public class ExtendedPropertiesHelper extends Object implements ExtendedPropertiesSupport, Persistent
| Modifier and Type | Class and Description |
|---|---|
static class |
ExtendedPropertiesHelper.RegisterPersistence |
| Constructor and Description |
|---|
ExtendedPropertiesHelper() |
| Modifier and Type | Method and Description |
|---|---|
Map |
getExtendedProperties()
Returns a hash map with all new properties associated to this layer.
|
Object |
getProperty(Object key)
Returns a reference to an object (property) associated to this layer.
|
void |
loadFromState(PersistentState state)
Set the state of the object from the state passed as parameter.
|
void |
saveToState(PersistentState state)
Saves the internal state of the object on the provided
PersistentState object.
|
void |
setExtendedProperties(Map properties) |
void |
setProperty(Object key,
Object val)
Inserts an object as a property to this layer.
|
public Object getProperty(Object key)
ExtendedPropertiesSupportReturns a reference to an object (property) associated to this layer.
For example, you can attach a network definition to key "network" and check if a layer has a network loaded using getAssociatedObject("network") and that it's not null.
getProperty in interface ExtendedPropertiesSupportkey - the key associated to the propertynull if key is not foundExtendedPropertiesSupport.getExtendedProperties(),
ExtendedPropertiesSupport.setProperty(Object, Object)public void setProperty(Object key, Object val)
ExtendedPropertiesSupportsetProperty in interface ExtendedPropertiesSupportkey - the key associated to the propertyval - the propertyExtendedPropertiesSupport.getProperty(Object),
ExtendedPropertiesSupport.getExtendedProperties()public Map getExtendedProperties()
ExtendedPropertiesSupportgetExtendedProperties in interface ExtendedPropertiesSupportExtendedPropertiesSupport.getProperty(Object),
ExtendedPropertiesSupport.setProperty(Object, Object)public void setExtendedProperties(Map properties)
public void saveToState(PersistentState state) throws PersistenceException
PersistentsaveToState in interface PersistentPersistenceExceptionpublic void loadFromState(PersistentState state) throws PersistenceException
PersistentloadFromState in interface PersistentPersistenceException