Java Doc for SharedFlowController.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) 


java.lang.Object
   org.apache.beehive.netui.pageflow.PageFlowManagedObject
      org.apache.beehive.netui.pageflow.FlowController
         org.apache.beehive.netui.pageflow.SharedFlowController

All known Subclasses:   org.apache.beehive.netui.pageflow.GlobalApp,
SharedFlowController
abstract public class SharedFlowController extends FlowController implements PageFlowConstants(Code)

Base "shared flow" class for controller logic, exception handlers, and state that can be shared by any number of page flows. A shared flow is not a page flow; it is used by page flows, but never becomes the "current page flow" (see PageFlowController for information on page flows and the "current page flow"). The class is configured through the org.apache.beehive.netui.pageflow.annotations.Jpf.Controller @Jpf.Controller annotation.

A shared flow comes into existance in one of two ways:

  • A page flow is hit, and the page flow refers to the shared flow in its org.apache.beehive.netui.pageflow.annotations.Jpf.Controller.sharedFlowRefs sharedFlowRefs annotation attribute, or
  • Any page flow is hit, and the <default-shared-flow-refs> element in /WEB-INF/beehive-netui-config.xml declares that this shared flow will be used by all page flows in the web application.
When a shared flow is created, it is stored in the user session. It is only removed through a call to SharedFlowController.remove or through a call to PageFlowUtils.removeSharedFlow .

Shared flow actions are defined with action methods or action annotations that determine the next URI to be displayed, after optionally performing arbitrary logic. A page or page flow can raise a shared flow action using the pattern "shared-flow-name.action-name". The shared flow name is the one chosen by the page flow in org.apache.beehive.netui.pageflow.annotations.Jpf.SharedFlowRef.name name on org.apache.beehive.netui.pageflow.annotations.Jpf.SharedFlowRef @Jpf.SharedFlowRef .

A referenced shared flow gets the chance to handle any uncaught page flow exception. It declares its exception handling through org.apache.beehive.netui.pageflow.annotations.Jpf.Controller.catches catches on org.apache.beehive.netui.pageflow.annotations.Jpf.Controller @Jpf.Controller .

Properties in the current shared flow instance can be accessed from JSP 2.0-style expressions like this one: ${sharedFlow.sharedFlowName.someProperty}.

There may only be one shared flow in any package.


See Also:   PageFlowController




Method Summary
public  voidensureFailover(HttpServletRequest request)
     Ensures that any changes to this object will be replicated in a cluster (for failover), even if the replication scheme uses a change-detection algorithm that relies on HttpSession.setAttribute to be aware of changes.
public  StringgetDisplayName()
     Get the display name.
public  StringgetModulePath()
     Get the Struts module path for actions in this shared flow.
public  PreviousPageInfogetPreviousPageInfoLegacy(PageFlowController curJpf, HttpServletRequest request)
     Get a legacy PreviousPageInfo.
public  StringgetURI()
     Get the URI.
public  voidpersistInSession(HttpServletRequest request, HttpServletResponse response)
     Store this object in the user session, in the appropriate place.
public synchronized  voidremoveFromSession(HttpServletRequest request)
     Remove this instance from the session.
 voidsavePreviousActionInfo(ActionForm form, HttpServletRequest request, ActionMapping mapping, ServletContext servletContext)
     Store information about the most recent action invocation.
public  voidsavePreviousPageInfo(ActionForward forward, ActionForm form, ActionMapping mapping, HttpServletRequest request, ServletContext servletContext, boolean isSpecialForward)
     Store information about recent pages displayed.



Method Detail
ensureFailover
public void ensureFailover(HttpServletRequest request)(Code)
Ensures that any changes to this object will be replicated in a cluster (for failover), even if the replication scheme uses a change-detection algorithm that relies on HttpSession.setAttribute to be aware of changes. Note that this method is used by the framework and does not need to be called explicitly in most cases.
Parameters:
  request - the current HttpServletRequest



getDisplayName
public String getDisplayName()(Code)
Get the display name. The display name for a shared flow is simply the class name. the name of the shared flow class.



getModulePath
public String getModulePath()(Code)
Get the Struts module path for actions in this shared flow. the Struts module path for actions in this shared flow.



getPreviousPageInfoLegacy
public PreviousPageInfo getPreviousPageInfoLegacy(PageFlowController curJpf, HttpServletRequest request)(Code)
Get a legacy PreviousPageInfo.



getURI
public String getURI()(Code)
Get the URI. null, as this object is not URL-addressible.



persistInSession
public void persistInSession(HttpServletRequest request, HttpServletResponse response)(Code)
Store this object in the user session, in the appropriate place. Used by the framework; normally should not be called directly.



removeFromSession
public synchronized void removeFromSession(HttpServletRequest request)(Code)
Remove this instance from the session. When inside a shared flow action, SharedFlowController.remove may be called instead.



savePreviousActionInfo
void savePreviousActionInfo(ActionForm form, HttpServletRequest request, ActionMapping mapping, ServletContext servletContext)(Code)
Store information about the most recent action invocation. This is a framework-invoked method that should not normally be called directly



