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.wcs;
06:
07: import org.vfny.geoserver.ExceptionHandler;
08: import org.vfny.geoserver.ServiceException;
09:
10: /**
11: * ServiceConfig exception handler for WCS services GR: should we rename it?
12: * ExceptionHandler don't seems appropiate.
13: *
14: * @author $Author: Alessio Fabiani (alessio.fabiani@gmail.com) $ (last modification)
15: * @author $Author: Simone Giannecchini (simboss1@gmail.com) $ (last modification)
16: * @version $Id: WcsExceptionHandler.java 6326 2007-03-15 18:36:40Z jdeolive $
17: */
18: public class WcsExceptionHandler implements ExceptionHandler {
19: /** DOCUMENT ME! */
20: private static final WcsExceptionHandler instance = new WcsExceptionHandler();
21:
22: /**
23: *
24: * @uml.property name="lnkWcsException"
25: * @uml.associationEnd multiplicity="(0 1)"
26: */
27: private WcsException lnkWcsException;
28:
29: private WcsExceptionHandler() {
30: }
31:
32: /**
33: * DOCUMENT ME!
34: *
35: * @return DOCUMENT ME!
36: */
37: public static WcsExceptionHandler getInstance() {
38: return instance;
39: }
40:
41: /**
42: * DOCUMENT ME!
43: *
44: * @param message DOCUMENT ME!
45: *
46: * @return DOCUMENT ME!
47: */
48: public ServiceException newServiceException(String message) {
49: return new WcsException(message);
50: }
51:
52: /**
53: * DOCUMENT ME!
54: *
55: * @param message DOCUMENT ME!
56: * @param locator DOCUMENT ME!
57: *
58: * @return DOCUMENT ME!
59: */
60: public ServiceException newServiceException(String message,
61: String locator) {
62: return new WcsException(message, locator);
63: }
64:
65: /**
66: * DOCUMENT ME!
67: *
68: * @param e DOCUMENT ME!
69: *
70: * @return DOCUMENT ME!
71: */
72: public ServiceException newServiceException(Throwable e) {
73: return new WcsException(e);
74: }
75:
76: /**
77: * DOCUMENT ME!
78: *
79: * @param e DOCUMENT ME!
80: * @param preMessage DOCUMENT ME!
81: * @param locator DOCUMENT ME!
82: *
83: * @return DOCUMENT ME!
84: */
85: public ServiceException newServiceException(Throwable e,
86: String preMessage, String locator) {
87: return new WcsException(e, preMessage, locator);
88: }
89: }
|