com.itextpdf.tool.xml.pipeline.css
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 in
open(WorkerContext, Tag, ProcessObject)
- Author:
- redlab_b
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CSS_RESOLVER
public static final String CSS_RESOLVER
- See Also:
- Constant Field Values
CssResolverPipeline
public CssResolverPipeline(CSSResolver cssResolver,
Pipeline<?> next)
- Parameters:
next
- the next pipeline.cssResolver
- the CSSResolver
to use in this Pipeline, it
will be stored in a ThreadLocal variable.
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
through
WorkerContext.put(String, CustomContext)
.
- Specified by:
init
in interface Pipeline<ObjectContext<CSSResolver>>
- Overrides:
init
in class AbstractPipeline<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 interface Pipeline<ObjectContext<CSSResolver>>
- Overrides:
open
in class AbstractPipeline<ObjectContext<CSSResolver>>
- Parameters:
context
- the WorkerContextt
- the Tagpo
- a processObject to put Writable
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.
Copyright © 2012. All Rights Reserved.