uk.ac.ebi.intact.application.editor.struts.view
Class AbstractEditBean

java.lang.Object
  |
  +--uk.ac.ebi.intact.application.editor.struts.view.AbstractEditBean
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AbstractEditKeyBean, ExperimentBean, ProteinBean

public abstract class AbstractEditBean
extends java.lang.Object
implements java.io.Serializable

Generic edit bean.

Version:
$Id: AbstractEditBean.java,v 1.2 2004/01/02 17:30:05 smudali Exp $
Author:
Sugath Mudali (smudali@ebi.ac.uk)
See Also:
Serialized Form

Field Summary
static java.lang.String SAVE
          The saving state.
static java.lang.String VIEW
          The editing state.
 
Constructor Summary
AbstractEditBean()
           
 
Method Summary
protected  boolean equals(java.lang.Object obj1, java.lang.Object obj2)
          True if both objects are null or object i is equal to object 2.
 java.lang.String getEditState()
          Returns the status of the editing state.
protected  java.lang.String getLink(java.lang.String topic, java.lang.String label)
          Returns a link to display a read only window.
 void setEditState(java.lang.String state)
          Sets this bean's edit state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VIEW

public static final java.lang.String VIEW
The editing state.

See Also:
Constant Field Values

SAVE

public static final java.lang.String SAVE
The saving state.

See Also:
Constant Field Values
Constructor Detail

AbstractEditBean

public AbstractEditBean()
Method Detail

getEditState

public java.lang.String getEditState()
Returns the status of the editing state.

Returns:
VIEW if this instance is currently in view mode; for all other instances SAVE is returned.

setEditState

public void setEditState(java.lang.String state)
Sets this bean's edit state.

Parameters:
state - the bean's edit state.
 post: getEditState() = state
 

getLink

protected java.lang.String getLink(java.lang.String topic,
                                   java.lang.String label)
Returns a link to display a read only window.

Parameters:
topic - the first parameter to the show command.
label - the second parameter to the show command; this should be the short label.
Returns:
the link to display a read only version of window.

equals

protected boolean equals(java.lang.Object obj1,
                         java.lang.Object obj2)
True if both objects are null or object i is equal to object 2.

Parameters:
obj1 - the first object to compare.
obj2 - the second object to compare.
Returns:
true only if both objects are null or obj1 equals obj2. False is returned for all other instances.


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