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 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(String name, List<HalResource<?>> embeddedCollection)
void
addEmbedded(String name, HalResource<?> embedded)
void
addLink(String rel, String href)
void
addLink(String rel, URI hrefUri)
T
embed(HalRelation relation, ProcessEngine processEngine)
Can be used to embed a relation.Map<String,Object>
get_embedded()
Map<String,HalLink>
get_links()
Object
getEmbedded(String name)
-
-
-
Method Detail
-
addEmbedded
public void addEmbedded(String name, HalResource<?> embedded)
-
addEmbedded
public void addEmbedded(String name, List<HalResource<?>> embeddedCollection)
-
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.
-
-