com.ibm.di.plugin.pwstore.itim.policy
Class PasswordPolicyServiceBuilder

java.lang.Object
  extended by com.ibm.di.plugin.pwstore.itim.policy.PasswordPolicyServiceBuilder

public final class PasswordPolicyServiceBuilder
extends Object

Builder or policy factory objects.

This class is uesed to create a PasswordPolicyFactory. The builder uses property value information using the System.properties.

The builder requires the following property names and values to be present
passwordPolicyServiceFactory - the class name of a class that implements the PasswordPolicyFactory interface.

Typical usage is shown below:

PasswordPolicyServiceBuilder builder = PasswordPolicyServiceBuilder.newBuilder()
builder.loadFactoryClass();
PasswordPolicyFactory factory = builder.getFactory();


Field Summary
static String PROP_NAME_FACTORY_CLASS
           
 
Method Summary
 PasswordPolicyFactory getFactory()
          Get the factory object instance following successful configuration and loading using other builder methods.
 void loadFactoryClass()
          Load the factory class.
static PasswordPolicyServiceBuilder newBuilder()
          Create new builder instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_NAME_FACTORY_CLASS

public static final String PROP_NAME_FACTORY_CLASS
See Also:
Constant Field Values
Method Detail

newBuilder

public static PasswordPolicyServiceBuilder newBuilder()
Create new builder instance.

Returns:
new building instance.

loadFactoryClass

public void loadFactoryClass()
                      throws ClassNotFoundException,
                             ClassCastException,
                             PolicyInitializationException
Load the factory class.

Throws:
ClassNotFoundException - if the class name associated with config property passwordPolicyServiceFactory cannot be loaded.
PolicyInitializationException - if the config property
ClassCastException - if the loaded class is not of type passwordPolicyServiceFactory is not present.
LinkageError - - if the linkage fails
ExceptionInInitializerError - - if the initialization provoked by this method fails.

getFactory

public PasswordPolicyFactory getFactory()
                                 throws PolicyInitializationException,
                                        InstantiationException,
                                        IllegalStateException,
                                        IllegalAccessException
Get the factory object instance following successful configuration and loading using other builder methods.

Returns:
The factory.
Throws:
IllegalStateException - if loadFactoryClass() has not called successfully previously.
InstantiationException - if this Class represents an abstract class, an interface, an array class, a primitive type, or void; or if the class has no nullary constructor; or if the instantiation fails for some other reason
IllegalAccessException - if the class or its nullary constructor is not accessible.
ExceptionInInitializerError - - if the initialization provoked by this method fails.
SecurityException - - if there is no permission to create a new instance.
PolicyInitializationException