version 1.6, 2003/07/23 03:34:14
|
version 1.11, 2007/06/29 17:43:16
|
|
|
//%///////////////////////////////////////////////////////////////////////////// |
//%2006//////////////////////////////////////////////////////////////////////// |
// | // |
// Copyright (c) 2000, 2001, 2002 BMC Software, Hewlett-Packard Company, IBM, |
// Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development |
// The Open Group, Tivoli Systems |
// Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. |
|
// Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.; |
|
// IBM Corp.; EMC Corporation, The Open Group. |
|
// Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.; |
|
// IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group. |
|
// Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.; |
|
// EMC Corporation; VERITAS Software Corporation; The Open Group. |
|
// Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.; |
|
// EMC Corporation; Symantec Corporation; The Open Group. |
// | // |
// Permission is hereby granted, free of charge, to any person obtaining a copy | // Permission is hereby granted, free of charge, to any person obtaining a copy |
// of this software and associated documentation files (the "Software"), to | // of this software and associated documentation files (the "Software"), to |
|
|
// | // |
//============================================================================== | //============================================================================== |
// | // |
// Author: Sushma Fernandes, Hewlett Packard Company (sushma_fernandes@hp.com) |
|
// |
|
// Modified By: |
|
// |
|
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
| |
|
|
| |
#include <Pegasus/Common/Exception.h> | #include <Pegasus/Common/Exception.h> |
#include <Pegasus/Security/UserManager/Linkage.h> | #include <Pegasus/Security/UserManager/Linkage.h> |
#include <Pegasus/Common/MessageLoader.h> //l10n |
#include <Pegasus/Common/MessageLoader.h> |
| |
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
| |
|
|
/** | /** |
DuplicateUser Exception class | DuplicateUser Exception class |
*/ | */ |
class PEGASUS_USERMANAGER_LINKAGE DuplicateUser : public Exception | class PEGASUS_USERMANAGER_LINKAGE DuplicateUser : public Exception |
{ | { |
public: | public: |
//l10n |
|
//DuplicateUser(const String& userName) |
|
//: Exception("User already exists, user name: " + userName) { } |
|
DuplicateUser(const String& userName) | DuplicateUser(const String& userName) |
: Exception(MessageLoaderParms("Security.UserManager.UserExceptions.USER_ALREADY_EXISTS", |
: Exception(MessageLoaderParms( |
|
"Security.UserManager.UserExceptions.USER_ALREADY_EXISTS", |
"User already exists, user name: $0", | "User already exists, user name: $0", |
userName)) { } |
userName)) |
|
{ |
|
} |
}; | }; |
| |
|
|
/** | /** |
InvalidUser Exception class | InvalidUser Exception class |
*/ | */ |
class PEGASUS_USERMANAGER_LINKAGE InvalidUser : public Exception | class PEGASUS_USERMANAGER_LINKAGE InvalidUser : public Exception |
{ | { |
public: | public: |
//l10n |
|
//InvalidUser(const String& userName) |
|
//: Exception("The specified user is not a valid CIM user, user name: " |
|
//+ userName + ".") { } |
|
InvalidUser(const String& userName) | InvalidUser(const String& userName) |
: Exception(MessageLoaderParms("Security.UserManager.UserExceptions.INVALID_CIM_USER", |
: Exception(MessageLoaderParms( |
|
"Security.UserManager.UserExceptions.INVALID_CIM_USER", |
"The specified user is not a valid CIM user, user name: $0.", | "The specified user is not a valid CIM user, user name: $0.", |
userName)) { } |
userName)) |
|
{ |
|
} |
}; | }; |
| |
|
|
/** | /** |
InvalidSystemUser Exception class | InvalidSystemUser Exception class |
*/ | */ |
class PEGASUS_USERMANAGER_LINKAGE InvalidSystemUser : public Exception | class PEGASUS_USERMANAGER_LINKAGE InvalidSystemUser : public Exception |
{ | { |
public: | public: |
//l10n |
|
//InvalidSystemUser(const String& userName) |
|
//: Exception("The specified user is not a valid user on the local system , user name: " + userName ) { } |
|
InvalidSystemUser(const String& userName) | InvalidSystemUser(const String& userName) |
: Exception(MessageLoaderParms("Security.UserManager.UserExceptions.INVALID_USER_ON_LOCAL_SYSTEM", |
: Exception(MessageLoaderParms( |
"The specified user is not a valid user on the local system , user name: $0", |
"Security.UserManager.UserExceptions." |
userName )) { } |
"INVALID_USER_ON_LOCAL_SYSTEM", |
|
"The specified user is not a valid user on the local system, " |
|
"user name: $0", |
|
userName)) |
|
{ |
|
} |
}; | }; |
| |
/** | /** |
|
|
class PEGASUS_USERMANAGER_LINKAGE PasswordMismatch : public Exception | class PEGASUS_USERMANAGER_LINKAGE PasswordMismatch : public Exception |
{ | { |
public: | public: |
//l10n |
|
//PasswordMismatch(const String& userName) |
|
//: Exception("The specified password does not match user's current password, user name: " + userName ) { } |
|
PasswordMismatch(const String& userName) | PasswordMismatch(const String& userName) |
: Exception(MessageLoaderParms("Security.UserManager.UserExceptions.PASSWORD_MISMATCH", |
: Exception(MessageLoaderParms( |
"The specified password does not match user's current password, user name: $0", |
"Security.UserManager.UserExceptions.PASSWORD_MISMATCH", |
userName )) { } |
"The specified password does not match user's current password, " |
|
"user name: $0", |
|
userName)) |
|
{ |
|
} |
}; | }; |
| |
/** | /** |
|
|
class PEGASUS_USERMANAGER_LINKAGE PasswordCacheError : public Exception | class PEGASUS_USERMANAGER_LINKAGE PasswordCacheError : public Exception |
{ | { |
public: | public: |
//l10n |
|
//PasswordCacheError() |
|
//: Exception("Internal error while processing password cache table." ) { } |
|
PasswordCacheError() | PasswordCacheError() |
: Exception(MessageLoaderParms("Security.UserManager.UserExceptions.INTERNAL_ERROR_PWD_CACHE", |
: Exception(MessageLoaderParms( |
"Internal error while processing password cache table." )) { } |
"Security.UserManager.UserExceptions.INTERNAL_ERROR_PWD_CACHE", |
|
"Internal error while processing password cache table.")) |
|
{ |
|
} |
}; | }; |
| |
/** | /** |
|
|
class PEGASUS_USERMANAGER_LINKAGE InvalidUserAndNamespace : public Exception | class PEGASUS_USERMANAGER_LINKAGE InvalidUserAndNamespace : public Exception |
{ | { |
public: | public: |
//l10n |
InvalidUserAndNamespace( |
//InvalidUserAndNamespace(const String& userName, const String& nameSpace) |
const String& userName, |
//: Exception("The specified user '" + userName + "' and namespace '" |
const String& nameSpace) |
//+ nameSpace + "' are not authorized.") { } |
: Exception(MessageLoaderParms( |
InvalidUserAndNamespace(const String& userName, const String& nameSpace) |
"Security.UserManager.UserExceptions." |
: Exception(MessageLoaderParms("Security.UserManager.UserExceptions.USER_NAMESPACE_NOT_AUTHORIZED", |
"USER_NAMESPACE_NOT_AUTHORIZED", |
"The specified user '$0' and namespace '$1' are not authorized.", | "The specified user '$0' and namespace '$1' are not authorized.", |
userName, | userName, |
nameSpace)) { } |
nameSpace)) |
|
{ |
|
} |
}; | }; |
| |
/** | /** |
|
|
class PEGASUS_USERMANAGER_LINKAGE AuthorizationCacheError : public Exception | class PEGASUS_USERMANAGER_LINKAGE AuthorizationCacheError : public Exception |
{ | { |
public: | public: |
//l10n |
|
//AuthorizationCacheError() |
|
//: Exception("Internal error while processing authorization cache table." ) { } |
|
AuthorizationCacheError() | AuthorizationCacheError() |
: Exception(MessageLoaderParms("Security.UserManager.UserExceptions.INTERNAL_ERROR_AUTH_CACHE", |
: Exception(MessageLoaderParms( |
"Internal error while processing authorization cache table." )) { } |
"Security.UserManager.UserExceptions.INTERNAL_ERROR_AUTH_CACHE", |
|
"Internal error while processing authorization cache table.")) |
|
{ |
|
} |
}; | }; |
| |
/** | /** |
|
|
class PEGASUS_USERMANAGER_LINKAGE AuthorizationEntryNotFound : public Exception | class PEGASUS_USERMANAGER_LINKAGE AuthorizationEntryNotFound : public Exception |
{ | { |
public: | public: |
//l10n |
AuthorizationEntryNotFound( |
//AuthorizationEntryNotFound(const String& userName, const String& nameSpace) |
const String& userName, |
//: Exception("Authorization entry not found for user '" + |
const String& nameSpace) |
//userName + "' with the namespace '" + nameSpace + "'." ) { } |
: Exception(MessageLoaderParms( |
AuthorizationEntryNotFound(const String& userName, const String& nameSpace) |
"Security.UserManager.UserExceptions.AUTH_ENTRY_NOT_FOUND", |
: Exception(MessageLoaderParms("Security.UserManager.UserExceptions.AUTH_ENTRY_NOT_FOUND", |
"Authorization entry not found for user '$0' with the namespace " |
"Authorization entry not found for user '$0' with the namespace '$1'.", |
"'$1'.", |
userName, nameSpace )) { } |
userName, |
|
nameSpace)) |
|
{ |
|
} |
}; | }; |
| |
/** | /** |
|
|
class PEGASUS_USERMANAGER_LINKAGE InvalidNamespace : public Exception | class PEGASUS_USERMANAGER_LINKAGE InvalidNamespace : public Exception |
{ | { |
public: | public: |
//l10n |
|
//InvalidNamespace(String nameSpace) |
|
//: Exception("The specified namespace does not exist, " + nameSpace ) { } |
|
InvalidNamespace(String nameSpace) | InvalidNamespace(String nameSpace) |
: Exception(MessageLoaderParms("Security.UserManager.UserExceptions.NAMESPACE_DOES_NOT_EXIST", |
: Exception(MessageLoaderParms( |
|
"Security.UserManager.UserExceptions.NAMESPACE_DOES_NOT_EXIST", |
"The specified namespace does not exist, $0", | "The specified namespace does not exist, $0", |
nameSpace )) { } |
nameSpace)) |
|
{ |
|
} |
}; | }; |
| |
/** | /** |
CannotCreateUserManagerInstance Exception class | CannotCreateUserManagerInstance Exception class |
*/ | */ |
class PEGASUS_USERMANAGER_LINKAGE CannotCreateUserManagerInstance: public Exception |
class PEGASUS_USERMANAGER_LINKAGE CannotCreateUserManagerInstance |
|
: public Exception |
{ | { |
public: | public: |
//l10n |
|
//CannotCreateUserManagerInstance() |
|
//: Exception("Cannot create UserManager instance, repository handle passed may be invalid.") { } |
|
CannotCreateUserManagerInstance() | CannotCreateUserManagerInstance() |
: Exception(MessageLoaderParms("Security.UserManager.UserExceptions.CANT_CREATE_USERMANAGER_INSTANCE", |
: Exception(MessageLoaderParms( |
"Cannot create UserManager instance, repository handle passed may be invalid.")) { } |
"Security.UserManager.UserExceptions." |
|
"CANT_CREATE_USERMANAGER_INSTANCE", |
|
"Cannot create UserManager instance, repository handle passed " |
|
"may be invalid.")) |
|
{ |
|
} |
}; | }; |
| |
PEGASUS_NAMESPACE_END | PEGASUS_NAMESPACE_END |