Interface LinkSelectionStrategy
-
public interface LinkSelectionStrategy
Implements the logic to pick one of the links in a given hal resoucen (by index or name)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getId()
io.wcm.caravan.hal.resource.Link
pickLink(io.wcm.caravan.hal.resource.HalResource resource)
-
-
-
Method Detail
-
pickLink
io.wcm.caravan.hal.resource.Link pickLink(io.wcm.caravan.hal.resource.HalResource resource) throws io.wcm.caravan.pipeline.JsonPipelineInputException
- Parameters:
resource
- the HAL resource that contains links- Returns:
- the link that should be followed or embedded
- Throws:
IllegalStateException
- if no link could be selected (because no links were found at all, or no match the criteria of the strategy)io.wcm.caravan.pipeline.JsonPipelineInputException
-
getId
String getId()
- Returns:
- a unique ID used to generate the
JsonPipelineAction.getId()
-
-