# Interface CSCertificateStoreType

All Superinterfaces:
  `AutoCloseable, Closeable`

All Known Implementing Classes:
  `CSCertificateStoreSQLite`

@ProviderType public interface CSCertificateStoreType extends Closeable
A certificate store.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `List<CSCertificateStored>`
  `all()`
  Obtain a read-only snapshot of all currently stored certificates.
  `boolean`
  `delete(String domain, CSCertificateName name)`
  Delete the certificate with the given domain and name.
  `Optional<CSCertificateStored>`
  `find(String domain, CSCertificateName name)`
  Find a certificate that has the given domain and name.
  `boolean`
  `isClosed()`
  `void`
  `put(CSCertificateStored certificate)`
  Create or update a certificate.

  ### Methods inherited from interface Closeable

  `close`

- ## Method Details

  - ### isClosed

    boolean isClosed()
    Returns:
      `true` if the store has been closed

  - ### put

    void put(CSCertificateStored certificate) throws IOException
    Create or update a certificate.
    Parameters:
      `certificate` - The certificate
    Throws:
      `IOException` - On I/O errors

  - ### find

    Optional<CSCertificateStored> find(String domain, CSCertificateName name) throws IOException
    Find a certificate that has the given domain and name.
    Parameters:
      `domain` - The domain
      `name` - The certificate name
    Returns:
      The certificate, if one exists
    Throws:
      `IOException` - On errors

  - ### delete

    boolean delete(String domain, CSCertificateName name) throws IOException
    Delete the certificate with the given domain and name.
    Parameters:
      `domain` - The domain
      `name` - The certificate name
    Returns:
      `true` if a certificate existed and was deleted
    Throws:
      `IOException` - On I/O errors

  - ### all

    List<CSCertificateStored> all() throws IOException
    Obtain a read-only snapshot of all currently stored certificates.
    Returns:
      A snapshot
    Throws:
      `IOException` - On I/O errors