Class HalResource<T extends HalResource<?>>

java.lang.Object
org.camunda.bpm.engine.rest.hal.HalResource<T>
Direct Known Subclasses:
EmptyHalResource, HalCaseDefinition, HalCollectionResource, HalGroup, HalIdentityLink, HalProcessDefinition, HalTask, HalTenant, HalUser, HalUserList, HalVariableValue

public abstract class HalResource<T extends HalResource<?>> extends Object
Base class for implementing a HAL resource as defined in json-hal-06#section-4
Author:
Daniel Meyer
  • Field Details

  • Constructor Details

    • HalResource

      public HalResource()
  • Method Details

    • get_links

      public Map<String,HalLink> get_links()
    • get_embedded

      public Map<String,Object> get_embedded()
    • addLink

      public void addLink(String rel, String href)
    • addLink

      public void addLink(String rel, URI hrefUri)
    • addEmbedded

      public void addEmbedded(String name, HalResource<?> embedded)
    • addEmbedded

      public void addEmbedded(String name, List<HalResource<?>> embeddedCollection)
    • getEmbedded

      public Object getEmbedded(String name)
    • embed

      public T embed(HalRelation relation, ProcessEngine processEngine)
      Can be used to embed a relation. Embedded all linked resources in the given relation.
      Parameters:
      relation - the relation to embedded
      processEngine - used to resolve the resources
      Returns:
      the resource itself.