|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.rhq.core.domain.configuration.Property
org.rhq.core.domain.configuration.PropertyList
public class PropertyList
Holds an indexed list of child properties. This can hold any number of properties, including
additional lists and maps of properties (which means you can have N-levels of hierarchical data).
This list will store the properties in the order they are added.
Caution must be used when accessing this object. This class is not thread safe and, for entity persistence, the
child properties must have their Property.getParentList() field set. This is done for you when using the
add(Property) method.
| Constructor Summary | |
|---|---|
PropertyList()
|
|
PropertyList(String name)
Creates a new, empty PropertyList object that is associated with the given name. |
|
PropertyList(String name,
Property... startingList)
Creates a new PropertyList object that is associated with the given name and has the given properties as
its initial list of child properties. |
|
| Method Summary | |
|---|---|
void |
add(Property property)
Adds a child property to the end of this list. |
void |
afterUnmarshal(javax.xml.bind.Unmarshaller u,
Object parent)
This listener runs after jaxb unmarshalling and reconnects children properties to their parent list (as we don't send them avoiding cyclic references). |
protected void |
appendToStringInternals(StringBuilder str)
Subclasses can override this to add things it wants to see in the toString. |
boolean |
equals(Object obj)
NOTE: An PropertyList containing a null list is considered equal to a PropertyList containing an empty list. |
List<Property> |
getList()
Returns the children of this list. |
int |
hashCode()
|
void |
readExternal(ObjectInput in)
|
void |
setList(List<Property> list)
Sets the list of child properties directly to the given list reference. |
void |
writeExternal(ObjectOutput out)
|
| Methods inherited from class org.rhq.core.domain.configuration.Property |
|---|
getConfiguration, getErrorMessage, getId, getName, getParentList, getParentMap, setConfiguration, setErrorMessage, setErrorMessageFromThrowable, setId, setName, setParentList, setParentMap, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PropertyList()
public PropertyList(@NotNull
String name)
PropertyList object that is associated with the given name.
name - the name of the list itself
public PropertyList(@NotNull
String name,
@NotNull
Property... startingList)
PropertyList object that is associated with the given name and has the given properties as
its initial list of child properties. All properties found in startingList will have their
parent list set to this newly constructed list.
name - the name of the list itselfstartingList - a list of properties to be immediately added to this list| Method Detail |
|---|
@NotNull public List<Property> getList()
Warning: Caution should be used when accessing the returned list. Please see
the javadoc for this class for more information.
public void setList(List<Property> list)
list reference. This means the actual
list object is stored internally in this object. Changes made to list will be reflected back
into this object.
Warning: Caution should be used when setting this object's internal list. Please see
the javadoc for this class for more information.
list - the new list used internally by this object
public void add(@NotNull
Property property)
parent list for the child property to make persistence work.
property - the property to add to this list
public void writeExternal(ObjectOutput out)
throws IOException
writeExternal in interface ExternalizablewriteExternal in class PropertyIOExceptionProperty.writeExternal(java.io.ObjectOutput)
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
readExternal in interface ExternalizablereadExternal in class PropertyIOException
ClassNotFoundExceptionProperty.readExternal(java.io.ObjectInput)public boolean equals(Object obj)
equals in class Propertypublic int hashCode()
hashCode in class Propertyprotected void appendToStringInternals(StringBuilder str)
Property
appendToStringInternals in class Propertystr - the builder to append strings to
public void afterUnmarshal(javax.xml.bind.Unmarshaller u,
Object parent)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||