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 Details

    • getName

      @NotNull @NotNull String getName()
      Returns:
      The name of the entity. This is a unique identifier for the entity within it's sibling set.
    • getDescription

      default Optional<DescriptionComponent> getDescription()
      Returns:
      Description information about the entity, this can contain a descriptive doc string as well as a map of additional properties.
    • getNavigation

      default Optional<NavigationComponent> getNavigation()
      Returns:
      Information about navigational actions eligible for this entity, for use in the web-ui, if applicable.
    • getDiagnostics

      default Optional<DiagnosticComponent> getDiagnostics()
      Returns:
      Diagnostic information (metrics and healthchecks) about this entity, if any.
    • getEnablement

      default Optional<EnablementComponent> getEnablement()
      Returns:
      Information about whether this entity is enabled or disabled, and how to change that state (if allowed)
    • getAudit

      default Optional<AuditComponent> getAudit()
      Returns:
      Information about when this entity was last changed, and who changed it (if applicable).
    • getChildren

      default Optional<ChildrenComponent> getChildren()
      Returns:
      The children of this entity, or how to retrieve them (if any).