| 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 String | doGetContent(HttpServletRequest req, HttpServletResponse res, String targetChannelName) Gets the view content for the channel. | public URL | doGetHelp(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 StringBuffer | getContent(HttpServletRequest request, HttpServletResponse response) The getContent() method handles edit, help, and content actions
for the HarnessPortletProvider. | public ChannelMode | getCurrentChannelMode(HttpServletRequest req) | protected URL | getEditURL(HttpServletRequest req, String parent, ProviderContext pc) | public String | getEntityID(HttpServletRequest req) EntityID is represented as //
/ is stored in the display profile during
deployment time. | public URL | getHelp(HttpServletRequest req) This method is overrided so that the super class's getHelp()
method won't be called. | protected URL | getHelpURL(HttpServletRequest req, ProviderContext pc) | public String | getParentContainerName(HttpServletRequest req) | public ContainerProvider | getParentContainerProvider(HttpServletRequest req) | public String | getProcessURL(HttpServletRequest req, String parent, ChannelMode channelMode) | public Map | getRoleMap(HttpServletRequest req) | public String | getTitle() Gets the title for the channel. | public Map | getUserInfoMap(HttpServletRequest req) | public void | init(String name, HttpServletRequest request) Initialize the target portlet provider class. | public boolean | isEditable() | public boolean | isPresentable() | public URL | processEdit(HttpServletRequest request, HttpServletResponse response) This method handles the process action for the
HarnessPortletProvider. | public static void | setPortlets(List portlets) This method should be called from the ProviderHarness before the
provider.init() method is called. |
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() |
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.
|
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. |
isPresentable | public boolean isPresentable()(Code) | | |
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 |
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)
|
|
|