Source Code Cross Referenced for PSMBeanException.java in  » Portal » Open-Portal » com » sun » portal » admin » common » 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 » Portal » Open Portal » com.sun.portal.admin.common 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * $Id: PSMBeanException.java,v 1.3 2005/02/15 14:14:34 rg149970 Exp $
003:         * Copyright 2005 Sun Microsystems, Inc. All
004:         * rights reserved. Use of this product is subject
005:         * to license terms. Federal Acquisitions:
006:         * Commercial Software -- Government Users
007:         * Subject to Standard License Terms and
008:         * Conditions.
009:         *
010:         * Sun, Sun Microsystems, the Sun logo, and Sun ONE
011:         * are trademarks or registered trademarks of Sun Microsystems,
012:         * Inc. in the United States and other countries.
013:         */package com.sun.portal.admin.common;
014:
015:        /**
016:         * A generic PS MBean error.
017:         */
018:        public class PSMBeanException extends Exception {
019:
020:            private String errorKey;
021:            private Object[] tokens = null;
022:
023:            /**
024:             * Constructs a new PS MBean exception with the specified error
025:             * key and <code>null</code> as its detail message.  The cause is
026:             * not initialized, and may subsequently be initialized by a call
027:             * to {@link #initCause}.
028:             *
029:             * @param  errorKey  the error key (which is saved for later
030:             *                    retrieval by the {@link #getErrorKey()} method).
031:             */
032:            public PSMBeanException(String errorKey) {
033:                super ();
034:                this .errorKey = errorKey;
035:            }
036:
037:            /**
038:             * Constructs a new PS MBean exception with the specified error
039:             * key and detail message . The cause is not initialized, and may
040:             * subsequently be initialized by a call to {@link #initCause}.
041:             *
042:             * @param  errorKey  the error key (which is saved for later
043:             *                    retrieval by the {@link #getErrorKey()} method).
044:             * @param  message  the detail message (which is saved for later
045:             *                  retrieval by the {@link #getMessage()} method).
046:             */
047:            public PSMBeanException(String errorKey, String message) {
048:                super (message);
049:                this .errorKey = errorKey;
050:            }
051:
052:            /**
053:             * Constructs a new PS MBean exception with the specified error
054:             * key and object array of tokens and <code>null</code> as its detail message.  The cause is
055:             * not initialized, and may subsequently be initialized by a call
056:             * to {@link #initCause}.
057:             *
058:             * @param  errorKey the error key (which is saved for later
059:             *                    retrieval by the {@link #getErrorKey()} method).
060:             * @param  tokens  the tokens to be inserted in the localized message (which is saved for later
061:             *                  retrieval by the {@link #getTokens()} method).
062:             */
063:            public PSMBeanException(String errorKey, Object[] tokens) {
064:                super ();
065:                this .errorKey = errorKey;
066:                this .tokens = tokens;
067:            }
068:
069:            /**
070:             * Constructs a new PS MBean exception with the specified error
071:             * key, cause ,detail message of <tt>((cause == null) ?
072:             * null : cause.toString())</tt> (which typically contains the
073:             * class and detail message of <tt>cause</tt>)
074:             *
075:             * @param  errorKey  the error key (which is saved for later
076:             *                    retrieval by the {@link #getErrorKey()} method).
077:             * @param  cause  the cause (which is saved for later retrieval by
078:             *                the {@link #getCause()} method).  (A
079:             *                <tt>null</tt> value is permitted, and indicates
080:             *                that the cause is nonexistent or unknown.)
081:             */
082:            public PSMBeanException(String errorKey, Throwable cause) {
083:                super (cause);
084:                this .errorKey = errorKey;
085:            }
086:
087:            /**
088:             * Constructs a new PS MBean exception with the specified error
089:             * key , detail message and an objecty array of tokens  The cause is not initialized, and may
090:             * subsequently be initialized by a call to {@link #initCause}.
091:             *
092:             * @param  errorKey  the error key (which is saved for later
093:             *                    retrieval by the {@link #getErrorKey()} method).
094:             * @param  message  the detail message (which is saved for later
095:             *                  retrieval by the {@link #getMessage()} method).
096:             * @param  tokens  the tokens to be inserted in the localized message (which is saved for later
097:             *                  retrieval by the {@link #getTokens()} method).
098:             */
099:            public PSMBeanException(String errorKey, String message,
100:                    Object[] tokens) {
101:                super (message);
102:                this .errorKey = errorKey;
103:                this .tokens = tokens;
104:            }
105:
106:            /**
107:             * Constructs a new PS MBean exception with the specified error
108:             * key, detail message , cause .  <p>Note that the detail
109:             * message associated with <code>cause</code> is <i>not</i>
110:             * automatically incorporated in this exception's detail message.
111:             *
112:             * @param  errorKey  the error key (which is saved for later
113:             *                    retrieval by the {@link #getErrorKey()} method).
114:             * @param  message  the detail message (which is saved for later
115:             *                  retrieval by the {@link #getMessage()} method).
116:             * @param  cause  the cause (which is saved for later retrieval by
117:             *                the {@link #getCause()} method).  (A
118:             *                <tt>null</tt> value is permitted, and indicates
119:             *                that the cause is nonexistent or unknown.)
120:
121:             */
122:            public PSMBeanException(String errorKey, String message,
123:                    Throwable cause) {
124:                super (message, cause);
125:                this .errorKey = errorKey;
126:            }
127:
128:            /**
129:             * Constructs a new PS MBean exception with the specified error
130:             * key, detail message , cause and object array of tokens.  <p>Note that the detail
131:             * message associated with <code>cause</code> is <i>not</i>
132:             * automatically incorporated in this exception's detail message.
133:             *
134:             * @param  errorKey  the error key (which is saved for later
135:             *                    retrieval by the {@link #getErrorKey()} method).
136:             * @param  message  the detail message (which is saved for later
137:             *                  retrieval by the {@link #getMessage()} method).
138:             * @param  cause  the cause (which is saved for later retrieval by
139:             *                the {@link #getCause()} method).  (A
140:             *                <tt>null</tt> value is permitted, and indicates
141:             *                that the cause is nonexistent or unknown.)
142:             * @param  tokens  the tokens to be inserted in the localized message (which is saved for later
143:             *                  retrieval by the {@link #getTokens()} method).
144:             */
145:            public PSMBeanException(String errorKey, String message,
146:                    Throwable cause, Object[] tokens) {
147:                super (message, cause);
148:                this .errorKey = errorKey;
149:                this .tokens = tokens;
150:            }
151:
152:            /**
153:             * Constructs a new PS MBean exception with the specified error
154:             * key, cause ,detail message of <tt>((cause == null) ?
155:             * null : cause.toString())</tt> (which typically contains the
156:             * class and detail message of <tt>cause</tt>) and  object array of tokens
157:             *
158:             * @param  errorKey  the error key (which is saved for later
159:             *                    retrieval by the {@link #getErrorKey()} method).
160:             * @param  cause  the cause (which is saved for later retrieval by
161:             *                the {@link #getCause()} method).  (A
162:             *                <tt>null</tt> value is permitted, and indicates
163:             *                that the cause is nonexistent or unknown.)
164:             *  @param  tokens  the tokens to be inserted in the localized message (which is saved for later
165:             *                  retrieval by the {@link #getTokens()} method).
166:             */
167:            public PSMBeanException(String errorKey, Throwable cause,
168:                    Object[] tokens) {
169:                super (cause);
170:                this .errorKey = errorKey;
171:                this .tokens = tokens;
172:            }
173:
174:            /**
175:             * Returns the error key of this PS MBean exception.
176:             *
177:             * @return the error key of this PS MBean exception.
178:             */
179:            public String getErrorKey() {
180:                return errorKey;
181:            }
182:
183:            /**
184:             * Returns the object array of tokens which can be later used to insert in
185:             * localzed messages
186:             *
187:             * @return the tokens as an object array.
188:             */
189:            public Object[] getTokens() {
190:                return tokens;
191:            }
192:
193:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.