public class MutableNavigationCase
extends javax.faces.application.NavigationCase
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.
Constructor and Description |
---|
MutableNavigationCase() |
MutableNavigationCase(String fromViewId,
String fromAction,
String fromOutcome,
String condition,
String toViewId,
String toFlowDocumentId,
boolean redirect,
boolean includeViewParams) |
MutableNavigationCase(String fromViewId,
String fromAction,
String fromOutcome,
String condition,
String toViewId,
String toFlowDocumentId,
Map<String,List<String>> parameters,
boolean redirect,
boolean includeViewParams) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Boolean |
getCondition(javax.faces.context.FacesContext context)
Evaluates the
|
String |
getFromAction()
Return the |
String |
getFromOutcome()
Return the |
String |
getFromViewId()
Return the
|
Map<String,List<String>> |
getParameters()
Return the parameters to be included for navigation cases requiring a redirect. |
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 |
String |
getToViewId(javax.faces.context.FacesContext context)
Evaluates the |
boolean |
hasCondition()
Test if this navigation case has an
associated |
int |
hashCode() |
boolean |
isIncludeViewParams()
Return the
|
boolean |
isRedirect()
Return the
|
void |
setCondition(String condition) |
void |
setConditionExpression(javax.el.ValueExpression conditionExpression) |
void |
setFromAction(String fromAction) |
void |
setFromOutcome(String fromOutcome) |
void |
setFromViewId(String fromViewId) |
void |
setIncludeViewParams(boolean includeViewParams) |
void |
setRedirect(boolean redirect) |
void |
setToFlowDocumentId(String toFlowDocumentId) |
void |
setToViewId(String toViewId) |
String |
toString() |
public MutableNavigationCase()
public MutableNavigationCase(String fromViewId, String fromAction, String fromOutcome, String condition, String toViewId, String toFlowDocumentId, Map<String,List<String>> parameters, boolean redirect, boolean includeViewParams)
public String getFromViewId()
javax.faces.application.NavigationCase
Return the
<from-view-id>
of the
<navigation-rule>
inside which this
<navigation-case>
is nested.
getFromViewId
in class javax.faces.application.NavigationCase
public void setFromViewId(String fromViewId)
public String getFromAction()
javax.faces.application.NavigationCase
Return the <from-action>
for this <navigation-case>
getFromAction
in class javax.faces.application.NavigationCase
public void setFromAction(String fromAction)
public String getFromOutcome()
javax.faces.application.NavigationCase
Return the <from-outcome>
for this <navigation-case>
getFromOutcome
in class javax.faces.application.NavigationCase
public void setFromOutcome(String fromOutcome)
public String getToViewId(javax.faces.context.FacesContext context)
javax.faces.application.NavigationCase
Evaluates the <to-view-id>
for this <navigation-case>
getToViewId
in class javax.faces.application.NavigationCase
context
- the FacesContext
for the current requestpublic void setToViewId(String toViewId)
public String getToFlowDocumentId()
javax.faces.application.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 javax.faces.application.NavigationCase
public void setToFlowDocumentId(String toFlowDocumentId)
public boolean hasCondition()
javax.faces.application.NavigationCase
Test if this navigation case has an
associated <if>
element.
hasCondition
in class javax.faces.application.NavigationCase
true
if there's an <if>
element associated with this <navigation-case>
,
otherwise false
public Boolean getCondition(javax.faces.context.FacesContext context)
javax.faces.application.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 javax.faces.application.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 void setCondition(String condition)
public void setConditionExpression(javax.el.ValueExpression conditionExpression)
public Map<String,List<String>> getParameters()
javax.faces.application.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 javax.faces.application.NavigationCase
null
public boolean isRedirect()
javax.faces.application.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 javax.faces.application.NavigationCase
true
if this is a redirect, false
otherwise.public void setRedirect(boolean redirect)
public boolean isIncludeViewParams()
javax.faces.application.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 javax.faces.application.NavigationCase
true
if view parameters are to be included, false
otherwise.public void setIncludeViewParams(boolean includeViewParams)
public boolean equals(Object obj)
equals
in class javax.faces.application.NavigationCase
public int hashCode()
hashCode
in class javax.faces.application.NavigationCase
public String toString()
toString
in class javax.faces.application.NavigationCase
Copyright © 2010–2019 JBoss by Red Hat. All rights reserved.