Package org.camunda.bpm.engine.rest.hal
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 java.lang.Object
Base class for implementing a HAL resource as defined in json-hal-06#section-4- Author:
- Daniel Meyer
-
-
Constructor Summary
Constructors Constructor Description HalResource()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addEmbedded(java.lang.String name, java.util.List<HalResource<?>> embeddedCollection)
void
addEmbedded(java.lang.String name, HalResource<?> embedded)
void
addLink(java.lang.String rel, java.lang.String href)
void
addLink(java.lang.String rel, java.net.URI hrefUri)
T
embed(HalRelation relation, ProcessEngine processEngine)
Can be used to embed a relation.java.util.Map<java.lang.String,java.lang.Object>
get_embedded()
java.util.Map<java.lang.String,HalLink>
get_links()
java.lang.Object
getEmbedded(java.lang.String name)
-
-
-
Method Detail
-
get_links
public java.util.Map<java.lang.String,HalLink> get_links()
-
get_embedded
public java.util.Map<java.lang.String,java.lang.Object> get_embedded()
-
addLink
public void addLink(java.lang.String rel, java.lang.String href)
-
addLink
public void addLink(java.lang.String rel, java.net.URI hrefUri)
-
addEmbedded
public void addEmbedded(java.lang.String name, HalResource<?> embedded)
-
addEmbedded
public void addEmbedded(java.lang.String name, java.util.List<HalResource<?>> embeddedCollection)
-
getEmbedded
public java.lang.Object getEmbedded(java.lang.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 embeddedprocessEngine
- used to resolve the resources- Returns:
- the resource itself.
-
-