Interface CryptoImportBean

All Superinterfaces:
Serializable
All Known Implementing Classes:
CryptoImportBeanImpl

public interface CryptoImportBean extends Serializable
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 Details

    • getInstance

      static CryptoImportBean getInstance()
      Returns an instance of the CryptoImportBean using CDI.

      This method should be used with caution, as it relies on CDI and works only during JSF lifecycle phases, where there is a FacesContext available.

      Returns:
      An instance of CryptoImportBean.
      Throws:
      javax.enterprise.context.ContextNotActiveException - if called outside a JSF context.
    • startCryptoFileImport

      boolean startCryptoFileImport(CryptoImportStartParams params)
      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:
      true if the import process was started successfully, false otherwise.
    • startKeyStoreImport

      boolean startKeyStoreImport(KeyStoreImportStartParams params)
      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:
      true if the import process was started successfully, false otherwise.