ProcessorConfigurationWrapper.java
1.91 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
56
57
58
59
60
61
62
63
64
65
66
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* org.apache.sling.api.SlingHttpServletRequest
* org.apache.sling.api.SlingHttpServletResponse
* org.apache.sling.rewriter.ProcessingContext
* org.apache.sling.rewriter.ProcessorConfiguration
*/
package com.day.cq.rewriter.processor.impl;
import com.day.cq.rewriter.processor.ProcessingContext;
import com.day.cq.rewriter.processor.ProcessorConfiguration;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Map;
import org.apache.sling.api.SlingHttpServletRequest;
import org.apache.sling.api.SlingHttpServletResponse;
public class ProcessorConfigurationWrapper
implements ProcessorConfiguration {
private final org.apache.sling.rewriter.ProcessorConfiguration delegatee;
public ProcessorConfigurationWrapper(org.apache.sling.rewriter.ProcessorConfiguration pc) {
this.delegatee = pc;
}
@Override
public Map<String, Object> getConfiguration() {
return this.delegatee.getConfiguration();
}
@Override
public String getType() {
return this.delegatee.getType();
}
@Override
public boolean match(final ProcessingContext context) {
return this.delegatee.match(new org.apache.sling.rewriter.ProcessingContext(){
public String getContentType() {
return context.getContentType();
}
public OutputStream getOutputStream() throws IOException {
return context.getOutputStream();
}
public SlingHttpServletRequest getRequest() {
return context.getRequest();
}
public SlingHttpServletResponse getResponse() {
return context.getResponse();
}
public PrintWriter getWriter() throws IOException {
return context.getWriter();
}
});
}
}