GeneratorWrapper.java
1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* org.apache.sling.rewriter.Generator
* org.apache.sling.rewriter.ProcessingComponentConfiguration
* org.apache.sling.rewriter.ProcessingContext
* org.osgi.service.component.ComponentInstance
*/
package com.day.cq.rewriter.processor.impl;
import com.day.cq.rewriter.pipeline.Generator;
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 java.io.PrintWriter;
import org.osgi.service.component.ComponentInstance;
import org.xml.sax.ContentHandler;
import org.xml.sax.SAXException;
public class GeneratorWrapper
implements org.apache.sling.rewriter.Generator {
private final Generator delegate;
private final ComponentInstance instance;
public GeneratorWrapper(Generator t, ComponentInstance cI) {
this.delegate = t;
this.instance = cI;
}
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 setContentHandler(ContentHandler handler) {
this.delegate.setContentHandler(handler);
}
public void finished() throws IOException, SAXException {
this.delegate.finished();
}
public PrintWriter getWriter() {
return this.delegate.getWriter();
}
public void dispose() {
if (this.instance != null) {
this.instance.dispose();
}
}
}