Class Entity

java.lang.Object
com.cedarpolicy.model.slice.Entity

public class Entity extends Object
An entity is the kind of object about which authorization decisions are made; principals, actions, and resources are all a kind of entity. Each entity is defined by its entity type, a unique identifier (UID), zero or more attributes mapped to values, and zero or more parent entities.
  • Field Details

    • attrs

      public final Map<String,Value> attrs
      Key/Value attribute map.
    • parentsEUIDs

      public final Set<JsonEUID> parentsEUIDs
      Set of entity EUIDs that are parents to this entity.
  • Constructor Details

    • Entity

      public Entity(JsonEUID uid, Map<String,Value> attributes, Set<JsonEUID> parentsEUIDs)
      Create an entity from JsonEUID and unwrapped JSON values.
      Parameters:
      uid - EUID of the Entity.
      attributes - Key/Value map of attributes.
      parentsEUIDs - Set of parent entities' EUIDs.
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getEUID

      public JsonEUID getEUID()
      Get entity uid in JsonEUID format
      Returns:
      Entity UID in JsonEUID format
    • getParents

      public Set<JsonEUID> getParents()
      Get entity uid in JsonEUID format
      Returns:
      Entity UID in JsonEUID format