Java Doc for HarnessPortletProvider.java in  » Portal » Open-Portal » com » sun » portal » harness » 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 » Portal » Open Portal » com.sun.portal.harness 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.sun.portal.providers.window.WindowProvider
   com.sun.portal.providers.portletwindow.PortletWindowProvider
      com.sun.portal.harness.HarnessPortletProvider

HarnessPortletProvider
public class HarnessPortletProvider extends PortletWindowProvider (Code)
This class is the bridge between the Portlet Builder and the portlet container. It extends PortletWindowProvider to delegate most of the work to it. The getContent() method handles portlet modes of VIEW, EDIT, and HELP. When portlet mode is VIEW, the getContentForPortlets() method is called, it loops through the portlet names that are defined in the protlet.xml and calls the doGetContent() method to get content for each of the portlet channel, and the doGetContent() method delegates the work to PortletWindowProvider's getContent() method. When portlet mode is EDIT or HELP, the supper class's getContent() method is called. The processEdit() method sets the target portlet, and then delegates the process ot PortletWindowProvider's processEdit() method. Since PortletWindowProvider extends from WindowProvider, there are some abstract methods that are defined in WindowProvider which are implemented in PortletWindowProvider. This class overrides the getRoleMap(), getUserInfoMap(), getEntityID() methods.




Method Summary
public  StringdoGetContent(HttpServletRequest req, HttpServletResponse res, String targetChannelName)
     Gets the view content for the channel.
public  URLdoGetHelp(HttpServletRequest req, String targetPortletChannel)
     Gets the help URL for this provider.

This method constructs a help URL which will call the getContent() method on this provider with a parameter portletAction=HELP. A URL pointing to the help page for the portletchannel.

public  StringBuffergetContent(HttpServletRequest request, HttpServletResponse response)
     The getContent() method handles edit, help, and content actions for the HarnessPortletProvider.
public  ChannelModegetCurrentChannelMode(HttpServletRequest req)
    
protected  URLgetEditURL(HttpServletRequest req, String parent, ProviderContext pc)
    
public  StringgetEntityID(HttpServletRequest req)
     EntityID is represented as // / is stored in the display profile during deployment time.
public  URLgetHelp(HttpServletRequest req)
     This method is overrided so that the super class's getHelp() method won't be called.
protected  URLgetHelpURL(HttpServletRequest req, ProviderContext pc)
    
public  StringgetParentContainerName(HttpServletRequest req)
    
public  ContainerProvidergetParentContainerProvider(HttpServletRequest req)
    
public  StringgetProcessURL(HttpServletRequest req, String parent, ChannelMode channelMode)
    
public  MapgetRoleMap(HttpServletRequest req)
    
public  StringgetTitle()
     Gets the title for the channel.
public  MapgetUserInfoMap(HttpServletRequest req)
    
public  voidinit(String name, HttpServletRequest request)
     Initialize the target portlet provider class.
public  booleanisEditable()
    
public  booleanisPresentable()
    
public  URLprocessEdit(HttpServletRequest request, HttpServletResponse response)
     This method handles the process action for the HarnessPortletProvider.
public static  voidsetPortlets(List portlets)
     This method should be called from the ProviderHarness before the provider.init() method is called.



Method Detail
doGetContent
public String doGetContent(HttpServletRequest req, HttpServletResponse res, String targetChannelName) throws ProviderException(Code)
Gets the view content for the channel. StringBuffer holding the content.
Parameters:
  req - An HttpServletRequest that containsinformation related to this request for content.
Parameters:
  res - An HttpServletResponse that allows the providerto influence the overall response for the desktop page (besides generating the content).
Parameters:
  targetChannelName - the target channel name.
exception:
  ProviderException - If there was an error generating thecontent.
See Also:   com.sun.portal.providers.PortletWindowProvider.getContent
See Also:   com.sun.portal.providers.ProviderException



doGetHelp
public URL doGetHelp(HttpServletRequest req, String targetPortletChannel) throws ProviderException(Code)
Gets the help URL for this provider.

This method constructs a help URL which will call the getContent() method on this provider with a parameter portletAction=HELP. A URL pointing to the help page for the portletchannel. A return value of null should signify that thisprovider does not have a help page.




getContent
public StringBuffer getContent(HttpServletRequest request, HttpServletResponse response) throws ProviderException(Code)
The getContent() method handles edit, help, and content actions for the HarnessPortletProvider. For help and edit, it creates a DesktopRequest and then pass it to the parent class's getContent() method. For view, it calls getContentForPortlets()



