com.ibm.itim.apps.pim
Class CredentialMO

java.lang.Object
  extended by com.ibm.itim.apps.pim.CredentialMO
All Implemented Interfaces:
java.io.Serializable

public class CredentialMO
extends java.lang.Object
implements java.io.Serializable

Managed object representing a credential of an account.

See Also:
Credential, Serialized Form

Constructor Summary
CredentialMO(PlatformContext platform, javax.security.auth.Subject subject, DistinguishedName name)
          This API constructs the the managed object with a platform context, a subject, and the distinguished name of the object to manage.
 
Method Summary
 AccountMO getAccount()
          This API returns the account that is associated with this credential.
 CredentialLeaseMO getCredentialLease()
          This API returns the credential lease held by the authenticated user for this credential.
 Credential getData()
          This API returns a current snapshot of the credential.
 DistinguishedName getDistinguishedName()
          Returns the distinguished name of the managed object
 java.lang.String getPassword()
          This method gets the password for the credential.
 java.util.Collection<HistoricalPassword> getPasswordHistory()
          This API gets the password history for the credential.
 void registerPassword(java.lang.String password)
          This API registers the password for the credential.
 void remove()
          This API removes the credential from the vault.
 void update(Credential credential)
          This API updates the credential with the given credential value object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CredentialMO

public CredentialMO(PlatformContext platform,
                    javax.security.auth.Subject subject,
                    DistinguishedName name)
This API constructs the the managed object with a platform context, a subject, and the distinguished name of the object to manage.

Parameters:
platform - specifies the PlatformContext that holds platform connection information.
subject - specifies the Subject that represents the authenticated caller.
name - specifies the DistinguishedName of the credential.
Method Detail

getDistinguishedName

public DistinguishedName getDistinguishedName()
Returns the distinguished name of the managed object

Returns:
DistinguishedName of the managed object.

getData

public Credential getData()
                   throws java.rmi.RemoteException,
                          ApplicationException
This API returns a current snapshot of the credential.

Returns:
the Credential object that holds attribute information.
Throws:
java.rmi.RemoteException - This exception is thrown if the API cannot communicate with platform.
ApplicationException - This exception is thrown if the API cannot retrieve data.

getCredentialLease

public CredentialLeaseMO getCredentialLease()
                                     throws ApplicationException,
                                            AuthorizationException,
                                            java.rmi.RemoteException
This API returns the credential lease held by the authenticated user for this credential.

Returns:
CredentialLeaseMO which represents the credential lease held by the authenticated user. Returns NULL if there is no credential lease for this credential.
Throws:
java.rmi.RemoteException - This exception is thrown if the API cannot communicate with the platform.
AuthorizationException - This exception is thrown if the authenticated user is not authorized to search for the lease.
ApplicationException - This exception is thrown if the API cannot obtain the credential lease.

remove

public void remove()
            throws java.rmi.RemoteException,
                   AuthorizationException,
                   ApplicationException
This API removes the credential from the vault. If the credential is checked out, an ApplicationException is thrown.

Throws:
java.rmi.RemoteException - This exception is thrown if the API cannot communicate with platform.
AuthorizationException - This exception is thrown if the user does not have the authority to remove the credential.
ApplicationException - This exception is thrown if the credential is checked out or if an error occurs when removing the credential.

update

public void update(Credential credential)
            throws java.rmi.RemoteException,
                   AuthorizationException,
                   ApplicationException
This API updates the credential with the given credential value object.

Parameters:
credential - specifies the Credential object that contains the changes that need to be made.
Throws:
java.rmi.RemoteException - This exception is thrown if the API cannot communicate with the platform.
AuthorizationException - This exception is thrown if the user is not authorized to change the credential.
ApplicationException - This exception is thrown if the API cannot change the credential. This might be caused by the account is removed by another client before this call. This exception can also be thrown if the credential is for a system user, and it is being changed from non-shared mode to shared mode.
java.lang.IllegalArgumentException - This exception is thrown if credential parameter is null or if the credential does not have a distinguished name.

registerPassword

public void registerPassword(java.lang.String password)
                      throws java.rmi.RemoteException,
                             AuthorizationException,
                             ApplicationException
This API registers the password for the credential.

Parameters:
password - This parameter specifies the password that is set for the credentials.
Throws:
java.rmi.RemoteException - This exception is thrown if the API cannot communicate with the platform.
AuthorizationException - This exception is thrown if the user is not authorized to register the password for the credentials.
ApplicationException - This exception is thrown if the API cannot register the password for the credentials.
java.lang.IllegalArgumentException - This exception is thrown if the password parameter is null

getPasswordHistory

public java.util.Collection<HistoricalPassword> getPasswordHistory()
                                                            throws java.rmi.RemoteException,
                                                                   AuthorizationException,
                                                                   ApplicationException
This API gets the password history for the credential.

Returns:
This API returns the password history of the credential.
Throws:
java.rmi.RemoteException - This exception is thrown if the API cannot communicate with the platform.
AuthorizationException - This exception is thrown if the user is not authorized to get the password history for the credential.
ApplicationException - This exception is thrown if the API cannot retrieve the password history for the credential.
See Also:
HistoricalPassword

getPassword

public java.lang.String getPassword()
                             throws java.rmi.RemoteException,
                                    AuthorizationException,
                                    ApplicationException
This method gets the password for the credential.

Returns:
This method returns the password of the credential. The null will be returned if there is no password registered for the credential.
Throws:
java.rmi.RemoteException - This exception is thrown if this method cannot communicate with the platform.
AuthorizationException - This exception is thrown if the user is not authorized to view the password. The user is not authorized to view the password when one of the following conditions is met:
1. The credential is required to be checked out to view the password, but the credential is not checked out by the user.
2. The credential is not required to be checked out to view the password, but the user is not authorized by the shared access policy.
3. The credential is not a shared credential.
ApplicationException - This exception is thrown if the API cannot retrieve the password for the credential.

getAccount

public AccountMO getAccount()
                     throws java.rmi.RemoteException,
                            ApplicationException
This API returns the account that is associated with this credential.

Returns:
AccountMO that represents the account.
Throws:
java.rmi.RemoteException - This exception is thrown if the API is unable to communicate with platform.
ApplicationException - This exception is thrown if the API is unable to retrieve the account. The exception can possibly be caused by the account being removed by another client before this call.


IBM Security Identity Manager 6.0.0
© Copyright International Business Machines Corporation 2007, 2012. All rights reserved. US Government Users Restricited Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.