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


001:        /* Copyright 2006 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.security.provider.cas;
007:
008:        import org.jasig.portal.PortalException;
009:
010:        import edu.yale.its.tp.cas.client.CASReceipt;
011:
012:        /**
013:         * Represents an exceptional condition encountered while attempting to
014:         * acquire a CAS Proxy Ticket.
015:         *
016:         * This exception evolved from edu.yale.its.tp.portal.security.CASProxyTicketAcquisitionException
017:         * as distributed in the Yale uPortal CAS security provider distribution version 3.0.0.
018:         */
019:        public class CasProxyTicketAcquisitionException extends PortalException {
020:
021:            private static final long serialVersionUID = 1L;
022:
023:            /**
024:             * The service for which a proxy ticket could not be acquired.
025:             */
026:            private final String service;
027:
028:            /**
029:             * CASReceipt provding background about the interaction with the CAS server
030:             * that did not produce a proxy granting ticket.
031:             */
032:            private final CASReceipt receipt;
033:
034:            /**
035:             * The pgtiou that was unsuccessfully presented for obtaining a proxy
036:             * ticket.  This field will be null when the constructor supplies a
037:             * CASReceipt instead of a pgtiou.  The CASReceipt contains the pgtiou.
038:             */
039:            private final String pgtIou;
040:
041:            /**
042:             * Exception thrown when cannot obtain proxy ticket for a given service using the given receipt.
043:             * @param serviceArg - service for which a PT was requested
044:             * @param receiptArg - receipt the pgtIou of which was being used to obtain the PT.
045:             */
046:            public CasProxyTicketAcquisitionException(String serviceArg,
047:                    CASReceipt receiptArg) {
048:                super ("Could not obtain proxy ticket for service ["
049:                        + serviceArg + "] using credentials [" + receiptArg
050:                        + "]");
051:                this .service = serviceArg;
052:                this .receipt = receiptArg;
053:                this .pgtIou = null;
054:            }
055:
056:            /**
057:             * Exception thrown when cannot obtain proxy ticket for a given service using the given receipt.
058:             * @param serviceArg - service for which a PT was requested
059:             * @param receiptArg - receipt the pgtIou of which was being used to obtain the PT.
060:             * @param cause - underlying throwable causing the error condition
061:             */
062:            public CasProxyTicketAcquisitionException(String serviceArg,
063:                    CASReceipt receiptArg, Throwable cause) {
064:                super ("Could not obtain proxy ticket for service ["
065:                        + serviceArg + "] using credentials [" + receiptArg
066:                        + "].", cause);
067:                this .service = serviceArg;
068:                this .receipt = receiptArg;
069:                this .pgtIou = null;
070:            }
071:
072:            /**
073:             * Exception thrown when cannot obtain proxy ticket for a given service using the given pgtIou.
074:             * @param serviceArg - service for which a PT was requested.
075:             * @param pgtIouArg - the pgtIou for the PGT which was to be used to obtain the PT.
076:             */
077:            public CasProxyTicketAcquisitionException(String serviceArg,
078:                    String pgtIouArg) {
079:                super ("Could not obtain proxy ticket for service ["
080:                        + serviceArg + "] using credentials [" + pgtIouArg
081:                        + "]");
082:                this .service = serviceArg;
083:                this .pgtIou = pgtIouArg;
084:                this .receipt = null;
085:            }
086:
087:            /**
088:             * Exception thrown when cannot obtain proxy ticket for a given service using the given pgtIou.
089:             * @param serviceArg - service for which a PT was requested.
090:             * @param pgtIouArg - the pgtIou for the PGT which was to be used to obtain the PT.
091:             * @param cause - underlying cause of the error condition
092:             */
093:            public CasProxyTicketAcquisitionException(String serviceArg,
094:                    String pgtIouArg, Throwable cause) {
095:                super ("Could not obtain proxy ticket for service ["
096:                        + serviceArg + "] using credentials [" + pgtIouArg
097:                        + "]", cause);
098:                this .service = serviceArg;
099:                this .pgtIou = pgtIouArg;
100:                this .receipt = null;
101:            }
102:
103:            /**
104:             * Get the CASReceipt if present, null otherwise.
105:             * CASReceipts convey information about a CAS authentication and can provide
106:             * useful diagnostic context for understanding the failure to acquire a
107:             * proxy granting ticket represented by this exception.
108:             * The CASReceipt may not be available depending upon the context with which
109:             * this exception was initialized, so this method may return null.
110:             * @return the CASReceipt or null.
111:             */
112:            public CASReceipt getReceipt() {
113:                return this .receipt;
114:            }
115:
116:            /**
117:             * Get the identifer of the service service for which the portal was trying
118:             * to obtain a Proxy Ticket when this exception was generated.
119:             * @return the service.
120:             */
121:            public String getService() {
122:                return this .service;
123:            }
124:
125:            /**
126:             * Get the PgtIou.
127:             * The pgtiou may have been set explicitly in the constructor or this method
128:             * may read it from the stored CASReceipt.
129:             * @return the pgtiou.
130:             */
131:            public String getPgtIou() {
132:
133:                if (this.pgtIou != null) {
134:                    return this.pgtIou;
135:                } else if (this.receipt != null) {
136:                    return this.receipt.getPgtIou();
137:                }
138:
139:                return null;
140:            }
141:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.