01: /* Copyright (c) 2001 - 2007 TOPP - www.openplans.org. All rights reserved.
02: * This code is licensed under the GPL 2.0 license, availible at the root
03: * application directory.
04: */
05: package org.vfny.geoserver.wms.servlets;
06:
07: import org.vfny.geoserver.Response;
08: import org.vfny.geoserver.global.WMS;
09: import org.vfny.geoserver.util.requests.readers.KvpRequestReader;
10: import org.vfny.geoserver.util.requests.readers.XmlRequestReader;
11: import org.vfny.geoserver.wms.requests.DescribeLayerKvpRequestReader;
12: import org.vfny.geoserver.wms.responses.DescribeLayerResponse;
13: import java.util.Map;
14:
15: /**
16: * Provides the artifacts to manage a WMS DescribeLayer request
17: * following the {@link org.vfny.geoserver.servlet.AbstractService}'s workflow.
18: *
19: * @author Gabriel Roldan, Axios Engineering
20: * @version $Id: DescribeLayer.java 6326 2007-03-15 18:36:40Z jdeolive $
21: */
22: public class DescribeLayer extends WMService {
23: public DescribeLayer(WMS wms) {
24: super ("DescribeLayer", wms);
25: }
26:
27: /**
28: * Creates and returns a response handler to encode
29: * the list of requested layers into a DescribeLayer
30: * document.
31: *
32: * @return a <code>DescribeLayerResponse</code>
33: */
34: protected Response getResponseHandler() {
35: return new DescribeLayerResponse();
36: }
37:
38: /**
39: * Builds a KVP reader to parse the parameters of
40: * a DescribeLayer request.
41: *
42: * @param params the request kvp parameters
43: *
44: * @return a new DescribeLayerKvpRequestReader
45: */
46: protected KvpRequestReader getKvpReader(Map params) {
47: return new DescribeLayerKvpRequestReader(params, this );
48: }
49:
50: /**
51: * Throws an UnsupportedOperationException allways, since
52: * there are no standard XML encoding for DescribeLayer requests.
53: *
54: * @return none
55: * @throws UnsupportedOperationException allways, since
56: * there are no standard XML encoding for DescribeLayer requests.
57: */
58: protected XmlRequestReader getXmlRequestReader() {
59: throw new UnsupportedOperationException(
60: "There are no standard XML encoding for DescribeLayer requests");
61: }
62: }
|