uk.ac.ebi.intact.application.editor.struts.framework
Class AbstractEditorDispatchAction

java.lang.Object
  |
  +--org.apache.struts.action.Action
        |
        +--org.apache.struts.actions.DispatchAction
              |
              +--org.apache.struts.actions.LookupDispatchAction
                    |
                    +--uk.ac.ebi.intact.application.editor.struts.framework.AbstractEditorDispatchAction
All Implemented Interfaces:
ForwardConstants
Direct Known Subclasses:
ExperimentDispatchAction, InteractionDispatchAction, SidebarDispatchAction, SubmitDispatchAction

public abstract class AbstractEditorDispatchAction
extends org.apache.struts.actions.LookupDispatchAction
implements ForwardConstants

The super class for all the dispatch actions.

Version:
$id$
Author:
Sugath Mudali (smudali@ebi.ac.uk)

Field Summary
protected static org.apache.log4j.Logger LOGGER
          The logger for Editor.
 
Fields inherited from class org.apache.struts.actions.LookupDispatchAction
keyMethodMap, localeMap
 
Fields inherited from class org.apache.struts.actions.DispatchAction
clazz, log, messages, methods, types
 
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
 
Fields inherited from interface uk.ac.ebi.intact.application.editor.struts.framework.util.ForwardConstants
EXP, FAILURE, MATCH, NO_MATCH, RESULT, SEARCH, SUCCESS
 
Constructor Summary
AbstractEditorDispatchAction()
           
 
Method Summary
protected  EditUserI getIntactUser(javax.servlet.http.HttpServletRequest request)
          Returns the Intact User instance saved in a session for given Http request.
protected  EditorService getService()
          Returns the only instance of Intact Service instance.
protected  javax.servlet.http.HttpSession getSession(javax.servlet.http.HttpServletRequest request)
          Returns the session from given request.
protected  boolean hasErrors(javax.servlet.http.HttpServletRequest request)
          Returns true if errors in stored in the request
 
Methods inherited from class org.apache.struts.actions.LookupDispatchAction
execute, getKeyMethodMap
 
Methods inherited from class org.apache.struts.actions.DispatchAction
dispatchMethod, getMethod, unspecified
 
Methods inherited from class org.apache.struts.action.Action
execute, generateToken, getDataSource, getDataSource, getLocale, getResources, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, perform, perform, resetToken, 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

LOGGER

protected static final org.apache.log4j.Logger LOGGER
The logger for Editor. Allow access from the subclasses.

Constructor Detail

AbstractEditorDispatchAction

public AbstractEditorDispatchAction()
Method Detail

getService

protected EditorService getService()
Returns the only instance of Intact Service instance.

Returns:
only instance of the EditorService class.

getSession

protected javax.servlet.http.HttpSession getSession(javax.servlet.http.HttpServletRequest request)
                                             throws SessionExpiredException
Returns the session from given request. No new session is created.

Parameters:
request - the request to get the session from.
Returns:
session associated with given request.
Throws:
SessionExpiredException - for an expired session.
 post: return <> Undefined
 

getIntactUser

protected EditUserI getIntactUser(javax.servlet.http.HttpServletRequest request)
                           throws SessionExpiredException
Returns the Intact User instance saved in a session for given Http request.

Parameters:
request - the Http request to access the Intact user object.
Returns:
an instance of EditUser stored in a session. No new session is created.
Throws:
SessionExpiredException - for an expired session.
 post: return <> Undefined
 

hasErrors

protected boolean hasErrors(javax.servlet.http.HttpServletRequest request)
Returns true if errors in stored in the request

Parameters:
request - Http request to search errors for.
Returns:
true if strut's error is found in request and it is not null. For all instances, false is returned.


IntAct Project - EMBL-EBI 2004 - intact-help@ebi.ac.uk