Class PasswordPolicyServiceBuilder


  • public final class PasswordPolicyServiceBuilder
    extends java.lang.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 Detail

      • PROP_NAME_FACTORY_CLASS

        public static final java.lang.String PROP_NAME_FACTORY_CLASS
        See Also:
        Constant Field Values
    • Method Detail

      • loadFactoryClass

        public void loadFactoryClass()
                              throws java.lang.ClassNotFoundException,
                                     java.lang.ClassCastException,
                                     PolicyInitializationException
        Load the factory class.
        Throws:
        java.lang.ClassNotFoundException - if the class name associated with config property passwordPolicyServiceFactory cannot be loaded.
        PolicyInitializationException - if the config property
        java.lang.ClassCastException - if the loaded class is not of type passwordPolicyServiceFactory is not present.
        java.lang.LinkageError - - if the linkage fails
        java.lang.ExceptionInInitializerError - - if the initialization provoked by this method fails.
      • getFactory

        public PasswordPolicyFactory getFactory()
                                         throws PolicyInitializationException,
                                                java.lang.InstantiationException,
                                                java.lang.IllegalStateException,
                                                java.lang.IllegalAccessException
        Get the factory object instance following successful configuration and loading using other builder methods.
        Returns:
        The factory.
        Throws:
        java.lang.IllegalStateException - if loadFactoryClass() has not called successfully previously.
        java.lang.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
        java.lang.IllegalAccessException - if the class or its nullary constructor is not accessible.
        java.lang.ExceptionInInitializerError - - if the initialization provoked by this method fails.
        java.lang.SecurityException - - if there is no permission to create a new instance.
        PolicyInitializationException