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)
ExtendedPropertiesSupport
Returns 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 ExtendedPropertiesSupport
key
- the key associated to the propertynull
if key is not foundExtendedPropertiesSupport.getExtendedProperties()
,
ExtendedPropertiesSupport.setProperty(Object, Object)
public void setProperty(Object key, Object val)
ExtendedPropertiesSupport
setProperty
in interface ExtendedPropertiesSupport
key
- the key associated to the propertyval
- the propertyExtendedPropertiesSupport.getProperty(Object)
,
ExtendedPropertiesSupport.getExtendedProperties()
public Map getExtendedProperties()
ExtendedPropertiesSupport
getExtendedProperties
in interface ExtendedPropertiesSupport
ExtendedPropertiesSupport.getProperty(Object)
,
ExtendedPropertiesSupport.setProperty(Object, Object)
public void setExtendedProperties(Map properties)
public void saveToState(PersistentState state) throws PersistenceException
Persistent
saveToState
in interface Persistent
PersistenceException
public void loadFromState(PersistentState state) throws PersistenceException
Persistent
loadFromState
in interface Persistent
PersistenceException