uk.ac.ebi.intact.application.hierarchView.struts.framework
Class IntactBaseForm

java.lang.Object
  |
  +--org.apache.struts.action.ActionForm
        |
        +--uk.ac.ebi.intact.application.hierarchView.struts.framework.IntactBaseForm
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
ClickBehaviourForm, HighlightmentForm, InitForm, InteractionNetworkForm, SearchForm

public class IntactBaseForm
extends org.apache.struts.action.ActionForm

Super class for all hierarchView related form classes.

Version:
$Id: IntactBaseForm.java,v 1.5 2003/11/13 14:15:34 skerrien Exp $
Author:
Samuel Kerrien (skerrien@ebi.ac.uk)
See Also:
Serialized Form

Field Summary
static java.lang.String INTACT_ERROR
          The global Intact error key.
static java.lang.String INTACT_MESSAGE
          The global Intact message key.
static org.apache.log4j.Logger logger
           
 
Fields inherited from class org.apache.struts.action.ActionForm
multipartRequestHandler, servlet
 
Constructor Summary
IntactBaseForm()
           
 
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 addMessage(java.lang.String key)
          Adds an error with given key.
protected  void addMessage(java.lang.String key, java.lang.String value)
          Adds an error with given key and value.
protected  org.apache.struts.action.ActionErrors getErrors()
          return the error set
protected  org.apache.struts.action.ActionMessages getMessages()
          return the error set
protected  boolean isErrorsEmpty()
          Specify if an the error set is empty.
protected  boolean isMessagesEmpty()
          Specify if an the error set is empty.
protected  void saveMessages(javax.servlet.http.HttpServletRequest request)
          Saves the Messages in given request for tag.
 
Methods inherited from class org.apache.struts.action.ActionForm
getMultipartRequestHandler, getServlet, getServletWrapper, reset, reset, setMultipartRequestHandler, setServlet, validate, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

public static 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

INTACT_MESSAGE

public static final java.lang.String INTACT_MESSAGE
The global Intact message key.

See Also:
Constant Field Values
Constructor Detail

IntactBaseForm

public IntactBaseForm()
Method Detail

getErrors

protected org.apache.struts.action.ActionErrors getErrors()
return the error set

Returns:
the error set

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.

isErrorsEmpty

protected boolean isErrorsEmpty()
Specify if an the error set is empty.

Returns:
boolean false is there are any error registered, else true

getMessages

protected org.apache.struts.action.ActionMessages getMessages()
return the error set

Returns:
the error set

addMessage

protected void addMessage(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.

addMessage

protected void addMessage(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.

isMessagesEmpty

protected boolean isMessagesEmpty()
Specify if an the error set is empty.

Returns:
boolean false is there are any error registered, else true

saveMessages

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

Parameters:
request - the request to save errors.


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