|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.portlet.GenericPortlet
org.jboss.portal.core.cms.ui.CMSPortlet
public class CMSPortlet
Displays content from the CMS.
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 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()
Called by the portlet container to indicate to a portlet that the portlet is being taken out of service. |
protected void |
doDispatch(RenderRequest req,
RenderResponse resp)
The default implementation of this method routes the render request to a set of helper methods depending on the current portlet mode the portlet is currently in. |
void |
doEdit(RenderRequest req,
RenderResponse resp)
Helper method to serve up the edit mode. |
protected void |
doEditContent(RenderRequest req,
RenderResponse resp)
|
void |
doHelp(RenderRequest req,
RenderResponse resp)
Helper method to serve up the help mode. |
protected void |
doView(RenderRequest req,
RenderResponse resp)
Helper method to serve up the mandatory view mode. |
void |
init()
A convenience method which can be overridden so that there's no need to call super.init(config) . |
void |
init(PortletConfig config)
Called by the portlet container to indicate to a portlet that the portlet is being placed into service. |
void |
processAction(ActionRequest request,
ActionResponse response)
Called by the portlet container to allow the portlet to process an action request. |
Methods inherited from class javax.portlet.GenericPortlet |
---|
getInitParameter, getInitParameterNames, getPortletConfig, getPortletContext, getPortletName, getResourceBundle, getTitle, render |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String RENDER_PARAMETER_PATH
protected CMS CMSService
Constructor Detail |
---|
public CMSPortlet()
Method Detail |
---|
public void init(PortletConfig config) throws PortletException
GenericPortlet
PortletConfig
object. The portlet container calls the
init
method exactly once after instantiating the portlet. The init
method must complete
successfully before the portlet can receive any requests.
The portlet container cannot place the portlet into service if the init
method does one of the
following:
PortletException
init
in interface Portlet
init
in class GenericPortlet
config
- a PortletConfig
object containing the portlet configuration and initialization
parameters
PortletException
- if an exception has occurred that interferes with the portlet normal operation.
UnavailableException
- if the portlet cannot perform the initialization at this time.public void destroy()
GenericPortlet
destroy
in interface Portlet
destroy
in class GenericPortlet
public void init() throws PortletException
GenericPortlet
super.init(config)
.
Instead of overriding GenericPortlet.init(PortletConfig)
, simply override this method and it will be called by
GenericPortlet.init(PortletConfig config)
. The PortletConfig
object can still be
retrieved via GenericPortlet.getPortletConfig()
.
init
in class GenericPortlet
PortletException
- if an exception has occurred that interferes with the portlet normal operation.
UnavailableException
- if the portlet is unavailable to perform initpublic void processAction(ActionRequest request, ActionResponse response) throws PortletException, PortletSecurityException, java.io.IOException
GenericPortlet
RenderResponse.createActionURL()
method.
The default implementation throws an exception.
processAction
in interface Portlet
processAction
in class GenericPortlet
request
- the action requestresponse
- the action response
PortletException
- if the portlet cannot fulfilling the request
UnavailableException
- if the portlet is unavailable to process the action at this time
PortletSecurityException
- if the portlet cannot fullfill this request because of security reasons
java.io.IOException
- if the streaming causes an I/O problemprotected void doView(RenderRequest req, RenderResponse resp) throws PortletException, PortletSecurityException, java.io.IOException
GenericPortlet
view
mode.
The default implementation throws an exception.
doView
in class GenericPortlet
req
- the portlet requestresp
- the render response
PortletException
- if the portlet cannot fulfilling the request
UnavailableException
- if the portlet is unavailable to perform render at this time
PortletSecurityException
- if the portlet cannot fullfill this request because of security reasons
java.io.IOException
- if the streaming causes an I/O problempublic void doHelp(RenderRequest req, RenderResponse resp) throws java.io.IOException, PortletException
GenericPortlet
help
mode.
The default implementation throws an exception.
doHelp
in class GenericPortlet
req
- the portlet requestresp
- the render response
java.io.IOException
- if the streaming causes an I/O problem
PortletException
- if the portlet cannot fulfilling the request
UnavailableException
- if the portlet is unavailable to perform render at this time
PortletSecurityException
- if the portlet cannot fullfill this request because of security reasonsprotected void doDispatch(RenderRequest req, RenderResponse resp) throws PortletException, PortletSecurityException, java.io.IOException
GenericPortlet
doView
for handling
view
requests doEdit
for handling edit
requests doHelp
for handling help
requests minimized
, this method does not invoke any of the portlet mode
rendering methods.
For handling custom portlet modes the portlet should override this method.
doDispatch
in class GenericPortlet
req
- the render requestresp
- the render response
PortletException
- if the portlet cannot fulfilling the request
UnavailableException
- if the portlet is unavailable to perform render at this time
PortletSecurityException
- if the portlet cannot fullfill this request because of security reasons
java.io.IOException
- if the streaming causes an I/O problemGenericPortlet.doView(RenderRequest,RenderResponse)
,
GenericPortlet.doEdit(RenderRequest,RenderResponse)
,
GenericPortlet.doHelp(RenderRequest,RenderResponse)
protected void doEditContent(RenderRequest req, RenderResponse resp) throws java.io.IOException, PortletException
java.io.IOException
PortletException
public void doEdit(RenderRequest req, RenderResponse resp) throws java.io.IOException, PortletException
GenericPortlet
edit
mode.
The default implementation throws an exception.
doEdit
in class GenericPortlet
req
- the portlet requestresp
- the render response
java.io.IOException
- if the streaming causes an I/O problem
PortletException
- if the portlet cannot fulfilling the request
UnavailableException
- if the portlet is unavailable to perform render at this time
PortletSecurityException
- if the portlet cannot fullfill this request because of security reasonsprotected java.lang.String cleanupContent(java.lang.String content)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |