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.void
setResolver
(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
- theCSSResolver
to 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:
getContextKey
in classAbstractPipeline<ObjectContext<CSSResolver>>
- Returns:
getClass().getName()
as name.
-
init
Description copied from interface:Pipeline
The 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:
init
in interfacePipeline<ObjectContext<CSSResolver>>
- Overrides:
init
in 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:AbstractPipeline
Just calls getNext.
Override this to get notified on encountered opening tags.- Specified by:
open
in interfacePipeline<ObjectContext<CSSResolver>>
- Overrides:
open
in classAbstractPipeline<ObjectContext<CSSResolver>>
- Parameters:
context
- the WorkerContextt
- the Tagpo
- a processObject to putWritable
s 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.
-