Class CryptoImportStartParams.Builder
- java.lang.Object
-
- de.xima.fc.certificate.gui.importing.CryptoImportStartParams.Builder
-
- Enclosing class:
- CryptoImportStartParams
public static class CryptoImportStartParams.Builder extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CryptoImportStartParamsbuild()CryptoImportStartParams.BuildercontinueWithKeyStoreSelector(boolean continueWithKeyStoreSelector)Optional.CryptoImportStartParams.BuildercryptoFileData(byte[] cryptoFileData)Required.CryptoImportStartParams.BuilderimportResultCallback(Consumer<FileImportResult> importResultCallback)Optional.CryptoImportStartParams.BuilderkeyStoreScope(KeyStoreScope keyStoreScope)Optional.CryptoImportStartParams.BuilderkeyStoreSelectionDisabled(boolean keyStoreSelectionDisabled)Optional.CryptoImportStartParams.BuilderkeyStoreSelector(KeyStoreSelector keyStoreSelector)Optional.CryptoImportStartParams.BuilderprivateKeyImportAllowed(boolean privateKeyImportAllowed)Optional.StringtoString()
-
-
-
Method Detail
-
cryptoFileData
public CryptoImportStartParams.Builder cryptoFileData(byte[] cryptoFileData)
Required. The crypto file data to be imported. This can be a keystore, certificate, or any other crypto-related file.- Returns:
this.
-
importResultCallback
public CryptoImportStartParams.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 crypto import dialog.- Returns:
this.
-
keyStoreScope
public CryptoImportStartParams.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.
-
keyStoreSelector
public CryptoImportStartParams.Builder keyStoreSelector(KeyStoreSelector keyStoreSelector)
Optional. A selector for the keystore where the crypto element 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 ifset to do soand if possible (i.e. no further user interaction is required, such as password prompts).- Returns:
this.- See Also:
continueWithKeyStoreSelector
-
continueWithKeyStoreSelector
public CryptoImportStartParams.Builder continueWithKeyStoreSelector(boolean continueWithKeyStoreSelector)
Optional. Whether to continue the import process should continue automatically if a keystore selector is provided. If set totrue, the import process will proceed without user interaction when a keystore selector is set. If set tofalse, the user will be prompted to confirm the selected keystore before proceeding with the import.- Returns:
this.- See Also:
keyStoreSelector
-
keyStoreSelectionDisabled
public CryptoImportStartParams.Builder keyStoreSelectionDisabled(boolean keyStoreSelectionDisabled)
Optional. Indicates whether the user should be allowed to select a different keystore during the import process. If true, the keystore selection will be disabled and the import will proceed with the default or provided keystore. If false, the user will be able to choose from available keystores. Default is false.- Returns:
this.
-
privateKeyImportAllowed
public CryptoImportStartParams.Builder privateKeyImportAllowed(boolean privateKeyImportAllowed)
Optional. Indicates whether the import of private keys is allowed. If true, private keys can be imported along with certificates. If false, only public certificates can be imported. Default is false.- Returns:
this.
-
build
public CryptoImportStartParams build()
-
-