SerializerWrapper.java 2.98 KB
/*
 * Decompiled with CFR 0_118.
 * 
 * Could not load the following classes:
 *  org.apache.sling.rewriter.ProcessingComponentConfiguration
 *  org.apache.sling.rewriter.ProcessingContext
 *  org.apache.sling.rewriter.Serializer
 *  org.osgi.service.component.ComponentInstance
 */
package com.day.cq.rewriter.processor.impl;

import com.day.cq.rewriter.processor.ProcessingComponentConfiguration;
import com.day.cq.rewriter.processor.ProcessingContext;
import com.day.cq.rewriter.processor.impl.ProcessingComponentConfigurationWrapper;
import com.day.cq.rewriter.processor.impl.ProcessingContextWrapper;
import java.io.IOException;
import org.apache.sling.rewriter.Serializer;
import org.osgi.service.component.ComponentInstance;
import org.xml.sax.Attributes;
import org.xml.sax.Locator;
import org.xml.sax.SAXException;

public class SerializerWrapper
implements Serializer {
    private final com.day.cq.rewriter.pipeline.Serializer delegate;
    private final ComponentInstance instance;

    public SerializerWrapper(com.day.cq.rewriter.pipeline.Serializer t, ComponentInstance cI) {
        this.delegate = t;
        this.instance = cI;
    }

    public void characters(char[] ch, int start, int length) throws SAXException {
        this.delegate.characters(ch, start, length);
    }

    public void endDocument() throws SAXException {
        this.delegate.endDocument();
    }

    public void endElement(String uri, String localName, String name) throws SAXException {
        this.delegate.endElement(uri, localName, name);
    }

    public void endPrefixMapping(String prefix) throws SAXException {
        this.delegate.endPrefixMapping(prefix);
    }

    public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException {
        this.delegate.ignorableWhitespace(ch, start, length);
    }

    public void processingInstruction(String target, String data) throws SAXException {
        this.delegate.processingInstruction(target, data);
    }

    public void setDocumentLocator(Locator locator) {
        this.delegate.setDocumentLocator(locator);
    }

    public void skippedEntity(String name) throws SAXException {
        this.delegate.skippedEntity(name);
    }

    public void startDocument() throws SAXException {
        this.delegate.startDocument();
    }

    public void startElement(String uri, String localName, String name, Attributes atts) throws SAXException {
        this.delegate.startElement(uri, localName, name, atts);
    }

    public void startPrefixMapping(String prefix, String uri) throws SAXException {
        this.delegate.startPrefixMapping(prefix, uri);
    }

    public void init(org.apache.sling.rewriter.ProcessingContext context, org.apache.sling.rewriter.ProcessingComponentConfiguration config) throws IOException {
        this.delegate.init(new ProcessingContextWrapper(context), new ProcessingComponentConfigurationWrapper(config));
    }

    public void dispose() {
        if (this.instance != null) {
            this.instance.dispose();
        }
    }
}