|
RSE Release 3.3 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.rse.core.model.RSEPersistableObject
org.eclipse.rse.core.model.PropertySetContainer
org.eclipse.rse.core.model.RSEModelObject
org.eclipse.rse.core.model.PropertySet
public class PropertySet
A LinkedHashmap based implementation of the IPropertySet interface.
Not thread-safe since the underlying HashMap is
not thread-safe.
| Field Summary | |
|---|---|
protected static IPropertyType |
_defaultType
|
| Fields inherited from interface org.eclipse.rse.core.model.IPropertySet |
|---|
DESCRIPTION_KEY |
| Fields inherited from interface org.eclipse.rse.core.model.IRSEPersistableContainer |
|---|
NO_CHILDREN |
| Constructor Summary | |
|---|---|
PropertySet(IPropertySet propertySet)
Construct a new PropertySet based on an existing one (i.e. clone it). |
|
PropertySet(String name)
Construct a new empty PropertySet. |
|
| Method Summary | |
|---|---|
IProperty |
addProperty(String key,
IProperty property)
Add a typed Property to the set. |
IProperty |
addProperty(String key,
String value)
Add a Property with String value to the set. |
IProperty |
addProperty(String key,
String value,
IPropertyType type)
Add a typed Property to the set. |
boolean |
commit()
Request a persistence manager to persist this object. |
IPropertySetContainer |
getContainer()
|
String |
getDescription()
Return the description of this Property Set. |
String |
getLabel()
|
String |
getName()
Return the name of this Property Set. |
IRSEPersistableContainer[] |
getPersistableChildren()
Retrieves the children of this object in the persistence containment hierarchy. |
IRSEPersistableContainer |
getPersistableParent()
Retrieve the parent of this object in the persistence containment hierarchy. |
IProperty |
getProperty(String key)
Return the IProperty associated with the given key. |
String[] |
getPropertyKeys()
Return the list of Property Keys in this Set. |
IPropertyType |
getPropertyType(String key)
Return the type of the property identified by the given key. |
String |
getPropertyValue(String key)
Return the String representation of a Property. |
boolean |
removeProperty(String key)
Remove a Property from the set. |
void |
setContainer(IPropertySetContainer container)
Sets the container of this property set. |
void |
setDescription(String description)
Sets the description property of the property set. |
void |
setLabel(String label)
|
void |
setName(String name)
Set the name of this Property Set. |
void |
setProperties(Map map)
Set all the Properties of this set. |
void |
update(Observable o,
Object arg)
|
| Methods inherited from class org.eclipse.rse.core.model.PropertySetContainer |
|---|
addPropertySet, addPropertySets, clonePropertySets, createPropertySet, createPropertySet, getPropertySet, getPropertySets, removePropertySet |
| Methods inherited from class org.eclipse.rse.core.model.RSEPersistableObject |
|---|
compareStrings, isDirty, isTainted, setDirty, setTainted, setWasRestored, wasRestored |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.eclipse.rse.core.model.IPropertySetContainer |
|---|
addPropertySet, addPropertySets, clonePropertySets, createPropertySet, createPropertySet, getPropertySet, getPropertySets, removePropertySet |
| Methods inherited from interface org.eclipse.rse.core.model.IPropertySetContainer |
|---|
addPropertySet, addPropertySets, clonePropertySets, createPropertySet, createPropertySet, getPropertySet, getPropertySets, removePropertySet |
| Methods inherited from interface org.eclipse.rse.core.model.IRSEPersistableContainer |
|---|
isDirty, isTainted, setDirty, setTainted, setWasRestored, wasRestored |
| Field Detail |
|---|
protected static IPropertyType _defaultType
| Constructor Detail |
|---|
public PropertySet(IPropertySet propertySet)
propertySet - existing Property Set to clonepublic PropertySet(String name)
name - of the new PropertySet| Method Detail |
|---|
public String getName()
IPropertySet
getName in interface IPropertySetgetName in interface IRSEModelObjectpublic String getLabel()
getLabel in interface ILabeledObjectpublic void setLabel(String label)
setLabel in interface ILabeledObjectlabel - A display label for this object.public String getDescription()
IPropertySetaddProperty(IPropertySet.DESCRIPTION_KEY, "Description");
getDescription in interface IPropertySetgetDescription in interface IRSEModelObjectgetDescription in class RSEModelObjectnull in case no description has been set.public void setDescription(String description)
IPropertySetaddProperty(IPropertySet.DESCRIPTION_KEY, description);
setDescription in interface IPropertySetdescription - the string describing this property set.public String[] getPropertyKeys()
IPropertySet
getPropertyKeys in interface IPropertySetpublic void setName(String name)
IPropertySet
setName in interface IPropertySetname - the name to set. Must not be nullpublic void setProperties(Map map)
IPropertySet
setProperties in interface IPropertySetmap - a Map of String to IProperty associations.
public IProperty addProperty(String key,
IProperty property)
key - Key to addproperty - The Property to add
public IProperty addProperty(String key,
String value)
IPropertySet
addProperty in interface IPropertySetkey - Key to addvalue - Value to add
public IProperty addProperty(String key,
String value,
IPropertyType type)
IPropertySet
addProperty in interface IPropertySetkey - Key to addvalue - Value to addtype - Type of the Property to add
public boolean removeProperty(String key)
IPropertySet
removeProperty in interface IPropertySetkey - The key to remove
true if the Property has been removed,
or false if the key has not been part of the set.public IProperty getProperty(String key)
IPropertySetIProperty associated with the given key.
If the key is not in the set, null is returned.
getProperty in interface IPropertySetkey - String key for Property
null if the key is not found in the set.public String getPropertyValue(String key)
IPropertySetnull is returned.
getPropertyValue in interface IPropertySetkey - String key for Property
null if the key is not found in the set.public IPropertyType getPropertyType(String key)
IPropertySet
getPropertyType in interface IPropertySetkey - String key for Property
null if the key is not found in the set.public boolean commit()
IRSEPersistableContainer
commit in interface IRSEPersistableContainerpublic IRSEPersistableContainer[] getPersistableChildren()
IRSEPersistableContainer
getPersistableChildren in interface IRSEPersistableContainerIRSEPersistableContainer.NO_CHILDREN.public IRSEPersistableContainer getPersistableParent()
IRSEPersistableContainer
getPersistableParent in interface IRSEPersistableContainerpublic void setContainer(IPropertySetContainer container)
IPropertySet
setContainer in interface IPropertySetcontainer - the property set containerpublic IPropertySetContainer getContainer()
getContainer in interface IPropertySet
public void update(Observable o,
Object arg)
update in interface Observer
|
RSE Release 3.3 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||