Class NavigationCaseWrapper
- All Implemented Interfaces:
FacesWrapper<NavigationCase>
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
-
Constructor Summary
ConstructorDescriptionDeprecated.Use the other constructor taking the implementation being wrapped.NavigationCaseWrapper
(NavigationCase wrapped) If this navigation case has been decorated, the implementation doing the decorating should push the implementation being wrapped to this constructor. -
Method Summary
Modifier and TypeMethodDescriptionboolean
getActionURL
(FacesContext context) Construct an absolute URL to thisNavigationCase
instance usingViewHandler.getActionURL(javax.faces.context.FacesContext, java.lang.String)
on the path portion of the url.getBookmarkableURL
(FacesContext context) Construct an absolute URL suitable for a bookmarkable link to thisNavigationCase
instance usingViewHandler.getBookmarkableURL(javax.faces.context.FacesContext, java.lang.String, java.util.Map<java.lang.String, java.util.List<java.lang.String>>, boolean)
on the path portion of the url.getCondition
(FacesContext context) Evaluates the<if>
for this<navigation-case>
, if any.Return the<from-action>
for this<navigation-case>
Return the<from-outcome>
for this<navigation-case>
Return the<from-view-id>
of the<navigation-rule>
inside which this<navigation-case>
is nested.Return the parameters to be included for navigation cases requiring a redirect.getRedirectURL
(FacesContext context) Construct an absolute URL suitable for a "redirect" to thisNavigationCase
instance usingViewHandler.getRedirectURL(javax.faces.context.FacesContext, java.lang.String, java.util.Map<java.lang.String, java.util.List<java.lang.String>>, boolean)
on the path portion of the url.getResourceURL
(FacesContext context) Construct an absolute URL to thisNavigationCase
instance usingViewHandler.getResourceURL(javax.faces.context.FacesContext, java.lang.String)
on the path portion of the url.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.getToViewId
(FacesContext context) Evaluates the<to-view-id>
for this<navigation-case>
A class that implements this interface uses this method to return an instance of the class being wrapped.boolean
Test if this navigation case has an associated<if>
element.int
hashCode()
boolean
Return the<redirect>
value for this<navigation-case>
.boolean
Return the<redirect>
value for this<navigation-case>
.toString()
-
Constructor Details
-
NavigationCaseWrapper
Deprecated.Use the other constructor taking the implementation being wrapped.
-
-
Method Details
-
getWrapped
Description copied from interface:FacesWrapper
A class that implements this interface uses this method to return an instance of the class being wrapped.
- Specified by:
getWrapped
in interfaceFacesWrapper<NavigationCase>
- Returns:
- the wrapped instance.
-
equals
- Overrides:
equals
in classNavigationCase
-
hashCode
public int hashCode()- Overrides:
hashCode
in classNavigationCase
-
toString
- Overrides:
toString
in classNavigationCase
-
getActionURL
Description copied from class:NavigationCase
Construct an absolute URL to this
NavigationCase
instance usingViewHandler.getActionURL(javax.faces.context.FacesContext, java.lang.String)
on the path portion of the url.- Overrides:
getActionURL
in classNavigationCase
- Parameters:
context
- theFacesContext
for the current request- Returns:
- the action URL.
- Throws:
MalformedURLException
- if the process of constructing the URL causes this exception to be thrown.
-
getBookmarkableURL
Description copied from class:NavigationCase
Construct an absolute URL suitable for a bookmarkable link to this
NavigationCase
instance usingViewHandler.getBookmarkableURL(javax.faces.context.FacesContext, java.lang.String, java.util.Map<java.lang.String, java.util.List<java.lang.String>>, boolean)
on the path portion of the url. This URL may include view parameters specified as metadata within the view.- Overrides:
getBookmarkableURL
in classNavigationCase
- Parameters:
context
- theFacesContext
for the current request- Returns:
- the bookmarkable URL.
- Throws:
MalformedURLException
- if the process of constructing the URL causes this exception to be thrown.
-
getCondition
Description copied from class:NavigationCase
Evaluates 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 aboolean
per the normal EL coercion rules.- Overrides:
getCondition
in classNavigationCase
- Parameters:
context
- theFacesContext
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
-
getFromAction
Description copied from class:NavigationCase
Return the
<from-action>
for this<navigation-case>
- Overrides:
getFromAction
in classNavigationCase
- Returns:
- the from action.
-
getFromOutcome
Description copied from class:NavigationCase
Return the
<from-outcome>
for this<navigation-case>
- Overrides:
getFromOutcome
in classNavigationCase
- Returns:
- the from outcome.
-
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 classNavigationCase
- Returns:
- the from viedId.
-
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 theMap
are parameter names. For each key, the corresponding value is aList
of unconverted values.- Overrides:
getParameters
in classNavigationCase
- Returns:
- the list of parameters, or
null
-
getRedirectURL
Description copied from class:NavigationCase
Construct an absolute URL suitable for a "redirect" to this
NavigationCase
instance usingViewHandler.getRedirectURL(javax.faces.context.FacesContext, java.lang.String, java.util.Map<java.lang.String, java.util.List<java.lang.String>>, boolean)
on the path portion of the url.- Overrides:
getRedirectURL
in classNavigationCase
- Parameters:
context
- theFacesContext
for the current request- Returns:
- the redirect URL.
- Throws:
MalformedURLException
- if the process of constructing the URL causes this exception to be thrown.
-
getResourceURL
Description copied from class:NavigationCase
Construct an absolute URL to this
NavigationCase
instance usingViewHandler.getResourceURL(javax.faces.context.FacesContext, java.lang.String)
on the path portion of the url.- Overrides:
getResourceURL
in classNavigationCase
- Parameters:
context
- theFacesContext
for the current request- Returns:
- the resource URL.
- Throws:
MalformedURLException
- if the process of constructing the URL causes this exception to be thrown.
-
getToViewId
Description copied from class:NavigationCase
Evaluates the
<to-view-id>
for this<navigation-case>
- Overrides:
getToViewId
in classNavigationCase
- Parameters:
context
- theFacesContext
for the current request- Returns:
- the view ID that should be navigated to
-
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 classNavigationCase
- Returns:
- the toFlow documentId.
-
hasCondition
public boolean hasCondition()Description copied from class:NavigationCase
Test if this navigation case has an associated
<if>
element.- Overrides:
hasCondition
in classNavigationCase
- Returns:
true
if there's an<if>
element associated with this<navigation-case>
, otherwisefalse
-
isIncludeViewParams
public boolean isIncludeViewParams()Description copied from class:NavigationCase
Return the
<redirect>
value for this<navigation-case>
. This will betrue
if the view parametets should be encoded into the redirect URL (only applies to redirect case)- Overrides:
isIncludeViewParams
in classNavigationCase
- Returns:
true
if view parameters are to be included,false
otherwise.
-
isRedirect
public boolean isRedirect()Description copied from class:NavigationCase
Return the
<redirect>
value for this<navigation-case>
. This will betrue
if the new view should be navigated to via aExternalContext.redirect(String)
- Overrides:
isRedirect
in classNavigationCase
- Returns:
true
if this is a redirect,false
otherwise.
-