Top Description Fields Constructors Methods
com.sun.faces.flow.builder

public Class MutableNavigationCase

extends NavigationCase
Class Inheritance
Imports
java.util.Collections, .List, .Map, java.util.concurrent.ConcurrentHashMap, jakarta.el.ExpressionFactory, .ValueExpression, jakarta.faces.application.NavigationCase, jakarta.faces.context.FacesContext

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

Field Summary

Modifier and TypeField and Description
private String
private ValueExpression
private String
private String
private String
private int
private boolean
private Map<String, List<String>>
private boolean
private String
private String
private String
private ValueExpression

Constructor Summary

AccessConstructor and Description
public
public
MutableNavigationCase(String fromViewId, String fromAction, String fromOutcome, String condition, String toViewId, String toFlowDocumentId, Map<String, List<String>> parameters, boolean redirect, boolean includeViewParams)

public
MutableNavigationCase(String fromViewId, String fromAction, String fromOutcome, String condition, String toViewId, String toFlowDocumentId, boolean redirect, boolean includeViewParams)

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(Object
the reference object with which to compare.
obj
)

Overrides jakarta.faces.application.NavigationCase.equals.

Indicates whether some other object is "equal to" this one.

public Boolean
getCondition(FacesContext
the FacesContext for the current request
context
)

Overrides jakarta.faces.application.NavigationCase.getCondition.

Evaluates the <if> for this <navigation-case>, if any.

public String
getFromAction()

Overrides jakarta.faces.application.NavigationCase.getFromAction.

Return the <from-action> for this <navigation-case>

public String
getFromOutcome()

Overrides jakarta.faces.application.NavigationCase.getFromOutcome.

Return the <from-outcome> for this <navigation-case>

public String
getFromViewId()

Overrides jakarta.faces.application.NavigationCase.getFromViewId.

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

public Map<String, List<String>>
getParameters()

Overrides jakarta.faces.application.NavigationCase.getParameters.

Return the parameters to be included for navigation cases requiring a redirect.

public String
getToFlowDocumentId()

Overrides jakarta.faces.application.NavigationCase.getToFlowDocumentId.

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 getFromOutcome() is defined.

public String
getToViewId(FacesContext
the FacesContext for the current request
context
)

Overrides jakarta.faces.application.NavigationCase.getToViewId.

Evaluates the <to-view-id> for this <navigation-case>

public boolean
hasCondition()

Overrides jakarta.faces.application.NavigationCase.hasCondition.

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

public int
hashCode()

Overrides jakarta.faces.application.NavigationCase.hashCode.

Returns a hash code value for this object.

public boolean
isIncludeViewParams()

Overrides jakarta.faces.application.NavigationCase.isIncludeViewParams.

Return the <redirect> value for this <navigation-case>.

public boolean
isRedirect()

Overrides jakarta.faces.application.NavigationCase.isRedirect.

Return the <redirect> value for this <navigation-case>.

public void
setCondition(String condition)

public void
public void
setFromAction(String fromAction)

public void
setFromOutcome(String fromOutcome)

public void
setFromViewId(String fromViewId)

public void
setIncludeViewParams(boolean includeViewParams)

public void
setRedirect(boolean redirect)

public void
setToFlowDocumentId(String toFlowDocumentId)

public void
setToViewId(String toViewId)

public String
toString()

Overrides jakarta.faces.application.NavigationCase.toString.

Returns a string representation of the object.

Inherited from jakarta.faces.application.NavigationCase:
getActionURLgetBookmarkableURLgetRedirectURLgetResourceURL

Field Detail

conditionback to summary
private String condition

Hides jakarta.faces.application.NavigationCase.condition.

conditionExprback to summary
private ValueExpression conditionExpr

Hides jakarta.faces.application.NavigationCase.conditionExpr.

fromActionback to summary
private String fromAction

Hides jakarta.faces.application.NavigationCase.fromAction.

fromOutcomeback to summary
private String fromOutcome

Hides jakarta.faces.application.NavigationCase.fromOutcome.

fromViewIdback to summary
private String fromViewId

Hides jakarta.faces.application.NavigationCase.fromViewId.

hashCodeback to summary
private int hashCode

Hides jakarta.faces.application.NavigationCase.hashCode.

includeViewParamsback to summary
private boolean includeViewParams

Hides jakarta.faces.application.NavigationCase.includeViewParams.

parametersback to summary
private Map<String, List<String>> parameters

Hides jakarta.faces.application.NavigationCase.parameters.

redirectback to summary
private boolean redirect

Hides jakarta.faces.application.NavigationCase.redirect.

toFlowDocumentIdback to summary
private String toFlowDocumentId

Hides jakarta.faces.application.NavigationCase.toFlowDocumentId.

toStringback to summary
private String toString

Hides jakarta.faces.application.NavigationCase.toString.

toViewIdback to summary
private String toViewId

Hides jakarta.faces.application.NavigationCase.toViewId.

toViewIdExprback to summary
private ValueExpression toViewIdExpr

