org.jboss.portal.core.cms.ui
Class CMSPortlet

java.lang.Object
  extended by javax.portlet.GenericPortlet
      extended by org.jboss.portal.core.cms.ui.CMSPortlet
All Implemented Interfaces:
javax.portlet.EventPortlet, javax.portlet.Portlet, javax.portlet.PortletConfig, javax.portlet.ResourceServingPortlet

public class CMSPortlet
extends javax.portlet.GenericPortlet

Displays content from the CMS.

Version:
$Revision: 11776 $

TODO: use portlet preferences for default homepage, and allow for preference modification in doEdit()

Author:
Roy Russo, Julien Viet

Nested Class Summary
protected static class CMSPortlet.GlobalURLFactory
          Implementation that routes thru the CMSObjectCommandMapper.
protected static class CMSPortlet.LocalURLFactory
          Implementation that uses a PortletURL object.
protected static class CMSPortlet.URLFactory
          Creates CMS urls which is used for image src calls from the html.
 
Field Summary
protected  org.jboss.portal.cms.CMS CMSService
          .
static java.lang.String RENDER_PARAMETER_PATH
          The render parameter name of the path of the file the portlet will show.
 
Constructor Summary
CMSPortlet()
           
 
Method Summary
protected  java.lang.String cleanupContent(java.lang.String content)
           
 void destroy()
           
protected  void doDispatch(javax.portlet.RenderRequest req, javax.portlet.RenderResponse resp)
           
 void doEdit(javax.portlet.RenderRequest req, javax.portlet.RenderResponse resp)
           
protected  void doEditContent(javax.portlet.RenderRequest req, javax.portlet.RenderResponse resp)
           
 void doHeaders(javax.portlet.RenderRequest req, javax.portlet.RenderResponse resp)
           
 void doHelp(javax.portlet.RenderRequest req, javax.portlet.RenderResponse resp)
           
protected  void doView(javax.portlet.RenderRequest req, javax.portlet.RenderResponse resp)
           
 void init()
           
 void init(javax.portlet.PortletConfig config)
           
 void processAction(javax.portlet.ActionRequest request, javax.portlet.ActionResponse response)
           
 
Methods inherited from class javax.portlet.GenericPortlet
getContainerRuntimeOptions, getDefaultNamespace, getInitParameter, getInitParameterNames, getNextPossiblePortletModes, getPortletConfig, getPortletContext, getPortletName, getProcessingEventQNames, getPublicRenderParameterNames, getPublishingEventQNames, getResourceBundle, getSupportedLocales, getTitle, processEvent, render, serveResource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RENDER_PARAMETER_PATH

public static final java.lang.String RENDER_PARAMETER_PATH
The render parameter name of the path of the file the portlet will show.

See Also:
Constant Field Values

CMSService

protected org.jboss.portal.cms.CMS CMSService
.

Constructor Detail

CMSPortlet

public CMSPortlet()
Method Detail

init

public void init(javax.portlet.PortletConfig config)
          throws javax.portlet.PortletException
Specified by:
init in interface javax.portlet.Portlet
Overrides:
init in class javax.portlet.GenericPortlet
Throws:
javax.portlet.PortletException

destroy

public void destroy()
Specified by:
destroy in interface javax.portlet.Portlet
Overrides:
destroy in class javax.portlet.GenericPortlet

init

public void init()
          throws javax.portlet.PortletException
Overrides:
init in class javax.portlet.GenericPortlet
Throws:
javax.portlet.PortletException

processAction

public void processAction(javax.portlet.ActionRequest request,
                          javax.portlet.ActionResponse response)
                   throws javax.portlet.PortletException,
                          javax.portlet.PortletSecurityException,
                          java.io.IOException
Specified by:
processAction in interface javax.portlet.Portlet
Overrides:
processAction in class javax.portlet.GenericPortlet
Throws:
javax.portlet.PortletException
javax.portlet.PortletSecurityException
java.io.IOException

doView

protected void doView(javax.portlet.RenderRequest req,
                      javax.portlet.RenderResponse resp)
               throws javax.portlet.PortletException,
                      javax.portlet.PortletSecurityException,
                      java.io.IOException
Overrides:
doView in class javax.portlet.GenericPortlet
Throws:
javax.portlet.PortletException
javax.portlet.PortletSecurityException
java.io.IOException

doHelp

public void doHelp(javax.portlet.RenderRequest req,
                   javax.portlet.RenderResponse resp)
            throws java.io.IOException,
                   javax.portlet.PortletException
Overrides:
doHelp in class javax.portlet.GenericPortlet
Throws:
java.io.IOException
javax.portlet.PortletException

doDispatch

protected void doDispatch(javax.portlet.RenderRequest req,
                          javax.portlet.RenderResponse resp)
                   throws javax.portlet.PortletException,
                          javax.portlet.PortletSecurityException,
                          java.io.IOException
Overrides:
doDispatch in class javax.portlet.GenericPortlet
Throws:
javax.portlet.PortletException
javax.portlet.PortletSecurityException
java.io.IOException

doEditContent

protected void doEditContent(javax.portlet.RenderRequest req,
                             javax.portlet.RenderResponse resp)
                      throws java.io.IOException,
                             javax.portlet.PortletException
Throws:
java.io.IOException
javax.portlet.PortletException

doEdit

public void doEdit(javax.portlet.RenderRequest req,
                   javax.portlet.RenderResponse resp)
            throws java.io.IOException,
                   javax.portlet.PortletException
Overrides:
doEdit in class javax.portlet.GenericPortlet
Throws:
java.io.IOException
javax.portlet.PortletException

doHeaders

public void doHeaders(javax.portlet.RenderRequest req,
                      javax.portlet.RenderResponse resp)
Overrides:
doHeaders in class javax.portlet.GenericPortlet

cleanupContent

protected java.lang.String cleanupContent(java.lang.String content)