Source Code Cross Referenced for ModificationException.java in  » Ajax » zk » org » zkoss » util » 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 » Ajax » zk » org.zkoss.util 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /* ModificationException.java
002:
003:        {{IS_NOTE
004:        	Purpose:
005:        		
006:        	Description:
007:        		
008:        	History:
009:        		Thu Aug  8 19:59:53  2002, Created by tomyeh
010:        }}IS_NOTE
011:
012:        Copyright (C) 2002 Potix Corporation. All Rights Reserved.
013:
014:        {{IS_RIGHT
015:        	This program is distributed under GPL Version 2.0 in the hope that
016:        	it will be useful, but WITHOUT ANY WARRANTY.
017:        }}IS_RIGHT
018:         */
019:        package org.zkoss.util;
020:
021:        import org.zkoss.lang.CommonException;
022:        import org.zkoss.lang.Exceptions;
023:        import org.zkoss.lang.Expectable;
024:
025:        /**
026:         * Denotes a modification fails. It is considered as
027:         * a program bug, while {@link InvalidValueException} is considered as
028:         * an operational error of user.
029:         *
030:         * <p>The create, remove and setter method of peristent beans (i3pb) must
031:         * declare this exception. Besides this exception and,
032:         * {@link InvalidValueException},
033:         * org.zkoss.i3.pb.RemoveException and org.zkoss.i3.pb.CreateException,
034:         * who derive from this class, might be thrown
035:         *
036:         * @author tomyeh
037:         */
038:        public class ModificationException extends CommonException {
039:            /** Utilities.
040:             *
041:             * <p>The reason to use a class to hold static utilities is we can
042:             * override the method's return type later.
043:             */
044:            public static class Aide {
045:                /** Converts an exception to ModificationException or InvalidValueException
046:                 * depending on whether t implements {@link Expectable}.
047:                 * @see Exceptions#wrap
048:                 */
049:                public static ModificationException wrap(Throwable t) {
050:                    t = Exceptions.unwrap(t);
051:                    if (t instanceof  Expectable)
052:                        return (InvalidValueException) Exceptions.wrap(t,
053:                                InvalidValueException.class);
054:                    return (ModificationException) Exceptions.wrap(t,
055:                            ModificationException.class);
056:                }
057:
058:                /** Converts an exception to ModificationException or InvalidValueException
059:                 * depending on whether t implements {@link Expectable}.
060:                 * @see Exceptions#wrap
061:                 */
062:                public static ModificationException wrap(Throwable t, String msg) {
063:                    t = Exceptions.unwrap(t);
064:                    if (t instanceof  Expectable)
065:                        return (InvalidValueException) Exceptions.wrap(t,
066:                                InvalidValueException.class, msg);
067:                    return (ModificationException) Exceptions.wrap(t,
068:                            ModificationException.class, msg);
069:                }
070:
071:                /** Converts an exception to ModificationException or InvalidValueException
072:                 * depending on whether t implements {@link Expectable}.
073:                 * @see Exceptions#wrap
074:                 */
075:                public static ModificationException wrap(Throwable t, int code,
076:                        Object[] fmtArgs) {
077:                    t = Exceptions.unwrap(t);
078:                    if (t instanceof  Expectable)
079:                        return (InvalidValueException) Exceptions.wrap(t,
080:                                InvalidValueException.class, code, fmtArgs);
081:                    return (ModificationException) Exceptions.wrap(t,
082:                            ModificationException.class, code, fmtArgs);
083:                }
084:
085:                /** Converts an exception to ModificationException or InvalidValueException
086:                 * depending on whether t implements {@link Expectable}.
087:                 * @see Exceptions#wrap
088:                 */
089:                public static ModificationException wrap(Throwable t, int code,
090:                        Object fmtArg) {
091:                    t = Exceptions.unwrap(t);
092:                    if (t instanceof  Expectable)
093:                        return (InvalidValueException) Exceptions.wrap(t,
094:                                InvalidValueException.class, code, fmtArg);
095:                    return (ModificationException) Exceptions.wrap(t,
096:                            ModificationException.class, code, fmtArg);
097:                }
098:
099:                /** Converts an exception to ModificationException or InvalidValueException
100:                 * depending on whether t implements {@link Expectable}.
101:                 * @see Exceptions#wrap
102:                 */
103:                public static ModificationException wrap(Throwable t, int code) {
104:                    t = Exceptions.unwrap(t);
105:                    if (t instanceof  Expectable)
106:                        return (InvalidValueException) Exceptions.wrap(t,
107:                                InvalidValueException.class, code);
108:                    return (ModificationException) Exceptions.wrap(t,
109:                            ModificationException.class, code);
110:                }
111:            }
112:
113:            public ModificationException(String msg, Throwable cause) {
114:                super (msg, cause);
115:            }
116:
117:            public ModificationException(String s) {
118:                super (s);
119:            }
120:
121:            public ModificationException(Throwable cause) {
122:                super (cause);
123:            }
124:
125:            public ModificationException() {
126:            }
127:
128:            public ModificationException(int code, Object[] fmtArgs,
129:                    Throwable cause) {
130:                super (code, fmtArgs, cause);
131:            }
132:
133:            public ModificationException(int code, Object fmtArg,
134:                    Throwable cause) {
135:                super (code, fmtArg, cause);
136:            }
137:
138:            public ModificationException(int code, Object[] fmtArgs) {
139:                super (code, fmtArgs);
140:            }
141:
142:            public ModificationException(int code, Object fmtArg) {
143:                super (code, fmtArg);
144:            }
145:
146:            public ModificationException(int code, Throwable cause) {
147:                super (code, cause);
148:            }
149:
150:            public ModificationException(int code) {
151:                super(code);
152:            }
153:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.