Class MutableNavigationCase
- java.lang.Object
-
- jakarta.faces.application.NavigationCase
-
- com.sun.faces.flow.builder.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 Summary
Constructors Constructor Description MutableNavigationCase()MutableNavigationCase(String fromViewId, String fromAction, String fromOutcome, String condition, String toViewId, String toFlowDocumentId, boolean redirect, boolean includeViewParams)MutableNavigationCase(String fromViewId, String fromAction, String fromOutcome, String condition, String toViewId, String toFlowDocumentId, Map<String,List<String>> parameters, boolean redirect, boolean includeViewParams)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)BooleangetCondition(FacesContext context)Evaluates the<if>for this<navigation-case>, if any.StringgetFromAction()Return the<from-action>for this<navigation-case>StringgetFromOutcome()Return the<from-outcome>for this<navigation-case>StringgetFromViewId()Return the<from-view-id>of the<navigation-rule>inside which this<navigation-case>is nested.Map<String,List<String>>getParameters()Return the parameters to be included for navigation cases requiring a redirect.StringgetToFlowDocumentId()If this navigation case represents a flow invocation, this property is the documentId in which the flow whose id is given by the return fromNavigationCase.getFromOutcome()is defined.StringgetToViewId(FacesContext context)Evaluates the<to-view-id>for this<navigation-case>booleanhasCondition()Test if this navigation case has an associated<if>element.inthashCode()booleanisIncludeViewParams()Return the<redirect>value for this<navigation-case>.booleanisRedirect()Return the<redirect>value for this<navigation-case>.voidsetCondition(String condition)voidsetConditionExpression(jakarta.el.ValueExpression conditionExpression)voidsetFromAction(String fromAction)voidsetFromOutcome(String fromOutcome)voidsetFromViewId(String fromViewId)voidsetIncludeViewParams(boolean includeViewParams)voidsetRedirect(boolean redirect)voidsetToFlowDocumentId(String toFlowDocumentId)voidsetToViewId(String toViewId)StringtoString()-
Methods inherited from class jakarta.faces.application.NavigationCase
getActionURL, getBookmarkableURL, getRedirectURL, getResourceURL
-
-
-
-
Constructor Detail
-
MutableNavigationCase
public MutableNavigationCase()
-
MutableNavigationCase
public MutableNavigationCase(String fromViewId, String fromAction, String fromOutcome, String condition, String toViewId, String toFlowDocumentId, Map<String,List<String>> parameters, boolean redirect, boolean includeViewParams)
-
-
Method Detail
-
getFromViewId
public String getFromViewId()
Description copied from class:NavigationCaseReturn the
<from-view-id>of the<navigation-rule>inside which this<navigation-case>is nested.- Overrides:
getFromViewIdin classNavigationCase- Returns:
- the from viedId.
-
setFromViewId
public void setFromViewId(String fromViewId)
-
getFromAction
public String getFromAction()
Description copied from class:NavigationCaseReturn the
<from-action>for this<navigation-case>- Overrides:
getFromActionin classNavigationCase- Returns:
- the from action.
-
setFromAction
public void setFromAction(String fromAction)
-
getFromOutcome
public String getFromOutcome()
Description copied from class:NavigationCaseReturn the
<from-outcome>for this<navigation-case>- Overrides:
getFromOutcomein classNavigationCase- Returns:
- the from outcome.
-
setFromOutcome
public void setFromOutcome(String fromOutcome)
-
getToViewId
public String getToViewId(FacesContext context)
Description copied from class:NavigationCaseEvaluates the
<to-view-id>for this<navigation-case>- Overrides:
getToViewIdin classNavigationCase- Parameters:
context- theFacesContextfor the current request- Returns:
- the view ID that should be navigated to
-
setToViewId
public void setToViewId(String toViewId)
-
getToFlowDocumentId
public String getToFlowDocumentId()
Description copied from class:NavigationCaseIf 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:
getToFlowDocumentIdin classNavigationCase- Returns:
- the toFlow documentId.
-
setToFlowDocumentId
public void setToFlowDocumentId(String toFlowDocumentId)
-
hasCondition
public boolean hasCondition()
Description copied from class:NavigationCaseTest if this navigation case has an associated
<if>element.- Overrides:
hasConditionin classNavigationCase- Returns:
trueif there's an<if>element associated with this<navigation-case>, otherwisefalse
-
getCondition
public Boolean getCondition(FacesContext context)
Description copied from class:NavigationCaseEvaluates the
Note throws any exceptions encountered during the process of evaluating the expression or obtaining its value.<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 abooleanper the normal Jakarta Expression Language coercion rules.- Overrides:
getConditionin classNavigationCase- Parameters:
context- theFacesContextfor the current request- Returns:
nullif 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:NavigationCaseReturn the parameters to be included for navigation cases requiring a redirect. If no parameters are defined,
nullwill be returned. The keys in theMapare parameter names. For each key, the corresponding value is aListof unconverted values.- Overrides:
getParametersin classNavigationCase- Returns:
- the list of parameters, or
null
-
isRedirect
public boolean isRedirect()
Description copied from class:NavigationCaseReturn the
<redirect>value for this<navigation-case>. This will betrueif the new view should be navigated to via aExternalContext.redirect(String)- Overrides:
isRedirectin classNavigationCase- Returns:
trueif this is a redirect,falseotherwise.
-
setRedirect
public void setRedirect(boolean redirect)
-
isIncludeViewParams
public boolean isIncludeViewParams()
Description copied from class:NavigationCaseReturn the
<redirect>value for this<navigation-case>. This will betrueif the view parametets should be encoded into the redirect URL (only applies to redirect case)- Overrides:
isIncludeViewParamsin classNavigationCase- Returns:
trueif view parameters are to be included,falseotherwise.
-
setIncludeViewParams
public void setIncludeViewParams(boolean includeViewParams)
-
equals
public boolean equals(Object obj)
- Overrides:
equalsin classNavigationCase
-
hashCode
public int hashCode()
- Overrides:
hashCodein classNavigationCase
-
toString
public String toString()
- Overrides:
toStringin classNavigationCase
-
-