|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ervacon.springframework.web.servlet.mvc.webflow.ParameterizableModelMapper
Simple model mapper that allows mappings to be configured in the Spring application context.
Exposed configuration properties:
| name | default | description |
| toMappingsList | empty | Mappings executed when mapping model data to the sub flow. The given list contains model entry names. The same name is used in both parent flow and sub flow model. |
| toMappingsMap | empty | Mappings executed when mapping model data to the sub flow. The keys in given list are the names of entries in the parent model that will be mapped. The value associated with a key is the name of the target entry in the sub flow model. |
| fromMappingsList | empty | Mappings executed when mapping model data from the sub flow. The given list contains model entry names. The same name is used in both parent flow and sub flow model. |
| fromMappingsMap | empty | Mappings executed when mapping model data from the sub flow. The keys in given list are the names of entries in the sub flow model that will be mapped. The value associated with a key is the name of the target entry in the parent model. |
The mappings defined using the above configuration properties fully support bean property access. So an entry name in a mapping can either be "beanName" or "beanName.propName". Nested property values are also supported ("beanName.propName.propName").
| Constructor Summary | |
ParameterizableModelMapper()
|
|
| Method Summary | |
protected org.springframework.beans.BeanWrapper |
createBeanWrapper(java.lang.Object obj)
Create a new bean wrapper wrapping given object. |
protected void |
map(java.util.Map from,
java.util.Map to,
java.util.Map mappings)
Map data from one map to another map using specified mappings. |
void |
mapFromSubFlow(java.util.Map parentFlowModel,
java.util.Map subFlowModel)
Map model data from the sub flow back to the parent flow. |
void |
mapToSubFlow(java.util.Map parentFlowModel,
java.util.Map subFlowModel)
Map model data from the parent flow to the sub flow. |
void |
setFromMappingsList(java.util.List fromMappingsList)
Set the mappings that will be executed when mapping model data from the sub flow. |
void |
setFromMappingsMap(java.util.Map fromMappings)
Set the mappings that will be executed when mapping model data from the sub flow. |
void |
setToMappingsList(java.util.List toMappingsList)
Set the mappings that will be executed when mapping model data to the sub flow. |
void |
setToMappingsMap(java.util.Map toMappings)
Set the mappings that will be executed when mapping model data to the sub flow. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ParameterizableModelMapper()
| Method Detail |
public void setToMappingsList(java.util.List toMappingsList)
Set the mappings that will be executed when mapping model data to the sub flow. All keys in given list will be mapped.
public void setToMappingsMap(java.util.Map toMappings)
Set the mappings that will be executed when mapping model data to the sub flow. The keys are the names in the parent flow model, the corresponding values are the names in the sub flow model.
public void setFromMappingsList(java.util.List fromMappingsList)
Set the mappings that will be executed when mapping model data from the sub flow. All keys in given list will be mapped.
public void setFromMappingsMap(java.util.Map fromMappings)
Set the mappings that will be executed when mapping model data from the sub flow. The keys are the names in the sub flow model, the corresponding values are the names in the parent flow model.
public void mapToSubFlow(java.util.Map parentFlowModel,
java.util.Map subFlowModel)
ModelMapperMap model data from the parent flow to the sub flow. This is called before the sub flow is started.
mapToSubFlow in interface ModelMapperparentFlowModel - parent flow modelsubFlowModel - sub flow model
public void mapFromSubFlow(java.util.Map parentFlowModel,
java.util.Map subFlowModel)
ModelMapperMap model data from the sub flow back to the parent flow. This is called after the sub flow completes and before the parent flow continues.
mapFromSubFlow in interface ModelMapperparentFlowModel - parent flow modelsubFlowModel - sub flow model
protected void map(java.util.Map from,
java.util.Map to,
java.util.Map mappings)
Map data from one map to another map using specified mappings.
protected org.springframework.beans.BeanWrapper createBeanWrapper(java.lang.Object obj)
Create a new bean wrapper wrapping given object. Can be redefined in subclasses in case special property editors need to be registered or when other similar tuning is required.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||