Class AbstractModel
java.lang.Object
org.springframework.webflow.engine.model.AbstractModel
- All Implemented Interfaces:
Model
- Direct Known Subclasses:
AbstractActionModel
,AbstractMappingModel
,AbstractStateModel
,AttributeModel
,BeanImportModel
,BinderModel
,BindingModel
,ExceptionHandlerModel
,FlowModel
,IfModel
,PersistenceContextModel
,SecuredModel
,TransitionModel
,VarModel
Contains basic merge functions that can be utilized by other models.
- Author:
- Scott Andrews
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Model
protected <T extends Model>
LinkedList<T>copyList
(LinkedList<T> list) protected Object
Merge two objects.protected String
Merge two strings.protected <T extends Model>
LinkedList<T>merge
(LinkedList<T> child, LinkedList<T> parent) Merge two lists.protected <T extends Model>
LinkedList<T>merge
(LinkedList<T> child, LinkedList<T> parent, boolean addAtEnd) Merge two lists.protected Model
Merge two model elements.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.webflow.engine.model.Model
createCopy, isMergeableWith, merge
-
Constructor Details
-
AbstractModel
public AbstractModel()
-
-
Method Details
-
merge
Merge two objects. If the child is null, the parent will be returned. Else the child will be returned.- Parameters:
child
- the child object to mergeparent
- the parent object to merge- Returns:
- the merged string
-
merge
Merge two strings. If the child is null, the parent will be returned. Else the child will be returned.- Parameters:
child
- the child string to mergeparent
- the parent string to merge- Returns:
- the merged string
-
merge
Merge two model elements. If the child is null, the parent will be returned. Else the parent element will be merged into the child element with the result returned- Parameters:
child
- the child model element to mergeparent
- the parent model element to merge- Returns:
- the merged element model
-
merge
Merge two lists. All child element will be in the merged list. All parent elements not in the child list will be added. Mergeable elements in both lists will be merged according to that element merge rules. New items are added to the end of the list- Parameters:
child
- the child list to mergeparent
- the parent list to merge- Returns:
- the merged list
-
merge
protected <T extends Model> LinkedList<T> merge(LinkedList<T> child, LinkedList<T> parent, boolean addAtEnd) Merge two lists. All child element will be in the merged list. All parent elements not in the child list will be added. Mergeable elements in both lists will be merged according to that element merge rules.- Parameters:
child
- the child list to mergeparent
- the parent list to mergeaddAtEnd
- if true new items will be added at the end of the list, otherwise the beginning- Returns:
- the merged list
-
copy
-
copyList
-