Spring Web Flow

org.springframework.webflow.engine.model
Class AbstractModel

java.lang.Object
  extended by 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

public abstract class AbstractModel
extends java.lang.Object
implements Model

Contains basic merge functions that can be utilized by other models.

Author:
Scott Andrews

Constructor Summary
AbstractModel()
           
 
Method Summary
protected  Model copy(Model model)
           
protected
<T extends Model>
java.util.LinkedList<T>
copyList(java.util.LinkedList<T> list)
           
protected
<T extends Model>
java.util.LinkedList<T>
merge(java.util.LinkedList<T> child, java.util.LinkedList<T> parent)
          Merge two lists.
protected
<T extends Model>
java.util.LinkedList<T>
merge(java.util.LinkedList<T> child, java.util.LinkedList<T> parent, boolean addAtEnd)
          Merge two lists.
protected  Model merge(Model child, Model parent)
          Merge two model elements.
protected  java.lang.Object merge(java.lang.Object child, java.lang.Object parent)
          Merge two objects.
protected  java.lang.String merge(java.lang.String child, java.lang.String parent)
          Merge two strings.
 
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 Detail

AbstractModel

public AbstractModel()
Method Detail

merge

protected java.lang.Object merge(java.lang.Object child,
                                 java.lang.Object parent)
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 merge
parent - the parent object to merge
Returns:
the merged string

merge

protected java.lang.String merge(java.lang.String child,
                                 java.lang.String parent)
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 merge
parent - the parent string to merge
Returns:
the merged string

merge

protected Model merge(Model child,
                      Model parent)
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 merge
parent - the parent model element to merge
Returns:
the merged element model

merge

protected <T extends Model> java.util.LinkedList<T> merge(java.util.LinkedList<T> child,
                                                          java.util.LinkedList<T> parent)
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 merge
parent - the parent list to merge
Returns:
the merged list

merge

protected <T extends Model> java.util.LinkedList<T> merge(java.util.LinkedList<T> child,
                                                          java.util.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 merge
parent - the parent list to merge
addAtEnd - if true new items will be added at the end of the list, otherwise the beginning
Returns:
the merged list

copy

protected Model copy(Model model)

copyList

protected <T extends Model> java.util.LinkedList<T> copyList(java.util.LinkedList<T> list)

Spring Web Flow