(file) Return to UserExceptions.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Security / UserManager

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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2