uk.ac.ebi.intact.application.search2.struts.framework
Class IntactBaseAction

java.lang.Object
  |
  +--org.apache.struts.action.Action
        |
        +--uk.ac.ebi.intact.application.search2.struts.framework.IntactBaseAction
Direct Known Subclasses:
AbstractResulltAction, DispatcherAction, SearchAction, WelcomeAction

public abstract class IntactBaseAction
extends org.apache.struts.action.Action

Super class for all Intact related action classes.

Version:
$Id: IntactBaseAction.java,v 1.2 2004/01/31 11:41:33 skerrien Exp $
Author:
Sugath Mudali (smudali@ebi.ac.uk)

Field Summary
static java.lang.String INTACT_ERROR
          The global Intact error key.
protected static org.apache.log4j.Logger logger
           
 
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
IntactBaseAction()
           
 
Method Summary
protected  void addError(java.lang.String key)
          Adds an error with given key.
protected  void addError(java.lang.String key, java.lang.String value)
          Adds an error with given key and value.
protected  void clearErrors()
          Clear error container.
protected  IntactServiceIF getIntactService()
          Returns the only instance of Intact Service instance.
protected  IntactUserIF getIntactUser(javax.servlet.http.HttpSession session)
          Returns the Intact User instance saved in a session.
protected  javax.servlet.http.HttpSession getSession(javax.servlet.http.HttpServletRequest request)
          Returns the session from given request.
protected  void saveErrors(javax.servlet.http.HttpServletRequest request)
          Saves the errors in given request for tag.
 
Methods inherited from class org.apache.struts.action.Action
execute, 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 transient org.apache.log4j.Logger logger

INTACT_ERROR

public static final java.lang.String INTACT_ERROR
The global Intact error key.

See Also:
Constant Field Values
Constructor Detail

IntactBaseAction

public IntactBaseAction()
Method Detail

getIntactService

protected IntactServiceIF getIntactService()
Returns the only instance of Intact Service instance.

Returns:
only instance of the IntactServiceImpl class.

getIntactUser

protected IntactUserIF getIntactUser(javax.servlet.http.HttpSession session)
Returns the Intact User instance saved in a session.

Parameters:
session - the session to access the Intact user object.
Returns:
an instance of IntactUserImpl stored in session

getSession

protected javax.servlet.http.HttpSession getSession(javax.servlet.http.HttpServletRequest request)
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. Null is returned if there is no session associated with request.

clearErrors

protected void clearErrors()
Clear error container.


addError

protected void addError(java.lang.String key)
Adds an error with given key.

Parameters:
key - the error key. This value is looked up in the IntactResources.properties bundle.

addError

protected void addError(java.lang.String key,
                        java.lang.String value)
Adds an error with given key and value.

Parameters:
key - the error key. This value is looked up in the IntactResources.properties bundle.
value - the value to substitute for the first place holder in the IntactResources.properties bundle.

saveErrors

protected void saveErrors(javax.servlet.http.HttpServletRequest request)
Saves the errors in given request for tag.

Parameters:
request - the request to save errors.


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