Class KeyStoreBuilder<E>

java.lang.Object
com.codingchili.core.security.KeyStoreBuilder<E>
Type Parameters:
E - the fluent object to return when builder is completed.

public class KeyStoreBuilder<E> extends Object
Keystore builder for use in #SecuritySettings.
  • Constructor Details

    • KeyStoreBuilder

      public KeyStoreBuilder(E fluent, Consumer<KeyStoreReference> completer)
      Parameters:
      fluent - the object to be returned when building is completed.
      completer - called with the result.
  • Method Details

    • build

      public E build()
      Completes the building by calling the completer and returning the provided object as a fluent, allowing the building class to resume fluent calls to the provider of the builder.
      Returns:
      object specified by the builder provider.
    • setPassword

      public KeyStoreBuilder<E> setPassword(String pwd)
      Parameters:
      pwd - password to set for the keystore.
      Returns:
      fluent
    • setPath

      public KeyStoreBuilder<E> setPath(String path)
      Parameters:
      path - to the keystore .jks file.
      Returns:
      fluent
    • setShortName

      public KeyStoreBuilder<E> setShortName(String shortName)
      Parameters:
      shortName - the keystore identifier to set.
      Returns:
      fluent
    • readPasswordFromConsole

      public KeyStoreBuilder<E> readPasswordFromConsole()
      reads the password from the console when build is called.
      Returns:
      fluent