org.apache.pluto.driver.portlets
Class PageAdminPortlet
java.lang.Object
javax.portlet.GenericPortlet
org.apache.pluto.driver.portlets.GenericPlutoPortlet
org.apache.pluto.driver.portlets.PageAdminPortlet
- All Implemented Interfaces:
- javax.portlet.EventPortlet, javax.portlet.Portlet, javax.portlet.PortletConfig, javax.portlet.ResourceServingPortlet
public class PageAdminPortlet
- extends GenericPlutoPortlet
|
Method Summary |
void |
doAddPage(javax.portlet.ActionRequest request)
Adds a page to the portal via the RenderConfigService. |
void |
doAddPortlet(javax.portlet.ActionRequest request)
|
void |
doRemovePage(javax.portlet.ActionRequest request)
Removes a page from the portal ignoring any requests to remove the default page
or the Pluto Admin page. |
void |
doRemovePortlet(javax.portlet.ActionRequest request)
|
void |
doView(javax.portlet.RenderRequest request,
javax.portlet.RenderResponse response)
|
java.util.Collection |
getAvailablePages()
|
protected static java.lang.String |
getContentBeforeRenderConfig(java.lang.String contents)
Gets the content of the config page before the render-config element
(also including the default attribute of render-config - see RENDER_CONFIG_SEARCH_TOKEN above). |
java.lang.String |
getEditPage()
|
java.lang.String |
getHelpPage(javax.portlet.RenderRequest request)
|
java.lang.String |
getViewPage()
|
protected static java.lang.String |
parseDefaultPage(java.lang.String configFileContents)
Parse out default attribute value of render-config element in pluto-portal-driver-config.xml. |
void |
processAction(javax.portlet.ActionRequest request,
javax.portlet.ActionResponse response)
|
| Methods inherited from class javax.portlet.GenericPortlet |
destroy, doDispatch, doHeaders, getContainerRuntimeOptions, getDefaultNamespace, getInitParameter, getInitParameterNames, getNextPossiblePortletModes, getPortletConfig, getPortletContext, getPortletName, getProcessingEventQNames, getPublicRenderParameterNames, getPublishingEventQNames, getResourceBundle, getSupportedLocales, getTitle, init, init, processEvent, render, serveResource |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PageAdminPortlet
public PageAdminPortlet()
processAction
public void processAction(javax.portlet.ActionRequest request,
javax.portlet.ActionResponse response)
- Specified by:
processAction in interface javax.portlet.Portlet- Overrides:
processAction in class javax.portlet.GenericPortlet
doAddPortlet
public void doAddPortlet(javax.portlet.ActionRequest request)
doAddPage
public void doAddPage(javax.portlet.ActionRequest request)
- Adds a page to the portal via the
RenderConfigService.
This does not add portlets to the new page. Do that when the page is created
using the Add Portlet button.
- Parameters:
request - The action request.
doRemovePage
public void doRemovePage(javax.portlet.ActionRequest request)
throws java.io.IOException
- Removes a page from the portal ignoring any requests to remove the default page
or the Pluto Admin page.
The page's portlets are still available, but no longer associated with the deleted page.
- Parameters:
request - The action request.
- Throws:
java.io.IOException - If a problem occurs accessing the config file.
doRemovePortlet
public void doRemovePortlet(javax.portlet.ActionRequest request)
doView
public void doView(javax.portlet.RenderRequest request,
javax.portlet.RenderResponse response)
throws javax.portlet.PortletException,
java.io.IOException
- Overrides:
doView in class GenericPlutoPortlet
- Throws:
javax.portlet.PortletException
java.io.IOException
getViewPage
public java.lang.String getViewPage()
- Specified by:
getViewPage in class GenericPlutoPortlet
getEditPage
public java.lang.String getEditPage()
- Specified by:
getEditPage in class GenericPlutoPortlet
getHelpPage
public java.lang.String getHelpPage(javax.portlet.RenderRequest request)
- Specified by:
getHelpPage in class GenericPlutoPortlet
getAvailablePages
public java.util.Collection getAvailablePages()
getContentBeforeRenderConfig
protected static java.lang.String getContentBeforeRenderConfig(java.lang.String contents)
- Gets the content of the config page before the render-config element
(also including the default attribute of render-config - see RENDER_CONFIG_SEARCH_TOKEN above).
- Parameters:
contents - pluto-portal-driver-config.xml file contents.
- Returns:
parseDefaultPage
protected static java.lang.String parseDefaultPage(java.lang.String configFileContents)
- Parse out default attribute value of render-config element in pluto-portal-driver-config.xml.
This method is protected to allow unit testing (see
PageAdminPortletTest.testParseDefaultPage().)
- Parameters:
configFileContents - Contents of pluto-portal-driver-config.xml file.
- Returns:
- The value of the default attribute in the render-config element.
Copyright © 2003-2009 Apache Software Foundation. All Rights Reserved.