Package org.camunda.bpm.engine.rest.hal
Class HalLinker
java.lang.Object
org.camunda.bpm.engine.rest.hal.HalLinker
A stateful linker which collects information about the links it creates.
- Author:
- Daniel Meyer
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected final Halprotected final HalResource<?>The HalResource on which the links are constructed
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidcreateLink(HalRelation rel, String... pathParams) Creates a link in a given relation.getLinkedResourceIdsByRelation(HalRelation relation) voidmergeLinks(HalResource<?> embedded) merge the links of an embedded resource into this linker.List<HalResource<?>>resolve(HalRelation relation, ProcessEngine processEngine) Resolves a relation.
- 
Field Details- 
hal
- 
resourceThe HalResource on which the links are constructed
 
- 
- 
Constructor Details- 
HalLinker
 
- 
- 
Method Details- 
createLinkCreates a link in a given relation.- Parameters:
- rel- the- HalRelationfor which a link should be constructed
- pathParams- the path params to populate the url template with.
 
- 
getLinkedRelations
- 
getLinkedResourceIdsByRelation
- 
resolveResolves a relation. Locates a HalLinkResolver for resolving the set of all linked resources in the relation.- Parameters:
- relation- the relation to resolve
- processEngine- the process engine to use
- Returns:
- the list of resolved resources
- Throws:
- RuntimeException- if no HalLinkResolver can be found for the linked resource type.
 
- 
mergeLinksmerge the links of an embedded resource into this linker. This is useful when building resources which are actually resource collections. You can then merge the relations of all resources in the collection and the unique the set of linked resources to embed.- Parameters:
- embedded- the embedded resource for which the links should be merged into this linker.
 
 
-