Source Code Cross Referenced for ServiceException.java in  » GIS » GeoServer » org » geoserver » platform » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » GIS » GeoServer » org.geoserver.platform 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /* Copyright (c) 2001 - 2007 TOPP - www.openplans.org. All rights reserved.
002:         * This code is licensed under the GPL 2.0 license, availible at the root
003:         * application directory.
004:         */
005:        package org.geoserver.platform;
006:
007:        import java.util.ArrayList;
008:        import java.util.List;
009:
010:        /**
011:         *  Base class for exceptions generated by a service.
012:         *  <p>
013:         *  This class is based off the OGC idea of an exception, which contains
014:         *  a {@link #code}, and {@link #locator}. Futhermore optional fragments of
015:         *  {@link #exceptionText} may be associated with the exception.
016:         *  </p>
017:         *
018:         * @author Justin Deoliveira, The Open Planning Project, jdeolive@openplans.org
019:         *
020:         */
021:        public class ServiceException extends RuntimeException {
022:            /**
023:             * Serial UID
024:             */
025:            private static final long serialVersionUID = 7254349181794561723L;
026:
027:            /**
028:             * Application specfic code.
029:             */
030:            String code;
031:
032:            /**
033:             * Application specific locator
034:             */
035:            String locator;
036:
037:            /**
038:             * List of text recording information about the exception
039:             */
040:            List exceptionText = new ArrayList();
041:
042:            /**
043:             * Constructs the exception from a message.
044:             *
045:             * @param message The message describing the exception.
046:             */
047:            public ServiceException(String message) {
048:                super (message);
049:            }
050:
051:            /**
052:             * Constructs the exception from a message and causing exception.
053:             *
054:             * @param message The message describing the exception.
055:             * @param cause The case of the exception.
056:             */
057:            public ServiceException(String message, Throwable cause) {
058:                super (message, cause);
059:            }
060:
061:            /**
062:             * Constructs the exception from a message, causing exception, and code.
063:             *
064:             * @param message The message describing the exception.
065:             * @param cause The case of the exception.
066:             * @param code The application specific exception code for the exception.
067:             */
068:            public ServiceException(String message, Throwable cause, String code) {
069:                this (message, cause);
070:                this .code = code;
071:            }
072:
073:            /**
074:             * Constructs the exception from a message, causing exception, code, and
075:             * locator.
076:             *
077:             * @param message The message describing the exception.
078:             * @param cause The case of the exception.
079:             * @param code The application specific exception code for the exception.
080:             * @param locator The application specific locator for the exception.
081:             */
082:            public ServiceException(String message, Throwable cause,
083:                    String code, String locator) {
084:                this (message, cause, code);
085:                this .locator = locator;
086:            }
087:
088:            /**
089:             * Constructs the exception from a message, and code.
090:             *
091:             * @param message The message describing the exception.
092:             * @param code The application specific exception code for the exception.
093:             */
094:            public ServiceException(String message, String code) {
095:                super (message);
096:                this .code = code;
097:            }
098:
099:            /**
100:             * Constructs the exception from a message,code, and
101:             * locator.
102:             *
103:             * @param message The message describing the exception.
104:             * @param code The application specific exception code for the exception.
105:             * @param locator The application specific locator for the exception.
106:             */
107:            public ServiceException(String message, String code, String locator) {
108:                this (message, code);
109:                this .locator = locator;
110:            }
111:
112:            /**
113:             * Constructs the exception from a causing exception.
114:             *
115:             * @param cause The case of the exception.
116:             */
117:            public ServiceException(Throwable cause) {
118:                super (cause);
119:            }
120:
121:            /**
122:             * Constructs the exception from causing exception, and code.
123:             *
124:             * @param cause The case of the exception.
125:             * @param code The application specific exception code for the exception.
126:             */
127:            public ServiceException(Throwable cause, String code) {
128:                this (cause);
129:                this .code = code;
130:            }
131:
132:            /**
133:             * Constructs the exception from a causing exception, code, and locator.
134:             *
135:             * @param cause The case of the exception.
136:             * @param code The application specific exception code for the exception.
137:             * @param locator The application specific locator for the exception.
138:             */
139:            public ServiceException(Throwable cause, String code, String locator) {
140:                this (cause, code);
141:                this .locator = locator;
142:            }
143:
144:            /**
145:             * @return The application specifc code of the exception.
146:             */
147:            public String getCode() {
148:                return code;
149:            }
150:
151:            /**
152:             * Sets the code for the exception.
153:             *
154:             * @param code The application specific code.
155:             */
156:            public void setCode(String code) {
157:                this .code = code;
158:            }
159:
160:            /**
161:             * @return The application specific locator.
162:             */
163:            public String getLocator() {
164:                return locator;
165:            }
166:
167:            /**
168:             * Sets the locator for the exception.
169:             *
170:             * @return The application specific locator.
171:             */
172:            public void setLocator(String locator) {
173:                this .locator = locator;
174:            }
175:
176:            /**
177:             * Returns the list of text fragments which provide additonal information
178:             * about the exception.
179:             * <p>
180:             * Text fragements may be added directly to the list with:
181:             * <code>
182:             * exception.getExceptionTest().add( "text fragment" );
183:             * </code>
184:             * </p>
185:             * @return A list of String recording information about the exception.
186:             */
187:            public List getExceptionText() {
188:                return exceptionText;
189:            }
190:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.