ContentRequestHandler.java
3.68 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* com.scene7.is.catalog.client.ImageDirectory
* com.scene7.is.provider.ProcessingStatus
* com.scene7.is.provider.catalog.CatalogException
* com.scene7.is.provider.catalog.ClientAddressForbiddenException
* com.scene7.is.provider.ruleset.RuleSetException
* com.scene7.is.ps.j2ee.ErrorRedirect
* com.scene7.is.ps.j2ee.ServletHelperUtil
* com.scene7.is.ps.j2ee.content.StaticContentHandler
* com.scene7.is.ps.j2ee.content.StaticContentHttpRequestHandler
* com.scene7.is.ps.provider.CatalogRecordException
* com.scene7.is.ps.provider.IZoomException
* com.scene7.is.ps.provider.ResourceAccessor
* com.scene7.is.util.text.ParameterException
* com.scene7.is.util.text.ParsingException
* javax.servlet.ServletContext
* javax.servlet.ServletException
* javax.servlet.http.HttpServletRequest
* javax.servlet.http.HttpServletResponse
* org.springframework.context.ApplicationContext
*/
package com.adobe.cq.dam.s7imaging.impl.ps;
import com.adobe.cq.dam.s7imaging.impl.ps.RequestHandler;
import com.scene7.is.catalog.client.ImageDirectory;
import com.scene7.is.provider.ProcessingStatus;
import com.scene7.is.provider.catalog.CatalogException;
import com.scene7.is.provider.catalog.ClientAddressForbiddenException;
import com.scene7.is.provider.ruleset.RuleSetException;
import com.scene7.is.ps.j2ee.ErrorRedirect;
import com.scene7.is.ps.j2ee.ServletHelperUtil;
import com.scene7.is.ps.j2ee.content.StaticContentHandler;
import com.scene7.is.ps.j2ee.content.StaticContentHttpRequestHandler;
import com.scene7.is.ps.provider.CatalogRecordException;
import com.scene7.is.ps.provider.IZoomException;
import com.scene7.is.ps.provider.ResourceAccessor;
import com.scene7.is.util.text.ParameterException;
import com.scene7.is.util.text.ParsingException;
import java.io.IOException;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.context.ApplicationContext;
final class ContentRequestHandler
extends RequestHandler {
private final StaticContentHttpRequestHandler delegate;
static RequestHandler apply(ApplicationContext applicationContext) {
return new ContentRequestHandler(applicationContext);
}
private ContentRequestHandler(ApplicationContext context) {
StaticContentHandler h = new StaticContentHandler((ImageDirectory)context.getBean("imageDirectory", ImageDirectory.class), (ServletContext)context.getBean("servletContext", ServletContext.class), "", 10000, (ResourceAccessor)context.getBean("resourceAccessor", ResourceAccessor.class)){
void handleRequest(HttpServletRequest request, HttpServletResponse response) throws ParsingException, CatalogRecordException, ClientAddressForbiddenException, ServletException, IOException, ParameterException, IZoomException, RuleSetException, CatalogException {
String netPath = ServletHelperUtil.getNetPath((HttpServletRequest)request);
ProcessingStatus processingStatus = new ProcessingStatus();
super.handleRequest(netPath, request, response, processingStatus);
}
};
this.delegate = new StaticContentHttpRequestHandler(h, (ErrorRedirect)context.getBean("errorRedirect", ErrorRedirect.class));
}
@Override
public void close() {
}
@Override
protected void doHandleRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
this.delegate.handleRequest(request, response);
}
@Override
protected String contextRoot() {
return "/is/content";
}
}