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