Package org.apache.sling.rewriter.impl
Class FactoryCache
- java.lang.Object
-
- org.apache.sling.rewriter.impl.FactoryCache
-
public class FactoryCache extends Object
This is an utility class for accessing the various pipeline components. it also acts like a cache for the factories.
-
-
Constructor Summary
Constructors Constructor Description FactoryCache(org.osgi.framework.BundleContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Generator
getGenerator(String type)
Get the generator of the given type.Transformer[][]
getGlobalTransformers(ProcessingContext context)
Lookup all global transformers that apply to the current request and return the transformer instances in two arrays.Processor
getProcessor(String type)
Get the processor of the given type.Serializer
getSerializer(String type)
Get the serializer of the given type.Transformer
getTransformer(String type)
Get the transformer of the given type.void
start()
Start trackingvoid
stop()
Stop tracking
-
-
-
Method Detail
-
start
public void start()
Start tracking
-
stop
public void stop()
Stop tracking
-
getGenerator
public Generator getGenerator(String type)
Get the generator of the given type.- Parameters:
type
- The generator type.- Returns:
- The generator or null if the generator is not available.
-
getSerializer
public Serializer getSerializer(String type)
Get the serializer of the given type.- Parameters:
type
- The serializer type.- Returns:
- The serializer or null if the serializer is not available.
-
getTransformer
public Transformer getTransformer(String type)
Get the transformer of the given type.- Parameters:
type
- The transformer type.- Returns:
- The transformer or null if the transformer is not available.
-
getProcessor
public Processor getProcessor(String type)
Get the processor of the given type.- Parameters:
type
- The processor type.- Returns:
- The processor or null if the processor is not available.
-
getGlobalTransformers
public Transformer[][] getGlobalTransformers(ProcessingContext context)
Lookup all global transformers that apply to the current request and return the transformer instances in two arrays. The first array contains all pre transformers and the second one contains all post transformers.- Parameters:
context
- The current processing context.
-
-