Class RemoveAllProperties
- java.lang.Object
-
- io.wcm.caravan.pipeline.extensions.hal.action.RemoveAllProperties
-
- All Implemented Interfaces:
io.wcm.caravan.pipeline.JsonPipelineAction
@ProviderType public final class RemoveAllProperties extends Object implements io.wcm.caravan.pipeline.JsonPipelineAction
Removes all properties for a HAL resource and its embedded resources. (useexcept(String...)
to specify properties you want to keep.
-
-
Constructor Summary
Constructors Constructor Description RemoveAllProperties()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description RemoveAllProperties
except(String... properties)
rx.Observable<io.wcm.caravan.pipeline.JsonPipelineOutput>
execute(io.wcm.caravan.pipeline.JsonPipelineOutput previousStepOutput, io.wcm.caravan.pipeline.JsonPipelineContext pipelineContext)
String
getId()
static void
removePropertiesRecursive(io.wcm.caravan.hal.resource.HalResource hal, Set<String> propertiesToKeep)
Removes all properties except the specified ones from the given resource and all embedded resources
-
-
-
Method Detail
-
getId
public String getId()
- Specified by:
getId
in interfaceio.wcm.caravan.pipeline.JsonPipelineAction
-
execute
public rx.Observable<io.wcm.caravan.pipeline.JsonPipelineOutput> execute(io.wcm.caravan.pipeline.JsonPipelineOutput previousStepOutput, io.wcm.caravan.pipeline.JsonPipelineContext pipelineContext)
- Specified by:
execute
in interfaceio.wcm.caravan.pipeline.JsonPipelineAction
-
except
public RemoveAllProperties except(String... properties)
- Parameters:
properties
- name of properties that should be preserved- Returns:
- This action
-
removePropertiesRecursive
public static void removePropertiesRecursive(io.wcm.caravan.hal.resource.HalResource hal, Set<String> propertiesToKeep)
Removes all properties except the specified ones from the given resource and all embedded resources- Parameters:
hal
- a HAL resourcepropertiesToKeep
- all properties that should be left untouched
-
-