com.ibm.di.plugin.pwstore.itim.policy
Interface PasswordPolicyService


public interface PasswordPolicyService

Provides features to enable password value conformance check and synchonization against externally defined policies.


Method Summary
 String getLastStatusMessage()
          Get the status message returned from the previous invocation of synchronizePassword(String, List) or validatePassword(String, List).
 void initialize()
          Perform and required post construction initialization.
 boolean ready()
          Ensure the password policy subsystem is available.
 void setConnection(PolicyServiceConnection conn)
          Set the connection.
 void synchronizePassword(String userName, List passwordValues)
          Propagate the password values for the given user.
 void terminate()
          Perform and required cleanup in preparation for shutdown.
 boolean validatePassword(String userName, List passwordValues)
          Check the password values conform to policy.
 

Method Detail

setConnection

void setConnection(PolicyServiceConnection conn)
Set the connection.

Parameters:
conn - - The connection.
Throws:
IllegalArgumentException - if conn is null.

ready

boolean ready()
Ensure the password policy subsystem is available. For example, check that network connectivity is available. If used, this method should be called before validatePassword(List).

Returns:
true if policy subsystem is ready.

validatePassword

boolean validatePassword(String userName,
                         List passwordValues)
                         throws PolicyConnectionException,
                                MalformedResponseException
Check the password values conform to policy.

Parameters:
userName - - The user name, e.g. jdoe or eruid=jdoe
passwordValues - - List of associated password values to be checked. List must have length > 0
Returns:
true if all passwords conform to policy.
Throws:
PolicyConnectionException - if connection to policy service is lost.
MalformedResponseException - if a policy service response cannot be parsed.
IllegalArgumentException - if passwordValues.length() <= 0.

synchronizePassword

void synchronizePassword(String userName,
                         List passwordValues)
                         throws PolicyConnectionException,
                                MalformedResponseException,
                                PasswordSynchException
Propagate the password values for the given user.

Parameters:
userName - - The user name, e.g. jdoe or eruid=jdoe
passwordValues - - List of associated password values to be synchronized. List must have length > 0
Throws:
PolicyConnectionException - if connection to policy service is lost.
MalformedResponseException - if a policy service response cannot be parsed.
PasswordSynchException - if any single password value cannot be synchronized, e.g. connection failure.
IllegalArgumentException - if passwordValues.length() <= 0.

initialize

void initialize()
                throws PolicyInitializationException
Perform and required post construction initialization. For example, establish network connections.

Throws:
PolicyInitializationException

terminate

void terminate()
Perform and required cleanup in preparation for shutdown.


getLastStatusMessage

String getLastStatusMessage()
Get the status message returned from the previous invocation of synchronizePassword(String, List) or validatePassword(String, List).

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