Package org.openremote.model.value
Class MetaItemDescriptor<T>
java.lang.Object
org.openremote.model.value.AbstractNameValueDescriptorHolder<T>
org.openremote.model.value.MetaItemDescriptor<T>
- All Implemented Interfaces:
NameHolder
,ValueDescriptorHolder<T>
Describes a
MetaItem
that can be added to an Attribute
; the AbstractNameValueDescriptorHolder.getName()
must match the AbstractNameValueHolder.getName()
, it also indicates what the ValueDescriptor
is for the MetaItem
. The MetaItemDescriptor
applies to the Asset
type it is associated with and all subtypes of this type (i.e. a
MetaItemDescriptor
associated with the base Asset
type will be available to all Asset
types
(e.g. MetaItemType.READ_ONLY
can be applied to any Asset
's Attribute
).
AbstractNameValueDescriptorHolder.getName()
must be globally unique within the context of the manager it is registered with.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
This class handles deserialising meta item descriptor names toMetaItemDescriptor
s; to reuse instancesNested classes/interfaces inherited from interface org.openremote.model.value.NameHolder
NameHolder.NameHolderToStringConverter
-
Field Summary
Fields inherited from class org.openremote.model.value.AbstractNameValueDescriptorHolder
constraints, format, name, type, units
-
Constructor Summary
ConstructorsConstructorDescriptionMetaItemDescriptor
(String name, ValueDescriptor<T> valueDescriptor, ValueConstraint... constraints) MetaItemDescriptor
(String name, ValueDescriptor<T> type, ValueConstraint[] constraints, ValueFormat format, String[] units) -
Method Summary
Modifier and TypeMethodDescriptionsetConstraints
(ValueConstraint... constraints) setFormat
(ValueFormat format) toString()
Methods inherited from class org.openremote.model.value.AbstractNameValueDescriptorHolder
equals, getConstraints, getFormat, getName, getType, getUnits, hashCode, setName, setType
-
Constructor Details
-
MetaItemDescriptor
public MetaItemDescriptor(String name, ValueDescriptor<T> valueDescriptor, ValueConstraint... constraints) -
MetaItemDescriptor
public MetaItemDescriptor(String name, ValueDescriptor<T> type, ValueConstraint[] constraints, ValueFormat format, String[] units)
-
-
Method Details
-
setFormat
-
setConstraints
-
setUnits
-
toString
- Overrides:
toString
in classAbstractNameValueDescriptorHolder<T>
-