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 ProcessingComponentConfiguration
getComponentConfig(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.ProcessingComponentConfiguration
getGeneratorConfiguration()
The configuration for the generator.int
getOrder()
Return the order of this configuration for sorting.ProcessingComponentConfiguration
getSerializerConfiguration()
The configuration for the serializer.ProcessingComponentConfiguration[]
getTransformerConfigurations()
The configuration for the transformers.String
getType()
The name/type of the component.boolean
isActive()
Is this component active?boolean
isPipeline()
Is this a pipeline?boolean
match(ProcessingContext processContext)
Check if this processor configuration matches for the current request.String
toString()
-
-
-
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:ProcessorConfiguration
Check if this processor configuration matches for the current request.- Specified by:
match
in 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:
getGeneratorConfiguration
in interfacePipelineConfiguration
-
getSerializerConfiguration
public ProcessingComponentConfiguration getSerializerConfiguration()
The configuration for the serializer.- Specified by:
getSerializerConfiguration
in interfacePipelineConfiguration
-
getTransformerConfigurations
public ProcessingComponentConfiguration[] getTransformerConfigurations()
The configuration for the transformers.- Specified by:
getTransformerConfigurations
in 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:ProcessorConfiguration
Return the configuration for this component.- Specified by:
getConfiguration
in 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:ProcessorConfiguration
The name/type of the component.- Specified by:
getType
in interfaceProcessorConfiguration
- Returns:
- A unique name for this component.
- See Also:
ProcessorConfiguration.getType()
-
-