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.util.requests.readers;
06:
07: import org.vfny.geoserver.Request;
08: import org.vfny.geoserver.ServiceException;
09: import org.vfny.geoserver.servlets.AbstractService;
10: import java.io.Reader;
11: import java.util.logging.Logger;
12: import javax.servlet.http.HttpServletRequest;
13:
14: /**
15: * This utility reads in XML requests and returns them as appropriate request
16: * objects.
17: *
18: * @author Rob Hranac, TOPP
19: * @author Chris Holmes, TOPP
20: * @author Gabriel Rold?n
21: * @version $Id: XmlRequestReader.java 7746 2007-11-13 15:38:35Z aaime $
22: */
23: public abstract class XmlRequestReader {
24: /** Class logger */
25: protected static Logger LOGGER = org.geotools.util.logging.Logging
26: .getLogger("org.vfny.geoserver.requests.readers");
27:
28: /** The service handling the request **/
29: private AbstractService service;
30:
31: /**
32: * DOCUMENT ME!
33: *
34: * @param reader DOCUMENT ME!
35: *
36: * @return DOCUMENT ME!
37: *
38: * @throws ServiceException DOCUMENT ME!
39: */
40: public abstract Request read(Reader reader, HttpServletRequest req)
41: throws ServiceException;
42:
43: /**
44: * This will create a new XmlRequestReader
45: * @param service The service handling the request
46: */
47: public XmlRequestReader(AbstractService service) {
48: this .service = service;
49: }
50:
51: /**
52: * @return the service handling the request
53: */
54: public AbstractService getServiceRef() {
55: return service;
56: }
57:
58: /**
59: * sets the service handling the request
60: */
61: public void setServiceRef(AbstractService service) {
62: this.service = service;
63: }
64: }
|