savePreviousPageInfo
public void savePreviousPageInfo(ActionForward forward, ActionForm form, ActionMapping mapping, HttpServletRequest request, ServletContext servletContext, boolean isSpecialForward)(Code)
Store information about recent pages displayed. This is a framework-invoked method that should not normally be called directly.



Fields inherited from org.apache.beehive.netui.pageflow.FlowController
protected static Locale defaultLocale(Code)(Java Doc)

Methods inherited from org.apache.beehive.netui.pageflow.FlowController
protected void addActionError(String propertyName, String messageKey, Object[] messageArgs)(Code)(Java Doc)
protected void addActionErrorExpression(String propertyName, String expression, Object[] messageArgs)(Code)(Java Doc)
protected void addValidationError(String propertyName, String messageKey, Object[] messageArgs)(Code)(Java Doc)
protected void addValidationError(String propertyName, String messageKey)(Code)(Java Doc)
protected synchronized void afterAction() throws Exception(Code)(Java Doc)
protected boolean alwaysTrackPreviousAction()(Code)(Java Doc)
protected boolean alwaysTrackPreviousPage()(Code)(Java Doc)
protected synchronized void beforeAction() throws Exception(Code)(Java Doc)
public synchronized void create(HttpServletRequest request, HttpServletResponse response, ServletContext servletContext)(Code)(Java Doc)
NotLoggedInException createNotLoggedInException(String actionName, HttpServletRequest request)(Code)(Java Doc)
void decrementRequestCount(HttpServletRequest request)(Code)(Java Doc)
void destroy(HttpSession session)(Code)(Java Doc)
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception(Code)(Java Doc)
ActionForward forwardTo(ActionForward fwd, ActionMapping mapping, PageFlowExceptionConfig exceptionConfig, String actionName, ModuleConfig altModuleConfig, ActionForm form, HttpServletRequest request, HttpServletResponse response, ServletContext servletContext)(Code)(Java Doc)
protected String generateToken(HttpServletRequest request)(Code)(Java Doc)
protected String generateToken()(Code)(Java Doc)
final protected ActionMapping getActionMapping()(Code)(Java Doc)
protected Method getActionMethod(String methodName, Class argType)(Code)(Java Doc)
ActionForward getActionMethodForward(String actionName, Object inputForm, HttpServletRequest request, HttpServletResponse response, ActionMapping mapping) throws Exception(Code)(Java Doc)
public MutableURI getActionURI(String actionName) throws URISyntaxException(Code)(Java Doc)
protected String[] getActions()(Code)(Java Doc)
protected String getCurrentActionName()(Code)(Java Doc)
protected DataSource getDataSource(HttpServletRequest request)(Code)(Java Doc)
protected DataSource getDataSource(HttpServletRequest request, String key)(Code)(Java Doc)
protected static Locale getDefaultLocale()(Code)(Java Doc)
public ActionForm getFormBean(ActionMapping mapping)(Code)(Java Doc)
FlowControllerHandlerContext getHandlerContext()(Code)(Java Doc)
protected Locale getLocale(HttpServletRequest request)(Code)(Java Doc)
protected Locale getLocale()(Code)(Java Doc)
final protected ActionMapping getMapping()(Code)(Java Doc)
protected MessageResources getMessageResources()(Code)(Java Doc)
protected MessageResources getMessageResources(String key)(Code)(Java Doc)
final protected ModuleConfig getModuleConfig()(Code)(Java Doc)
public ModuleConfig getModuleConfig(ServletContext servletContext, HttpServletRequest request)(Code)(Java Doc)
abstract public String getModulePath()(Code)(Java Doc)
abstract public PreviousPageInfo getPreviousPageInfoLegacy(PageFlowController curJpf, HttpServletRequest request)(Code)(Java Doc)
final protected HttpServletRequest getRequest()(Code)(Java Doc)
PageFlowRequestProcessor getRequestProcessor()(Code)(Java Doc)
protected MessageResources getResources()(Code)(Java Doc)
protected MessageResources getResources(HttpServletRequest request)(Code)(Java Doc)
protected MessageResources getResources(HttpServletRequest request, String key)(Code)(Java Doc)
final protected HttpServletResponse getResponse()(Code)(Java Doc)
public String getRewrittenActionURI(String actionName, Map parameters, boolean asValidXml) throws URISyntaxException(Code)(Java Doc)
protected ActionServlet getServlet()(Code)(Java Doc)
final protected HttpSession getSession()(Code)(Java Doc)
public Principal getUserPrincipal()(Code)(Java Doc)
public synchronized ActionForward handleException(Throwable ex, ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException(Code)(Java Doc)
boolean incrementRequestCount(HttpServletRequest request, HttpServletResponse response, ServletContext servletContext) throws IOException(Code)(Java Doc)
protected ActionForward internalExecute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception(Code)(Java Doc)
protected ActionForward invokeActionMethod(Method method, Object arg) throws Exception(Code)(Java Doc)
ActionForward invokeActionMethod(Method method, Object arg, HttpServletRequest request, ActionMapping mapping) throws Exception(Code)(Java Doc)
public synchronized ActionForward invokeExceptionHandler(Method method, Throwable ex, String message, ActionForm wrappedFormBean, PageFlowExceptionConfig exceptionConfig, ActionMapping actionMapping, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException(Code)(Java Doc)
public boolean isAction(String name)(Code)(Java Doc)
protected boolean isCancelled(HttpServletRequest request)(Code)(Java Doc)
public boolean isPageFlow()(Code)(Java Doc)
protected boolean isTokenValid(HttpServletRequest request)(Code)(Java Doc)
protected boolean isTokenValid()(Code)(Java Doc)
protected boolean isTokenValid(HttpServletRequest request, boolean reset)(Code)(Java Doc)
protected boolean isTokenValid(boolean reset)(Code)(Java Doc)
public boolean isUserInRole(String roleName)(Code)(Java Doc)
public void login(String username, String password) throws LoginException(Code)(Java Doc)
public void logout(boolean invalidateSessions)(Code)(Java Doc)
public static ActionResult lookup(String actionName, ServletContext context, HttpServletRequest request, HttpServletResponse response) throws Exception(Code)(Java Doc)
public static ActionResult lookup(String actionName, ServletContext context, HttpServletRequest request, HttpServletResponse response, String actionServletClassName) throws Exception(Code)(Java Doc)
protected void onCreate() throws Exception(Code)(Java Doc)
protected void onDestroy()(Code)(Java Doc)
protected void onDestroy(HttpSession session)(Code)(Java Doc)
protected void onRefresh()(Code)(Java Doc)
final public synchronized void refresh(HttpServletRequest request, HttpServletResponse response)(Code)(Java Doc)
public void reinitialize(HttpServletRequest request, HttpServletResponse response, ServletContext servletContext)(Code)(Java Doc)
protected void remove()(Code)(Java Doc)
protected void resetToken(HttpServletRequest request)(Code)(Java Doc)
protected void resetToken()(Code)(Java Doc)
public String resolveAction(String actionName, Object form, HttpServletRequest request, HttpServletResponse response) throws Exception(Code)(Java Doc)
public String resolveAction(String actionName, Object form) throws Exception(Code)(Java Doc)
public static Locale retrieveUserLocale(HttpServletRequest request, String locale)(Code)(Java Doc)
protected void saveActionErrors(ActionMessages errors)(Code)(Java Doc)
protected void saveErrors(HttpServletRequest request, ActionMessages errors)(Code)(Java Doc)
protected void saveMessages(HttpServletRequest request, ActionMessages messages)(Code)(Java Doc)
void savePreviousActionInfo(ActionForm form, HttpServletRequest request, ActionMapping mapping, ServletContext servletContext)(Code)(Java Doc)
public void savePreviousPageInfo(ActionForward forward, ActionForm form, ActionMapping mapping, HttpServletRequest request, ServletContext servletContext, boolean isSpecialForward)(Code)(Java Doc)
protected void saveToken(HttpServletRequest request)(Code)(Java Doc)
protected void sendError(String errText, HttpServletResponse response) throws IOException(Code)(Java Doc)
protected void sendError(String errText, HttpServletRequest request, HttpServletResponse response) throws IOException(Code)(Java Doc)
protected void setLocale(HttpServletRequest request, Locale locale)(Code)(Java Doc)
protected void setLocale(Locale locale)(Code)(Java Doc)
PerRequestState setPerRequestState(PerRequestState state)(Code)(Java Doc)
final public ModuleConfig theModuleConfig()(Code)(Java Doc)

Methods inherited from org.apache.beehive.netui.pageflow.PageFlowManagedObject
public synchronized void create(HttpServletRequest request, HttpServletResponse response, ServletContext servletContext) throws Exception(Code)(Java Doc)
void destroy(HttpSession session)(Code)(Java Doc)
abstract public void ensureFailover(HttpServletRequest request)(Code)(Java Doc)
protected boolean fieldIsUninitialized(Field field)(Code)(Java Doc)
public long getCreateTime()(Code)(Java Doc)
abstract public String getDisplayName()(Code)(Java Doc)
protected ServletContext getServletContext()(Code)(Java Doc)
protected void initializeField(Field field, Object instance)(Code)(Java Doc)
boolean isDestroyed()(Code)(Java Doc)
protected void onCreate() throws Exception(Code)(Java Doc)
protected void onDestroy(HttpSession session)(Code)(Java Doc)
abstract public void persistInSession(HttpServletRequest request, HttpServletResponse response)(Code)(Java Doc)
public void reinitialize(HttpServletRequest request, HttpServletResponse response, ServletContext servletContext)(Code)(Java Doc)
void reinitializeIfNecessary(HttpServletRequest request, HttpServletResponse response, ServletContext servletContext)(Code)(Java Doc)
abstract public void removeFromSession(HttpServletRequest request)(Code)(Java Doc)
public void valueBound(HttpSessionBindingEvent event)(Code)(Java Doc)
public void valueUnbound(HttpSessionBindingEvent event)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

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