| org.jaffa.presentation.portlet.ActionBase
All known Subclasses: org.jaffa.presentation.portlet.session.ui.SessionExplorerAction, org.jaffa.presentation.portlet.StartComponentAction, org.jaffa.presentation.portlet.widgets.tests.GridAction, org.jaffa.presentation.portlet.widgets.tests.LookupClientAction, org.jaffa.presentation.portlet.widgets.tests.FoldingSectionAction, org.jaffa.presentation.portlet.widgets.tests.LookupAction, org.jaffa.presentation.portlet.widgets.tests.TextAction, org.jaffa.presentation.portlet.widgets.tests.CheckBoxAction, org.jaffa.presentation.portlet.widgets.tests.ImageAction, org.jaffa.presentation.portlet.widgets.tests.TableAction, org.jaffa.components.maint.MaintAction, org.jaffa.components.finder.FinderAction, org.jaffa.presentation.portlet.widgets.tests.LabelAction, org.jaffa.presentation.portlet.session.ui.ComponentDetailsAction, org.jaffa.presentation.portlet.widgets.tests.UserGridAction, org.jaffa.applications.test.modules.security.components.test1.ui.Page1Action, org.jaffa.presentation.portlet.widgets.tests.EditBoxAction, org.jaffa.presentation.portlet.widgets.tests.DateTimeAction, org.jaffa.presentation.portlet.widgets.tests.DropDownAction, org.jaffa.presentation.portlet.widgets.tests.TreeAction, org.jaffa.presentation.portlet.widgets.tests.RadioButtonAction, org.jaffa.applications.test.modules.material.components.itemfinder.ui.ItemFinderCriteriaAction, org.jaffa.presentation.portlet.widgets.tests.ButtonAction, org.jaffa.presentation.portlet.session.ui.ComponentExplorerAction, org.jaffa.applications.test.modules.material.components.itemfinder.ui.ItemFinderResultsAction,
ActionBase | public class ActionBase extends Action (Code) | | This is the base class for all 'Action' classes
|
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.
Parameters: formBase - The input FormBean from which the current FormKey is to be determined. | public FormKey | do_HistoryNav_Clicked(String index) This is the handler for the event generated in the historyNav for rendering a previous screen.
Parameters: index - The index for the screen to be rendered. | public FormKey | do_refresh() Determines the currentFormKey, if possible, utilising the NAME field (if defined) and the componentId of the formBase. | public 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.
Parameters: eventId - The event. throws: Exception - If any error occurs in introspection or invocation of the event-handler. | protected ActionForward | handleNullFormKey() This is invoked whenever a null FormKey is returned by an event handler.
This will kill the UserSession, if the config property 'PROP_SECURITY_PORTLET_INVALIDATE_SESSION_BEFORE_REDIRECTING_TO_FINAL_URL' is set to true.
It will then redirect to the root of this webapp '/'.
throws: Exception - if any error occurs. | 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.
It will then return the FormName minus the parameters.
Parameters: formName - The input FormName. throws: UnsupportedEncodingException - This will be thrown if the JVM doesn't support the 'UTF-8' encoding. | 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.
For such a component a FormKeyChangeEvent will be sent to the registered FormKeyChangeListeners.
Parameters: fk - The input FormKey. | 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. |
component | protected Component component(Code) | | The optional component for this request (if any)
|
form | protected ActionForm form(Code) | | The optional ActionForm bean for this request (if any)
|
mapping | protected ActionMapping mapping(Code) | | The ActionMapping used to select this instance
|
defaultAction | protected FormKey defaultAction() throws Exception(Code) | | The default action method which should be overriden by the extending class.
This method is invoked by the perform() method, if no eventId is passed.
If the extending class doesn't provide an implementation of this method, a EventHandlerMissingRuntimeException will be thrown.
If all the 'submit' actions send an eventId, then there is no need to provide any implementation for this method.
throws: Exception - if the application business logic throws an exception A FormKey instance which describes the current Component & Form |
determineCurrentFormKey | protected FormKey determineCurrentFormKey(FormBase formBase)(Code) | | Determines the currentFormKey, if possible, utilising the NAME field (if defined) and the componentId of the formBase.
Parameters: formBase - The input FormBean from which the current FormKey is to be determined. The current FormKey. |
do_HistoryNav_Clicked | public FormKey do_HistoryNav_Clicked(String index)(Code) | | This is the handler for the event generated in the historyNav for rendering a previous screen.
Parameters: index - The index for the screen to be rendered. The most ancient screen(usually the Home) will be indexed '0' The FormKey for a previous screen. |
do_refresh | public FormKey do_refresh()(Code) | | Determines the currentFormKey, if possible, utilising the NAME field (if defined) and the componentId of the formBase.
This event is invoked when a user changes the settings of the UserGrid in a screen.
The FormKey for the Results screen. |
execute | public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception(Code) | | Check the eventId & invoke the suitable method which will return the FormKey.
It will invoke the defaultAction() method in case the eventId is null.
This will throw the EventHandlerMissingRuntimeException in case no method is found.
Parameters: mapping - The ActionMapping used to select this instance Parameters: form - The optional ActionForm bean for this request (if any) Parameters: request - The HTTP request we are processing Parameters: response - The HTTP response we are creating throws: Exception - if the application business logic throws an exception An ActionForward instance describing where and how control should be forwarded, or null if the response has already been completed |
executeEvent | protected FormKey executeEvent(String eventId) throws Exception(Code) | | This method will introspect this class for a suitable handler for the input eventId and invoke it.
Parameters: eventId - The event. throws: Exception - If any error occurs in introspection or invocation of the event-handler. The output from the input handler. |
handleNullFormKey | protected ActionForward handleNullFormKey() throws Exception(Code) | | This is invoked whenever a null FormKey is returned by an event handler.
This will kill the UserSession, if the config property 'PROP_SECURITY_PORTLET_INVALIDATE_SESSION_BEFORE_REDIRECTING_TO_FINAL_URL' is set to true.
It will then redirect to the root of this webapp '/'.
throws: Exception - if any error occurs. The ActionForward representing the redirection to the root of this webapp '/'. |
isTokenValid | protected boolean isTokenValid(HttpServletRequest request)(Code) | | 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. Else it returns false.
Parameters: request - The servlet request we are processing true if there is a transaction token stored in the component, and the value submitted as a request parameter with this action matches it. Else it returns false. |
isTokenValid | protected boolean isTokenValid(HttpServletRequest request, boolean reset)(Code) | | 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. Else it returns false.
Parameters: request - The servlet request we are processing Parameters: reset - Should we reset the token after checking it? true if there is a transaction token stored in the component, and the value submitted as a request parameter with this action matches it. Else it returns false. |
parseFormName | protected String parseFormName(String formName) throws UnsupportedEncodingException(Code) | | This will parse the input FormName for parameters and set them as attributes on the request stream.
It will then return the FormName minus the parameters.
Parameters: formName - The input FormName. throws: UnsupportedEncodingException - This will be thrown if the JVM doesn't support the 'UTF-8' encoding. Highly unlikely that this will be thrown. The FormName minus the parameters, if any. |
performTokenValidation | protected void performTokenValidation(HttpServletRequest request) throws ApplicationExceptions(Code) | | This merely invokes the isTokenValid() method and throws the ApplicationExceptions if the validation fails.
Parameters: request - The servlet request we are processing throws: ApplicationExceptions - if the token on the component does not match the token submitted as the request paramter. |
processContainerFormKey | protected FormKey processContainerFormKey(FormKey fk)(Code) | | Returns the ContainerFormKey, if the component specified by the input FormKey has one defined.
For such a component a FormKeyChangeEvent will be sent to the registered FormKeyChangeListeners.
Parameters: fk - The input FormKey. The ContainerFormKey, if exists, or just the input FormKey. |
resetToken | protected void resetToken(HttpServletRequest request)(Code) | | Reset the saved transaction token in the component. This
indicates that transactional token checking will not be needed
on the next request that is submitted.
Parameters: request - The servlet request we are processing |
saveToken | protected void saveToken(FormKey fk)(Code) | | Save a new transaction token in the component.
Parameters: fk - The FormKey from which the component will be determined. |
|
|