getCurrentChannelMode
public ChannelMode getCurrentChannelMode(HttpServletRequest req)(Code)



getEditURL
protected URL getEditURL(HttpServletRequest req, String parent, ProviderContext pc) throws MalformedURLException(Code)



getEntityID
public String getEntityID(HttpServletRequest req) throws ProviderException(Code)
EntityID is represented as // / is stored in the display profile during deployment time. This method overrides the implementation in PortletWindowProvider since the target channel is not the HarnessPortletChannel but the channel defines in the portlet deployment descriptor.



getHelp
public URL getHelp(HttpServletRequest req) throws ProviderException(Code)
This method is overrided so that the super class's getHelp() method won't be called. This method returns null so that the help link for the HarnessPortletChannel in the simulator won't be shown. The help links of each individual portlet defined in the portlet.xml, the doGetHelp() method is used.



getHelpURL
protected URL getHelpURL(HttpServletRequest req, ProviderContext pc) throws MalformedURLException(Code)



getParentContainerName
public String getParentContainerName(HttpServletRequest req) throws ProviderException(Code)



getParentContainerProvider
public ContainerProvider getParentContainerProvider(HttpServletRequest req) throws ProviderException(Code)



getProcessURL
public String getProcessURL(HttpServletRequest req, String parent, ChannelMode channelMode)(Code)



getRoleMap
public Map getRoleMap(HttpServletRequest req) throws ProviderContextException, ProviderException(Code)



getTitle
public String getTitle() throws ProviderException(Code)
Gets the title for the channel. This method returns the title from the portlet. Portlet uses javax.portlet.title namespace for its title. A string title.
exception:
  ProviderException - if error occurs when getting the title forthe channel.



getUserInfoMap
public Map getUserInfoMap(HttpServletRequest req) throws ProviderException(Code)



init
public void init(String name, HttpServletRequest request) throws ProviderException(Code)
Initialize the target portlet provider class.

The init method simulates the environment that is expected by the portlet container.




isEditable
public boolean isEditable() throws ProviderException(Code)



isPresentable
public boolean isPresentable()(Code)



processEdit
public URL processEdit(HttpServletRequest request, HttpServletResponse response) throws ProviderException(Code)
This method handles the process action for the HarnessPortletProvider. It creates a DesktopRequest and then pass it to the parent class's processEdit() method.



setPortlets
public static void setPortlets(List portlets)(Code)
This method should be called from the ProviderHarness before the provider.init() method is called. This is to set the list of portlets that will be displayed in the target simulator page.
Parameters:
  portlets - A List of portlet names



Fields inherited from com.sun.portal.providers.portletwindow.PortletWindowProvider
final public static String JAVAX_PORTLET_ENTITY_ID(Code)(Java Doc)
final public static String JAVAX_PORTLET_LOCALE(Code)(Java Doc)
final public static String JAVAX_PORTLET_TITLE(Code)(Java Doc)
final public static String PORTLET_CONTAINER(Code)(Java Doc)

Methods inherited from com.sun.portal.providers.portletwindow.PortletWindowProvider
public ChannelURLFactory getChannelURLFactory(String desktopURLPrefix, HttpServletRequest request) throws ProviderException(Code)(Java Doc)
public Container getContainer(HttpServletRequest req)(Code)(Java Doc)
public String getDefaultTitle() throws ProviderException(Code)(Java Doc)
public String getEntityID(HttpServletRequest request) throws ProviderException(Code)(Java Doc)
protected ErrorCode getErrorCode(ContentException ex)(Code)(Java Doc)
public List getRoleList(HttpServletRequest request) throws ProviderException(Code)(Java Doc)
protected String getTitleFromRB() throws ProviderException(Code)(Java Doc)
public Map getUserInfoMap(HttpServletRequest request) throws ProviderException(Code)(Java Doc)
public WindowRequestReader getWindowRequestReader() throws ProviderException(Code)(Java Doc)
public void init(String n, HttpServletRequest req) throws ProviderException(Code)(Java Doc)
public boolean isMarkupSupported(String contentType, String locale, ChannelMode mode, WindowState state) throws ProviderException(Code)(Java Doc)
public URL processEdit(HttpServletRequest req, HttpServletResponse res) throws ProviderException(Code)(Java Doc)

