1 karl 1.9 //%2005////////////////////////////////////////////////////////////////////////
|
2 mike 1.2 //
|
3 karl 1.8 // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
4 // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
5 // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
|
6 karl 1.7 // IBM Corp.; EMC Corporation, The Open Group.
|
7 karl 1.8 // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
8 // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
|
9 karl 1.9 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
10 // EMC Corporation; VERITAS Software Corporation; The Open Group.
|
11 mike 1.2 //
12 // Permission is hereby granted, free of charge, to any person obtaining a copy
13 // of this software and associated documentation files (the "Software"), to
14 // deal in the Software without restriction, including without limitation the
15 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
16 // sell copies of the Software, and to permit persons to whom the Software is
17 // furnished to do so, subject to the following conditions:
|
18 kumpf 1.5 //
|
19 mike 1.2 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
20 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
21 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
22 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
23 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
24 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
25 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
26 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
27 //
28 //==============================================================================
29 //
30 // Author: Sushma Fernandes, Hewlett Packard Company (sushma_fernandes@hp.com)
31 //
32 // Modified By:
33 //
34 //%/////////////////////////////////////////////////////////////////////////////
35
36
37 ////////////////////////////////////////////////////////////////////////////////
38 // This file contains the exception classes used in the UserManager
39 // classes.
40 mike 1.2 ////////////////////////////////////////////////////////////////////////////////
41
42 #ifndef Pegasus_UserExceptions_h
43 #define Pegasus_UserExceptions_h
44
45 #include <Pegasus/Common/Exception.h>
46 #include <Pegasus/Security/UserManager/Linkage.h>
|
47 humberto 1.6 #include <Pegasus/Common/MessageLoader.h> //l10n
|
48 mike 1.2
49 PEGASUS_NAMESPACE_BEGIN
50
51
52 /**
53 DuplicateUser Exception class
54 */
55 class PEGASUS_USERMANAGER_LINKAGE DuplicateUser : public Exception
56 {
57 public:
|
58 humberto 1.6 //l10n
59 //DuplicateUser(const String& userName)
60 //: Exception("User already exists, user name: " + userName) { }
|
61 mike 1.2 DuplicateUser(const String& userName)
|
62 humberto 1.6 : Exception(MessageLoaderParms("Security.UserManager.UserExceptions.USER_ALREADY_EXISTS",
63 "User already exists, user name: $0",
64 userName)) { }
|
65 mike 1.2 };
66
67
68 /**
69 InvalidUser Exception class
70 */
71 class PEGASUS_USERMANAGER_LINKAGE InvalidUser : public Exception
72 {
73 public:
|
74 humberto 1.6 //l10n
75 //InvalidUser(const String& userName)
76 //: Exception("The specified user is not a valid CIM user, user name: "
77 //+ userName + ".") { }
78 InvalidUser(const String& userName)
79 : Exception(MessageLoaderParms("Security.UserManager.UserExceptions.INVALID_CIM_USER",
80 "The specified user is not a valid CIM user, user name: $0.",
81 userName)) { }
|
82 mike 1.2 };
83
84
85 /**
86 InvalidSystemUser Exception class
87 */
88 class PEGASUS_USERMANAGER_LINKAGE InvalidSystemUser : public Exception
89 {
90 public:
|
91 humberto 1.6 //l10n
92 //InvalidSystemUser(const String& userName)
93 //: Exception("The specified user is not a valid user on the local system , user name: " + userName ) { }
|
94 mike 1.2 InvalidSystemUser(const String& userName)
|
95 humberto 1.6 : Exception(MessageLoaderParms("Security.UserManager.UserExceptions.INVALID_USER_ON_LOCAL_SYSTEM",
96 "The specified user is not a valid user on the local system , user name: $0",
97 userName )) { }
|
98 mike 1.2 };
99
100 /**
101 PasswordMismatch Exception class
102 */
103 class PEGASUS_USERMANAGER_LINKAGE PasswordMismatch : public Exception
104 {
105 public:
|
106 humberto 1.6 //l10n
107 //PasswordMismatch(const String& userName)
108 //: Exception("The specified password does not match user's current password, user name: " + userName ) { }
|
109 mike 1.2 PasswordMismatch(const String& userName)
|
110 humberto 1.6 : Exception(MessageLoaderParms("Security.UserManager.UserExceptions.PASSWORD_MISMATCH",
111 "The specified password does not match user's current password, user name: $0",
112 userName )) { }
|
113 mike 1.2 };
114
115 /**
116 PasswordCacheError Exception class
117 */
118 class PEGASUS_USERMANAGER_LINKAGE PasswordCacheError : public Exception
119 {
120 public:
|
121 humberto 1.6 //l10n
122 //PasswordCacheError()
123 //: Exception("Internal error while processing password cache table." ) { }
|
124 mike 1.2 PasswordCacheError()
|
125 humberto 1.6 : Exception(MessageLoaderParms("Security.UserManager.UserExceptions.INTERNAL_ERROR_PWD_CACHE",
126 "Internal error while processing password cache table." )) { }
|
127 mike 1.2 };
128
129 /**
130 InvalidUserAndNamespace Exception class
131 */
132 class PEGASUS_USERMANAGER_LINKAGE InvalidUserAndNamespace : public Exception
133 {
134 public:
|
135 humberto 1.6 //l10n
136 //InvalidUserAndNamespace(const String& userName, const String& nameSpace)
137 //: Exception("The specified user '" + userName + "' and namespace '"
138 //+ nameSpace + "' are not authorized.") { }
|
139 mike 1.2 InvalidUserAndNamespace(const String& userName, const String& nameSpace)
|
140 humberto 1.6 : Exception(MessageLoaderParms("Security.UserManager.UserExceptions.USER_NAMESPACE_NOT_AUTHORIZED",
141 "The specified user '$0' and namespace '$1' are not authorized.",
142 userName,
143 nameSpace)) { }
|
144 mike 1.2 };
145
146 /**
147 AuthorizationCacheError Exception class
148 */
149 class PEGASUS_USERMANAGER_LINKAGE AuthorizationCacheError : public Exception
150 {
151 public:
|
152 humberto 1.6 //l10n
153 //AuthorizationCacheError()
154 //: Exception("Internal error while processing authorization cache table." ) { }
|
155 mike 1.2 AuthorizationCacheError()
|
156 humberto 1.6 : Exception(MessageLoaderParms("Security.UserManager.UserExceptions.INTERNAL_ERROR_AUTH_CACHE",
157 "Internal error while processing authorization cache table." )) { }
|
158 mike 1.2 };
159
160 /**
161 AuthorizationEntryNotFound Exception class
162 */
163 class PEGASUS_USERMANAGER_LINKAGE AuthorizationEntryNotFound : public Exception
164 {
165 public:
|
166 humberto 1.6 //l10n
167 //AuthorizationEntryNotFound(const String& userName, const String& nameSpace)
168 //: Exception("Authorization entry not found for user '" +
169 //userName + "' with the namespace '" + nameSpace + "'." ) { }
|
170 mike 1.2 AuthorizationEntryNotFound(const String& userName, const String& nameSpace)
|
171 humberto 1.6 : Exception(MessageLoaderParms("Security.UserManager.UserExceptions.AUTH_ENTRY_NOT_FOUND",
172 "Authorization entry not found for user '$0' with the namespace '$1'.",
173 userName, nameSpace )) { }
|
174 mike 1.2 };
175
176 /**
177 InvalidNamespace Exception class
178 */
179 class PEGASUS_USERMANAGER_LINKAGE InvalidNamespace : public Exception
180 {
181 public:
|
182 humberto 1.6 //l10n
183 //InvalidNamespace(String nameSpace)
184 //: Exception("The specified namespace does not exist, " + nameSpace ) { }
|
185 mike 1.2 InvalidNamespace(String nameSpace)
|
186 humberto 1.6 : Exception(MessageLoaderParms("Security.UserManager.UserExceptions.NAMESPACE_DOES_NOT_EXIST",
187 "The specified namespace does not exist, $0",
188 nameSpace )) { }
|
189 mike 1.2
190 };
191
|
192 kumpf 1.4 /**
193 CannotCreateUserManagerInstance Exception class
194 */
195 class PEGASUS_USERMANAGER_LINKAGE CannotCreateUserManagerInstance: public Exception
196 {
197 public:
|
198 humberto 1.6 //l10n
199 //CannotCreateUserManagerInstance()
200 //: Exception("Cannot create UserManager instance, repository handle passed may be invalid.") { }
|
201 kumpf 1.4 CannotCreateUserManagerInstance()
|
202 humberto 1.6 : Exception(MessageLoaderParms("Security.UserManager.UserExceptions.CANT_CREATE_USERMANAGER_INSTANCE",
203 "Cannot create UserManager instance, repository handle passed may be invalid.")) { }
|
204 kumpf 1.4
205 };
206
|
207 mike 1.2 PEGASUS_NAMESPACE_END
208
209 #endif /* Pegasus_UserExceptions_h */
|