public abstract class NavigationCaseWrapper extends NavigationCase implements 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.
Constructor and Description |
---|
NavigationCaseWrapper()
Deprecated.
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. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
java.net.URL |
getActionURL(FacesContext context)
Construct an absolute URL to this
|
java.net.URL |
getBookmarkableURL(FacesContext context)
Construct an absolute URL suitable for a
bookmarkable link to this |
java.lang.Boolean |
getCondition(FacesContext context)
Evaluates the
|
java.lang.String |
getFromAction()
Return the |
java.lang.String |
getFromOutcome()
Return the |
java.lang.String |
getFromViewId()
Return the
|
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getParameters()
Return the parameters to be included for navigation cases requiring a redirect. |
java.net.URL |
getRedirectURL(FacesContext context)
Construct an absolute URL suitable for a
"redirect" to this |
java.net.URL |
getResourceURL(FacesContext context)
Construct an absolute URL to this
|
java.lang.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 |
java.lang.String |
getToViewId(FacesContext context)
Evaluates the |
NavigationCase |
getWrapped()
A class that implements this interface uses this method to return an instance of the class being wrapped. |
boolean |
hasCondition()
Test if this navigation case has an
associated |
int |
hashCode() |
boolean |
isIncludeViewParams()
Return the
|
boolean |
isRedirect()
Return the
|
java.lang.String |
toString() |
@Deprecated public NavigationCaseWrapper()
public NavigationCaseWrapper(NavigationCase wrapped)
If this navigation case has been decorated,
the implementation doing the decorating should push the implementation being wrapped to this constructor.
The getWrapped()
will then return the implementation being wrapped.
wrapped
- The implementation being wrapped.public NavigationCase getWrapped()
FacesWrapper
A class that implements this interface uses this method to return an instance of the class being wrapped.
getWrapped
in interface FacesWrapper<NavigationCase>
public boolean equals(java.lang.Object o)
equals
in class NavigationCase
public int hashCode()
hashCode
in class NavigationCase
public java.lang.String toString()
toString
in class NavigationCase
public java.net.URL getActionURL(FacesContext context) throws java.net.MalformedURLException
NavigationCase
Construct an absolute URL to this
NavigationCase
instance using ViewHandler.getActionURL(javax.faces.context.FacesContext, java.lang.String)
on the path
portion of the url.
getActionURL
in class NavigationCase
context
- the FacesContext
for the current requestjava.net.MalformedURLException
- if the process of constructing the
URL causes this exception to be thrown.public java.net.URL getBookmarkableURL(FacesContext context) throws java.net.MalformedURLException
NavigationCase
Construct an absolute URL suitable for a
bookmarkable link to this NavigationCase
instance using ViewHandler.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.
getBookmarkableURL
in class NavigationCase
context
- the FacesContext
for the current requestjava.net.MalformedURLException
- if the process of constructing the
URL causes this exception to be thrown.public java.lang.Boolean getCondition(FacesContext context)
NavigationCase
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.
getCondition
in class NavigationCase
context
- the FacesContext
for the current requestnull
if there is no <if>
element
associated with this <navigation-case>
, otherwise
return the evaluation result of the conditionpublic java.lang.String getFromAction()
NavigationCase
Return the <from-action>
for this <navigation-case>
getFromAction
in class NavigationCase
public java.lang.String getFromOutcome()
NavigationCase
Return the <from-outcome>
for this <navigation-case>
getFromOutcome
in class NavigationCase
public java.lang.String getFromViewId()
NavigationCase
Return the
<from-view-id>
of the
<navigation-rule>
inside which this
<navigation-case>
is nested.
getFromViewId
in class NavigationCase
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getParameters()
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 the
Map
are parameter names. For each key, the
corresponding value is a List
of unconverted
values.
getParameters
in class NavigationCase
null
public java.net.URL getRedirectURL(FacesContext context) throws java.net.MalformedURLException
NavigationCase
Construct an absolute URL suitable for a
"redirect" to this NavigationCase
instance using ViewHandler.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.
getRedirectURL
in class NavigationCase
context
- the FacesContext
for the current requestjava.net.MalformedURLException
- if the process of constructing the
URL causes this exception to be thrown.public java.net.URL getResourceURL(FacesContext context) throws java.net.MalformedURLException
NavigationCase
Construct an absolute URL to this
NavigationCase
instance using ViewHandler.getResourceURL(javax.faces.context.FacesContext, java.lang.String)
on the path
portion of the url.
getResourceURL
in class NavigationCase
context
- the FacesContext
for the current requestjava.net.MalformedURLException
- if the process of constructing the
URL causes this exception to be thrown.public java.lang.String getToViewId(FacesContext context)
NavigationCase
Evaluates the <to-view-id>
for this <navigation-case>
getToViewId
in class NavigationCase
context
- the FacesContext
for the current requestpublic java.lang.String getToFlowDocumentId()
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.
getToFlowDocumentId
in class NavigationCase
public boolean hasCondition()
NavigationCase
Test if this navigation case has an
associated <if>
element.
hasCondition
in class NavigationCase
true
if there's an <if>
element associated with this <navigation-case>
,
otherwise false
public boolean isIncludeViewParams()
NavigationCase
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)
isIncludeViewParams
in class NavigationCase
true
if view parameters are to be included, false
otherwise.public boolean isRedirect()
NavigationCase
Return the
<redirect>
value for this
<navigation-case>
. This will be
true
if the new view should be navigated to via a
ExternalContext.redirect(String)
isRedirect
in class NavigationCase
true
if this is a redirect, false
otherwise.Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms