Java Doc for Forward.java in  » Library » Apache-beehive-1.0.2-src » org » apache » beehive » netui » pageflow » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Library » Apache beehive 1.0.2 src » org.apache.beehive.netui.pageflow 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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.


Field Summary
final public static  intRETURN_TO_ACTION
    
final public static  intRETURN_TO_CURRENT_PAGE
    
final public static  intRETURN_TO_NONE
    
final public static  intRETURN_TO_PAGE
    
final public static  intRETURN_TO_PREVIOUS_ACTION
    
final public static  intRETURN_TO_PREVIOUS_PAGE
    

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  voidaddActionOutput(String paramName, Object value)
     Adds an action output that will be made available in the request, through PageFlowUtils.getActionOutput .
final public  voidaddOutputForm(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  voidaddPageInput(String paramName, Object value)
     Adds an action output that will be made available in the request, through PageFlowUtils.getActionOutput .
public  voidaddQueryParam(String paramName, String value)
     Add a query parameter to the URI returned by Forward.getPath .
final public  voidaddQueryParam(String paramName)
     Add a query parameter with no value to the URI returned by Forward.getPath .
public  booleandoesResolve()
    
public  booleandoesRestoreQueryString()
     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  ActionForwardfindForward(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  booleanforwardsToPageFlow()
     Tell whether the URI returned by Forward.getPath is for a page flow.
public  MapgetActionOutputs()
     Get all action outputs that have been set on this Forward.
public  ActionFormgetFirstOutputForm(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  MapgetPageInputs()
     Get all action outputs that have been set on this Forward.
public  StringgetPath()
     Get the URI path associated with this object.
public  StringgetQueryString()
     Get the query string that will be appended to the URI returned by Forward.getPath .
public  intgetReturnToType()
     Get the type of return, if this is a return-to type.
public  StringgetReturnToTypeAsString()
     Get the type of return as a String, if this is a return-to type.
public  booleanhasExplicitRedirectValue()
     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  booleanhasRelativeToPath()
     Tell whether this Forward is relative to a particular directory path (as is the case when inheriting local paths from base classes).
public  voidinitialize(ActionMapping mapping, FlowController flowController)
     Set the current ActionMapping and associated FlowController.
public  voidinitialize(ActionMapping mapping, FlowController flowController, ServletRequest request)
     Set the current ActionMapping and associated FlowController.
public  voidinitializeRelativePath(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).
 booleanisExplicitPath()
    
public  booleanisExternalRedirect()
     Tell whether this is a redirect to a URI outside of the current web application.
public  booleanisNestedReturn()
     Tell whether returning this forward from an action method will cause a return from a nested PageFlowController .
public  booleanisRedirect()
     Tell whether the URI resolved by this Forward should be redirected to.
public  booleanisReturnToAction()
     Tell whether returning this forward from an action method will cause the previous action to be re-run.
public  booleanisReturnToPage()
     Tell whether returning this forward from an action method will cause a previous page to be displayed.
 voidreinitialize(FlowController fc)
    
public  voidsetAlternateModuleConfig(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  voidsetExternalRedirect(boolean externalRedirect)
     Specify that this is a redirect to a URI outside of the current web application.
public  voidsetPath(String contextRelativePath)
     Set the path to be returned by Forward.getPath .
public  voidsetQueryString(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  voidsetRedirect(boolean doRedirect)
     Set whether the URI resolved by this Forward should be redirected to.
public  voidsetRestoreQueryString(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.

Field Detail
RETURN_TO_ACTION
final public static int RETURN_TO_ACTION(Code)
Forward.RETURN_TO_PREVIOUS_ACTION



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_PAGE
final public static int RETURN_TO_PAGE(Code)
Forward.RETURN_TO_CURRENT_PAGEForward.RETURN_TO_PREVIOUS_PAGE



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)




Constructor Detail
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)(Code)
Constructs a Forward that returns the given URI for Forward.getPath . By default the Forward will cause server forward (not a browser redirect); to change this, use Forward.setRedirect .
Parameters:
  uri - the URI to return for Forward.getPath.



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.




Method Detail
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.



addPageInput
public void addPageInput(String paramName, Object value)(Code)
Adds an action output that will be made available in the request, through PageFlowUtils.getActionOutput . Forward.addActionOutput
Parameters:
  paramName - the name of the action output.
Parameters:
  value - the action output value.



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.



getOutputForms
final public ActionForm[] getOutputForms()(Code)
Get all form-beans attached to this forward through Forward.addOutputForm or Forward.Forward(String,Object) . an array of ActionForm instances that are attached to this forward.



getPageInputs
public Map getPageInputs()(Code)
Get all action outputs that have been set on this Forward. Forward.getActionOutputs a Map of name/value pairs representing all action outputs.
See Also:   Forward.addActionOutput



getPath
public String getPath()(Code)
Get the URI path associated with this object. Resolve it from the name of a forward ( org.apache.beehive.netui.pageflow.annotations.Jpf.Forward @Jpf.Forward ) if necessary. a String that is the URI path.
See Also:   Forward.Forward(String)
See Also:   Forward.Forward(String,Object)
See Also:   Forward.Forward(URI)
See Also:   Forward.Forward(URL)
See Also:   Forward.setPath



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.



getReturnToType
public int getReturnToType()(Code)
Get the type of return, if this is a return-to type. one of the following values: Forward.RETURN_TO_CURRENT_PAGE, Forward.RETURN_TO_PREVIOUS_PAGE,Forward.RETURN_TO_PAGE, Forward.RETURN_TO_PREVIOUS_ACTION, Forward.RETURN_TO_ACTION, orForward.RETURN_TO_NONE if this Forward is not a return-to type.
See Also:   Forward.isReturnToAction
See Also:   Forward.isReturnToPage



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 nullif 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)(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 . Forward.initialize(ActionMapping,FlowController,ServletRequest)
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.



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.



reinitialize
void reinitialize(FlowController fc)(Code)



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.



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.