Interface CryptoImportBean
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
CryptoImportBeanImpl
Common interface for interacting with the crypto import process via the crypto import wizard (dialog). This is a
view-scoped CDI bean that provides methods to start the import process for crypto
files, such as keystores or certificates.
Note: This is a GUI-specific interface that is used to interact with the crypto import process,
therefore it is necessary that cryptoImportDialog.xhtml is included in the view, wich is included by default
in /WEB-INF/xfc/templates/dialogs.xhtml.
- Since:
- 8.6.0
- Author:
- Norman Lorenz
-
Method Summary
Modifier and TypeMethodDescriptionstatic CryptoImportBeanReturns an instance of theCryptoImportBeanusing CDI.booleanStarts the crypto import process with the given parameters.booleanOptional.
-
Method Details
-
getInstance
Returns an instance of theCryptoImportBeanusing CDI.This method should be used with caution, as it relies on CDI and works only during JSF lifecycle phases, where there is a
FacesContextavailable.- Returns:
- An instance of
CryptoImportBean. - Throws:
javax.enterprise.context.ContextNotActiveException- if called outside a JSF context.
-
startCryptoFileImport
Starts the crypto import process with the given parameters. Opens the crypto import dialog.If there are errors during the import process, they will be shown in the UI.
- Parameters:
params- The parameters for starting the crypto import process, including the file data and a callback for the import result.- Returns:
trueif the import process was started successfully,falseotherwise.
-
startKeyStoreImport
Optional. Starts the keystore import process with the given file data and password. The file data is expected to be a keystore file. Opens the import dialog for the keystore.If there are errors during the import process, they will be shown in the UI.
- Parameters:
params- The parameters for starting the keystore import process, including the keystore file data, password, and a callback for the import result.- Returns:
trueif the import process was started successfully,falseotherwise.
-