Hides jakarta.faces.application.NavigationCase.toViewIdExpr.

Constructor Detail

MutableNavigationCaseback to summary
public MutableNavigationCase()
MutableNavigationCaseback to summary
public MutableNavigationCase(String fromViewId, String fromAction, String fromOutcome, String condition, String toViewId, String toFlowDocumentId, Map<String, List<String>> parameters, boolean redirect, boolean includeViewParams)
MutableNavigationCaseback to summary
public MutableNavigationCase(String fromViewId, String fromAction, String fromOutcome, String condition, String toViewId, String toFlowDocumentId, boolean redirect, boolean includeViewParams)

Method Detail

equalsback to summary
public boolean equals(Object obj)

Overrides jakarta.faces.application.NavigationCase.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
obj:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
getConditionback to summary
public Boolean getCondition(FacesContext context)

Overrides jakarta.faces.application.NavigationCase.getCondition.

Doc from jakarta.faces.application.NavigationCase.getCondition.

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.
Parameters
context:FacesContext

the FacesContext for the current request

Returns:Boolean

null if there is no <if> element associated with this <navigation-case>, otherwise return the evaluation result of the condition

Annotations
@Override
getFromActionback to summary
public String getFromAction()

Overrides jakarta.faces.application.NavigationCase.getFromAction.

Doc from jakarta.faces.application.NavigationCase.getFromAction.

Return the <from-action> for this <navigation-case>

Returns:String

the from action.

Annotations
@Override
getFromOutcomeback to summary
public String getFromOutcome()

Overrides jakarta.faces.application.NavigationCase.getFromOutcome.

Doc from jakarta.faces.application.NavigationCase.getFromOutcome.

Return the <from-outcome> for this <navigation-case>

Returns:String

the from outcome.

Annotations
@Override
getFromViewIdback to summary
public String getFromViewId()

Overrides jakarta.faces.application.NavigationCase.getFromViewId.

Doc from jakarta.faces.application.NavigationCase.getFromViewId.

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

Returns:String

the from viedId.

Annotations
@Override
getParametersback to summary
public Map<String, List<String>> getParameters()

Overrides jakarta.faces.application.NavigationCase.getParameters.

Doc from jakarta.faces.application.NavigationCase.getParameters.

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.

Returns:Map<String, List<String>>

the list of parameters, or null

Annotations
@Override
getToFlowDocumentIdback to summary
public String getToFlowDocumentId()

Overrides jakarta.faces.application.NavigationCase.getToFlowDocumentId.

Doc from jakarta.faces.application.NavigationCase.getToFlowDocumentId.

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 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.

Returns:String

the toFlow documentId.

Annotations
@Override
getToViewIdback to summary
public String getToViewId(FacesContext context)

Overrides jakarta.faces.application.NavigationCase.getToViewId.

Doc from jakarta.faces.application.NavigationCase.getToViewId.

Evaluates the <to-view-id> for this <navigation-case>

Parameters
context:FacesContext

the FacesContext for the current request

Returns:String

the view ID that should be navigated to

Annotations
@Override
hasConditionback to summary
public boolean hasCondition()

Overrides jakarta.faces.application.NavigationCase.hasCondition.

Doc from jakarta.faces.application.NavigationCase.hasCondition.

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

Returns:boolean

true if there's an <if> element associated with this <navigation-case>, otherwise false

Annotations
@Override
hashCodeback to summary
public int hashCode()

Overrides jakarta.faces.application.NavigationCase.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object

Annotations
@Override
isIncludeViewParamsback to summary
public boolean isIncludeViewParams()

Overrides jakarta.faces.application.NavigationCase.isIncludeViewParams.

Doc from jakarta.faces.application.NavigationCase.isIncludeViewParams.

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)

Returns:boolean

true if view parameters are to be included, false otherwise.

Annotations
@Override
isRedirectback to summary
public boolean isRedirect()

Overrides jakarta.faces.application.NavigationCase.isRedirect.

Doc from jakarta.faces.application.NavigationCase.isRedirect.

Return the <redirect> value for this <navigation-case>. This will be true if the new view should be navigated to via a jakarta.faces.context.ExternalContext#redirect(String)

Returns:boolean

true if this is a redirect, false otherwise.

Annotations
@Override
setConditionback to summary
public void setCondition(String condition)
setConditionExpressionback to summary
public void setConditionExpression(ValueExpression conditionExpression)
setFromActionback to summary
public void setFromAction(String fromAction)
setFromOutcomeback to summary
public void setFromOutcome(String fromOutcome)
setFromViewIdback to summary
public void setFromViewId(String fromViewId)
setIncludeViewParamsback to summary
public void setIncludeViewParams(boolean includeViewParams)
setRedirectback to summary
public void setRedirect(boolean redirect)
setToFlowDocumentIdback to summary
public void setToFlowDocumentId(String toFlowDocumentId)
setToViewIdback to summary
public void setToViewId(String toViewId)
toStringback to summary
public String toString()

Overrides jakarta.faces.application.NavigationCase.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override