Java Doc for Jsr168Dispatcher.java in  » Web-Framework » struts-2.0.11 » org » apache » struts2 » portlet » dispatcher » 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 » Web Framework » struts 2.0.11 » org.apache.struts2.portlet.dispatcher 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher

Jsr168Dispatcher
public class Jsr168Dispatcher extends GenericPortlet implements StrutsStatics,PortletActionConstants(Code)

Struts JSR-168 portlet dispatcher. Similar to the WW2 Servlet dispatcher, but adjusted to a portal environment. The portlet is configured through the portlet.xml descriptor. Examples and descriptions follow below:


author:
   Nils-Helge Garli
author:
   Rainer Hermanns
author:
  

Init parameters


author:
  
author:
  
author:
  
author:
  
author:
  
author:
  
author:
  
author:
  
author:
  
author:
  
author:
  
author:
  
author:
  
author:
  
author:
  
author:
  
author:
  
author:
  
author:
  
author:
  
author:
  
author:
  
author:
  
author:
  
author:
  
author:
  
author:
  
author:
  
author:
  
NameDescriptionDefault value
portletNamespaceThe namespace for the portlet in the xwork configuration. This
author:
   namespace is prepended to all action lookups, and makes it possible to host multiple
author:
   portlets in the same portlet application. If this parameter is set, the complete namespace
author:
   will be /portletNamespace/modeNamespace/actionName
The default namespace
viewNamespaceBase namespace in the xwork configuration for the view portlet
author:
   mode
The default namespace
editNamespaceBase namespace in the xwork configuration for the edit portlet
author:
   mode
The default namespace
helpNamespaceBase namespace in the xwork configuration for the help portlet
author:
   mode
The default namespace
defaultViewActionDefault action to invoke in the view portlet mode if no action is
author:
   specified
default
defaultEditActionDefault action to invoke in the edit portlet mode if no action is
author:
   specified
default
defaultHelpActionDefault action to invoke in the help portlet mode if no action is
author:
   specified
default

author:
  
author:
  

Example:


author:
  

author:
  
author:
   <init-param>
author:
   <!-- The view mode namespace. Maps to a namespace in the xwork config file -->
author:
   <name>viewNamespace</name>
author:
   <value>/view</value>
author:
   </init-param>
author:
   <init-param>
author:
   <!-- The default action to invoke in view mode -->
author:
   <name>defaultViewAction</name>
author:
   <value>index</value>
author:
   </init-param>
author:
   <init-param>
author:
   <!-- The view mode namespace. Maps to a namespace in the xwork config file -->
author:
   <name>editNamespace</name>
author:
   <value>/edit</value>
author:
   </init-param>
author:
   <init-param>
author:
   <!-- The default action to invoke in view mode -->
author:
   <name>defaultEditAction</name>
author:
   <value>index</value>
author:
   </init-param>
author:
   <init-param>
author:
   <!-- The view mode namespace. Maps to a namespace in the xwork config file -->
author:
   <name>helpNamespace</name>
author:
   <value>/help</value>
author:
   </init-param>
author:
   <init-param>
author:
   <!-- The default action to invoke in view mode -->
author:
   <name>defaultHelpAction</name>
author:
   <value>index</value>
author:
   </init-param>
author:
  
author:
  




Method Summary
public  HashMapcreateContextMap(Map requestMap, Map parameterMap, Map sessionMap, Map applicationMap, PortletRequest request, PortletResponse response, PortletConfig portletConfig, Integer phase)
     Merges all application and portlet attributes into a single HashMap to represent the entire Action context.
public  voiddestroy()
    
protected  ActionMappinggetActionMapping(PortletRequest request)
     Gets the namespace of the action from the request.
 StringgetActionName(String actionPath)
     Get the action name part of the action path.
protected  MapgetApplicationMap()
     Returns a Map of all application attributes.
 StringgetNamespace(String actionPath)
     Get the namespace part of the action path.
protected  MapgetParameterMap(PortletRequest request)
     Returns a Map of all request parameters.
protected  MapgetRequestMap(PortletRequest request)
     Returns a Map of all request attributes.
protected  MapgetSessionMap(PortletRequest request)
     Returns a Map of all session attributes.
public  voidinit(PortletConfig cfg)
    
public  voidprocessAction(ActionRequest request, ActionResponse response)
     Service an action from the event phase.
public  voidrender(RenderRequest request, RenderResponse response)
     Service an action from the render phase.
public  voidserviceAction(PortletRequest request, PortletResponse response, ActionMapping mapping, Map requestMap, Map parameterMap, Map sessionMap, Map applicationMap, String portletNamespace, Integer phase)
     Loads the action and executes it.
