Package org.apache.sling.rewriter
Class DefaultTransformer
java.lang.Object
org.apache.sling.rewriter.DefaultTransformer
- All Implemented Interfaces:
Transformer,ContentHandler
A generic base transformer which simply delegates all ContentHandler method
invocations to the next ContentHandler.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcharacters(char[] ac, int i, int j) voiddispose()Dispose the transformer.voidvoidendElement(String s, String s1, String s2) voidvoidignorableWhitespace(char[] ac, int i, int j) voidinit(ProcessingContext context, ProcessingComponentConfiguration config) Initialize this component.voidprocessingInstruction(String s, String s1) final voidsetContentHandler(ContentHandler handler) Set the content handler the transformer should stream to.voidsetDocumentLocator(Locator locator) voidvoidvoidstartElement(String s, String s1, String s2, Attributes attributes) voidstartPrefixMapping(String s, String s1) Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.xml.sax.ContentHandler
declaration
-
Constructor Details
-
DefaultTransformer
public DefaultTransformer()
-
-
Method Details
-
characters
- Specified by:
charactersin interfaceContentHandler- Throws:
SAXException
-
dispose
public void dispose()Description copied from interface:TransformerDispose the transformer. This method is always invoked by the rewriter in order to allow the transformer to release any resources etc. After this method has been called the instance is considered unusable.- Specified by:
disposein interfaceTransformer
-
endDocument
- Specified by:
endDocumentin interfaceContentHandler- Throws:
SAXException
-
endElement
- Specified by:
endElementin interfaceContentHandler- Throws:
SAXException
-
endPrefixMapping
- Specified by:
endPrefixMappingin interfaceContentHandler- Throws:
SAXException
-
ignorableWhitespace
- Specified by:
ignorableWhitespacein interfaceContentHandler- Throws:
SAXException
-
init
public void init(ProcessingContext context, ProcessingComponentConfiguration config) throws IOException Description copied from interface:TransformerInitialize this component.- Specified by:
initin interfaceTransformer- Parameters:
context- The invocation context.config- The configuration for this component.- Throws:
IOException- in case of any problems
-
processingInstruction
- Specified by:
processingInstructionin interfaceContentHandler- Throws:
SAXException
-
setContentHandler
Description copied from interface:TransformerSet the content handler the transformer should stream to.- Specified by:
setContentHandlerin interfaceTransformer- Parameters:
handler- Another transformer or a serializer.
-
setDocumentLocator
- Specified by:
setDocumentLocatorin interfaceContentHandler
-
skippedEntity
- Specified by:
skippedEntityin interfaceContentHandler- Throws:
SAXException
-
startDocument
- Specified by:
startDocumentin interfaceContentHandler- Throws:
SAXException
-
startElement
- Specified by:
startElementin interfaceContentHandler- Throws:
SAXException
-
startPrefixMapping
- Specified by:
startPrefixMappingin interfaceContentHandler- Throws:
SAXException
-