Package org.openremote.model.asset
Class AssetDescriptor<T extends Asset<?>>
java.lang.Object
org.openremote.model.asset.AssetDescriptor<T>
- All Implemented Interfaces:
NameHolder
- Direct Known Subclasses:
AgentDescriptor
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 AssetDescriptor
s 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.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.openremote.model.value.NameHolder
NameHolder.NameHolderToStringConverter
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionAssetDescriptor
(String icon, String colour, Class<T> type) Construct an instance using theClass.getSimpleName()
value of the specified type as the descriptor name, theClass.getSimpleName()
must therefore be unique enough to not clash with otherAssetDescriptor
s.protected
AssetDescriptor
(String name, String icon, String colour) -
Method Summary
-
Field Details
-
name
-
type
-
icon
-
colour
-
-
Constructor Details
-
AssetDescriptor
-
AssetDescriptor
Construct an instance using theClass.getSimpleName()
value of the specified type as the descriptor name, theClass.getSimpleName()
must therefore be unique enough to not clash with otherAssetDescriptor
s.
-
-
Method Details
-
getName
The unique name of this descriptor and corresponds to the simple class name ofgetType()
.- Specified by:
getName
in interfaceNameHolder
-
getType
-
getIcon
-
getColour
-
isDynamicInternal
-
isDynamic
public boolean isDynamic()
-