Source Code Cross Referenced for PortletException.java in  » Portal » Open-Portal » javax » portlet » 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 » javax.portlet 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * Copyright 2003 IBM Corporation and Sun Microsystems, Inc.
003:         * All rights reserved.
004:         * Use is subject to license terms.
005:         */package javax.portlet;
006:
007:        /**
008:         * The <CODE>PortletException</CODE> class defines a general exception
009:         * that a portlet can throw when it is unable to perform its operation
010:         * successfully.
011:         */
012:
013:        public class PortletException extends java.lang.Exception {
014:
015:            private Throwable _cause;
016:
017:            /**
018:             * Constructs a new portlet exception.
019:             */
020:
021:            public PortletException() {
022:                super ();
023:            }
024:
025:            /**
026:             * Constructs a new portlet exception with the given text. The
027:             * portlet container may use the text write it to a log.
028:             *
029:             * @param   text
030:             *          the exception text
031:             */
032:
033:            public PortletException(String text) {
034:                super (text);
035:            }
036:
037:            /**
038:             * Constructs a new portlet exception when the portlet needs to do
039:             * the following:
040:             * <ul>
041:             * <li>throw an exception 
042:             * <li>include the "root cause" exception
043:             * <li>include a description message
044:             * </ul>
045:             *
046:             * @param   text
047:             *          the exception text
048:             * @param   cause
049:             *          the root cause
050:             */
051:
052:            public PortletException(String text, Throwable cause) {
053:                super (text);
054:                _cause = cause;
055:                // change this when going to jdk1.4:    super (text, cause);
056:            }
057:
058:            /**
059:             * Constructs a new portlet exception when the portlet needs to throw an
060:             * exception. The exception's message is based on the localized message
061:             * of the underlying exception.
062:             *
063:             * @param   cause
064:             *          the root cause
065:             */
066:
067:            public PortletException(Throwable cause) {
068:                _cause = cause;
069:                // change this when going to jdk1.4:        super (cause);
070:            }
071:
072:            /**
073:             * Prints the stack trace of this exception to the standard error stream.
074:             */
075:            public void printStackTrace() {
076:                this .printStackTrace(System.err);
077:            }
078:
079:            /**
080:             * Prints the stack trace of this exception to the specified print stream.
081:             *
082:             * @param out the <code>PrintStream</code> to be used for output
083:             */
084:            public void printStackTrace(java.io.PrintStream out) {
085:                this .printStackTrace(new java.io.PrintWriter(out, true));
086:            }
087:
088:            /**
089:             * Prints the stack trace of this exception to the specified print writer.
090:             * 
091:             * @param out the <code>PrintWriter</code> to be used for output
092:             */
093:            public void printStackTrace(java.io.PrintWriter out) {
094:                super .printStackTrace(out);
095:
096:                if (getCause() != null) {
097:                    out.println();
098:                    out.print("Nested Exception is ");
099:                    getCause().printStackTrace(out);
100:                }
101:                // change this when going tojdk1.4:
102:                /*
103:                  super.printStackTrace(out);
104:
105:                  if( getRootCause () != null )
106:                  {
107:                      out.println();
108:                      out.print("Nested Exception is ");
109:                      getRootCause ().printStackTrace(out);
110:                  }
111:                 */
112:            }
113:
114:            /**
115:             * Returns the cause of this throwable or <code>null</code> if the
116:             * cause is nonexistent or unknown.  (The cause is the throwable that
117:             * caused this throwable to get thrown.)
118:             *
119:             * <p>This implementation returns the cause that was supplied via one of
120:             * the constructors requiring a <tt>Throwable</tt>.
121:             *
122:             * @return  the cause of this throwable or <code>null</code> if the
123:             *          cause is nonexistent or unknown.
124:             */
125:            public Throwable getCause() {
126:                return (_cause != null ? _cause : null);
127:            }
128:
129:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.