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

public abstract class AbstractModel extends Object implements Model
Contains basic merge functions that can be utilized by other models.
Author:
Scott Andrews
  • Constructor Details

    • AbstractModel

      public AbstractModel()
  • Method Details

    • merge

      protected Object merge(Object child, 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 String merge(String child, 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> LinkedList<T> merge(LinkedList<T> child, 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> 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 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> LinkedList<T> copyList(LinkedList<T> list)