Class AssetDescriptor<T extends Asset<?>>

java.lang.Object
org.openremote.model.asset.AssetDescriptor<T>
All Implemented Interfaces:
NameHolder
Direct Known Subclasses:
AgentDescriptor

public class AssetDescriptor<T extends Asset<?>> extends Object implements NameHolder
Describes an Asset that can be added to this instance; the getName() must match the Asset.type with which it is associated. For a given Asset class only one AssetDescriptor is allowed, each concrete Asset class must have a corresponding AssetDescriptor and AssetDescriptors are not allowed for abstract Asset classes. AssetDescriptor names are extracted using Class.getSimpleName() of the Asset class, so each asset's simple class name must be unique to avoid clashes.

getName() must be globally unique within the context of the manager it is registered with.

  • Field Details

    • name

      @Pattern(regexp="^\\w+$") protected @Pattern(regexp="^\\w+$") String name
    • type

      protected Class<T extends Asset<?>> type
    • icon

      protected String icon
    • colour

      protected String colour
  • Constructor Details

  • Method Details

    • getName

      public String getName()
      The unique name of this descriptor and corresponds to the simple class name of getType().
      Specified by:
      getName in interface NameHolder
    • getType

      public Class<T> getType()
    • getIcon

      public String getIcon()
    • getColour

      public String getColour()
    • isDynamicInternal

      protected Boolean isDynamicInternal()
    • isDynamic

      public boolean isDynamic()