com.itextpdf.tool.xml
Interface Pipeline<T extends CustomContext>

Type Parameters:
T - the type of CustomContext
All Known Implementing Classes:
AbstractPipeline, AutoDocPipeline, CssResolverPipeline, ElementHandlerPipeline, HtmlPipeline, PdfTemplatePipeline, PdfWriterPipeline, SvgPipeline

public interface Pipeline<T extends CustomContext>

Author:
redlab_b

Method Summary
 Pipeline<?> close(WorkerContext context, Tag t, ProcessObject po)
          Called when a closing tag has been encountered.
 Pipeline<?> content(WorkerContext context, Tag t, String content, ProcessObject po)
          Called when content has been encountered.
 Pipeline<?> getNext()
          Returns the next pipeline in line.
 Pipeline<?> init(WorkerContext context)
          The init method allows implementation to initialize the pipeline.
 Pipeline<?> open(WorkerContext context, Tag t, ProcessObject po)
          Called when an opening tag has been encountered.
 

Method Detail

init

Pipeline<?> init(WorkerContext context)
                 throws PipelineException
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).

Parameters:
context - the WorkerContext
Returns:
the next pipeline in line
Throws:
PipelineException - can be thrown to indicate that something went wrong.

open

Pipeline<?> open(WorkerContext context,
                 Tag t,
                 ProcessObject po)
                 throws PipelineException
Called when an opening tag has been encountered.

Parameters:
context - the WorkerContext
t - the Tag
po - a processObject to put Writables in
Returns:
the next pipeline in line
Throws:
PipelineException - can be thrown to indicate that something went wrong.

content

Pipeline<?> content(WorkerContext context,
                    Tag t,
                    String content,
                    ProcessObject po)
                    throws PipelineException
Called when content has been encountered.

Parameters:
context - the WorkerContext
t - the Tag
content - the content
po - a processObject to put Writables in
Returns:
the next pipeline in line
Throws:
PipelineException - can be thrown to indicate that something went wrong.

close

Pipeline<?> close(WorkerContext context,
                  Tag t,
                  ProcessObject po)
                  throws PipelineException
Called when a closing tag has been encountered.

Parameters:
context - the WorkerContext
t - the Tag
po - a processObject to put Writables in
Returns:
the next pipeline in line
Throws:
PipelineException - can be thrown to indicate that something went wrong.

getNext

Pipeline<?> getNext()
Returns the next pipeline in line.

Returns:
the next pipeline


Copyright © 2012. All Rights Reserved.