Class JdbcCacheAIASource

java.lang.Object
eu.europa.esig.dss.spi.x509.aia.RepositoryAIASource
eu.europa.esig.dss.service.x509.aia.JdbcCacheAIASource
All Implemented Interfaces:
eu.europa.esig.dss.spi.x509.aia.AIASource, Serializable

public class JdbcCacheAIASource extends eu.europa.esig.dss.spi.x509.aia.RepositoryAIASource
The class represents a JDBC cached AIA Source
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    protected static class 
    Represents an AIA record extracted from the SQL database table
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected eu.europa.esig.dss.spi.client.jdbc.JdbcCacheConnector
    Connection to database

    Fields inherited from class eu.europa.esig.dss.spi.x509.aia.RepositoryAIASource

    proxiedSource
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor with null JdbcCacheConnector
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Removes table from DB
    protected Set<eu.europa.esig.dss.model.x509.CertificateToken>
     
    protected eu.europa.esig.dss.spi.client.jdbc.query.SqlSelectQuery
    Returns an SQL query to extract AIA certificates from a table
    protected eu.europa.esig.dss.spi.client.jdbc.query.SqlSelectQuery
    Returns an SQL query to extract stored AIA keys in a table
    protected eu.europa.esig.dss.spi.client.jdbc.query.SqlQuery
    Returns CREATE_TABLE sql query
    protected eu.europa.esig.dss.spi.client.jdbc.query.SqlQuery
    Returns an sql query to remove a table from DB
    protected List<String>
     
    protected eu.europa.esig.dss.spi.client.jdbc.query.SqlQuery
    Returns an SQL query to insert a new CRL to a table
    protected eu.europa.esig.dss.spi.client.jdbc.query.SqlQuery
    Returns an sql query to remove a record from DB
    protected eu.europa.esig.dss.spi.client.jdbc.query.SqlQuery
    Returns an sql query to check table existence
    void
    Initialize the table.
    protected void
    insertCertificate(String aiaKey, eu.europa.esig.dss.model.x509.CertificateToken certificateTokens)
     
    boolean
    Checks of the table is created
    protected void
     
    void
    setJdbcCacheConnector(eu.europa.esig.dss.spi.client.jdbc.JdbcCacheConnector jdbcCacheConnector)
    Sets the SQL connection DataSource

    Methods inherited from class eu.europa.esig.dss.spi.x509.aia.RepositoryAIASource

    getAIAKey, getCertificatesByAIA, getCertificatesByAIA, getCertificateTokenAIAUrl, getUniqueCertificateAiaId, initCertificateAIAKeys, setProxySource

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • jdbcCacheConnector

      protected transient eu.europa.esig.dss.spi.client.jdbc.JdbcCacheConnector jdbcCacheConnector
      Connection to database
  • Constructor Details

    • JdbcCacheAIASource

      public JdbcCacheAIASource()
      Default constructor with null JdbcCacheConnector
  • Method Details

    • setJdbcCacheConnector

      public void setJdbcCacheConnector(eu.europa.esig.dss.spi.client.jdbc.JdbcCacheConnector jdbcCacheConnector)
      Sets the SQL connection DataSource
      Parameters:
      jdbcCacheConnector - JdbcCacheConnector
    • getCreateTableQuery

      protected eu.europa.esig.dss.spi.client.jdbc.query.SqlQuery getCreateTableQuery()
      Returns CREATE_TABLE sql query
      Returns:
      SqlQuery
    • getTableExistenceQuery

      protected eu.europa.esig.dss.spi.client.jdbc.query.SqlQuery getTableExistenceQuery()
      Returns an sql query to check table existence
      Returns:
      SqlQuery
    • getDeleteTableQuery

      protected eu.europa.esig.dss.spi.client.jdbc.query.SqlQuery getDeleteTableQuery()
      Returns an sql query to remove a table from DB
      Returns:
      SqlQuery
    • getInsertCertificateTokenEntryQuery

      protected eu.europa.esig.dss.spi.client.jdbc.query.SqlQuery getInsertCertificateTokenEntryQuery()
      Returns an SQL query to insert a new CRL to a table
      Returns:
      SqlQuery
    • getRemoveCertificateTokenEntryQuery

      protected eu.europa.esig.dss.spi.client.jdbc.query.SqlQuery getRemoveCertificateTokenEntryQuery()
      Returns an sql query to remove a record from DB
      Returns:
      SqlQuery
    • getAIACertificatesExtractQuery

      protected eu.europa.esig.dss.spi.client.jdbc.query.SqlSelectQuery getAIACertificatesExtractQuery()
      Returns an SQL query to extract AIA certificates from a table
      Returns:
      SqlSelectQuery
    • getAIAKeysExtractQuery

      protected eu.europa.esig.dss.spi.client.jdbc.query.SqlSelectQuery getAIAKeysExtractQuery()
      Returns an SQL query to extract stored AIA keys in a table
      Returns:
      SqlSelectQuery
    • findCertificates

      protected Set<eu.europa.esig.dss.model.x509.CertificateToken> findCertificates(String key)
      Specified by:
      findCertificates in class eu.europa.esig.dss.spi.x509.aia.RepositoryAIASource
    • insertCertificate

      protected void insertCertificate(String aiaKey, eu.europa.esig.dss.model.x509.CertificateToken certificateTokens)
      Specified by:
      insertCertificate in class eu.europa.esig.dss.spi.x509.aia.RepositoryAIASource
    • removeCertificates

      protected void removeCertificates(String aiaKey)
      Specified by:
      removeCertificates in class eu.europa.esig.dss.spi.x509.aia.RepositoryAIASource
    • getExistingAIAKeys

      protected List<String> getExistingAIAKeys()
      Specified by:
      getExistingAIAKeys in class eu.europa.esig.dss.spi.x509.aia.RepositoryAIASource
    • initTable

      public void initTable() throws SQLException
      Initialize the table.
      Throws:
      SQLException - in case of SQL connection error
    • isTableExists

      public boolean isTableExists()
      Checks of the table is created
      Returns:
      TRUE if the table is created, FALSE otherwise
    • destroyTable

      public void destroyTable() throws SQLException
      Removes table from DB
      Throws:
      SQLException - in case of error