Package org.apache.sling.rewriter.impl
Class ProcessorManagerImpl
- java.lang.Object
-
- org.apache.sling.rewriter.impl.ProcessorManagerImpl
-
- All Implemented Interfaces:
org.apache.sling.api.resource.observation.ExternalResourceChangeListener
,org.apache.sling.api.resource.observation.ResourceChangeListener
,ProcessorManager
public class ProcessorManagerImpl extends Object implements ProcessorManager, org.apache.sling.api.resource.observation.ResourceChangeListener, org.apache.sling.api.resource.observation.ExternalResourceChangeListener
This manager keeps track of configured processors.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ProcessorManagerImpl.ConfigEntry
protected static class
ProcessorManagerImpl.ProcessorConfiguratorComparator
-
Field Summary
Fields Modifier and Type Field Description protected static String
MIME_TYPE_HTML
-
Constructor Summary
Constructors Constructor Description ProcessorManagerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
activate(org.osgi.framework.BundleContext ctx)
Activate this component.protected void
addProcessor(String key, String configPath, ProcessorConfigurationImpl config)
adds a processor configurationprotected void
deactivate(org.osgi.service.component.ComponentContext ctx)
Deactivate this component.Processor
getProcessor(ProcessorConfiguration configuration, ProcessingContext context)
Return a pipeline for a pipeline configuration.List<ProcessorConfiguration>
getProcessorConfigurations()
Return the list of currently available processor configurations.void
onChange(List<org.apache.sling.api.resource.observation.ResourceChange> changes)
-
-
-
Field Detail
-
MIME_TYPE_HTML
protected static final String MIME_TYPE_HTML
- See Also:
- Constant Field Values
-
-
Method Detail
-
activate
protected void activate(org.osgi.framework.BundleContext ctx) throws org.apache.sling.api.resource.LoginException, org.osgi.framework.InvalidSyntaxException
Activate this component.- Parameters:
ctx
-- Throws:
org.apache.sling.api.resource.LoginException
org.osgi.framework.InvalidSyntaxException
-
deactivate
protected void deactivate(org.osgi.service.component.ComponentContext ctx)
Deactivate this component.- Parameters:
ctx
-
-
onChange
public void onChange(List<org.apache.sling.api.resource.observation.ResourceChange> changes)
- Specified by:
onChange
in interfaceorg.apache.sling.api.resource.observation.ResourceChangeListener
-
addProcessor
protected void addProcessor(String key, String configPath, ProcessorConfigurationImpl config)
adds a processor configuration
-
getProcessor
public Processor getProcessor(ProcessorConfiguration configuration, ProcessingContext context)
Description copied from interface:ProcessorManager
Return a pipeline for a pipeline configuration.- Specified by:
getProcessor
in interfaceProcessorManager
- See Also:
ProcessorManager.getProcessor(org.apache.sling.rewriter.ProcessorConfiguration, org.apache.sling.rewriter.ProcessingContext)
-
getProcessorConfigurations
public List<ProcessorConfiguration> getProcessorConfigurations()
Description copied from interface:ProcessorManager
Return the list of currently available processor configurations.- Specified by:
getProcessorConfigurations
in interfaceProcessorManager
- Returns:
- The list of processor configurations in the order to check.
- See Also:
ProcessorManager.getProcessorConfigurations()
-
-