BlackBoard, WorldModelpublic class CmionStorageContainer extends CmionComponent
| Modifier and Type | Field | Description |
|---|---|---|
java.util.HashSet<java.lang.String> |
persistentProperties |
by default properties are non persistent, if the container has a persistent property
it will be in this set here
|
architecture| Modifier | Constructor | Description |
|---|---|---|
|
CmionStorageContainer(IArchitecture architecture,
java.lang.String name,
java.lang.String type) |
create a new CMION Storage Container
|
protected |
CmionStorageContainer(IArchitecture architecture,
java.lang.String name,
java.lang.String type,
CmionStorageContainer parentContainer) |
create a new CMION Storage Container (this constructor is protected because it
should not be accessed from outside) to create a new top level container, use the
public constructor)
|
| Modifier and Type | Method | Description |
|---|---|---|
java.lang.String |
getContainerName() |
returns the name (identifier) of this container
|
java.lang.String |
getContainerType() |
returns the type (class) of this container
|
CmionStorageContainer |
getParentContainer() |
returns the parent container or null if this is the top container of a storage
hierarchy
|
java.util.ArrayList<java.lang.String> |
getPropertyNames() |
returns a list of all property names
|
<T> java.util.ArrayList<java.lang.String> |
getPropertyNames(java.lang.Class<T> propertyClass) |
returns a list of names of all properties that are of a certain class
|
java.lang.Object |
getPropertyValue(java.lang.String propertyName) |
returns the value of the property with the specified name or null if such a property does not exist in this container
|
CmionStorageContainer |
getSubContainer(java.lang.String subContainerName) |
returns the sub container with the provided name or null, if there is no
such container in this storage container
|
java.util.ArrayList<java.lang.String> |
getSubContainerNames() |
returns a list of all sub container names
|
java.util.ArrayList<java.lang.String> |
getSubContainerNames(java.lang.String type) |
returns a list of names of all sub containers that have a certain type
|
CmionStorageContainer |
getTopContainer() |
returns the top container of the storage hierarchy that this container is part of,
so typically this should return either the blackboard or the world model object
|
boolean |
hasProperty(java.lang.String name) |
returns whether the container has a property with the specified name
|
<T> boolean |
hasProperty(java.lang.String name,
java.lang.Class<T> propertyClass) |
returns whether the container has a property with the specified name and of the specified class
|
boolean |
hasSubContainer(java.lang.String name) |
returns whether the container has a sub container with the specified name
|
boolean |
hasSubContainer(java.lang.String name,
java.lang.String type) |
returns whether the container has a sub container with the specified name and of the specified type
|
boolean |
isPropertyPersistent(java.lang.String propertyName) |
returns whether a property is persistent or not
|
void |
registerEventHandlerWithSubContainers(ion.Meta.EventHandler handler) |
registers an Event Handler with all entities this storage component possesses or will possess eventually.
|
void |
registerHandlers() |
registers the request handlers of this storage component class
|
void |
requestAddSubContainer(java.lang.String name,
java.lang.String type) |
convenience method for scheduling a requestAddSubContainer with this container
|
void |
requestAddSubContainer(java.lang.String name,
java.lang.String type,
java.util.HashMap<java.lang.String,java.lang.Object> initialProperties) |
convenience method for scheduling a requestAddSubContainer with this container
|
void |
requestAddSubContainer(java.lang.String name,
java.lang.String type,
java.util.HashMap<java.lang.String,java.lang.Object> initialProperties,
java.util.HashSet<java.lang.String> persistentProperties) |
convenience method for scheduling a requestAddSubContainer with this container
|
void |
requestRemoveProperty(java.lang.String name) |
convenience method for scheduling a requestRemoveProperty with this container
|
void |
requestRemoveSubContainer(java.lang.String name) |
convenience method for scheduling a requestRemoveSubContainer with this container
|
void |
requestSetProperty(java.lang.String name,
java.lang.Object value) |
convenience method for scheduling a requestSetProperty with this container
|
void |
requestSetProperty(java.lang.String name,
java.lang.Object value,
boolean persistent) |
convenience method for scheduling a requestSetProperty with this container
|
java.lang.String |
toString() |
getArchitecture, isConnected, onDestroy, raisepublic java.util.HashSet<java.lang.String> persistentProperties
protected CmionStorageContainer(IArchitecture architecture, java.lang.String name, java.lang.String type, CmionStorageContainer parentContainer)
name - the name of this container, should be unique along siblings in storage hierarchytype - the type/class of this containerparentContainer - the container that owns this container or null for a top container in a hierarchyarchitecture - reference to the architecture objectpublic CmionStorageContainer(IArchitecture architecture, java.lang.String name, java.lang.String type)
name - the name of this container, should be unique along siblings in storage hierarchytype - the type/class of this containerarchitecture - reference to the architecture objectpublic void registerEventHandlerWithSubContainers(ion.Meta.EventHandler handler)
public CmionStorageContainer getSubContainer(java.lang.String subContainerName)
public CmionStorageContainer getParentContainer()
public java.lang.Object getPropertyValue(java.lang.String propertyName)
public java.lang.String getContainerName()
public java.lang.String getContainerType()
public java.util.ArrayList<java.lang.String> getSubContainerNames()
public java.util.ArrayList<java.lang.String> getSubContainerNames(java.lang.String type)
public java.util.ArrayList<java.lang.String> getPropertyNames()
public boolean isPropertyPersistent(java.lang.String propertyName)
public <T> java.util.ArrayList<java.lang.String> getPropertyNames(java.lang.Class<T> propertyClass)
T - the class we want to find properties ofpropertyClass - the class represented as a dynamic Class objectpublic final void registerHandlers()
registerHandlers in class CmionComponentpublic boolean hasProperty(java.lang.String name)
public <T> boolean hasProperty(java.lang.String name,
java.lang.Class<T> propertyClass)
public boolean hasSubContainer(java.lang.String name)
public boolean hasSubContainer(java.lang.String name,
java.lang.String type)
public void requestAddSubContainer(java.lang.String name,
java.lang.String type,
java.util.HashMap<java.lang.String,java.lang.Object> initialProperties,
java.util.HashSet<java.lang.String> persistentProperties)
public void requestAddSubContainer(java.lang.String name,
java.lang.String type,
java.util.HashMap<java.lang.String,java.lang.Object> initialProperties)
public void requestAddSubContainer(java.lang.String name,
java.lang.String type)
public void requestRemoveSubContainer(java.lang.String name)
public void requestSetProperty(java.lang.String name,
java.lang.Object value)
public void requestSetProperty(java.lang.String name,
java.lang.Object value,
boolean persistent)
public void requestRemoveProperty(java.lang.String name)
public CmionStorageContainer getTopContainer()
public java.lang.String toString()
toString in class java.lang.Object