public class FieldConversionFactory extends Object implements FieldConverter, org.springframework.beans.factory.InitializingBean
FieldConverter
encapsulating all the other FieldConverter
s, thus providing the ability to convert
any FieldType
.FieldConverter.DatafieldOwner, FieldConverter.FieldDefOwner
Constructor and Description |
---|
FieldConversionFactory() |
FieldConversionFactory(ExpressionEvaluator expressionEvaluator) |
Modifier and Type | Method and Description |
---|---|
Datafield |
addField(FieldConverter.DatafieldOwner dataFieldOwner,
FieldWrapper fieldWrapper)
Creates a
Datafield and add it to the given FieldConverter.DatafieldOwner , using
FieldWrapper.getStringValue() for the Datafield 's value. |
void |
afterPropertiesSet() |
org.springframework.core.convert.ConversionService |
getConversionService() |
Environment |
getEnvironment() |
org.springframework.context.MessageSource |
getMessageSource() |
void |
reset(FieldWrapper field) |
void |
setConversionService(org.springframework.core.convert.ConversionService conversionService) |
void |
setEnvironment(Environment environment) |
void |
setMessageSource(org.springframework.context.MessageSource messageSource) |
void |
setObject(FieldWrapper field,
RequestContainer request)
Sets the
Object for the given FieldWrapper , using the given RequestContainer as the
parameter source. |
void |
setString(FieldWrapper field)
Transforms the property identified by
FieldWrapper.getBinding() to it's String representation,
which is used as an argument for Datafield.setValue(String) in
FieldConverter.addField(DatafieldOwner, FieldWrapper) . |
public FieldConversionFactory()
public FieldConversionFactory(ExpressionEvaluator expressionEvaluator)
public void reset(FieldWrapper field)
reset
in interface FieldConverter
public Datafield addField(FieldConverter.DatafieldOwner dataFieldOwner, FieldWrapper fieldWrapper)
FieldConverter
Datafield
and add it to the given FieldConverter.DatafieldOwner
, using
FieldWrapper.getStringValue()
for the Datafield
's value.addField
in interface FieldConverter
dataFieldOwner
- the FieldWrapper
fieldWrapper
- the FieldWrapper
Datafield
which has been added, if anypublic void setString(FieldWrapper field)
FieldConverter
FieldWrapper.getBinding()
to it's String
representation,
which is used as an argument for Datafield.setValue(String)
in
FieldConverter.addField(DatafieldOwner, FieldWrapper)
.setString
in interface FieldConverter
field
- the FieldWrapper
FieldWrapper.setStringValue(String)
public void setObject(FieldWrapper field, RequestContainer request)
FieldConverter
Object
for the given FieldWrapper
, using the given RequestContainer
as the
parameter source.setObject
in interface FieldConverter
field
- the FieldWrapper
request
- the RequestContainer
FieldWrapper.setObject(Object)
public void afterPropertiesSet()
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
public Environment getEnvironment()
public void setEnvironment(Environment environment)
public org.springframework.core.convert.ConversionService getConversionService()
public void setConversionService(org.springframework.core.convert.ConversionService conversionService)
public org.springframework.context.MessageSource getMessageSource()
public void setMessageSource(org.springframework.context.MessageSource messageSource)
Copyright © 2011–2020 aiticon GmbH. All rights reserved.