public  voidsetActionMapper(ActionMapper actionMapper)
    
protected  voidsetActionProxyFactory(ActionProxyFactory factory)
     Convenience method to ease testing.



Method Detail
createContextMap
public HashMap createContextMap(Map requestMap, Map parameterMap, Map sessionMap, Map applicationMap, PortletRequest request, PortletResponse response, PortletConfig portletConfig, Integer phase) throws IOException(Code)
Merges all application and portlet attributes into a single HashMap to represent the entire Action context.
Parameters:
  requestMap - a Map of all request attributes.
Parameters:
  parameterMap - a Map of all request parameters.
Parameters:
  sessionMap - a Map of all session attributes.
Parameters:
  applicationMap - a Map of all servlet context attributes.
Parameters:
  request - the PortletRequest object.
Parameters:
  response - the PortletResponse object.
Parameters:
  portletConfig - the PortletConfig object.
Parameters:
  phase - The portlet phase (render or action, seePortletActionConstants) a HashMap representing the Action context.



destroy
public void destroy()(Code)



getActionMapping
protected ActionMapping getActionMapping(PortletRequest request)(Code)
Gets the namespace of the action from the request. The namespace is the same as the portlet mode. E.g, view mode is mapped to namespace view, and edit mode is mapped to the namespace edit
Parameters:
  request - the PortletRequest object. the namespace of the action.



getActionName
String getActionName(String actionPath)(Code)
Get the action name part of the action path.
Parameters:
  actionPath - Full path to action The action name.



getApplicationMap
protected Map getApplicationMap()(Code)
Returns a Map of all application attributes. Copies all attributes from the PortletActionContext into an ApplicationMap . a Map of all application attributes.



getNamespace
String getNamespace(String actionPath)(Code)
Get the namespace part of the action path.
Parameters:
  actionPath - Full path to action The namespace part.



getParameterMap
protected Map getParameterMap(PortletRequest request) throws IOException(Code)
Returns a Map of all request parameters. This implementation just calls PortletRequest.getParameterMap .
Parameters:
  request - the PortletRequest object. a Map of all request parameters.
throws:
  IOException - if an exception occurs while retrieving the parametermap.



getRequestMap
protected Map getRequestMap(PortletRequest request)(Code)
Returns a Map of all request attributes. The default implementation is to wrap the request in a RequestMap . Override this method to customize how request attributes are mapped.
Parameters:
  request - the PortletRequest object. a Map of all request attributes.



getSessionMap
protected Map getSessionMap(PortletRequest request)(Code)
Returns a Map of all session attributes. The default implementation is to wrap the reqeust in a SessionMap . Override this method to customize how session attributes are mapped.
Parameters:
  request - the PortletRequest object. a Map of all session attributes.



init
public void init(PortletConfig cfg) throws PortletException(Code)
Initialize the portlet with the init parameters from portlet.xml



processAction
public void processAction(ActionRequest request, ActionResponse response) throws PortletException, IOException(Code)
Service an action from the event phase.
See Also:   javax.portlet.Portlet.processAction(javax.portlet.ActionRequestjavax.portlet.ActionResponse)



render
public void render(RenderRequest request, RenderResponse response) throws PortletException, IOException(Code)
Service an action from the render phase.
See Also:   javax.portlet.Portlet.render(javax.portlet.RenderRequestjavax.portlet.RenderResponse)



serviceAction
public void serviceAction(PortletRequest request, PortletResponse response, ActionMapping mapping, Map requestMap, Map parameterMap, Map sessionMap, Map applicationMap, String portletNamespace, Integer phase) throws PortletException(Code)
Loads the action and executes it. This method first creates the action context from the given parameters then loads an ActionProxy from the given action name and namespace. After that, the action is executed and output channels throught the response object.
Parameters:
  request - the HttpServletRequest object.
Parameters:
  response - the HttpServletResponse object.
Parameters:
  mapping - the action mapping.
Parameters:
  requestMap - a Map of request attributes.
Parameters:
  parameterMap - a Map of request parameters.
Parameters:
  sessionMap - a Map of all session attributes.
Parameters:
  applicationMap - a Map of all application attributes.
Parameters:
  portletNamespace - the namespace or context of the action.
Parameters:
  phase - The portlet phase (render or action, seePortletActionConstants)



setActionMapper
public void setActionMapper(ActionMapper actionMapper)(Code)

Parameters:
  actionMapper - the actionMapper to set



setActionProxyFactory
protected void setActionProxyFactory(ActionProxyFactory factory)(Code)
Convenience method to ease testing.
Parameters:
  factory -



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