version 1.4, 2002/04/04 00:34:22
|
version 1.11, 2007/06/29 17:43:16
|
|
|
//%///////////////////////////////////////////////////////////////////////////// |
//%2006//////////////////////////////////////////////////////////////////////// |
// | // |
// Copyright (c) 2000, 2001 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> |
| |
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
| |
|
|
/** | /** |
DuplicateUser Exception class | DuplicateUser Exception class |
*/ | */ |
|
|
{ | { |
public: | public: |
DuplicateUser(const String& userName) | DuplicateUser(const String& userName) |
: Exception("User already exists, user name: " + userName) { } |
: Exception(MessageLoaderParms( |
|
"Security.UserManager.UserExceptions.USER_ALREADY_EXISTS", |
|
"User already exists, user name: $0", |
|
userName)) |
|
{ |
|
} |
}; | }; |
| |
|
|
/** | /** |
InvalidUser Exception class | InvalidUser Exception class |
*/ | */ |
|
|
{ | { |
public: | public: |
InvalidUser(const String& userName) | InvalidUser(const String& userName) |
: Exception("The specified user is not a valid CIM user, user name: " |
: Exception(MessageLoaderParms( |
+ userName + ".") { } |
"Security.UserManager.UserExceptions.INVALID_CIM_USER", |
|
"The specified user is not a valid CIM user, user name: $0.", |
|
userName)) |
|
{ |
|
} |
}; | }; |
| |
|
|
/** | /** |
InvalidSystemUser Exception class | InvalidSystemUser Exception class |
*/ | */ |
|
|
{ | { |
public: | public: |
InvalidSystemUser(const String& userName) | InvalidSystemUser(const String& userName) |
: Exception("The specified user is not a valid user on the local system , user name: " + userName ) { } |
: Exception(MessageLoaderParms( |
|
"Security.UserManager.UserExceptions." |
|
"INVALID_USER_ON_LOCAL_SYSTEM", |
|
"The specified user is not a valid user on the local system, " |
|
"user name: $0", |
|
userName)) |
|
{ |
|
} |
}; | }; |
| |
/** | /** |
|
|
{ | { |
public: | public: |
PasswordMismatch(const String& userName) | PasswordMismatch(const String& userName) |
: Exception("The specified password does not match user's current password, user name: " + userName ) { } |
: Exception(MessageLoaderParms( |
|
"Security.UserManager.UserExceptions.PASSWORD_MISMATCH", |
|
"The specified password does not match user's current password, " |
|
"user name: $0", |
|
userName)) |
|
{ |
|
} |
}; | }; |
| |
/** | /** |
|
|
{ | { |
public: | public: |
PasswordCacheError() | PasswordCacheError() |
: Exception("Internal error while processing password cache table." ) { } |
: Exception(MessageLoaderParms( |
|
"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: |
InvalidUserAndNamespace(const String& userName, const String& nameSpace) |
InvalidUserAndNamespace( |
: Exception("The specified user '" + userName + "' and namespace '" |
const String& userName, |
+ nameSpace + "' are not authorized.") { } |
const String& nameSpace) |
|
: Exception(MessageLoaderParms( |
|
"Security.UserManager.UserExceptions." |
|
"USER_NAMESPACE_NOT_AUTHORIZED", |
|
"The specified user '$0' and namespace '$1' are not authorized.", |
|
userName, |
|
nameSpace)) |
|
{ |
|
} |
}; | }; |
| |
/** | /** |
|
|
{ | { |
public: | public: |
AuthorizationCacheError() | AuthorizationCacheError() |
: Exception("Internal error while processing authorization cache table." ) { } |
: Exception(MessageLoaderParms( |
|
"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: |
AuthorizationEntryNotFound(const String& userName, const String& nameSpace) |
AuthorizationEntryNotFound( |
: Exception("Authorization entry not found for user '" + |
const String& userName, |
userName + "' with the namespace '" + nameSpace + "'." ) { } |
const String& nameSpace) |
|
: Exception(MessageLoaderParms( |
|
"Security.UserManager.UserExceptions.AUTH_ENTRY_NOT_FOUND", |
|
"Authorization entry not found for user '$0' with the namespace " |
|
"'$1'.", |
|
userName, |
|
nameSpace)) |
|
{ |
|
} |
}; | }; |
| |
/** | /** |
|
|
{ | { |
public: | public: |
InvalidNamespace(String nameSpace) | InvalidNamespace(String nameSpace) |
: Exception("The specified namespace does not exist, " + nameSpace ) { } |
: Exception(MessageLoaderParms( |
|
"Security.UserManager.UserExceptions.NAMESPACE_DOES_NOT_EXIST", |
|
"The specified namespace does not exist, $0", |
|
nameSpace)) |
|
{ |
|
} |
}; | }; |
| |
/** | /** |
CannotCreateUserManagerInstance Exception class | CannotCreateUserManagerInstance Exception class |
*/ | */ |
class PEGASUS_USERMANAGER_LINKAGE CannotCreateUserManagerInstance: public Exception |
class PEGASUS_USERMANAGER_LINKAGE CannotCreateUserManagerInstance |
|
: public Exception |
{ | { |
public: | public: |
CannotCreateUserManagerInstance() | CannotCreateUserManagerInstance() |
: Exception("Cannot create UserManager instance, repository handle passed may be invalid.") { } |
: Exception(MessageLoaderParms( |
|
"Security.UserManager.UserExceptions." |
|
"CANT_CREATE_USERMANAGER_INSTANCE", |
|
"Cannot create UserManager instance, repository handle passed " |
|
"may be invalid.")) |
|
{ |
|
} |
}; | }; |
| |
PEGASUS_NAMESPACE_END | PEGASUS_NAMESPACE_END |