Package com.adobe.acs.commons.rewriter
Class ContentHandlerBasedTransformer
- java.lang.Object
-
- com.adobe.acs.commons.rewriter.ContentHandlerBasedTransformer
-
- All Implemented Interfaces:
org.apache.sling.rewriter.Transformer,ContentHandler
@ConsumerType public class ContentHandlerBasedTransformer extends Object implements org.apache.sling.rewriter.Transformer
Abstract base class to ease creating transformer pipeline components. All methods are impelemented as pass-throughs to the next content handler. Similar to Cocoon's AbstractSAXPipe.
-
-
Constructor Summary
Constructors Constructor Description ContentHandlerBasedTransformer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcharacters(char[] ch, int start, int length)voiddispose()voidendDocument()voidendElement(String uri, String localName, String qName)voidendPrefixMapping(String prefix)protected ContentHandlergetContentHandler()voidignorableWhitespace(char[] ch, int start, int length)voidinit(org.apache.sling.rewriter.ProcessingContext context, org.apache.sling.rewriter.ProcessingComponentConfiguration config)voidprocessingInstruction(String target, String data)voidsetContentHandler(ContentHandler contentHandler)voidsetDocumentLocator(Locator locator)voidskippedEntity(String name)voidstartDocument()voidstartElement(String uri, String localName, String qName, Attributes atts)voidstartPrefixMapping(String prefix, String uri)
-
-
-
Method Detail
-
characters
public void characters(char[] ch, int start, int length) throws SAXException- Specified by:
charactersin interfaceContentHandler- Throws:
SAXException
-
dispose
public void dispose()
- Specified by:
disposein interfaceorg.apache.sling.rewriter.Transformer
-
endDocument
public void endDocument() throws SAXException- Specified by:
endDocumentin interfaceContentHandler- Throws:
SAXException
-
endElement
public void endElement(String uri, String localName, String qName) throws SAXException
- Specified by:
endElementin interfaceContentHandler- Throws:
SAXException
-
endPrefixMapping
public void endPrefixMapping(String prefix) throws SAXException
- Specified by:
endPrefixMappingin interfaceContentHandler- Throws:
SAXException
-
ignorableWhitespace
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException- Specified by:
ignorableWhitespacein interfaceContentHandler- Throws:
SAXException
-
init
public void init(org.apache.sling.rewriter.ProcessingContext context, org.apache.sling.rewriter.ProcessingComponentConfiguration config) throws IOException- Specified by:
initin interfaceorg.apache.sling.rewriter.Transformer- Throws:
IOException
-
processingInstruction
public void processingInstruction(String target, String data) throws SAXException
- Specified by:
processingInstructionin interfaceContentHandler- Throws:
SAXException
-
setContentHandler
public final void setContentHandler(ContentHandler contentHandler)
- Specified by:
setContentHandlerin interfaceorg.apache.sling.rewriter.Transformer
-
setDocumentLocator
public void setDocumentLocator(Locator locator)
- Specified by:
setDocumentLocatorin interfaceContentHandler
-
skippedEntity
public void skippedEntity(String name) throws SAXException
- Specified by:
skippedEntityin interfaceContentHandler- Throws:
SAXException
-
startDocument
public void startDocument() throws SAXException- Specified by:
startDocumentin interfaceContentHandler- Throws:
SAXException
-
startElement
public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException
- Specified by:
startElementin interfaceContentHandler- Throws:
SAXException
-
startPrefixMapping
public void startPrefixMapping(String prefix, String uri) throws SAXException
- Specified by:
startPrefixMappingin interfaceContentHandler- Throws:
SAXException
-
getContentHandler
protected final ContentHandler getContentHandler()
-
-