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.StringCSS_RESOLVERprivate CSSResolverresolver
-
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.StringgetContextKey()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.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 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- theCSSResolverto 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:
getContextKeyin classAbstractPipeline<ObjectContext<CSSResolver>>- Returns:
getClass().getName()as name.
-
init
public Pipeline<?> init(WorkerContext context) throws PipelineException
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
public Pipeline<?> open(WorkerContext context, Tag t, ProcessObject po) throws PipelineException
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
public void setResolver(CSSResolver resolver)
Stores the cssResolver for the calling thread.- Parameters:
resolver- the CSSResolver to use.
-
-