public abstract class Entity extends Object implements Jsonifiable
Modifier and Type | Class and Description |
---|---|
static class |
Entity.Builder<T extends Entity.Builder<T>> |
Jsonifiable.JsonMapper
Modifier and Type | Field and Description |
---|---|
protected List<Attribute<?>> |
attributes |
protected DeviceInventoryRemote |
remote |
Modifier | Constructor and Description |
---|---|
protected |
Entity(Entity.Builder<?> builder) |
Modifier and Type | Method and Description |
---|---|
Optional<?> |
attribute(String attributePath)
Returns the value of the attribute with the specified attribute path.
|
List<Attribute<?>> |
attributes()
Returns the attributes that describe the entity.
|
protected String |
canonize(String path) |
Optional<Long> |
created()
Returns the device creation time.
|
Optional<DefinitionIdentifier> |
definition() |
CompletionStage<Void> |
deleteAttribute(String attributePath)
Deletes the attribute with the specified attribute path.
|
CompletionStage<Void> |
deleteAttributes()
Deletes the entity's attributes.
|
boolean |
equals(Object obj) |
int |
hashCode() |
Identifier |
identifier()
Returns the unique identifier of the entity.
|
Optional<Long> |
modified()
Returns the time of last device modification.
|
Optional<Long> |
revision()
Returns Device revision.
|
CompletionStage<Void> |
setAttribute(Attribute<?> attribute)
Sets the entity's attribute to the specified value.
|
CompletionStage<Void> |
setAttributes(List<Attribute<?>> attributes)
Sets the entity's attributes to the specified values.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
toJsonString
protected final DeviceInventoryRemote remote
protected Entity(Entity.Builder<?> builder)
public Identifier identifier()
public Optional<DefinitionIdentifier> definition()
public Optional<Long> modified()
public Optional<Long> created()
public List<Attribute<?>> attributes()
public Optional<?> attribute(String attributePath)
map
value,
you can invoke this method with the argument "example/key" and receive the value associated with the "key" directly.attributePath
- the attribute pathOptional
containing the value of the attribute with the specified attribute pathpublic CompletionStage<Void> setAttributes(List<Attribute<?>> attributes)
attributes
- the attributes to setCompletionStage
providing the result of the operationpublic CompletionStage<Void> setAttribute(Attribute<?> attribute)
attribute
- attribute to be setCompletionStage
providing the result of the operationpublic CompletionStage<Void> deleteAttributes()
CompletionStage
providing the result of the operationpublic CompletionStage<Void> deleteAttribute(String attributePath)
attributePath
- the path of the attribute to deleteCompletionStage
providing the result of the operationCopyright © 2022 Bosch.IO GmbH. All rights reserved.