|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object Action com.ibm.portal.struts.action.StrutsAction
public class StrutsAction
A StrutsAction is an adapter between the contents of an incoming
Portlet request and the corresponding business logic that should be executed to
process this request. The controller (StrutsPortlet) will select an
appropriate StrutsAction for each request, create an instance (if necessary),
and call the execute
method.
StrutsActions must be programmed in a thread-safe manner, because the controller will share the same instance for multiple simultaneous requests. This means you should design with the following items in mind:
When a StrutsAction
instance is first created, the controller
servlet will call setServlet()
with a non-null argument to
identify the controller servlet instance to which this Action is attached.
When the controller servlet is to be shut down (or restarted), the
setServlet()
method will be called with a null
argument, which can be used to clean up any allocated resources in use
by this Action.
The Struts Action is a Portal friendly Action that is directly passed the portlet objects. This is the preferred interface for Struts applications that do not need to support the servlet environment.
Constructor Summary | |
---|---|
StrutsAction()
Constructor for this class |
Method Summary | |
---|---|
ActionForward |
execute(ActionMapping mapping,
ActionForm form,
ActionRequest request,
ActionResponse response)
Process the current request based on the ActionMapping information. |
ActionForward |
execute(ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
Deprecated. use execute methods that take portlet objects |
ActionForward |
execute(ActionMapping mapping,
ActionForm form,
PortletRequest request,
PortletResponse response)
Process the current request based on the ActionMapping information. |
ActionForward |
execute(ActionMapping mapping,
ActionForm form,
RenderRequest request,
RenderResponse response)
Process the current request based on the ActionMapping information. |
ActionForward |
execute(ActionMapping mapping,
ActionForm form,
ServletRequest request,
ServletResponse response)
Deprecated. use execute methods that take portlet objects |
void |
sendError(ActionRequest actionRequest,
int sc)
Sends an error response to the client using the specified status. |
void |
sendError(ActionRequest actionRequest,
int sc,
java.lang.String msg)
Sends an error response to the client using the specified status code and descriptive message. |
void |
sendError(PortletRequest portletRequest,
int sc)
Sends an error response to the client using the specified status. |
void |
sendError(PortletRequest portletRequest,
int sc,
java.lang.String msg)
Sends an error response to the client using the specified status code and descriptive message. |
void |
sendError(RenderRequest renderRequest,
int sc)
Sends an error response to the client using the specified status. |
void |
sendError(RenderRequest renderRequest,
int sc,
java.lang.String msg)
Sends an error response to the client using the specified status code and descriptive message. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StrutsAction()
Method Detail |
---|
public ActionForward execute(ActionMapping mapping, ActionForm form, PortletRequest request, PortletResponse response) throws java.lang.Exception
null
return value will stop the request processing, but will not result in the
creation of a new IViewCommand
. Note that this signature will not be called
if the execute method that takes either the Action or Render objects is also implemented.
mapping
- The ActionMapping used to select this instanceform
- The optional ActionForm bean for this request (if any)request
- The PortletRequest we are processingresponse
- The PortletResponse we are processing
null
java.lang.Exception
- if the application business logic throws an exceptionpublic ActionForward execute(ActionMapping mapping, ActionForm form, ActionRequest request, ActionResponse response) throws java.lang.Exception
null
return value will stop the request
processing, but will not result in the creation of a new IViewCommand
mapping
- The ActionMapping used to select this instanceform
- The optional ActionForm bean for this request (if any)request
- The action request we are processingresponse
- The action response
null
java.lang.Exception
- if the application business logic throws an exceptionpublic ActionForward execute(ActionMapping mapping, ActionForm form, RenderRequest request, RenderResponse response) throws java.lang.Exception
null
return value will stop the request processing, but will not result in the creation
of a new IViewCommand
mapping
- The ActionMapping used to select this instanceform
- The optional ActionForm bean for this request (if any)request
- The render request we are processingresponse
- The render response
null
java.lang.Exception
- if the application business logic throws an exceptionpublic ActionForward execute(ActionMapping mapping, ActionForm form, ServletRequest request, ServletResponse response) throws java.lang.Exception
null
return value will stop the request
processing, but will not result in the creation of a new IViewCommand
mapping
- The ActionMapping used to select this instanceform
- The optional ActionForm bean for this request (if any)request
- The non-HTTP request we are processingresponse
- The non-HTTP response we are creating
null
java.lang.Exception
- if the application business logic throws an exceptionpublic ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws java.lang.Exception
null
return value will stop the request
processing, but will not result in the creation of a new IViewCommand
mapping
- The ActionMapping used to select this instanceform
- The optional ActionForm bean for this request (if any)request
- The HTTP request we are processingresponse
- The HTTP response
null
java.lang.Exception
- if the application business logic throws an exceptionpublic void sendError(PortletRequest portletRequest, int sc, java.lang.String msg) throws java.io.IOException
portletRequest
- the PortletRequest this error report is associated withsc
- the error status codemsg
- the descriptive message
java.io.IOException
- if the error information can not be savedpublic void sendError(ActionRequest actionRequest, int sc, java.lang.String msg) throws java.io.IOException
actionRequest
- the PortletRequest this error report is associated withsc
- the error status codemsg
- the descriptive message
java.io.IOException
- if the error information can not be savedpublic void sendError(RenderRequest renderRequest, int sc, java.lang.String msg) throws java.io.IOException
renderRequest
- the PortletRequest this error report is associated withsc
- the error status codemsg
- the descriptive message
java.io.IOException
- if the error information can not be savedpublic void sendError(PortletRequest portletRequest, int sc) throws java.io.IOException
portletRequest
- the PortletRequest this error report is associated withsc
- the error status code
java.io.IOException
- if the error information can not be savedpublic void sendError(ActionRequest actionRequest, int sc) throws java.io.IOException
actionRequest
- the PortletRequest this error report is associated withsc
- the error status code
java.io.IOException
- if the error information can not be savedpublic void sendError(RenderRequest renderRequest, int sc) throws java.io.IOException
renderRequest
- the PortletRequest this error report is associated withsc
- the error status code
java.io.IOException
- if the error information can not be saved
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |