Class KeyStoreImportStartParams.Builder

java.lang.Object
de.xima.fc.certificate.gui.importing.KeyStoreImportStartParams.Builder
Enclosing class:
KeyStoreImportStartParams

public static class KeyStoreImportStartParams.Builder extends Object
Since:
22.08.25
Author:
Norman Lorenz
  • Method Details

    • keystoreFileData

      public KeyStoreImportStartParams.Builder keystoreFileData(byte[] keystoreFileData)
      Required. The keystore file data to be imported. This data is used to read the keystore and its entries.
      Returns:
      this.
    • keyStorePassword

      public KeyStoreImportStartParams.Builder keyStorePassword(char[] keyStorePassword)
      Optional. The password for the keystore. This password is used to access the keystore and its entries if set to do so.
      Returns:
      this.
      See Also:
      • useKeyStorePasswordForKeyEntries
    • useKeyStorePasswordForKeyEntries

      public KeyStoreImportStartParams.Builder useKeyStorePasswordForKeyEntries(boolean useKeyStorePasswordForKeyEntries)
      Optional. Whether to use the keystore password for accessing key entries within the keystore. If set to true, the keystore password will be used for key entries as well. If set to false, the user may be prompted to enter separate passwords for key entries during the import process. This may be useful for keystores where all entries share the same password as the keystore itself, allowing for a smoother import experience.
      Returns:
      this.
    • importResultCallback

      public KeyStoreImportStartParams.Builder importResultCallback(Consumer<FileImportResult> importResultCallback)
      Optional. A callback that will be invoked with the result of the import process. This callback is executed after all necessary steps of the import process have been completed, including any user interactions in the keystore import dialog or if the import process has been canceled by the user (i.e. the import dialog has been closed). The payload of the callback may be null if the import process was canceled or if there were errors during the import.
      Returns:
      this.
    • keyStoreEntrySelector

      public KeyStoreImportStartParams.Builder keyStoreEntrySelector(KeyStoreEntrySelector keyStoreEntrySelector)
      Optional. A selector for the keystore entries to be automatically selected for import. This selector is used to determine which entries in the keystore should be imported. If not provided, the import will require user interaction to select the entries. If a selector is provided, the import process will proceed without user interaction. Requires a valid keystore file and password to be set.
      Returns:
      this.
      See Also:
    • keyStoreSelector

      public KeyStoreImportStartParams.Builder keyStoreSelector(KeyStoreSelector keyStoreSelector)
      Optional. A selector for the keystore where the entries should be imported into. If not provided, the import will require user interaction to select the keystore. If a selector is provided, the import process will be started immediately with the selected keystore if set to do so. Requires the keystore entries to be selected and the keystore password to be set.
      Returns:
      this.
      See Also:
      • keyStoreEntrySelector
      • keyStorePassword
      • continueWithKeyStoreSelector
    • keyStoreScope

      public KeyStoreImportStartParams.Builder keyStoreScope(KeyStoreScope keyStoreScope)
      Optional. The scope in which the crypto file is being imported, such as whether it is client or system scope. This is used to determine the keystore options of the import process. If not provided, the current scope of the view will be used.
      Returns:
      this.
    • continueWithKeyStoreSelector

      public KeyStoreImportStartParams.Builder continueWithKeyStoreSelector(boolean continueWithKeyStoreSelector)
      Optional. Whether to continue the import process should continue automatically if a keystore selector is provided. If set to true, the import process will proceed without user interaction when a keystore selector is set. If set to false, the user will be prompted to confirm the selected keystore before proceeding with the import.
      Returns:
      this.
      See Also:
      • keyStoreSelector
    • keyStoreSelectionDisabled

      public KeyStoreImportStartParams.Builder keyStoreSelectionDisabled(boolean keyStoreSelectionDisabled)
      Optional. Whether the user is allowed to select a different keystore during the import process. If set to true, the keystore selection step will be disabled, and the import will proceed with the default or provided keystore. If set to false, the user will have the option to select a different keystore during the import process.
      Returns:
      this.
    • privateKeyImportAllowed

      public KeyStoreImportStartParams.Builder privateKeyImportAllowed(boolean privateKeyImportAllowed)
      Optional. Whether the import of private keys is allowed during the import process. If set to true, private keys can be imported along with their corresponding certificates. If set to false, only certificates without private keys will be imported.
      Returns:
      this.
    • build

      public KeyStoreImportStartParams build()
    • toString

      public String toString()
      Overrides:
      toString in class Object