Class HtmlGeneratorFactory.HtmlGenerator
- java.lang.Object
-
- org.apache.sling.rewriter.impl.components.HtmlGeneratorFactory.HtmlGenerator
-
- All Implemented Interfaces:
Generator
- Enclosing class:
- HtmlGeneratorFactory
public static final class HtmlGeneratorFactory.HtmlGenerator extends Object implements Generator
-
-
Constructor Summary
Constructors Constructor Description HtmlGenerator(org.apache.sling.commons.html.HtmlParser parser)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddispose()Dispose the generator.voidfinished()Notify the generator that parsing is finished.PrintWritergetWriter()Get the writer to write the output to.voidinit(ProcessingContext context, ProcessingComponentConfiguration config)Initialize this component.voidsetContentHandler(ContentHandler handler)Set the content handler the generator should stream to.
-
-
-
Method Detail
-
finished
public void finished() throws IOException, SAXExceptionDescription copied from interface:GeneratorNotify the generator that parsing is finished.- Specified by:
finishedin interfaceGenerator- Throws:
IOException- IOExceptionSAXException- SAXException- See Also:
Generator.finished()
-
getWriter
public PrintWriter getWriter()
Description copied from interface:GeneratorGet the writer to write the output to.- Specified by:
getWriterin interfaceGenerator- Returns:
- A print writer.
- See Also:
Generator.getWriter()
-
init
public void init(ProcessingContext context, ProcessingComponentConfiguration config) throws IOException
Description copied from interface:GeneratorInitialize this component.- Specified by:
initin interfaceGenerator- Parameters:
context- The invocation context.config- The configuration for this component.- Throws:
IOException- in case of any problems
-
setContentHandler
public void setContentHandler(ContentHandler handler)
Description copied from interface:GeneratorSet the content handler the generator should stream to.- Specified by:
setContentHandlerin interfaceGenerator- Parameters:
handler- A transformer or serializer.- See Also:
Generator.setContentHandler(org.xml.sax.ContentHandler)
-
dispose
public void dispose()
Description copied from interface:GeneratorDispose the generator. This method is always invoked by the rewriter in order to allow the generator to release any resources etc. After this method has been called the instance is considered unusable.- Specified by:
disposein interfaceGenerator- See Also:
Generator.dispose()
-
-