Class CssResolverPipeline
java.lang.Object
com.itextpdf.tool.xml.pipeline.AbstractPipeline<ObjectContext<CSSResolver>>
com.itextpdf.tool.xml.pipeline.css.CssResolverPipeline
- All Implemented Interfaces:
Pipeline<ObjectContext<CSSResolver>>
This Pipeline resolves CSS for the Tags it receives in
open(WorkerContext, Tag, ProcessObject)-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThis allows the descendant classes to be fetched from the context.Pipeline<?> init(WorkerContext context) The init method allows implementation to initialize the pipeline.Pipeline<?> open(WorkerContext context, Tag t, ProcessObject po) Just calls getNext.
Override this to get notified on encountered opening tags.voidsetResolver(CSSResolver resolver) Stores the cssResolver for the calling thread.Methods inherited from class com.itextpdf.tool.xml.pipeline.AbstractPipeline
close, content, getLocalContext, getNext, setNext
-
Field Details
-
resolver
-
CSS_RESOLVER
- See Also:
-
-
Constructor Details
-
CssResolverPipeline
- Parameters:
cssResolver- theCSSResolverto use in this Pipeline, it will be stored in a ThreadLocal variable.next- the next pipeline.
-
-
Method Details
-
getContextKey
This allows the descendant classes to be fetched from the context.- Overrides:
getContextKeyin classAbstractPipeline<ObjectContext<CSSResolver>>- Returns:
getClass().getName()as name.
-
init
Description copied from interface:PipelineThe init method allows implementation to initialize the pipeline. e.g. Initialize their CustomContext here and add it to the WorkerContext throughWorkerContext.put(String, CustomContext).- Specified by:
initin interfacePipeline<ObjectContext<CSSResolver>>- Overrides:
initin classAbstractPipeline<ObjectContext<CSSResolver>>- Parameters:
context- the WorkerContext- Returns:
- the next pipeline in line
- Throws:
PipelineException- can be thrown to indicate that something went wrong.
-
open
Description copied from class:AbstractPipelineJust calls getNext.
Override this to get notified on encountered opening tags.- Specified by:
openin interfacePipeline<ObjectContext<CSSResolver>>- Overrides:
openin classAbstractPipeline<ObjectContext<CSSResolver>>- Parameters:
context- the WorkerContextt- the Tagpo- a processObject to putWritables in- Returns:
- the next pipeline in line
- Throws:
PipelineException- can be thrown to indicate that something went wrong.
-
setResolver
Stores the cssResolver for the calling thread.- Parameters:
resolver- the CSSResolver to use.
-