Interface Entity
- All Known Subinterfaces:
MutableEntity
- All Known Implementing Classes:
DefaultResourceEntityDelegate.ResourceEntity
public interface Entity
An entity is a named object that can have various data components attached to it. This is an abstraction that allows many different types of objects to have their existence and status information represented in a consistent way, and exposed through a common route API.
All components are optional.
Note that the Entity API is a hybrid of some entities which are instantiated and registered with the
EntityManager
, and others that are created on-demand when browsed.
It is common to register a statically defined entity to represent a category of items, which then calculates its
child entities on the fly See ChildrenComponent
for more information.
-
Method Summary
Modifier and TypeMethodDescriptiondefault Optional<AuditComponent>
getAudit()
default Optional<ChildrenComponent>
default Optional<DescriptionComponent>
default Optional<DiagnosticComponent>
default Optional<EnablementComponent>
@NotNull String
getName()
default Optional<NavigationComponent>
-
Method Details
-
getName
- Returns:
- The name of the entity. This is a unique identifier for the entity within it's sibling set.
-
getDescription
- Returns:
- Description information about the entity, this can contain a descriptive doc string as well as a map of additional properties.
-
getDiagnostics
- Returns:
- Diagnostic information (metrics and healthchecks) about this entity, if any.
-
getEnablement
- Returns:
- Information about whether this entity is enabled or disabled, and how to change that state (if allowed)
-
getAudit
- Returns:
- Information about when this entity was last changed, and who changed it (if applicable).
-
getChildren
- Returns:
- The children of this entity, or how to retrieve them (if any).
-