Interface EntityParent

  • All Known Subinterfaces:
    Device, Entity

    public interface EntityParent
    • 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 the NodeManagement instance notifies subscribers about the change.
        Parameters:
        entity - the entity built with Entity.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 address EntityAddressType.getEntity(). Note that this implementation limits entity addresses to Integer.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 address EntityAddressType.getEntity(). Note that this implementation limits entity addresses to Integer.MAX_VALUE
        Throws:
        SpineException - when no entity with the given address exists
      • getParent

        EntityParent getParent()
        Returns:
        the parent of this entity or null if 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 an Entity
      • getDevice

        Device getDevice()
        Returns:
        the device this entity belongs to or this instance itself if this a device