Class KeyStoreSelector

java.lang.Object
de.xima.fc.certificate.mgmt.keystore.KeyStoreSelector
All Implemented Interfaces:
Serializable

public final class KeyStoreSelector extends Object implements Serializable
Model for selecting a keystore. This is used when creating certificates to determine in which keystore the certificate should be stored. The keystore can either be an existing one, a new one that should be created, or the default keystore for a specified scope.
Since:
26.11.25
Author:
Norman Lorenz
See Also:
  • Method Details

    • forDefaultScope

      public static KeyStoreSelector forDefaultScope(KeyStoreScope defaultScope)
      Creates a selector for the default keystore of a specified scope.
      Parameters:
      defaultScope - The scope of the default keystore.
      Returns:
      A new instance of KeyStoreSelector for the specified scope.
    • forExistingKeyStore

      public static KeyStoreSelector forExistingKeyStore(Long keyStoreId)
      Creates a selector for an existing keystore.
      Parameters:
      keyStoreId - The ID of the existing keystore.
      Returns:
      A new instance of KeyStoreSelector for the specified keystore ID.
    • forNewKeyStore

      public static KeyStoreSelector forNewKeyStore(NewKeyStoreDefinition newKeyStoreDefinition)
      Creates a selector for a new keystore.
      Parameters:
      newKeyStoreDefinition - The definition of the new keystore.
      Returns:
      A new instance of KeyStoreSelector for the specified new keystore definition.
    • getKeyStoreId

      public Long getKeyStoreId()
      The ID of an existing keystore. This is only valid if defaultScope and newKeyStoreDefinition are null. This field must not be null when using the default keystore for a specified scope via defaultScope or creating a new keystore via newKeyStoreDefinition.
    • getDefaultScope

      public KeyStoreScope getDefaultScope()
      The scope of the default keystore. This is only valid if keyStoreId and newKeyStoreDefinition are null. This field must not be null when using an existing keystore via keyStoreId or creating a new keystore via newKeyStoreDefinition.
    • getNewKeyStoreDefinition

      public NewKeyStoreDefinition getNewKeyStoreDefinition()
      The definition of a new keystore. This is only valid if keyStoreId and defaultScope are null. This field must not be null when using an existing keystore via keyStoreId or using the default keystore for a specified scope via defaultScope.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object