| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.struts.action.Action
org.jaffa.presentation.portlet.ActionBase
This is the base class for all 'Action' classes
| Field Summary | |
| protected  Component | componentThe optional component for this request (if any) | 
| protected  ActionForm | formThe optional ActionForm bean for this request (if any) | 
| protected  ActionMapping | mappingThe ActionMapping used to select this instance | 
| protected  HttpServletRequest | requestThe HTTP request we are processing | 
| protected  HttpServletResponse | responseThe HTTP response we are creating | 
| Fields inherited from class org.apache.struts.action.Action | 
| ACTION_SERVLET_KEY, APPLICATION_KEY, DATA_SOURCE_KEY, defaultLocale, ERROR_KEY, EXCEPTION_KEY, FORM_BEANS_KEY, FORWARDS_KEY, LOCALE_KEY, MAPPING_KEY, MAPPINGS_KEY, MESSAGE_KEY, MESSAGES_KEY, MULTIPART_KEY, PLUG_INS_KEY, REQUEST_PROCESSOR_KEY, servlet, SERVLET_KEY, TRANSACTION_TOKEN_KEY | 
| Constructor Summary | |
| ActionBase() | |
| Method Summary | |
| protected  FormKey | defaultAction()The default action method which should be overriden by the extending class. | 
| protected  FormKey | determineCurrentFormKey(FormBase formBase)Determines the currentFormKey, if possible, utilising the NAME field (if defined) and the componentId of the formBase. | 
|  FormKey | do_HistoryNav_Clicked(String index)This is the handler for the event generated in the historyNav for rendering a previous screen. | 
|  FormKey | do_refresh()Determines the currentFormKey, if possible, utilising the NAME field (if defined) and the componentId of the formBase. | 
|  ActionForward | execute(ActionMapping mapping,
               ActionForm form,
               HttpServletRequest request,
               HttpServletResponse response)Check the eventId & invoke the suitable method which will return the FormKey. | 
| protected  FormKey | executeEvent(String eventId)This method will introspect this class for a suitable handler for the input eventId and invoke it. | 
| protected  ActionForward | handleNullFormKey()This is invoked whenever a null FormKey is returned by an event handler. | 
| protected  boolean | isTokenValid(HttpServletRequest request)Return true if there is a transaction token stored in the component, and the value submitted as a request parameter with this action matches it. | 
| protected  boolean | isTokenValid(HttpServletRequest request,
                         boolean reset)Return true if there is a transaction token stored in the component, and the value submitted as a request parameter with this action matches it. | 
| protected  String | parseFormName(String formName)This will parse the input FormName for parameters and set them as attributes on the request stream. | 
| protected  void | performTokenValidation(HttpServletRequest request)This merely invokes the isTokenValid() method and throws the ApplicationExceptions if the validation fails. | 
| protected  FormKey | processContainerFormKey(FormKey fk)Returns the ContainerFormKey, if the component specified by the input FormKey has one defined. | 
| protected  void | resetToken(HttpServletRequest request)Reset the saved transaction token in the component. | 
| protected  void | saveToken(FormKey fk)Save a new transaction token in the component. | 
| Methods inherited from class org.apache.struts.action.Action | 
| execute, generateToken, getDataSource, getDataSource, getLocale, getResources, getResources, getResources, getServlet, isCancelled, perform, perform, saveErrors, saveMessages, saveToken, setLocale, setServlet, toHex | 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
protected ActionMapping mapping
protected ActionForm form
protected HttpServletRequest request
protected HttpServletResponse response
protected Component component
| Constructor Detail | 
public ActionBase()
| Method Detail | 
public ActionForward execute(ActionMapping mapping,
                             ActionForm form,
                             HttpServletRequest request,
                             HttpServletResponse response)
                      throws Exception
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 we are creating
Exception - if the application business logic throws an exception
protected FormKey defaultAction()
                         throws Exception
Exception - if the application business logic throws an exceptionprotected void saveToken(FormKey fk)
fk - The FormKey from which the component will be determined.protected boolean isTokenValid(HttpServletRequest request)
request - The servlet request we are processing
protected boolean isTokenValid(HttpServletRequest request,
                               boolean reset)
request - The servlet request we are processingreset - Should we reset the token after checking it?
protected void resetToken(HttpServletRequest request)
request - The servlet request we are processing
protected void performTokenValidation(HttpServletRequest request)
                               throws ApplicationExceptions
request - The servlet request we are processing
ApplicationExceptions - if the token on the component does not match the token submitted as the request paramter.public FormKey do_refresh()
public FormKey do_HistoryNav_Clicked(String index)
index - The index for the screen to be rendered. The most ancient screen(usually the Home) will be indexed '0'
protected FormKey executeEvent(String eventId)
                        throws Exception
eventId - The event.
Exception - If any error occurs in introspection or invocation of the event-handler.
protected ActionForward handleNullFormKey()
                                   throws Exception
Exception - if any error occurs.protected FormKey determineCurrentFormKey(FormBase formBase)
formBase - The input FormBean from which the current FormKey is to be determined.
protected String parseFormName(String formName)
                        throws UnsupportedEncodingException
formName - The input FormName.
UnsupportedEncodingException - This will be thrown if the JVM doesn't support the 'UTF-8' encoding. Highly unlikely that this will be thrown.protected FormKey processContainerFormKey(FormKey fk)
fk - The input FormKey.
| 
 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||