com.adobe.acs.commons.rewriter.DelegatingTransformer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of acs-aem-commons-bundle Show documentation
Show all versions of acs-aem-commons-bundle Show documentation
Main ACS AEM Commons OSGi Bundle. Includes commons utilities.
/*
* ACS AEM Commons
*
* Copyright (C) 2013 - 2023 Adobe
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.adobe.acs.commons.rewriter;
import org.apache.sling.rewriter.ProcessingComponentConfiguration;
import org.apache.sling.rewriter.ProcessingContext;
import org.apache.sling.rewriter.Transformer;
import org.xml.sax.Attributes;
import org.xml.sax.ContentHandler;
import org.xml.sax.Locator;
import org.xml.sax.SAXException;
import java.io.IOException;
public class DelegatingTransformer implements Transformer {
private Transformer delegate;
public void setDelegate(final Transformer delegate) {
this.delegate = delegate;
}
public Transformer getDelegate() {
return delegate;
}
@Override
public void init(final ProcessingContext context, final ProcessingComponentConfiguration componentConfiguration) throws IOException {
delegate.init(context, componentConfiguration);
}
@Override
public void setContentHandler(final ContentHandler contentHandler) {
delegate.setContentHandler(contentHandler);
}
@Override
public void dispose() {
delegate.dispose();
}
@Override
public void setDocumentLocator(final Locator locator) {
delegate.setDocumentLocator(locator);
}
@Override
public void startDocument() throws SAXException {
delegate.startDocument();
}
@Override
public void endDocument() throws SAXException {
delegate.endDocument();
}
@Override
public void startPrefixMapping(final String prefix, final String uri) throws SAXException {
delegate.startPrefixMapping(prefix, uri);
}
@Override
public void endPrefixMapping(final String prefix) throws SAXException {
delegate.endPrefixMapping(prefix);
}
@Override
public void startElement(final String uri, final String localName, final String qName, final Attributes attrs) throws SAXException {
delegate.startElement(uri, localName, qName, attrs);
}
@Override
public void endElement(final String uri, final String localName, final String qName) throws SAXException {
delegate.endElement(uri, localName, qName);
}
@Override
public void characters(final char[] ch, final int start, final int length) throws SAXException {
delegate.characters(ch, start, length);
}
@Override
public void ignorableWhitespace(final char[] ch, final int start, final int length) throws SAXException {
delegate.ignorableWhitespace(ch, start, length);
}
@Override
public void processingInstruction(final String target, final String data) throws SAXException {
delegate.processingInstruction(target, data);
}
@Override
public void skippedEntity(final String name) throws SAXException {
delegate.skippedEntity(name);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy