Package org.apache.sling.rewriter.impl
Class ProcessorConfigurationImpl
- java.lang.Object
-
- org.apache.sling.rewriter.impl.ProcessorConfigurationImpl
-
- All Implemented Interfaces:
PipelineConfiguration,ProcessorConfiguration
public class ProcessorConfigurationImpl extends Object implements PipelineConfiguration
Configuration of a processor. This configuration consists either of a pipeline (generator, transformer and serializer) or a processor. A processor is configured with mime types indicating when to apply this processor.
-
-
Constructor Summary
Constructors Constructor Description ProcessorConfigurationImpl(String[] contentTypes, String[] paths, String[] extensions, String[] resourceTypes, boolean unwrapResources, String[] selectors, int order, ProcessingComponentConfiguration generatorConfig, ProcessingComponentConfiguration[] transformerConfigs, ProcessingComponentConfiguration serializerConfig, boolean processErrorResponse)This is the constructor for a pipelineProcessorConfigurationImpl(String[] contentTypes, String[] paths, String[] extensions, String[] resourceTypes, String[] selectors)This is the constructor for a pipelineProcessorConfigurationImpl(org.apache.sling.api.resource.Resource resource)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ProcessingComponentConfigurationgetComponentConfig(org.apache.sling.api.resource.Resource configResource, String propertyName, String prefix)protected ProcessingComponentConfiguration[]getComponentConfigs(org.apache.sling.api.resource.Resource configResource, String propertyName, String prefix)Map<String,Object>getConfiguration()Return the configuration for this component.ProcessingComponentConfigurationgetGeneratorConfiguration()The configuration for the generator.intgetOrder()Return the order of this configuration for sorting.ProcessingComponentConfigurationgetSerializerConfiguration()The configuration for the serializer.ProcessingComponentConfiguration[]getTransformerConfigurations()The configuration for the transformers.StringgetType()The name/type of the component.booleanisActive()Is this component active?booleanisPipeline()Is this a pipeline?booleanmatch(ProcessingContext processContext)Check if this processor configuration matches for the current request.StringtoString()
-
-
-
Constructor Detail
-
ProcessorConfigurationImpl
public ProcessorConfigurationImpl(String[] contentTypes, String[] paths, String[] extensions, String[] resourceTypes, boolean unwrapResources, String[] selectors, int order, ProcessingComponentConfiguration generatorConfig, ProcessingComponentConfiguration[] transformerConfigs, ProcessingComponentConfiguration serializerConfig, boolean processErrorResponse)
This is the constructor for a pipeline
-
ProcessorConfigurationImpl
public ProcessorConfigurationImpl(String[] contentTypes, String[] paths, String[] extensions, String[] resourceTypes, String[] selectors)
This is the constructor for a pipeline
-
ProcessorConfigurationImpl
public ProcessorConfigurationImpl(org.apache.sling.api.resource.Resource resource)
Constructor. This constructor reads the configuration from the specified resource.
-
-
Method Detail
-
getComponentConfig
protected ProcessingComponentConfiguration getComponentConfig(org.apache.sling.api.resource.Resource configResource, String propertyName, String prefix)
-
getComponentConfigs
protected ProcessingComponentConfiguration[] getComponentConfigs(org.apache.sling.api.resource.Resource configResource, String propertyName, String prefix)
-
getOrder
public int getOrder()
Return the order of this configuration for sorting.
-
match
public boolean match(ProcessingContext processContext)
Description copied from interface:ProcessorConfigurationCheck if this processor configuration matches for the current request.- Specified by:
matchin interfaceProcessorConfiguration- Returns:
- true or false
- See Also:
ProcessorConfiguration.match(org.apache.sling.rewriter.ProcessingContext)
-
getGeneratorConfiguration
public ProcessingComponentConfiguration getGeneratorConfiguration()
The configuration for the generator.- Specified by:
getGeneratorConfigurationin interfacePipelineConfiguration
-
getSerializerConfiguration
public ProcessingComponentConfiguration getSerializerConfiguration()
The configuration for the serializer.- Specified by:
getSerializerConfigurationin interfacePipelineConfiguration
-
getTransformerConfigurations
public ProcessingComponentConfiguration[] getTransformerConfigurations()
The configuration for the transformers.- Specified by:
getTransformerConfigurationsin interfacePipelineConfiguration
-
isPipeline
public boolean isPipeline()
Is this a pipeline?
-
isActive
public boolean isActive()
Is this component active?
-
getConfiguration
public Map<String,Object> getConfiguration()
Description copied from interface:ProcessorConfigurationReturn the configuration for this component.- Specified by:
getConfigurationin interfaceProcessorConfiguration- Returns:
- The configuration for this component or an empty map if there is none.
- See Also:
ProcessorConfiguration.getConfiguration()
-
getType
public String getType()
Description copied from interface:ProcessorConfigurationThe name/type of the component.- Specified by:
getTypein interfaceProcessorConfiguration- Returns:
- A unique name for this component.
- See Also:
ProcessorConfiguration.getType()
-
-