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>>
public class CssResolverPipeline extends AbstractPipeline<ObjectContext<CSSResolver>>
This Pipeline resolves CSS for the Tags it receives inopen(WorkerContext, Tag, ProcessObject)
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CSS_RESOLVER
private CSSResolver
resolver
-
Constructor Summary
Constructors Constructor Description CssResolverPipeline(CSSResolver cssResolver, Pipeline<?> next)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getContextKey()
This 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 Detail
-
resolver
private CSSResolver resolver
-
CSS_RESOLVER
public static final java.lang.String CSS_RESOLVER
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CssResolverPipeline
public CssResolverPipeline(CSSResolver cssResolver, Pipeline<?> next)
- Parameters:
next
- the next pipeline.cssResolver
- theCSSResolver
to use in this Pipeline, it will be stored in a ThreadLocal variable.
-
-
Method Detail
-
getContextKey
public java.lang.String getContextKey()
This allows the descendant classes to be fetched from the context.- Overrides:
getContextKey
in classAbstractPipeline<ObjectContext<CSSResolver>>
- Returns:
getClass().getName()
as name.
-
init
public Pipeline<?> init(WorkerContext context) throws PipelineException
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
public Pipeline<?> open(WorkerContext context, Tag t, ProcessObject po) throws PipelineException
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
public void setResolver(CSSResolver resolver)
Stores the cssResolver for the calling thread.- Parameters:
resolver
- the CSSResolver to use.
-
-