|
RSE Release 3.4 |
|||||||||
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 PropertySetMethod Detail |
---|
public String getName()
IPropertySet
getName
in interface IPropertySet
getName
in interface IRSEModelObject
public String getLabel()
getLabel
in interface ILabeledObject
public void setLabel(String label)
setLabel
in interface ILabeledObject
label
- A display label for this object.public String getDescription()
IPropertySet
addProperty(IPropertySet.DESCRIPTION_KEY, "Description");
getDescription
in interface IPropertySet
getDescription
in interface IRSEModelObject
getDescription
in class RSEModelObject
null
in case no description has been set.public void setDescription(String description)
IPropertySet
addProperty(IPropertySet.DESCRIPTION_KEY, description);
setDescription
in interface IPropertySet
description
- the string describing this property set.public String[] getPropertyKeys()
IPropertySet
getPropertyKeys
in interface IPropertySet
public void setName(String name)
IPropertySet
setName
in interface IPropertySet
name
- the name to set. Must not be null
public void setProperties(Map map)
IPropertySet
setProperties
in interface IPropertySet
map
- 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 IPropertySet
key
- Key to addvalue
- Value to add
public IProperty addProperty(String key, String value, IPropertyType type)
IPropertySet
addProperty
in interface IPropertySet
key
- Key to addvalue
- Value to addtype
- Type of the Property to add
public boolean removeProperty(String key)
IPropertySet
removeProperty
in interface IPropertySet
key
- 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)
IPropertySet
IProperty
associated with the given key.
If the key is not in the set, null
is returned.
getProperty
in interface IPropertySet
key
- String key for Property
null
if the key is not found in the set.public String getPropertyValue(String key)
IPropertySet
null
is returned.
getPropertyValue
in interface IPropertySet
key
- String key for Property
null
if the key is not found in the set.public IPropertyType getPropertyType(String key)
IPropertySet
getPropertyType
in interface IPropertySet
key
- String key for Property
null
if the key is not found in the set.public boolean commit()
IRSEPersistableContainer
commit
in interface IRSEPersistableContainer
public IRSEPersistableContainer[] getPersistableChildren()
IRSEPersistableContainer
getPersistableChildren
in interface IRSEPersistableContainer
IRSEPersistableContainer.NO_CHILDREN
.public IRSEPersistableContainer getPersistableParent()
IRSEPersistableContainer
getPersistableParent
in interface IRSEPersistableContainer
public void setContainer(IPropertySetContainer container)
IPropertySet
setContainer
in interface IPropertySet
container
- the property set containerpublic IPropertySetContainer getContainer()
getContainer
in interface IPropertySet
public void update(Observable o, Object arg)
update
in interface Observer
|
RSE Release 3.4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |