Record Class DSSOnlineTrustedListLoader

java.lang.Object
java.lang.Record
br.ufsc.labsec.signature.conformanceVerifier.validationService.trustedList.dss.DSSOnlineTrustedListLoader
All Implemented Interfaces:
eu.europa.esig.dss.spi.client.http.DSSCacheFileLoader, eu.europa.esig.dss.spi.client.http.DSSFileLoader, Serializable

public record DSSOnlineTrustedListLoader(TrustPointDB database) extends Record implements eu.europa.esig.dss.spi.client.http.DSSCacheFileLoader
See Also:
  • Field Details

    • TIMEOUT

      public static final org.apache.hc.core5.util.Timeout TIMEOUT
      Timeout para o download de arquivos.
  • Constructor Details

    • DSSOnlineTrustedListLoader

      public DSSOnlineTrustedListLoader(TrustPointDB database)
      Construtor
      Parameters:
      database - Banco de dados
  • Method Details

    • getSourcedDocument

      public DSSSourcedDocument getSourcedDocument(String s)
      Retorna o arquivo baixado contido em um DSSSourcedDocument, acompanhado de informações sobre a validade e obtenção deste arquivo.
      Parameters:
      s - String url do arquivo a ser baixado.
      Returns:
      Arquivo baixado contido em um DSSSourcedDocument.
    • getDocumentFromCache

      public DSSSourcedDocument getDocumentFromCache(String url)
      Specified by:
      getDocumentFromCache in interface eu.europa.esig.dss.spi.client.http.DSSCacheFileLoader
    • getDocument

      public eu.europa.esig.dss.model.DSSDocument getDocument(String url, boolean refresh)
      Specified by:
      getDocument in interface eu.europa.esig.dss.spi.client.http.DSSCacheFileLoader
    • getDocument

      public eu.europa.esig.dss.model.DSSDocument getDocument(String url) throws eu.europa.esig.dss.model.DSSException
      Retorna o arquivo baixado contido em um DSSDocument.
      Specified by:
      getDocument in interface eu.europa.esig.dss.spi.client.http.DSSFileLoader
      Parameters:
      url - String url do arquivo a ser baixado.
      Returns:
      Arquivo baixado contido em um DSSDocument.
      Throws:
      eu.europa.esig.dss.model.DSSException - caso haja algum problema na obtenção do arquivo.
    • remove

      public boolean remove(String s)
      Remove um arquivo em cache.
      Specified by:
      remove in interface eu.europa.esig.dss.spi.client.http.DSSCacheFileLoader
      Parameters:
      s - String url de download do arquivo (o mesmo utilizado para baixar e definir o nome de armazenamento de arquivo)
      Returns:
      valor lógico indicando se o arquivo foi corretamente removido.
    • 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.
    • database

      public TrustPointDB database()
      Returns the value of the database record component.
      Returns:
      the value of the database record component