|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object GenericPortlet com.ibm.portal.struts.portlet.StrutsPortlet
public class StrutsPortlet
Class specified in the portlet deployment descriptor for Struts-based portlets. This class can be subclassed to customize the behavior of the portlet. In general, the WpRequestProcessor should be subclassed to customize the behavior of the Struts applicaton, and this class should be subclassed to affect the Portal behavior.
Field Summary | |
---|---|
protected static MessageResources |
messages
The message resources for the Struts Portlet Framework. |
static java.lang.String |
STRUTS_SERVLET_MAPPING_KEY
The key used to identify the Struts servlet mapping in the servlet context. |
Constructor Summary | |
---|---|
StrutsPortlet()
StrutsPortlet constructor. |
Method Summary | |
---|---|
protected WpActionServlet |
createActionServlet(ServletContext servletContext,
ServletConfig servletConfig,
PortletConfig portletConfig,
StrutsInfo strutsInfo)
Returns the ActionServlet. |
protected ViewCommandExecutionContext |
createCommandExecutionContext(PortletContext portletContext,
ModuleContext moduleContext,
ServletContext servletContext)
Creates a ViewCommandExecutionContext to be used when executing a ViewCommand. |
protected PortletRequest |
createPortletRequestWrapper(PortletRequest portletRequest)
Creates a portlet request wrapper. |
protected void |
createWelcomeFileCommand(PortletRequest request,
PortletResponse response)
Creates the welcome file command. |
void |
destroy()
Called by the portlet container to indicate to a portlet that the portlet is being taken out of service. |
protected void |
destroyCommandManagerPlugin(PortletConfig portletConfig)
Destroys a plugin by calling the destroy method of the plugin. |
void |
doConfigure(RenderRequest request,
RenderResponse response)
Render method for configure mode. |
protected void |
doDispatch(RenderRequest request,
RenderResponse response)
Support for config mode |
void |
doEdit(RenderRequest request,
RenderResponse response)
Render method for edit mode. |
void |
doHelp(RenderRequest request,
RenderResponse response)
Render method for help mode. |
protected void |
doService(RenderRequest renderRequest,
RenderResponse renderResponse)
The common processing for doView, doHelp, doConfigure and doEdit. |
void |
doView(RenderRequest request,
RenderResponse response)
Render method for view mode. |
WpActionServlet |
getActionServlet()
Returns the ActionServlet object. |
protected ServletConfig |
getServletConfigWrapper(PortletConfig portletConfig)
Gets the serlvet config wrapper. |
protected ServletContext |
getServletContextWrapper()
Returns the Servlet Context Wrapper |
protected ServletContext |
getServletContextWrapper(PortletConfig portletConfig,
ServletContext servletContext)
Returns a servlet context that namescopes the attributes to the portlet. |
StrutsInfo |
getStrutsInfo()
Returns the StrutsInfo object. |
java.lang.String |
getStrutsRoot()
Returns the Struts context root. |
protected java.util.Vector |
getWelcomeFileList(ServletContext servletContext)
Gets the welcome file list from the web.xml file. |
protected java.util.List |
getWelcomeFileList(ServletContext servletContext,
PortletContext portletContext,
PortletRequest portletRequest)
Gets the welcome file list. |
void |
init(PortletConfig portletConfig)
Called by the portlet container to indicate to a portlet that the portlet is being placed into service. |
protected void |
initCommandManagerPlugin(PortletConfig portletConfig)
Initializes a plugin. |
void |
processAction(ActionRequest aRequest,
ActionResponse aResponse)
Called by the portlet container to allow the portlet to process an action request. |
protected void |
processActionPerformed(PortletRequest pRequest,
PortletResponse pResponse)
The processing for actionPerformed. |
protected void |
processLocale(PortletRequest request)
Sets the locale for Jakarta Struts in session to the locale obtained from the portlet request object. |
void |
processStrutsAction(PortletRequest aRequest,
PortletResponse aResponse,
java.lang.String strutsAction)
Calls the appropriate Struts request processor's process method for the specified Struts action. |
protected void |
readInitParameters(ServletContext servletContext,
PortletConfig portletConfig,
StrutsInfo strutsInfo)
Reads the init parameters for this portlet from the web deployment descriptor and performs the appropriate configuration. |
void |
setCommonsLogFactory()
Previously used to set a commons logger using the System property. |
protected static void |
setupBase(PortletRequest request,
PortletResponse response,
PortletConfig config)
Allows BaseImplUtils to set up the processing. |
protected void |
setupRenderPhase(PortletRequest request)
Sets up the render phase. |
protected void |
setupRequestPhase(PortletRequest request)
Sets up the request phase. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static MessageResources messages
public static final java.lang.String STRUTS_SERVLET_MAPPING_KEY
Constructor Detail |
---|
public StrutsPortlet()
Method Detail |
---|
public WpActionServlet getActionServlet()
public StrutsInfo getStrutsInfo()
public java.lang.String getStrutsRoot()
protected ServletContext getServletContextWrapper()
public void init(PortletConfig portletConfig) throws PortletException
portletConfig
- the portlet configuration
PortletException
- if an exception has occurred that interferes with the portlet normal operationprotected WpActionServlet createActionServlet(ServletContext servletContext, ServletConfig servletConfig, PortletConfig portletConfig, StrutsInfo strutsInfo)
servletConfig
- the ServletConfig objectservletContext
- the ServletContext objectportletConfig
- the PortletConfig objectstrutsInfo
- the StrutsInfo object
protected void readInitParameters(ServletContext servletContext, PortletConfig portletConfig, StrutsInfo strutsInfo)
servletContext
- the servlet contextportletConfig
- the portlet configstrutsInfo
- the struts inf objectprotected void doService(RenderRequest renderRequest, RenderResponse renderResponse) throws PortletException, java.io.IOException
StrutsViewCommand
is obtained from the CommandManagerFactory
.
If the command is found, then it is executed to render the view. If a
StrutsViewCommand
is not found then the welcome file processing
is used for the initial view.
request
- the render request objectresponse
- the render response object
PortletException
- if the portlet cannot fulfill the request
java.io.IOException
- if the streaming causes an I/O problempublic void doView(RenderRequest request, RenderResponse response) throws PortletException, java.io.IOException
request
- the render request objectresponse
- the render response object
PortletException
- if the portlet cannot fulfill the request
java.io.IOException
- if the streaming causes an I/O problempublic void doHelp(RenderRequest request, RenderResponse response) throws PortletException, java.io.IOException
request
- the render request objectresponse
- the render response object
PortletException
- if the portlet cannot fulfill the request
java.io.IOException
- if the streaming causes an I/O problempublic void doEdit(RenderRequest request, RenderResponse response) throws PortletException, java.io.IOException
request
- the render request objectresponse
- the render response object
PortletException
- if the portlet cannot fulfill the request
java.io.IOException
- if the streaming causes an I/O problempublic void doConfigure(RenderRequest request, RenderResponse response) throws PortletException, java.io.IOException
request
- the render request objectresponse
- the render response object
PortletException
- if the portlet cannot fulfill the request
java.io.IOException
- if the streaming causes an I/O problemprotected void createWelcomeFileCommand(PortletRequest request, PortletResponse response) throws PortletException
request
- the request objectresponse
- the response object
PortletException
- if the portlet cannot fulfill the requestpublic void destroy()
public void processAction(ActionRequest aRequest, ActionResponse aResponse) throws PortletException, java.io.IOException
request
- the action request objectresponse
- the action response object
PortletException
- if the portlet cannot fulfill the request
java.io.IOException
- if the streaming causes an I/O problemprotected void processActionPerformed(PortletRequest pRequest, PortletResponse pResponse) throws java.io.IOException, PortletException
request
- the request objectresponse
- the portlet response object
PortletException
- if the portlet cannot fulfill the request
java.io.IOException
- if the streaming causes an I/O problemprotected ViewCommandExecutionContext createCommandExecutionContext(PortletContext portletContext, ModuleContext moduleContext, ServletContext servletContext)
portletContext
- the PortletContext objectmoduleContext
- the module context objectservletContext
- the servlet context object
protected java.util.List getWelcomeFileList(ServletContext servletContext, PortletContext portletContext, PortletRequest portletRequest)
ServletContext
- servletContextPortletConfig
- portletConfigportletRequest
- the portlet request objects
protected java.util.Vector getWelcomeFileList(ServletContext servletContext)
ServletContext
- servletContext
protected PortletRequest createPortletRequestWrapper(PortletRequest portletRequest)
portletRequest
- the portlet request
public void processStrutsAction(PortletRequest aRequest, PortletResponse aResponse, java.lang.String strutsAction) throws PortletException
request
- the request objectstrutsAction
- the struts action
PortletException
- if the portlet cannot fulfill the requestprotected static void setupBase(PortletRequest request, PortletResponse response, PortletConfig config)
request
- the request objectresponse
- the response objectconfig
- the config parameterprotected void processLocale(PortletRequest request)
request
- the portlet request objectprotected void setupRenderPhase(PortletRequest request)
request
- the portlet request objectprotected void setupRequestPhase(PortletRequest request)
request
- the portlet requestpublic void setCommonsLogFactory()
protected ServletContext getServletContextWrapper(PortletConfig portletConfig, ServletContext servletContext)
portletConfig
- the portlet configservletContext
- the real servlet context
protected void initCommandManagerPlugin(PortletConfig portletConfig)
portletConfig
- the portlet configprotected void destroyCommandManagerPlugin(PortletConfig portletConfig)
portletConfig
- the portlet configprotected ServletConfig getServletConfigWrapper(PortletConfig portletConfig)
PortletConfig
- portlet config
protected void doDispatch(RenderRequest request, RenderResponse response) throws PortletException, java.io.IOException
PortletException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |