01: /**
02: *
03: */package org.enhydra.dm.handler;
04:
05: import java.io.IOException;
06:
07: import javax.servlet.ServletException;
08: import javax.servlet.http.HttpServletRequest;
09: import javax.servlet.http.HttpServletResponse;
10:
11: import org.enhydra.dm.api.handler.AbstractHandler;
12:
13: /**
14: * Default implementation of a handler for requests using the WebDAV COPY method.
15: *
16: * @author Slobodan Vujasinovic
17: */
18: public class DefaultCopyHandler extends AbstractHandler {
19:
20: /**
21: * THIS HANDLER CURRENTLY NOT IN USE! <br>
22: * Services requests which use the WebDAV COPY method.
23: *
24: * @param request The request being serviced.
25: * @param response The servlet response.
26: * @throws SerlvetException If an application error occurs.
27: * @throws IOException If an IO error occurs while handling the request.
28: */
29:
30: public void service(HttpServletRequest request,
31: HttpServletResponse response) throws ServletException,
32: IOException {
33: /*
34: * NOTE: This is dummy implementation that introduces only the list of possible
35: * response statuses.
36: */
37: response.setStatus(HttpServletResponse.SC_NOT_FOUND);
38: response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
39: response.setStatus(HttpServletResponse.SC_FORBIDDEN);
40: response.setStatus(HttpServletResponse.SC_OK);
41:
42: response.flushBuffer();
43: }
44:
45: }
|