Class CertificateTrustPromptBeanImpl

java.lang.Object
de.xima.fc.certificate.gui.internal.trust_prompt.CertificateTrustPromptBeanImpl
All Implemented Interfaces:
CertificateTrustPromptBean, Serializable

@Named("certificateTrustPromptBean") @ViewScoped public class CertificateTrustPromptBeanImpl extends Object implements CertificateTrustPromptBean
Bean for handling the certificate trust prompt dialog in the GUI.
Since:
8.5.0
Author:
Norman Lorenz
See Also:
  • Constructor Details

  • Method Details

    • importCertificate

      public void importCertificate()
    • isUserHasPermissionToImport

      public boolean isUserHasPermissionToImport()
    • openDialog

      public void openDialog(OpenTrustPromptDialogParams params) throws FcCertificateManagementException
      Description copied from interface: CertificateTrustPromptBean
      Opens the trust prompt dialog for the specified key store scope and certificate chain. This method can be used to manually trigger the trust prompt dialog for a given set of certificates. The dialog allows the user to review the certificates and decide whether to trust them by importing them into a key store.
      Specified by:
      openDialog in interface CertificateTrustPromptBean
      Parameters:
      params - The parameters for opening the trust prompt dialog, including the certificate chain, key store scope, and an optional preselected key store selector.
      Throws:
      FcCertificateManagementException - If an error occurs while opening the dialog.
    • testConnection

      public boolean testConnection(SocketConnectionTestParams params)
      Description copied from interface: CertificateTrustPromptBean
      Tests the connection with the provided socket connection test parameters. The connection test is performed on the specified host and port using the provided key store scope.
      Specified by:
      testConnection in interface CertificateTrustPromptBean
      Parameters:
      params - The parameters for testing the socket connection, including host, port, key store scope, and import result callback.
      Returns:
      true if the connection test is successful and trust validation passes, otherwise false. If the trust validation fails, the trust prompt dialog is shown to the user to handle possible certificate trust operations, such as importing the certificate(s) into a keystore.
    • testConnection

      public boolean testConnection(SslConnectionTestParams params)
      Description copied from interface: CertificateTrustPromptBean
      Tests the connection with the provided SSL connection test parameters. The connection test is determined by the caller of this method, which can use the provided SSLContext to establish a connection.
      Specified by:
      testConnection in interface CertificateTrustPromptBean
      Parameters:
      params - The parameters for testing the SSL connection, including the SSLContext consumer, key store scope, and import result callback.
      Returns:
      true if the connection test is successful and trust validation passes, otherwise false. If the trust validation fails, the trust prompt dialog is shown to the user to handle possible certificate trust operations, such as importing the certificate(s) into a keystore.
    • getCertificateChain

      public CertificateChainImportModel getCertificateChain()
      The certificate chain that was received from the connection test. This is used to select a certificate for import.
    • getSelectKeyStoreModel

      public SelectKeyStoreModel getSelectKeyStoreModel()
      The selected keystore for the import. This is either an existing keystore or a new keystore that should be created.
    • getClientTrustValidationPassed

      public Boolean getClientTrustValidationPassed()
      Indicates whether the client trust validation passed during the connection test. This is used to determine if the client certificate needs to be imported or created.