Class AbstractEmbedLinks
- java.lang.Object
-
- io.wcm.caravan.pipeline.extensions.hal.client.action.AbstractEmbedLinks
-
- All Implemented Interfaces:
HalClientAction
,io.wcm.caravan.pipeline.JsonPipelineAction
- Direct Known Subclasses:
DeepEmbedLinks
,EmbedLink
,EmbedLinks
@ConsumerType public abstract class AbstractEmbedLinks extends Object
Base link embedding action to load links for a given relation and store them as embedded resources.
-
-
Constructor Summary
Constructors Constructor Description AbstractEmbedLinks(ServiceIdExtractor serviceId, String relation, Map<String,Object> parameters)
AbstractEmbedLinks(String serviceId, String relation, Map<String,Object> parameters)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description rx.Observable<io.wcm.caravan.pipeline.JsonPipelineOutput>
execute(io.wcm.caravan.pipeline.JsonPipelineOutput previousStepOutput, io.wcm.caravan.pipeline.JsonPipelineContext context)
io.wcm.caravan.pipeline.cache.CacheStrategy
getCacheStrategy()
List<io.wcm.caravan.pipeline.JsonPipelineExceptionHandler>
getExceptionHandlers()
com.google.common.collect.Multimap<String,String>
getHttpHeaders()
String
getId()
org.slf4j.Logger
getLogger()
protected String
getRelation()
boolean
hasLogger()
HalClientAction
setCacheStrategy(io.wcm.caravan.pipeline.cache.CacheStrategy value)
HalClientAction
setExceptionHandlers(List<io.wcm.caravan.pipeline.JsonPipelineExceptionHandler> value)
HalClientAction
setHttpHeaders(com.google.common.collect.Multimap<String,String> value)
HalClientAction
setLogger(org.slf4j.Logger value)
-
-
-
Constructor Detail
-
AbstractEmbedLinks
public AbstractEmbedLinks(String serviceId, String relation, Map<String,Object> parameters)
- Parameters:
serviceId
- Service IDrelation
- Link relation to embedparameters
- URI parameters
-
AbstractEmbedLinks
public AbstractEmbedLinks(ServiceIdExtractor serviceId, String relation, Map<String,Object> parameters)
- Parameters:
serviceId
- a function to extract Service ID from a given request URLrelation
- Link relation to embedparameters
- URI parameters
-
-
Method Detail
-
getId
public String getId()
-
execute
public final rx.Observable<io.wcm.caravan.pipeline.JsonPipelineOutput> execute(io.wcm.caravan.pipeline.JsonPipelineOutput previousStepOutput, io.wcm.caravan.pipeline.JsonPipelineContext context)
-
getRelation
protected final String getRelation()
- Returns:
- Returns the relation.
-
setCacheStrategy
public HalClientAction setCacheStrategy(io.wcm.caravan.pipeline.cache.CacheStrategy value)
- Specified by:
setCacheStrategy
in interfaceHalClientAction
- Parameters:
value
- Caching strategy- Returns:
- This HAL client action
-
setExceptionHandlers
public HalClientAction setExceptionHandlers(List<io.wcm.caravan.pipeline.JsonPipelineExceptionHandler> value)
- Specified by:
setExceptionHandlers
in interfaceHalClientAction
- Parameters:
value
- Exception Handlers- Returns:
- This HAL client action
-
setLogger
public HalClientAction setLogger(org.slf4j.Logger value)
- Specified by:
setLogger
in interfaceHalClientAction
- Parameters:
value
- Logger- Returns:
- This HAL client action
-
setHttpHeaders
public HalClientAction setHttpHeaders(com.google.common.collect.Multimap<String,String> value)
- Specified by:
setHttpHeaders
in interfaceHalClientAction
- Parameters:
value
- HTTP headers- Returns:
- This HAL client action
-
getCacheStrategy
public io.wcm.caravan.pipeline.cache.CacheStrategy getCacheStrategy()
- Returns:
- Returns the cacheStrategy.
-
getExceptionHandlers
public List<io.wcm.caravan.pipeline.JsonPipelineExceptionHandler> getExceptionHandlers()
- Returns:
- Returns the exceptionHandlers.
-
getLogger
public org.slf4j.Logger getLogger()
- Returns:
- Current Logger
-
hasLogger
public boolean hasLogger()
- Returns:
- True if has a logger
-
-