Package org.openmuc.jeebus.spine.api
Interface EntityParent
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intaddEntity(Entity entity)Adds an entity with all its sub-entities and features to this device/entity at runtime.voiddeleteEntity(int address)DevicegetDevice()java.util.Collection<Entity>getEntities()EntitygetEntity(int address)EntityParentgetParent()booleanisDevice()
-
-
-
Method Detail
-
addEntity
int addEntity(Entity entity)
Adds an entity with all its sub-entities and features to this device/entity at runtime. After the entity was added theNodeManagementinstance notifies subscribers about the change.- Parameters:
entity- the entity built withEntity.getBuilder()- Returns:
- the entity address part of the added entity
-
getEntity
Entity getEntity(int address) throws SpineException
- Parameters:
address- the entity address part of the entity addressEntityAddressType.getEntity(). Note that this implementation limits entity addresses toInteger.MAX_VALUE- Returns:
- the entity with the given address
- Throws:
SpineException- when no entity with the given address exists
-
deleteEntity
void deleteEntity(int address) throws SpineException- Parameters:
address- the entity address part of the entity addressEntityAddressType.getEntity(). Note that this implementation limits entity addresses toInteger.MAX_VALUE- Throws:
SpineException- when no entity with the given address exists
-
getParent
EntityParent getParent()
- Returns:
- the parent of this entity or
nullif this is a device
-
getEntities
java.util.Collection<Entity> getEntities()
- Returns:
- all sub-entities of this entity excluding sub-entities of sub-entities
-
isDevice
boolean isDevice()
- Returns:
- true if this is a
Device, false if this is anEntity
-
getDevice
Device getDevice()
- Returns:
- the device this entity belongs to or this instance itself if this a device
-
-