java.lang.Object
org.springframework.webflow.engine.model.AbstractModel
org.springframework.webflow.engine.model.IfModel
All Implemented Interfaces:
Model

public class IfModel extends AbstractModel
Model support for if elements.

Defines a boolean expression to evaluate a target state to transition to if that expression evaluates to true. Optionally, this element may define an 'else' attribute to define a state to transition to if the expression evaluates to false.

Author:
Scott Andrews
  • Constructor Details

    • IfModel

      public IfModel(String test, String then)
      Create an if model
      Parameters:
      test - the boolean condition to test
      then - the state to transition to if the boolean expression evaluates to true
  • Method Details

    • isMergeableWith

      public boolean isMergeableWith(Model model)
      Description copied from interface: Model
      Determine if the model is able to be merged into the current model
      Parameters:
      model - the model to compare
      Returns:
      true if able to merge
    • merge

      public void merge(Model model)
      Description copied from interface: Model
      Merge the model into the current model
      Parameters:
      model - the model to merge with
    • createCopy

      public Model createCopy()
      Description copied from interface: Model
      Create a deep copy of this model. Needed when merging models and collections.
      Returns:
      a deep copy of this model
    • getTest

      public String getTest()
      Returns:
      the test
    • setTest

      public void setTest(String test)
      Parameters:
      test - the test to set
    • getThen

      public String getThen()
      Returns:
      the then
    • setThen

      public void setThen(String then)
      Parameters:
      then - the then to set
    • getElse

      public String getElse()
      Returns:
      the else
    • setElse

      public void setElse(String elze)
      Parameters:
      elze - the else to set