Class Profile.PasswordParameter

Enclosing class:
Profile

public final class Profile.PasswordParameter extends Profile.Parameter<Profile.PasswordParameter,CharSequence>
Represents a parameter whose value is a password.

Note: Usage of CharSequence instead of string is a hack to avoid the following compilation error: Methods defaultValue(T) from Profile.Parameter and defaultValue(String) from Parameter are inherited with the same signature.

  • Method Details

    • parseStringValue

      public String parseStringValue(String clearTextPassword) throws com.forgerock.opendj.cli.ArgumentException
      Description copied from class: Profile.Parameter
      Parses provided string value into this parameter type and returns the typed value.
      Specified by:
      parseStringValue in class Profile.Parameter<Profile.PasswordParameter,CharSequence>
      Parameters:
      clearTextPassword - A string representing the parameter value to be parsed
      Returns:
      The typed value associated to provided string
      Throws:
      com.forgerock.opendj.cli.ArgumentException - If an error occurred while parsing provided string value
    • accept

      public <R, P, E extends Exception> R accept(Profile.ParameterVisitor<R,P,E> visitor, P p) throws E
      Description copied from class: Profile.Parameter
      Specified by:
      accept in class Profile.Parameter<Profile.PasswordParameter,CharSequence>
      Type Parameters:
      R - The return type of the visitor's methods
      P - The type of the additional parameter to this visitor's methods. Use Void for visitors that do not need an additional parameter
      E - The type of the exception thrown by the visitor method if it fails, or NeverThrowsException if the visitor cannot fail
      Parameters:
      visitor - The parameter visitor
      p - Optional additional visitor parameter
      Returns:
      A result as specified by the visitor
      Throws:
      E - If the visitor failed