Top Description Fields Constructors Methods
jakarta.faces.application

public abstract Class NavigationCaseWrapper

extends NavigationCase
implements FacesWrapper<NavigationCase>
Class Inheritance
All Implemented Interfaces
jakarta.faces.FacesWrapper
Imports
java.net.MalformedURLException, .URL, java.util.List, .Map, jakarta.faces.FacesWrapper, jakarta.faces.context.FacesContext

Provides a simple implementation of NavigationCase that can be subclassed by developers wishing to provide specialized behavior to an existing NavigationCase instance. The default implementation of all methods is to call through to the wrapped NavigationCase instance.

Usage: extend this class and push the implementation being wrapped to the constructor and use getWrapped to access the instance being wrapped.

Since
2.2

Field Summary

Modifier and TypeField and Description
private final NavigationCase

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 jakarta.faces.application.NavigationCase.equals.

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

public URL
getActionURL(FacesContext
the FacesContext for the current request
context
)

Overrides jakarta.faces.application.NavigationCase.getActionURL.

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

public URL
getBookmarkableURL(FacesContext
the FacesContext for the current request
context
)

Overrides jakarta.faces.application.NavigationCase.getBookmarkableURL.

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

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 URL
getRedirectURL(FacesContext
the FacesContext for the current request
context
)

Overrides jakarta.faces.application.NavigationCase.getRedirectURL.

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

public URL
getResourceURL(FacesContext
the FacesContext for the current request
context
)

Overrides jakarta.faces.application.NavigationCase.getResourceURL.

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

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 NavigationCase
getWrapped()

Implements jakarta.faces.FacesWrapper.getWrapped.

A class that implements this interface uses this method to return an instance of the class being wrapped.

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 String
toString()

Overrides jakarta.faces.application.NavigationCase.toString.

Returns a string representation of the object.

Field Detail

wrappedback to summary
private final NavigationCase wrapped

Constructor Detail

Method Detail

equalsback to summary
public boolean equals(Object o)

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

Overrides jakarta.faces.application.NavigationCase.getActionURL.

Doc from jakarta.faces.application.NavigationCase.getActionURL.

Construct an absolute URL to this NavigationCase instance using jakarta.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.

Annotations
@Override
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

Overrides jakarta.faces.application.NavigationCase.getBookmarkableURL.

Doc from jakarta.faces.application.NavigationCase.getBookmarkableURL.

Construct an absolute URL suitable for a bookmarkable link to this NavigationCase instance using jakarta.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.

Annotations
@Override
Exceptions
MalformedURLException:
if the process of constructing the URL causes this exception to be thrown.
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
getRedirectURLback to summary
public URL getRedirectURL(FacesContext context) throws MalformedURLException

Overrides jakarta.faces.application.NavigationCase.getRedirectURL.

Doc from jakarta.faces.application.NavigationCase.getRedirectURL.

Construct an absolute URL suitable for a "redirect" to this NavigationCase instance using jakarta.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.

Annotations
@Override
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

Overrides jakarta.faces.application.NavigationCase.getResourceURL.

Doc from jakarta.faces.application.NavigationCase.getResourceURL.

Construct an absolute URL to this NavigationCase instance using jakarta.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.

Annotations
@Override
Exceptions
MalformedURLException:
if the process of constructing the URL causes this exception to be thrown.
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
getWrappedback to summary
public NavigationCase getWrapped()

Implements jakarta.faces.FacesWrapper.getWrapped.

Doc from jakarta.faces.FacesWrapper.getWrapped.

A class that implements this interface uses this method to return an instance of the class being wrapped.

Returns:NavigationCase

the wrapped instance.

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