Top Description Fields Constructors Methods
javax.faces.application

public Class NavigationCase

extends Object
Class Inheritance
Known Direct Subclasses
javax.faces.application.NavigationCaseWrapper
Imports
java.net.MalformedURLException, .URL, java.util.Map, .List, javax.el.ValueExpression, .ExpressionFactory, javax.faces.context.ExternalContext, .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 final String
private ValueExpression
private final String
private final String
private final String
private int
private final boolean
private final Map<String, List<String>>
private final boolean
private final String
private String
private final String
private ValueExpression

Constructor Summary

AccessConstructor and Description

Method Summary

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

Overrides java.lang.Object.equals.

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

Returns:

the action URL.
getActionURL
(FacesContext
the FacesContext for the current request
context
)

Construct an absolute URL to this NavigationCase instance using javax.faces.application.ViewHandler#getActionURL on the path portion of the url.

public URL

Returns:

the bookmarkable URL.
getBookmarkableURL
(FacesContext
the FacesContext for the current request
context
)

Construct an absolute URL suitable for a bookmarkable link to this NavigationCase instance using javax.faces.application.ViewHandler#getBookmarkableURL on the path portion of the url.

public Boolean

Returns:

null if there is no <if> element associated with this <navigation-case>, otherwise return the evaluation result of the condition
getCondition
(FacesContext
the FacesContext for the current request
context
)

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

public String

Returns:

the from action.
getFromAction
()

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

public String

Returns:

the from outcome.
getFromOutcome
()

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

public String

Returns:

the from viedId.
getFromViewId
()

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

public Map<String, List<String>>

Returns:

the list of parameters, or null
getParameters
()

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

public URL

Returns:

the redirect URL.
getRedirectURL
(FacesContext
the FacesContext for the current request
context
)

Construct an absolute URL suitable for a "redirect" to this NavigationCase instance using javax.faces.application.ViewHandler#getRedirectURL on the path portion of the url.

public URL

Returns:

the resource URL.
getResourceURL
(FacesContext
the FacesContext for the current request
context
)

Construct an absolute URL to this NavigationCase instance using javax.faces.application.ViewHandler#getResourceURL on the path portion of the url.

public String

Returns:

the toFlow documentId.
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

Returns:

the view ID that should be navigated to
getToViewId
(FacesContext
the FacesContext for the current request
context
)

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

public boolean

Returns:

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

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

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for the object.
public boolean

Returns:

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

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

public boolean

Returns:

true if this is a redirect, false otherwise.
isRedirect
()

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

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

conditionback to summary
private final String condition
conditionExprback to summary
private ValueExpression conditionExpr
fromActionback to summary
private final String fromAction
fromOutcomeback to summary
private final String fromOutcome
fromViewIdback to summary
private final String fromViewId
hashCodeback to summary
private int hashCode
includeViewParamsback to summary
private final boolean includeViewParams
parametersback to summary
private final Map<String, List<String>> parameters
redirectback to summary
private final boolean redirect
toFlowDocumentIdback to summary
private final String toFlowDocumentId
toStringback to summary
private String toString
toViewIdback to summary
private final String toViewId
toViewIdExprback to summary
private ValueExpression toViewIdExpr

Constructor Detail

Method Detail

equalsback to summary
public boolean equals(Object o)

Overrides java.lang.Object.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
o: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
getActionURLback to summary
public URL getActionURL(FacesContext context) throws MalformedURLException

Construct an absolute URL to this NavigationCase instance using javax.faces.application.ViewHandler#getActionURL on the path portion of the url.

Parameters
context:FacesContext

the FacesContext for the current request

Returns:URL

the action URL.

Exceptions
MalformedURLException:
if the process of constructing the URL causes this exception to be thrown.
getBookmarkableURLback to summary
public URL getBookmarkableURL(FacesContext context) throws MalformedURLException

Construct an absolute URL suitable for a bookmarkable link to this NavigationCase instance using javax.faces.application.ViewHandler#getBookmarkableURL on the path portion of the url. This URL may include view parameters specified as metadata within the view.

Parameters
context:FacesContext

the FacesContext for the current request

Returns:URL

the bookmarkable URL.

Exceptions
MalformedURLException:
if the process of constructing the URL causes this exception to be thrown.
getConditionback to summary
public Boolean getCondition(FacesContext context)

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

getFromActionback to summary
public String getFromAction()

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

Returns:String

the from action.

getFromOutcomeback to summary
public String getFromOutcome()

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

Returns:String

the from outcome.

getFromViewIdback to summary
public String getFromViewId()

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

Returns:String

the from viedId.

getParametersback to summary
public Map<String, List<String>> 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

getRedirectURLback to summary
public URL getRedirectURL(FacesContext context) throws MalformedURLException

Construct an absolute URL suitable for a "redirect" to this NavigationCase instance using javax.faces.application.ViewHandler#getRedirectURL on the path portion of the url.

Parameters
context:FacesContext

the FacesContext for the current request

Returns:URL

the redirect URL.

Exceptions
MalformedURLException:
if the process of constructing the URL causes this exception to be thrown.
getResourceURLback to summary
public URL getResourceURL(FacesContext context) throws MalformedURLException

Construct an absolute URL to this NavigationCase instance using javax.faces.application.ViewHandler#getResourceURL on the path portion of the url.

Parameters
context:FacesContext

the FacesContext for the current request

Returns:URL

the resource URL.

Exceptions
MalformedURLException:
if the process of constructing the URL causes this exception to be thrown.
getToFlowDocumentIdback to summary
public String 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.

Since
2.2
getToViewIdback to summary
public String getToViewId(FacesContext context)

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

hasConditionback to summary
public boolean 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

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for the 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()

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.

isRedirectback to summary
public boolean isRedirect()

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

Returns:boolean

true if this is a redirect, false otherwise.

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override