Record Class JksSslStoreDetails

java.lang.Object
java.lang.Record
org.springframework.boot.ssl.jks.JksSslStoreDetails
Record Components:
type - the key store type, for example JKS or PKCS11. A null value will use KeyStore.getDefaultType()).
provider - the name of the key store provider
location - the location of the key store file or null if using a PKCS11 hardware store
password - the password used to unlock the store or null

public record JksSslStoreDetails(String type, String provider, String location, String password) extends Record
Details for an individual trust or key store in a JksSslStoreBundle.
Since:
3.1.0
Author:
Scott Frederick, Phillip Webb
  • Constructor Details

    • JksSslStoreDetails

      public JksSslStoreDetails(String type, String provider, String location, String password)
      Creates an instance of a JksSslStoreDetails record class.
      Parameters:
      type - the value for the type record component
      provider - the value for the provider record component
      location - the value for the location record component
      password - the value for the password record component
  • Method Details

    • withPassword

      public JksSslStoreDetails withPassword(String password)
      Return a new JksSslStoreDetails instance with a new password.
      Parameters:
      password - the new password
      Returns:
      a new JksSslStoreDetails instance
    • forLocation

      public static JksSslStoreDetails forLocation(String location)
      Factory method to create a new JksSslStoreDetails instance for the given location.
      Parameters:
      location - the location
      Returns:
      a new JksSslStoreDetails instance.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • type

      public String type()
      Returns the value of the type record component.
      Returns:
      the value of the type record component
    • provider

      public String provider()
      Returns the value of the provider record component.
      Returns:
      the value of the provider record component
    • location

      public String location()
      Returns the value of the location record component.
      Returns:
      the value of the location record component
    • password

      public String password()
      Returns the value of the password record component.
      Returns:
      the value of the password record component