com.ibm.di.plugin.pwstore.itim
Class BasePasswordSynchronizerDecorator

java.lang.Object
  extended by com.ibm.di.plugin.pwstore.itim.BasePasswordSynchronizerDecorator
All Implemented Interfaces:
IPasswordSynchronizer

public final class BasePasswordSynchronizerDecorator
extends Object
implements IPasswordSynchronizer

This is a generic password synchronizer decorator. Its decorates an IPasswordSynchronizer with password validation functionality.


Constructor Summary
BasePasswordSynchronizerDecorator(IPasswordSynchronizer sync, PasswordPolicyService pps)
          Create the generic decorator by wrapping the concrete impls.
 
Method Summary
 boolean addPasswordValues(String aId, Vector aPasswordValues)
          Add the users' passwords.
 boolean deletePasswordValues(String aId, Vector aPasswordValues)
           
 Exception getLastError()
          Enable client to access the exception caught during invocation of object methods, if an error occurred.
 String getLastPolicyServiceMsg()
          /** Get the status message returned from the previous invocation of addPasswordValues(String, Vector) or syncPassword(String, Vector).
 void initialize(Object aObj)
           
 boolean readyToSync(String aId)
           
 boolean readyToSync(String aId, Vector aPasswordValues)
           
 boolean setExtendedData(String id, String extendedData)
           
 boolean syncPassword(String aId, Vector aPasswordValues)
           Synchronize the users' passwords.
 void terminate()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasePasswordSynchronizerDecorator

public BasePasswordSynchronizerDecorator(IPasswordSynchronizer sync,
                                         PasswordPolicyService pps)
Create the generic decorator by wrapping the concrete impls.

Parameters:
sync - The traditional TDI password synchronizer.
pps - The password policy service provider.
Method Detail

readyToSync

public boolean readyToSync(String aId)
Specified by:
readyToSync in interface IPasswordSynchronizer
See Also:
IPasswordSynchronizer.readyToSync(java.lang.String)

readyToSync

public boolean readyToSync(String aId,
                           Vector aPasswordValues)
Specified by:
readyToSync in interface IPasswordSynchronizer
See Also:
IPasswordSynchronizer.readyToSync(java.lang.String, java.util.Vector)

syncPassword

public boolean syncPassword(String aId,
                            Vector aPasswordValues)

Synchronize the users' passwords. This method first validates the password against the password policy service provider. If successful the password are then synchronized. Clients should check for errors after exceuting this method using getLastError().

NB: Although the PasswordPolicyService supports synchronization, this method does not invoke this support. Synchronization is delegated to the decorated IPasswordSynchronizer only.

Specified by:
syncPassword in interface IPasswordSynchronizer
See Also:
IPasswordSynchronizer.syncPassword(java.lang.String, java.util.Vector)

addPasswordValues

public boolean addPasswordValues(String aId,
                                 Vector aPasswordValues)
Add the users' passwords. This method first validates the password against the password policy service provider. If successful the password are then added. Clients should check for errors after exceuting this method using getLastError().

Specified by:
addPasswordValues in interface IPasswordSynchronizer
See Also:
IPasswordSynchronizer.addPasswordValues(java.lang.String, java.util.Vector)

deletePasswordValues

public boolean deletePasswordValues(String aId,
                                    Vector aPasswordValues)
Specified by:
deletePasswordValues in interface IPasswordSynchronizer
See Also:
IPasswordSynchronizer.deletePasswordValues(java.lang.String, java.util.Vector)

initialize

public void initialize(Object aObj)
                throws Exception
Specified by:
initialize in interface IPasswordSynchronizer
Throws:
Exception
See Also:
IPasswordSynchronizer.initialize(java.lang.Object)

terminate

public void terminate()
Specified by:
terminate in interface IPasswordSynchronizer
See Also:
IPasswordSynchronizer.terminate()

getLastError

public Exception getLastError()
Enable client to access the exception caught during invocation of object methods, if an error occurred. This method will clear the exception. This method is provided because some of the IPasswordSynchronizer methods do not declare to throw exceptions.

Returns:
The last exception, or null. If null, the client can assume the previous method executed successfully.

getLastPolicyServiceMsg

public String getLastPolicyServiceMsg()
/** Get the status message returned from the previous invocation of addPasswordValues(String, Vector) or syncPassword(String, Vector).

Returns:
The status message from the service, or null if no status was returned.

setExtendedData

public boolean setExtendedData(String id,
                               String extendedData)
Specified by:
setExtendedData in interface IPasswordSynchronizer
See Also:
IPasswordSynchronizer.setExtendedData(String, String)