Class MutableNavigationCase


  • public class MutableNavigationCase
    extends NavigationCase

    NavigationCase represents a <navigation-case> in the navigation rule base, as well as the <from-view-id> with which this <navigation-case> is a sibling.

    Since:
    2.0
    • Constructor Detail

      • MutableNavigationCase

        public MutableNavigationCase()
      • MutableNavigationCase

        public MutableNavigationCase​(String fromViewId,
                                     String fromAction,
                                     String fromOutcome,
                                     String condition,
                                     String toViewId,
                                     String toFlowDocumentId,
                                     boolean redirect,
                                     boolean includeViewParams)
    • Method Detail

      • getFromViewId

        public String getFromViewId()
        Description copied from class: NavigationCase

        Return the <from-view-id> of the <navigation-rule> inside which this <navigation-case> is nested.

        Overrides:
        getFromViewId in class NavigationCase
        Returns:
        the from viedId.
      • setFromViewId

        public void setFromViewId​(String fromViewId)
      • setFromAction

        public void setFromAction​(String fromAction)
      • setFromOutcome

        public void setFromOutcome​(String fromOutcome)
      • setToViewId

        public void setToViewId​(String toViewId)
      • getToFlowDocumentId

        public String getToFlowDocumentId()
        Description copied from class: NavigationCase

        If this navigation case represents a flow invocation, this property is the documentId in which the flow whose id is given by the return from NavigationCase.getFromOutcome() is defined. Implementations must override this method to return the value defined in the corresponding application configuration resources element. The base implementation returns the empty string.

        Overrides:
        getToFlowDocumentId in class NavigationCase
        Returns:
        the toFlow documentId.
      • setToFlowDocumentId

        public void setToFlowDocumentId​(String toFlowDocumentId)
      • hasCondition

        public boolean hasCondition()
        Description copied from class: NavigationCase

        Test if this navigation case has an associated <if> element.

        Overrides:
        hasCondition in class NavigationCase
        Returns:
        true if there's an <if> element associated with this <navigation-case>, otherwise false
      • getCondition

        public Boolean getCondition​(FacesContext context)
        Description copied from class: NavigationCase

        Evaluates the <if> for this <navigation-case>, if any. The expression to be evaluated is passed into the constructor as a string. When the expression is evaluated, its value must be coerced into a boolean per the normal Jakarta Expression Language coercion rules.

        Note throws any exceptions encountered during the process of evaluating the expression or obtaining its value.
        Overrides:
        getCondition in class NavigationCase
        Parameters:
        context - the FacesContext for the current request
        Returns:
        null if there is no <if> element associated with this <navigation-case>, otherwise return the evaluation result of the condition
      • setCondition

        public void setCondition​(String condition)
      • setConditionExpression

        public void setConditionExpression​(jakarta.el.ValueExpression conditionExpression)
      • getParameters

        public Map<String,​List<String>> getParameters()
        Description copied from class: NavigationCase

        Return the parameters to be included for navigation cases requiring a redirect. If no parameters are defined, null will be returned. The keys in the Map are parameter names. For each key, the corresponding value is a List of unconverted values.

        Overrides:
        getParameters in class NavigationCase
        Returns:
        the list of parameters, or null
      • setRedirect

        public void setRedirect​(boolean redirect)
      • isIncludeViewParams

        public boolean isIncludeViewParams()
        Description copied from class: NavigationCase

        Return the <redirect> value for this <navigation-case>. This will be true if the view parametets should be encoded into the redirect URL (only applies to redirect case)

        Overrides:
        isIncludeViewParams in class NavigationCase
        Returns:
        true if view parameters are to be included, false otherwise.
      • setIncludeViewParams

        public void setIncludeViewParams​(boolean includeViewParams)