KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sslexplorer > security > SecurityErrorException


1 /*
2  * SSL-Explorer
3  *
4  * Copyright (C) 2003-2006 3SP LTD. All Rights Reserved
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2 of
9  * the License, or (at your option) any later version.
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public
16  * License along with this program; if not, write to the Free Software
17  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18  */

19             
20 package com.sslexplorer.security;
21
22 import com.sslexplorer.core.CoreException;
23
24 /**
25  * @author Brett Smith <brett@3sp.com>
26  */

27 public class SecurityErrorException extends CoreException {
28     
29     /**
30      * Error category
31      */

32     public final static String JavaDoc ERROR_CATEGORY = "security";
33
34
35     /**
36      * General authentication error
37      */

38     public final static int INTERNAL_ERROR = 0;
39     
40     /**
41      * An invalid ticket has been provided, probably by an external component
42      * such as the launcher applet or agent.
43      */

44     public final static int ERR_INVALID_TICKET = 1;
45
46     /**
47      * Constructor.
48      *
49      * @param code
50      */

51     public SecurityErrorException(int code) {
52         super(code, ERROR_CATEGORY);
53     }
54
55     /**
56      * Constructor.
57      *
58      * @param code
59      * @param bundle
60      * @param cause
61      * @param arg0
62      * @param arg1
63      * @param arg2
64      * @param arg3
65      */

66     public SecurityErrorException(int code, String JavaDoc bundle, Throwable JavaDoc cause, String JavaDoc arg0, String JavaDoc arg1, String JavaDoc arg2, String JavaDoc arg3) {
67         super(code, ERROR_CATEGORY, bundle, cause, arg0, arg1, arg2, arg3);
68     }
69
70     /**
71      * Constructor.
72      *
73      * @param code
74      * @param bundle
75      * @param cause
76      * @param arg0
77      */

78     public SecurityErrorException(int code, String JavaDoc bundle, Throwable JavaDoc cause, String JavaDoc arg0) {
79         super(code, ERROR_CATEGORY, bundle, cause, arg0);
80     }
81
82     /**
83      * Constructor.
84      *
85      * @param code
86      * @param arg0
87      */

88     public SecurityErrorException(int code, String JavaDoc arg0) {
89         super(code, ERROR_CATEGORY, arg0);
90     }
91
92     /**
93      * Constructor.
94      *
95      * @param code
96      * @param arg0
97      * @param arg1
98      */

99     public SecurityErrorException(int code, String JavaDoc arg0, String JavaDoc arg1) {
100         super(code, ERROR_CATEGORY, DEFAULT_BUNDLE, null, arg0, arg1, null, null);
101     }
102
103     /**
104      * Constructor.
105      *
106      * @param code
107      * @param cause
108      */

109     public SecurityErrorException(int code, Throwable JavaDoc cause) {
110         super(code, ERROR_CATEGORY, DEFAULT_BUNDLE, cause, cause.getMessage());
111     }
112
113     /**
114      * Constructor.
115      *
116      * @param code
117      * @param cause
118      * @param arg0
119      */

120     public SecurityErrorException(int code, Throwable JavaDoc cause, String JavaDoc arg0) {
121         super(code, ERROR_CATEGORY, DEFAULT_BUNDLE, cause, arg0);
122     }
123
124     /**
125      * Constructor.
126      *
127      * @param code
128      * @param arg0
129      * @param arg1
130      * @param arg2
131      * @param cause
132      */

133     public SecurityErrorException(int code, String JavaDoc arg0, String JavaDoc arg1, String JavaDoc arg2, Throwable JavaDoc cause) {
134         super(code, ERROR_CATEGORY, DEFAULT_BUNDLE, cause, arg0, arg1, arg2, null);
135     }
136 }
137
Popular Tags