Fields inherited from com.sun.portal.providers.window.WindowProvider
final public static String CURRENT_CHANNEL_MODE_KEY(Code)(Java Doc)
final public static String KEYWORD_PREFIX(Code)(Java Doc)
final public static String PORTAL_CONTEXT_PATH(Code)(Java Doc)
final public static String PROVIDER_CONTEXT(Code)(Java Doc)
final public static String RENDER_PARAM_PREFIX(Code)(Java Doc)
final public static String SSO_TOKEN(Code)(Java Doc)
final public static String TARGET_PORTLET_CHANNEL_KEY(Code)(Java Doc)
final public static List _localParamKeyList(Code)(Java Doc)

Methods inherited from com.sun.portal.providers.window.WindowProvider
protected List getAllowableWindowStates(HttpServletRequest req, ChannelMode mode) throws ProviderException(Code)(Java Doc)
abstract public ChannelURLFactory getChannelURLFactory(String desktopURLPrefix, HttpServletRequest req) throws ProviderException(Code)(Java Doc)
abstract public Container getContainer(HttpServletRequest req)(Code)(Java Doc)
public StringBuffer getContent(HttpServletRequest req, HttpServletResponse res) throws ProviderException(Code)(Java Doc)
public StringBuffer getContentInternal(HttpServletRequest req, HttpServletResponse res) throws ProviderException(Code)(Java Doc)
protected ChannelMode getCurrentChannelMode(HttpServletRequest req)(Code)(Java Doc)
protected WindowState getCurrentWindowState(HttpServletRequest req) throws ProviderException(Code)(Java Doc)
abstract public String getDefaultTitle() throws ProviderException(Code)(Java Doc)
public StringBuffer getEdit(HttpServletRequest req, HttpServletResponse res) throws ProviderException(Code)(Java Doc)
protected URL getEditURL(HttpServletRequest req, String parent, ProviderContext pc) throws ProviderContextException, MalformedURLException(Code)(Java Doc)
abstract public String getEntityID(HttpServletRequest req) throws ProviderException(Code)(Java Doc)
protected ErrorCode getErrorCode(ContentException ex)(Code)(Java Doc)
public URL getErrorCodeURL(ErrorCode errorCode, HttpServletRequest req) throws ProviderException(Code)(Java Doc)
protected StringBuffer getErrorMessageContent(ErrorCode errorCode) throws ProviderException(Code)(Java Doc)
public URL getHelp(HttpServletRequest req) throws ProviderException(Code)(Java Doc)
protected URL getHelpURL(HttpServletRequest req, ProviderContext pc) throws ProviderContextException, MalformedURLException(Code)(Java Doc)
protected String getParentContainerName(HttpServletRequest req) throws ProviderException(Code)(Java Doc)
protected ContainerProvider getParentContainerProvider(HttpServletRequest req) throws ProviderException(Code)(Java Doc)
protected String getProcessURL(HttpServletRequest req, String parent, ChannelMode channelMode)(Code)(Java Doc)
abstract public List getRoleList(HttpServletRequest req) throws ProviderException(Code)(Java Doc)
public String getTitle() throws ProviderException(Code)(Java Doc)
abstract public Map getUserInfoMap(HttpServletRequest req) throws ProviderException(Code)(Java Doc)
abstract public WindowRequestReader getWindowRequestReader() throws ProviderException(Code)(Java Doc)
public void init(String n, HttpServletRequest req) throws ProviderException(Code)(Java Doc)
public boolean isEditable() throws ProviderException(Code)(Java Doc)
abstract public boolean isMarkupSupported(String contentType, String locale, ChannelMode mode, WindowState state) throws ProviderException(Code)(Java Doc)
public boolean isPresentable(HttpServletRequest req)(Code)(Java Doc)
public static boolean isWindowProviderKey(String key)(Code)(Java Doc)
public URL processEdit(HttpServletRequest req, HttpServletResponse res) throws ProviderException(Code)(Java Doc)
public URL processEditInternal(HttpServletRequest req, HttpServletResponse res) throws ProviderException, WindowException(Code)(Java Doc)
protected URL processModeChange(ChannelMode channelMode, HttpServletRequest req, ProviderContext pc) throws ProviderException(Code)(Java Doc)
protected WindowState processWindowStateChange(HttpServletRequest request, WindowState newWindowState, ChannelMode channelMode, boolean authless) throws ProviderException, WindowException(Code)(Java Doc)
protected ErrorCode readErrorCode(HttpServletRequest req)(Code)(Java Doc)
public void setTitle(String title)(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.