Source Code Cross Referenced for CError.java in  » Portal » uPortal_rel-2-6-1-GA » org » jasig » portal » channels » 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 » uPortal_rel 2 6 1 GA » org.jasig.portal.channels 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /* Copyright 2001, 2004 The JA-SIG Collaborative.  All rights reserved.
002:         *  See license distributed with this file and
003:         *  available online at http://www.uportal.org/license.html
004:         */
005:
006:        package org.jasig.portal.channels;
007:
008:        import java.io.PrintWriter;
009:
010:        import org.jasig.portal.ChannelCacheKey;
011:        import org.jasig.portal.ChannelRuntimeData;
012:        import org.jasig.portal.ChannelRuntimeProperties;
013:        import org.jasig.portal.ChannelStaticData;
014:        import org.jasig.portal.ICacheable;
015:        import org.jasig.portal.IChannel;
016:        import org.jasig.portal.ICharacterChannel;
017:        import org.jasig.portal.IPrivilegedChannel;
018:        import org.jasig.portal.PortalControlStructures;
019:        import org.jasig.portal.PortalEvent;
020:        import org.jasig.portal.PortalException;
021:        import org.jasig.portal.channels.error.ErrorCode;
022:        import org.xml.sax.ContentHandler;
023:
024:        /**
025:         * Deprecated legacy stub channel.
026:         * CError has been moved to the org.jasig.portal.error package.
027:         * This class exists to provide backwards compatibility -- it delegates to
028:         * the org.jasig.portal.error.CError channel.
029:         * @author andrew.petro@yale.edu
030:         * @version $Revision: 35594 $ $Date: 2005-04-17 13:55:47 -0700 (Sun, 17 Apr 2005) $
031:         * @deprecated moved to org.jasig.portal.channels.error package.
032:         */
033:        public class CError implements  IPrivilegedChannel, ICacheable,
034:                ICharacterChannel {
035:
036:            /** Generic error code */
037:            public static final int GENERAL_ERROR = 0;
038:
039:            /** Error code for failure during rendering. */
040:            public static final int RENDER_TIME_EXCEPTION = 1;
041:
042:            /** Error code for errors at time static data is set */
043:            public static final int SET_STATIC_DATA_EXCEPTION = 2;
044:
045:            /** Error code for errors at time runtime data is set. */
046:            public static final int SET_RUNTIME_DATA_EXCEPTION = 3;
047:
048:            /** Error code for channels that fail to complete rendering during
049:             * allotted time.
050:             */
051:            public static final int TIMEOUT_EXCEPTION = 4;
052:
053:            /** Error code representing failure when framework attempts to set
054:             * channel portal control structures.
055:             */
056:            public static final int SET_PCS_EXCEPTION = 5;
057:
058:            /**
059:             * Error code representing failure to render due to lack of authorization.
060:             */
061:            public static final int CHANNEL_AUTHORIZATION_EXCEPTION = 6;
062:
063:            /**
064:             * Error code representing the channel being just plain missing.
065:             */
066:            public static final int CHANNEL_MISSING_EXCEPTION = 7;
067:
068:            // codes defining exception types
069:            public static final int GENERAL_RENDERING_EXCEPTION = 1;
070:            public static final int INTERNAL_TIMEOUT_EXCEPTION = 2;
071:            public static final int AUTHORIZATION_EXCEPTION = 3;
072:            public static final int RESOURCE_MISSING_EXCEPTION = 4;
073:
074:            /**
075:             * The modern CError instance to which we delegate.
076:             */
077:            private org.jasig.portal.channels.error.CError delegate;
078:
079:            /**
080:             * Construct an uninitialized instance of the CError channel.
081:             */
082:            public CError() {
083:                this .delegate = new org.jasig.portal.channels.error.CError();
084:            }
085:
086:            /**
087:             * Construct an instance of the Error channel representing a failure to render of 
088:             * a particular subscribed channel for reason of having thrown a Throwable.
089:             * @param errorCode - one of the static error codes of this class
090:             * @param throwable - cause of failed channel's failure
091:             * @param channelSubscribeId - identifies the failed channel
092:             * @param channelInstance - the failed channel
093:             */
094:            public CError(int errorCode, Throwable throwable,
095:                    String channelSubscribeId, IChannel channelInstance) {
096:                ErrorCode codeObject = ErrorCode.codeForInt(errorCode);
097:                this .delegate = new org.jasig.portal.channels.error.CError(
098:                        codeObject, throwable, channelSubscribeId,
099:                        channelInstance);
100:            }
101:
102:            /**
103:             * Instantiate a CError representing a particular channel's failure,
104:             * including a message and errorCode, but not a Throwable.
105:             * @param errorCode - one of the static error codes of this class
106:             * @param message - describes error
107:             * @param channelSubscribeId - identifies failed channel
108:             * @param channelInstance - failed channel
109:             */
110:            public CError(int errorCode, String message,
111:                    String channelSubscribeId, IChannel channelInstance) {
112:                ErrorCode codeObject = ErrorCode.codeForInt(errorCode);
113:                this .delegate = new org.jasig.portal.channels.error.CError(
114:                        codeObject, message, channelSubscribeId,
115:                        channelInstance);
116:            }
117:
118:            /**
119:             * Instantiate a CError instance representing the failure of some particular channel,
120:             * including an error code, message, and the Throwable.
121:             * @param errorCode - one of the static error codes of this class
122:             * @param exception - thrown by the failed channel
123:             * @param channelSubscribeId - identifies failed channel
124:             * @param channelInstance - the failed channel instance
125:             * @param message - message describing failure
126:             */
127:            public CError(int errorCode, Throwable exception,
128:                    String channelSubscribeId, IChannel channelInstance,
129:                    String message) {
130:                ErrorCode codeObject = ErrorCode.codeForInt(errorCode);
131:                this .delegate = new org.jasig.portal.channels.error.CError(
132:                        codeObject, exception, channelSubscribeId,
133:                        channelInstance, message);
134:            }
135:
136:            /**
137:             * Set the failure message.
138:             * @param m - a mesage describing the error.
139:             */
140:            public void setMessage(String m) {
141:                this .delegate.getErrorDocument().setMessage(m);
142:            }
143:
144:            public void setPortalControlStructures(PortalControlStructures pcs) {
145:                this .delegate.setPortalControlStructures(pcs);
146:            }
147:
148:            /*
149:             * This is so CError can be used by getUserLayout() as a placeholder for
150:             * channels that have either been deleted from the portal database or
151:             * the users permission to use the channel has been removed (permanently or
152:             * temporarily).
153:             */
154:            public void setStaticData(ChannelStaticData sd) {
155:                this .delegate.setStaticData(sd);
156:            }
157:
158:            public void renderXML(ContentHandler out) {
159:                this .delegate.renderXML(out);
160:            }
161:
162:            public ChannelCacheKey generateKey() {
163:                return this .delegate.generateKey();
164:            }
165:
166:            public boolean isCacheValid(Object validity) {
167:                return this .delegate.isCacheValid(validity);
168:            }
169:
170:            public void renderCharacters(PrintWriter out)
171:                    throws PortalException {
172:                this .delegate.renderCharacters(out);
173:            }
174:
175:            public void setRuntimeData(ChannelRuntimeData rd)
176:                    throws PortalException {
177:                this .delegate.setRuntimeData(rd);
178:            }
179:
180:            public void receiveEvent(PortalEvent ev) {
181:                this .delegate.receiveEvent(ev);
182:            }
183:
184:            public ChannelRuntimeProperties getRuntimeProperties() {
185:                return this.delegate.getRuntimeProperties();
186:            }
187:
188:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.