1 |
8810
|
leinfelder
|
/**
|
2 |
|
|
* '$RCSfile$'
|
3 |
|
|
* Copyright: 2000 Regents of the University of California and the
|
4 |
|
|
* National Center for Ecological Analysis and Synthesis
|
5 |
|
|
*
|
6 |
|
|
* '$Author$'
|
7 |
|
|
* '$Date$'
|
8 |
|
|
*
|
9 |
|
|
* This program is free software; you can redistribute it and/or modify
|
10 |
|
|
* it under the terms of the GNU General Public License as published by
|
11 |
|
|
* the Free Software Foundation; either version 2 of the License, or
|
12 |
|
|
* (at your option) any later version.
|
13 |
|
|
*
|
14 |
|
|
* This program is distributed in the hope that it will be useful,
|
15 |
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16 |
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
17 |
|
|
* GNU General Public License for more details.
|
18 |
|
|
*
|
19 |
|
|
* You should have received a copy of the GNU General Public License
|
20 |
|
|
* along with this program; if not, write to the Free Software
|
21 |
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
22 |
|
|
*/
|
23 |
|
|
package edu.ucsb.nceas.metacat.restservice.v1;
|
24 |
|
|
|
25 |
|
|
import java.io.IOException;
|
26 |
|
|
|
27 |
|
|
import javax.servlet.ServletException;
|
28 |
|
|
import javax.servlet.http.HttpServletRequest;
|
29 |
|
|
import javax.servlet.http.HttpServletResponse;
|
30 |
|
|
|
31 |
|
|
import edu.ucsb.nceas.metacat.restservice.D1ResourceHandler;
|
32 |
|
|
import edu.ucsb.nceas.metacat.restservice.D1RestServlet;
|
33 |
|
|
|
34 |
|
|
|
35 |
|
|
/**
|
36 |
|
|
* Routes CN REST service requests to the appropriate handler
|
37 |
|
|
*
|
38 |
|
|
*/
|
39 |
|
|
public class CNRestServlet extends D1RestServlet {
|
40 |
|
|
|
41 |
|
|
/**
|
42 |
|
|
* Provide a CNResourceHandler subclass of D1ResourceHandler
|
43 |
|
|
*/
|
44 |
|
|
@Override
|
45 |
|
|
protected D1ResourceHandler createHandler(HttpServletRequest request, HttpServletResponse response)
|
46 |
|
|
throws ServletException, IOException {
|
47 |
|
|
return new CNResourceHandler(getServletContext(), request, response);
|
48 |
|
|
}
|
49 |
|
|
|
50 |
|
|
}
|