Class SwitchCaseBuilder

java.lang.Object
jakarta.faces.flow.builder.SwitchCaseBuilder
Direct Known Subclasses:
SwitchCaseBuilderImpl

public abstract class SwitchCaseBuilder extends Object

Create a case in the current switch.

Since:
2.2
  • Constructor Details

    • SwitchCaseBuilder

      public SwitchCaseBuilder()
  • Method Details

    • switchCase

      public abstract SwitchCaseBuilder switchCase()

      Create a new case in the current switch.

      Returns:
      the builder instance
      Since:
      2.2
    • condition

      public abstract SwitchCaseBuilder condition(jakarta.el.ValueExpression expression)

      Set the if in the previously created switch case.

      Parameters:
      expression - the ValueExpression to be evaluated to see if this case is chosen.
      Returns:
      the builder instance
      Throws:
      NullPointerException - if any of the parameters are null
      Since:
      2.2
    • condition

      public abstract SwitchCaseBuilder condition(String expression)

      Set the if in the previously created switch case.

      Parameters:
      expression - the ValueExpression String to be evaluated to see if this case is chosen.
      Returns:
      the builder instance
      Throws:
      NullPointerException - if any of the parameters are null
      Since:
      2.2
    • fromOutcome

      public abstract SwitchCaseBuilder fromOutcome(String outcome)

      Set the outcome in the previously created switch case.

      Parameters:
      outcome - the outcome to be returned if the condition evaluates to true.
      Returns:
      the builder instance
      Throws:
      NullPointerException - if any of the parameters are null
      Since:
      2.2