Class 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. (use except(String...) to specify properties you want to keep.
    • Constructor Detail

      • RemoveAllProperties

        public RemoveAllProperties()
    • Method Detail

      • getId

        public String getId()
        Specified by:
        getId in interface io.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 interface io.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 resource
        propertiesToKeep - all properties that should be left untouched