public class Form extends ICEObject implements Composite
The Form class is a representation of the Item class and contains all of the Entries that must be addressed by the Eclipse User before the Item can perform its task or tasks. The Entries in a Form may change after it is submitted if the Item class needs more information. A client only interacts with an Item through its Forms. The Form requires a list of Actions for which it can be used upon construction and, if no such list is provided, getActionList() will return null. Such usage is common because in some instances Forms are actually used by Actions themselves and not Items!
All Forms must be in a "ready to use" state by default with enough information provided so that a task can be performed with no modification. isReady() should always return true for such a Form, newly created.
iComponentVisitor
iComponentListener
Constructor and Description |
---|
Form()
The constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(IComponentVisitor visitor)
(non-Javadoc)
|
void |
addComponent(Component child)
(non-Javadoc)
|
java.lang.Object |
clone()
This operation provides a deep copy of the Form.
|
void |
copy(Form otherForm)
This operation performs a deep copy of the attributes of another Form
into the current Form.
|
boolean |
equals(java.lang.Object otherForm)
This operation is used to check equality between the Form and another
Form.
|
java.util.ArrayList<java.lang.String> |
getActionList()
This operation retrieves the list of Actions that can be performed for
the Form.
|
Component |
getComponent(int childId)
(non-Javadoc)
|
java.util.ArrayList<Component> |
getComponents()
(non-Javadoc)
|
int |
getItemID()
This operation returns the id of the Item that is represented by this
Form.
|
int |
getNumberOfComponents()
(non-Javadoc)
|
int |
hashCode()
This operation returns the hashcode value of the Form.
|
boolean |
isReady()
This operation returns true if the Form is complete, valid and can be
processed.
|
void |
markReady(boolean ready)
This operation marks the Form as either ready (true) or not ready (false)
to be processed.
|
void |
removeComponent(int childId)
(non-Javadoc)
|
void |
setActionList(java.util.ArrayList<java.lang.String> actions)
This operation sets the list of Actions that can be performed using the
data on the Form.
|
void |
setItemID(int newItemID)
This operation sets the ID of the item to which the Form belongs.
|
void |
update(java.lang.String updatedKey,
java.lang.String newValue)
(non-Javadoc)
|
copy, getDescription, getId, getName, register, setDescription, setId, setName, unregister
getClass, notify, notifyAll, toString, wait, wait, wait
register, unregister
getDescription, getId, getName, setDescription, setId, setName
public Form()
The constructor. This constructor requires a list of Actions for which the Form can be used. If this list is null, then getActionList() will return null.
public int getItemID()
This operation returns the id of the Item that is represented by this Form.
The unique ID of the Item that the Form represents.
public void setItemID(int newItemID)
This operation sets the ID of the item to which the Form belongs.
newItemID
- The new Item ID.
public java.util.ArrayList<java.lang.String> getActionList()
This operation retrieves the list of Actions that can be performed for the Form.
The list of Actions that can be performed for this Form when it is processed or null if no such list was provided.
public void setActionList(java.util.ArrayList<java.lang.String> actions)
This operation sets the list of Actions that can be performed using the data on the Form.
actions
- The list of available Actions.
public boolean isReady()
This operation returns true if the Form is complete, valid and can be processed.
True if the Form is complete, valid and can be processed.
public void markReady(boolean ready)
This operation marks the Form as either ready (true) or not ready (false) to be processed.
ready
- True if the Form should be marked as complete, valid and ready to be processed. False otherwise.
public boolean equals(java.lang.Object otherForm)
This operation is used to check equality between the Form and another Form. It returns true if the Forms are equal and false if they are not.
equals
in interface Identifiable
equals
in class ICEObject
otherForm
- The other Form to which this Form should be compared.
True if the Forms are equal, false otherwise.
Identifiable.equals(Object otherObject)
public int hashCode()
This operation returns the hashcode value of the Form.
hashCode
in interface Identifiable
hashCode
in class ICEObject
The hashcode of the Form.
Identifiable.hashCode()
public java.lang.Object clone()
This operation provides a deep copy of the Form.
clone
in interface Identifiable
clone
in class ICEObject
The deep-copy clone of this Form.
public void copy(Form otherForm)
This operation performs a deep copy of the attributes of another Form into the current Form.
otherForm
- The other Form from which information should be copied.
public void update(java.lang.String updatedKey, java.lang.String newValue)
ICEObject
update
in interface IUpdateable
update
in class ICEObject
updatedKey
- A unique key that describes the value that to be updated.
newValue
- The updated value of the key.
IUpdateable.update(String updatedKey, String newValue)
public void accept(IComponentVisitor visitor)
accept
in interface Component
visitor
- The visitor
Component.accept(IComponentVisitor visitor)
public void addComponent(Component child)
addComponent
in interface Composite
child
- The Component that should be added to the Composite.
Composite.addComponent(Component child)
public void removeComponent(int childId)
removeComponent
in interface Composite
childId
- The id of the child Component that should be removed from the Composite.
Composite.removeComponent(int childId)
public Component getComponent(int childId)
getComponent
in interface Composite
childId
- The id of the child Component that should be retrieved from the Composite.
The child with id childId that was retrieved from the Composite. NULL if the childId was not found in the Composite.
Composite.getComponent(int childId)
public int getNumberOfComponents()
getNumberOfComponents
in interface Composite
The number of child Components contained in the Composite.
Composite.getNumberOfComponents()
public java.util.ArrayList<Component> getComponents()
getComponents
in interface Composite
The set of Components.
Composite.getComponents()