| org.apache.beehive.netui.pageflow.Forward
All known Subclasses: org.apache.beehive.netui.pageflow.interceptor.action.InterceptorForward,
Forward | public class Forward extends ActionForward (Code) | | An object of this type is returned from an action methods in a
PageFlowController to
determine the next URI to be displayed. It is constructed on the name of a forward defined
by the @
org.apache.beehive.netui.pageflow.annotations.Jpf.Forward @Jpf.Forward annotation, and resolves to the URI
specified in that forward.
|
Constructor Summary | |
protected | Forward(Forward init) Construct based on an initializer Forward. | protected | Forward(HttpServletRequest request) Construct based on a given request. | public | Forward(String forwardName) Constructor which accepts the name of a forward defined by the
org.apache.beehive.netui.pageflow.annotations.Jpf.Forward @Jpf.Forward annotation. | public | Forward(String forwardName, Object outputFormBean) Constructor which accepts the name of a forward defined by the
org.apache.beehive.netui.pageflow.annotations.Jpf.Forward @Jpf.Forward annotation. | public | Forward(String forwardName, String actionOutputName, Object actionOutputValue) Constructor which accepts the name of a forward defined by the
org.apache.beehive.netui.pageflow.annotations.Jpf.Forward @Jpf.Forward annotation. | public | Forward(URI uri) Constructs a Forward that returns the given URI for
Forward.getPath . | public | Forward(URI uri, boolean doRedirect) Constructs a Forward that returns the given URI for
Forward.getPath . | protected | Forward(String path, boolean doRedirect) Construct based on the given webapp-relative path. | public | Forward(URL url) Constructs a Forward that returns the given URL for
Forward.getPath . | protected | Forward(ActionForward initFwd, ServletContext servletContext) Internal. |
Method Summary | |
public void | addActionOutput(String paramName, Object value) Adds an action output that will be made available in the request, through
PageFlowUtils.getActionOutput . | final public void | addOutputForm(Object formBean) Add a form bean that will be made available in the request (or user session, as
appropriate) if this Forward is returned by an action method in a
PageFlowController . | public void | addPageInput(String paramName, Object value) Adds an action output that will be made available in the request, through
PageFlowUtils.getActionOutput . | public void | addQueryParam(String paramName, String value) Add a query parameter to the URI returned by
Forward.getPath . | final public void | addQueryParam(String paramName) Add a query parameter with no value to the URI returned by
Forward.getPath . | public boolean | doesResolve() | public boolean | doesRestoreQueryString() Tell whether this Forward will restore the original query string on the page restored when a
org.apache.beehive.netui.pageflow.annotations.Jpf.Forward @Jpf.Forward ,
org.apache.beehive.netui.pageflow.annotations.Jpf.SimpleAction @Jpf.SimpleAction ,
or
org.apache.beehive.netui.pageflow.annotations.Jpf.ConditionalForward @Jpf.ConditionalForward with navigateTo=
org.apache.beehive.netui.pageflow.annotations.Jpf.NavigateTo.previousAction Jpf.NavigateTo.previousAction is used. | protected ActionForward | findForward(String forwardName) Resolves the forward with the given name, from the stored ActionMapping if possible, or
from the stored alternate ModuleConfig as a last resort.
Parameters: forwardName - the name of the forward to resolve. | public boolean | forwardsToPageFlow() Tell whether the URI returned by
Forward.getPath is for a page flow. | public Map | getActionOutputs() Get all action outputs that have been set on this Forward. | public ActionForm | getFirstOutputForm(HttpServletRequest request) Get the first output form bean that was added to this Forward. | final public ActionForm[] | getOutputForms() Get all form-beans attached to this forward through
Forward.addOutputForm or
Forward.Forward(String,Object) . | public Map | getPageInputs() Get all action outputs that have been set on this Forward. | public String | getPath() Get the URI path associated with this object. | public String | getQueryString() Get the query string that will be appended to the URI returned by
Forward.getPath . | public int | getReturnToType() Get the type of return, if this is a return-to type. | public String | getReturnToTypeAsString() Get the type of return as a String, if this is a return-to type. | public boolean | hasExplicitRedirectValue() Tell whether this Forward was configured explicitly (through
org.apache.beehive.netui.pageflow.annotations.Jpf.Forward.redirect @Jpf.Forward(redirect=...) ,
Forward.setRedirect , or
Forward.Forward(URI,boolean) ) to perform a redirect. | public boolean | hasRelativeToPath() Tell whether this Forward is relative to a particular directory path
(as is the case when inheriting local paths from base classes). | public void | initialize(ActionMapping mapping, FlowController flowController) Set the current ActionMapping and associated FlowController. | public void | initialize(ActionMapping mapping, FlowController flowController, ServletRequest request) Set the current ActionMapping and associated FlowController. | public void | initializeRelativePath(ServletRequest request, String relativeTo) If this is a local path, change it so it's relative to the given path prefix, and remember that we did it in
a flag (_outsidePageFlowDirectory). | boolean | isExplicitPath() | public boolean | isExternalRedirect() Tell whether this is a redirect to a URI outside of the current web application. | public boolean | isNestedReturn() Tell whether returning this forward from an action method will cause a return from
a nested
PageFlowController . | public boolean | isRedirect() Tell whether the URI resolved by this Forward should be redirected to. | public boolean | isReturnToAction() Tell whether returning this forward from an action method will cause the previous action
to be re-run. | public boolean | isReturnToPage() Tell whether returning this forward from an action method will cause a previous page
to be displayed. | void | reinitialize(FlowController fc) | public void | setAlternateModuleConfig(ModuleConfig mc) Set an alternate ModuleConfig from which to resolve forwards if they are not resolved
from the stored ActionMapping (and its stored ModuleConfig). | public void | setExternalRedirect(boolean externalRedirect) Specify that this is a redirect to a URI outside of the current web application. | public void | setPath(String contextRelativePath) Set the path to be returned by
Forward.getPath . | public void | setQueryString(String queryString) Set the query string that will be appended to the URI returned by
Forward.getPath .
Parameters: queryString - the query string that will be appended to the URI. | public void | setRedirect(boolean doRedirect) Set whether the URI resolved by this Forward should be redirected to. | public void | setRestoreQueryString(boolean doesRestoreQueryString) Set whether this Forward will restore the original query string query string on the page restored when a
org.apache.beehive.netui.pageflow.annotations.Jpf.Forward @Jpf.Forward ,
org.apache.beehive.netui.pageflow.annotations.Jpf.SimpleAction @Jpf.SimpleAction ,
or
org.apache.beehive.netui.pageflow.annotations.Jpf.ConditionalForward @Jpf.ConditionalForward with navigateTo=
org.apache.beehive.netui.pageflow.annotations.Jpf.NavigateTo.previousAction Jpf.NavigateTo.previousAction is used. |
RETURN_TO_CURRENT_PAGE | final public static int RETURN_TO_CURRENT_PAGE(Code) | | |
RETURN_TO_NONE | final public static int RETURN_TO_NONE(Code) | | |
RETURN_TO_PREVIOUS_ACTION | final public static int RETURN_TO_PREVIOUS_ACTION(Code) | | |
RETURN_TO_PREVIOUS_PAGE | final public static int RETURN_TO_PREVIOUS_PAGE(Code) | | |
Forward | protected Forward(Forward init)(Code) | | Construct based on an initializer Forward. This is a framework-invoked constructor that should not normally
be called directly.
|
Forward | protected Forward(HttpServletRequest request)(Code) | | Construct based on a given request. This is a framework-invoked constructor that should not normally
be called directly.
|
Forward | public Forward(String forwardName)(Code) | | Constructor which accepts the name of a forward defined by the
org.apache.beehive.netui.pageflow.annotations.Jpf.Forward @Jpf.Forward annotation. The values returned from
Forward.getPath ,
Forward.getRedirect and
Forward.contextRelative are resolved from this forward.
Parameters: forwardName - the name of the forward(org.apache.beehive.netui.pageflow.annotations.Jpf.Forward @Jpf.Forward) to resolve. |
Forward | public Forward(String forwardName, Object outputFormBean)(Code) | | Constructor which accepts the name of a forward defined by the
org.apache.beehive.netui.pageflow.annotations.Jpf.Forward @Jpf.Forward annotation. The values returned from
Forward.getPath ,
Forward.getRedirect and
Forward.contextRelative are resolved from this forward. Also accepts a form bean
to make available in the request (or user session, as appropriate).
Parameters: forwardName - the name of the forward(org.apache.beehive.netui.pageflow.annotations.Jpf.Forward @Jpf.Forward) to resolve. Parameters: outputFormBean - a form bean instance to make available in the request (or user session, as appropriate).See Forward.addOutputForm for details about how this manifests itself. |
Forward | public Forward(String forwardName, String actionOutputName, Object actionOutputValue)(Code) | | Constructor which accepts the name of a forward defined by the
org.apache.beehive.netui.pageflow.annotations.Jpf.Forward @Jpf.Forward annotation. The values returned from
Forward.getPath ,
Forward.getRedirect and
Forward.contextRelative are resolved from this forward. Also accepts a named action output
to make available in the request, through
PageFlowUtils.getActionOutput ..
Parameters: forwardName - the name of the forward(org.apache.beehive.netui.pageflow.annotations.Jpf.Forward @Jpf.Forward) to resolve. Parameters: actionOutputName - the name of a action output to make available in the request. Parameters: actionOutputValue - the action output object to make available in the request. |
Forward | public Forward(URI uri, boolean doRedirect)(Code) | | Constructs a Forward that returns the given URI for
Forward.getPath .
Parameters: uri - the URI to return for Forward.getPath. Parameters: doRedirect - set to true if this Forward should cause a browser redirect;false if it should cause a server forward. |
Forward | protected Forward(String path, boolean doRedirect)(Code) | | Construct based on the given webapp-relative path. This is a framework-invoked constructor that
should not normally be called directly.
|
Forward | public Forward(URL url)(Code) | | Constructs a Forward that returns the given URL for
Forward.getPath . Because the URL path
is absolute by nature, this Forward will cause a browser redirect.
Parameters: url - the URL to return for Forward.getPath. |
Forward | protected Forward(ActionForward initFwd, ServletContext servletContext)(Code) | | Internal. Initialize from an existing Struts ActionForward.
|
addActionOutput | public void addActionOutput(String paramName, Object value)(Code) | | Adds an action output that will be made available in the request, through
PageFlowUtils.getActionOutput .
Parameters: paramName - the name of the action output. Parameters: value - the action output value. |
addOutputForm | final public void addOutputForm(Object formBean)(Code) | | Add a form bean that will be made available in the request (or user session, as
appropriate) if this Forward is returned by an action method in a
PageFlowController .
Specifically, each form bean is stored as a request attribute with a name determined by
PageFlowUtils.getFormBeanName .
Parameters: formBean - the form bean instance to add. |
addQueryParam | public void addQueryParam(String paramName, String value)(Code) | | Add a query parameter to the URI returned by
Forward.getPath .
Parameters: paramName - the name of the query parameter. Parameters: value - the value of the query parameter, or null if there is no value. |
addQueryParam | final public void addQueryParam(String paramName)(Code) | | Add a query parameter with no value to the URI returned by
Forward.getPath .
Parameters: paramName - the name of the query parameter. |
doesResolve | public boolean doesResolve()(Code) | | Tell whether
Forward.getPath will be successful, i.e., whether one of the following two
conditions is met:
- the name around which this object was constructed resolves to a path defined
by a
org.apache.beehive.netui.pageflow.annotations.Jpf.Forward @Jpf.Forward , or
- this object was constructed around an explicit path, by
Forward.Forward(URI) or
Forward.Forward(URL) .
true if this forward does resolve to a URI path. |
doesRestoreQueryString | public boolean doesRestoreQueryString()(Code) | | Tell whether this Forward will restore the original query string on the page restored when a
org.apache.beehive.netui.pageflow.annotations.Jpf.Forward @Jpf.Forward ,
org.apache.beehive.netui.pageflow.annotations.Jpf.SimpleAction @Jpf.SimpleAction ,
or
org.apache.beehive.netui.pageflow.annotations.Jpf.ConditionalForward @Jpf.ConditionalForward with navigateTo=
org.apache.beehive.netui.pageflow.annotations.Jpf.NavigateTo.previousAction Jpf.NavigateTo.previousAction is used.
|
findForward | protected ActionForward findForward(String forwardName)(Code) | | Resolves the forward with the given name, from the stored ActionMapping if possible, or
from the stored alternate ModuleConfig as a last resort.
Parameters: forwardName - the name of the forward to resolve. the resolved ActionForward, or null if none is found. |
forwardsToPageFlow | public boolean forwardsToPageFlow()(Code) | | Tell whether the URI returned by
Forward.getPath is for a page flow.
true if the URI returned by Forward.getPath is for a page flow, i.e., if it ends in ".jpf". |
getActionOutputs | public Map getActionOutputs()(Code) | | Get all action outputs that have been set on this Forward.
a Map of name/value pairs representing all action outputs. See Also: Forward.addActionOutput |
getFirstOutputForm | public ActionForm getFirstOutputForm(HttpServletRequest request)(Code) | | Get the first output form bean that was added to this Forward.
|
getQueryString | public String getQueryString()(Code) | | Get the query string that will be appended to the URI returned by
Forward.getPath .
the query string that will be appended to the URI, or null if thereis no query string. |
getReturnToTypeAsString | public String getReturnToTypeAsString()(Code) | | Get the type of return as a String, if this is a return-to type.
one of the following values: currentPage , previousPage , page ,(deprecated), previousAction , action (deprecated), or null if this is not a return-to type. See Also: Forward.isReturnToAction See Also: Forward.isReturnToPage |
hasExplicitRedirectValue | public boolean hasExplicitRedirectValue()(Code) | | Tell whether this Forward was configured explicitly (through
org.apache.beehive.netui.pageflow.annotations.Jpf.Forward.redirect @Jpf.Forward(redirect=...) ,
Forward.setRedirect , or
Forward.Forward(URI,boolean) ) to perform a redirect. Otherwise, a redirect is
implied by a URI that does not resolve to the current server.
|
hasRelativeToPath | public boolean hasRelativeToPath()(Code) | | Tell whether this Forward is relative to a particular directory path
(as is the case when inheriting local paths from base classes). If
this is true, it implies the forward is an inherited global forward,
with a "relativeTo" path given in a <set-property>
in the forward config.
This is a framework-invoked method that should not normally be called
directly.
|
initialize | public void initialize(ActionMapping mapping, FlowController flowController, ServletRequest request)(Code) | | Set the current ActionMapping and associated FlowController. Normally, this method is called
by the framework, but you can use it to initialize the Forward object in order to call
Forward.getPath .
Parameters: mapping - the current ActionMapping; this can be obtained from FlowController.getMapping. Parameters: flowController - the object in which to look for referenced return-form members. |
initializeRelativePath | public void initializeRelativePath(ServletRequest request, String relativeTo)(Code) | | If this is a local path, change it so it's relative to the given path prefix, and remember that we did it in
a flag (_outsidePageFlowDirectory). This is a framework-invoked method that should not normally be called
directly.
|
isExplicitPath | boolean isExplicitPath()(Code) | | |
isExternalRedirect | public boolean isExternalRedirect()(Code) | | Tell whether this is a redirect to a URI outside of the current web application.
|
isNestedReturn | public boolean isNestedReturn()(Code) | | Tell whether returning this forward from an action method will cause a return from
a nested
PageFlowController .
true if this forward will cause a return from nesting. |
isRedirect | public boolean isRedirect()(Code) | | Tell whether the URI resolved by this Forward should be redirected to.
true if the controller will send a browser redirect to the URI forthis Forward; false if it will do a server forward to the URI. |
isReturnToAction | public boolean isReturnToAction()(Code) | | Tell whether returning this forward from an action method will cause the previous action
to be re-run.
true if returning this forward from an action method will cause theprevious action to be re-run, i.e., whether the URI returned by Forward.getPath will endin "previous-action-name.do". |
isReturnToPage | public boolean isReturnToPage()(Code) | | Tell whether returning this forward from an action method will cause a previous page
to be displayed.
true if returning this forward from an action method will causea previous page to be displayed. |
setAlternateModuleConfig | public void setAlternateModuleConfig(ModuleConfig mc)(Code) | | Set an alternate ModuleConfig from which to resolve forwards if they are not resolved
from the stored ActionMapping (and its stored ModuleConfig).
|
setExternalRedirect | public void setExternalRedirect(boolean externalRedirect)(Code) | | Specify that this is a redirect to a URI outside of the current web application.
|
setPath | public void setPath(String contextRelativePath)(Code) | | Set the path to be returned by
Forward.getPath . This overrides any path or forward name
set in a constructor.
Parameters: contextRelativePath - the path to be returned by Forward.getPath. |
setQueryString | public void setQueryString(String queryString)(Code) | | Set the query string that will be appended to the URI returned by
Forward.getPath .
Parameters: queryString - the query string that will be appended to the URI. If this string does notstart with '?' , then this character will be prepended; if the string isnull , the query string will be removed. |
setRedirect | public void setRedirect(boolean doRedirect)(Code) | | Set whether the URI resolved by this Forward should be redirected to.
Parameters: doRedirect - if true , the controller will send a browser redirect tothe URI for this Forward; otherwise, it will do a server forward tothe URI. |
setRestoreQueryString | public void setRestoreQueryString(boolean doesRestoreQueryString)(Code) | | Set whether this Forward will restore the original query string query string on the page restored when a
org.apache.beehive.netui.pageflow.annotations.Jpf.Forward @Jpf.Forward ,
org.apache.beehive.netui.pageflow.annotations.Jpf.SimpleAction @Jpf.SimpleAction ,
or
org.apache.beehive.netui.pageflow.annotations.Jpf.ConditionalForward @Jpf.ConditionalForward with navigateTo=
org.apache.beehive.netui.pageflow.annotations.Jpf.NavigateTo.previousAction Jpf.NavigateTo.previousAction is used.
|
|
|