public class DataComponent extends ICEObject implements Component, IUpdateableListener
The DataComponent class is a container for Entries and behaves as a Component from the UpdateableComposite package. The class is used contain a set of Entries that are related to each other in some way and to accept updates from dispatched from the Registry.
iComponentVisitor
iComponentListener
component
Constructor and Description |
---|
DataComponent()
The Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
accept(IComponentVisitor visitor)
(non-Javadoc)
|
void |
addEntry(Entry newEntry)
This operation adds an entry to the DataComponent.
|
void |
addEntry(Entry newEntry,
java.lang.String... parentNames)
This operation adds an Entry to the DataComponent and specifies the name
of another Entry on which it is dependent.
|
void |
clearEntries()
This operation clears all entries that are currently stored in the Form.
|
java.lang.Object |
clone()
This operation provides a deep copy of the DataComponent.
|
boolean |
contains(java.lang.String entryName)
This operation determines whether a Form contains an Entry with the name
entryName.
|
void |
copy(DataComponent otherDataComponent)
This operation performs a deep copy of the attributes of another
DataComponent into the current DataComponent.
|
void |
deleteEntry(java.lang.String entryName)
This operation deletes the Entry with name equal to entryName from the
Entries in the Form.
|
boolean |
equals(java.lang.Object otherDataComponent)
This operation is used to check equality between the DataComponent and
another DataComponent.
|
int |
hashCode()
This operation returns the hashcode value of the DataComponent.
|
java.util.ArrayList<Entry> |
retrieveAllEntries()
This operation will return all of the Entries in the Form regardless of
their dependency or preparation status.
|
Entry |
retrieveEntry(java.lang.String entryName)
This operation retrieves the Entry with name entryName from the Form.
|
java.util.ArrayList<Entry> |
retrieveReadyEntries()
This operation retrieves those Entries in the Form that are currently
ready to be answered by the Eclipse User.
|
void |
update(IUpdateable component)
(non-Javadoc)
|
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 void addEntry(Entry newEntry)
This operation adds an entry to the DataComponent.
newEntry
- The new Entry that will be added to the Form.
public void addEntry(Entry newEntry, java.lang.String... parentNames)
This operation adds an Entry to the DataComponent and specifies the name of another Entry on which it is dependent. It notifies listeners that the DataComponent has been updated.
newEntry
- The new Entry that should be added to the form.
parentNames
- The list of Entry names for those Entries on which the new Entry is dependent.
public void clearEntries()
This operation clears all entries that are currently stored in the Form.
public void deleteEntry(java.lang.String entryName)
This operation deletes the Entry with name equal to entryName from the Entries in the Form.
entryName
- The name of the Entry to delete.
public Entry retrieveEntry(java.lang.String entryName)
This operation retrieves the Entry with name entryName from the Form.
entryName
- The name of the Entry to retrieve from the Form.
The Entry with name entryName.
public java.util.ArrayList<Entry> retrieveReadyEntries()
This operation retrieves those Entries in the Form that are currently ready to be answered by the Eclipse User. This list can change with time as more information is provided to the Form and Item.
The list of Entries that are ready to be addressed. The Entries in this list are only the Entries that are not dependent on other Entries or Entries for which all of the needed information has been provided.
public java.util.ArrayList<Entry> retrieveAllEntries()
This operation will return all of the Entries in the Form regardless of their dependency or preparation status.
The list of all Entries stored in the Form.
public boolean contains(java.lang.String entryName)
This operation determines whether a Form contains an Entry with the name entryName. It returns True if the Entry is in the Form and False if it is not in the Form.
entryName
- The name of the Entry whose existence in the Form should be checked.
True if the Entry with name entryName is in the form, false otherwise.
public boolean equals(java.lang.Object otherDataComponent)
This operation is used to check equality between the DataComponent and another DataComponent. It returns true if the DataComponents are equal and false if they are not.
equals
in interface Identifiable
equals
in class ICEObject
otherDataComponent
- The other DataComponent to which this component should be compared.
True if the DataComponents are equal, false otherwise.
Identifiable.equals(Object otherObject)
public int hashCode()
This operation returns the hashcode value of the DataComponent.
hashCode
in interface Identifiable
hashCode
in class ICEObject
The hashcode.
Identifiable.hashCode()
public void copy(DataComponent otherDataComponent)
This operation performs a deep copy of the attributes of another DataComponent into the current DataComponent.
otherDataComponent
- The other DataComponent from which information should be copied.
public java.lang.Object clone()
This operation provides a deep copy of the DataComponent.
clone
in interface Identifiable
clone
in class ICEObject
The deep-copy clone of this DataComponent.
public void update(java.lang.String updatedKey, java.lang.String newValue)
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 update(IUpdateable component)
update
in interface IUpdateableListener
component
- The component that was updated in some way.IUpdateableListener.update(IUpdateable component)