Class SharedPGPCertificateDirectoryAdapter

  • All Implemented Interfaces:
    pgp.certificate_store.CertificateDirectory, pgp.certificate_store.CertificateStore, pgp.certificate_store.SubkeyLookup

    public class SharedPGPCertificateDirectoryAdapter
    extends java.lang.Object
    implements pgp.certificate_store.CertificateStore
    Adapter class used to adapt the SharedPGPCertificateDirectory for use with CertificateDirectory.
    • Constructor Summary

      Constructors 
      Constructor Description
      SharedPGPCertificateDirectoryAdapter​(pgp.cert_d.SharedPGPCertificateDirectory directory, pgp.certificate_store.SubkeyLookup subkeyLookup)
      Create an adapter to use SharedPGPCertificateDirectory objects as CertificateStores.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      pgp.certificate_store.Certificate getCertificate​(java.lang.String identifier)  
      java.util.Set<java.lang.String> getCertificateFingerprintsForSubkeyId​(long subkeyId)  
      pgp.certificate_store.Certificate getCertificateIfChanged​(java.lang.String identifier, java.lang.String tag)  
      java.util.Iterator<pgp.certificate_store.Certificate> getCertificates()  
      java.util.Iterator<java.lang.String> getFingerprints()  
      pgp.certificate_store.Certificate insertCertificate​(java.io.InputStream data, pgp.certificate_store.MergeCallback merge)  
      pgp.certificate_store.Certificate insertCertificateBySpecialName​(java.lang.String specialName, java.io.InputStream data, pgp.certificate_store.MergeCallback merge)  
      void storeCertificateSubkeyIds​(java.lang.String certificate, java.util.List<java.lang.Long> subkeyIds)  
      pgp.certificate_store.Certificate tryInsertCertificate​(java.io.InputStream data, pgp.certificate_store.MergeCallback merge)  
      pgp.certificate_store.Certificate tryInsertCertificateBySpecialName​(java.lang.String specialName, java.io.InputStream data, pgp.certificate_store.MergeCallback merge)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SharedPGPCertificateDirectoryAdapter

        public SharedPGPCertificateDirectoryAdapter​(pgp.cert_d.SharedPGPCertificateDirectory directory,
                                                    pgp.certificate_store.SubkeyLookup subkeyLookup)
        Create an adapter to use SharedPGPCertificateDirectory objects as CertificateStores.
        Parameters:
        directory - directory instance
    • Method Detail

      • getCertificate

        public pgp.certificate_store.Certificate getCertificate​(java.lang.String identifier)
                                                         throws java.io.IOException,
                                                                pgp.certificate_store.exception.BadDataException,
                                                                pgp.certificate_store.exception.BadNameException
        Specified by:
        getCertificate in interface pgp.certificate_store.CertificateDirectory
        Throws:
        java.io.IOException
        pgp.certificate_store.exception.BadDataException
        pgp.certificate_store.exception.BadNameException
      • getCertificateIfChanged

        public pgp.certificate_store.Certificate getCertificateIfChanged​(java.lang.String identifier,
                                                                         java.lang.String tag)
                                                                  throws java.io.IOException,
                                                                         pgp.certificate_store.exception.BadDataException,
                                                                         pgp.certificate_store.exception.BadNameException
        Specified by:
        getCertificateIfChanged in interface pgp.certificate_store.CertificateDirectory
        Throws:
        java.io.IOException
        pgp.certificate_store.exception.BadDataException
        pgp.certificate_store.exception.BadNameException
      • insertCertificate

        public pgp.certificate_store.Certificate insertCertificate​(java.io.InputStream data,
                                                                   pgp.certificate_store.MergeCallback merge)
                                                            throws java.io.IOException,
                                                                   java.lang.InterruptedException,
                                                                   pgp.certificate_store.exception.BadDataException
        Specified by:
        insertCertificate in interface pgp.certificate_store.CertificateDirectory
        Throws:
        java.io.IOException
        java.lang.InterruptedException
        pgp.certificate_store.exception.BadDataException
      • tryInsertCertificate

        public pgp.certificate_store.Certificate tryInsertCertificate​(java.io.InputStream data,
                                                                      pgp.certificate_store.MergeCallback merge)
                                                               throws java.io.IOException,
                                                                      pgp.certificate_store.exception.BadDataException
        Specified by:
        tryInsertCertificate in interface pgp.certificate_store.CertificateDirectory
        Throws:
        java.io.IOException
        pgp.certificate_store.exception.BadDataException
      • insertCertificateBySpecialName

        public pgp.certificate_store.Certificate insertCertificateBySpecialName​(java.lang.String specialName,
                                                                                java.io.InputStream data,
                                                                                pgp.certificate_store.MergeCallback merge)
                                                                         throws java.io.IOException,
                                                                                java.lang.InterruptedException,
                                                                                pgp.certificate_store.exception.BadDataException,
                                                                                pgp.certificate_store.exception.BadNameException
        Specified by:
        insertCertificateBySpecialName in interface pgp.certificate_store.CertificateDirectory
        Throws:
        java.io.IOException
        java.lang.InterruptedException
        pgp.certificate_store.exception.BadDataException
        pgp.certificate_store.exception.BadNameException
      • tryInsertCertificateBySpecialName

        public pgp.certificate_store.Certificate tryInsertCertificateBySpecialName​(java.lang.String specialName,
                                                                                   java.io.InputStream data,
                                                                                   pgp.certificate_store.MergeCallback merge)
                                                                            throws java.io.IOException,
                                                                                   pgp.certificate_store.exception.BadDataException,
                                                                                   pgp.certificate_store.exception.BadNameException
        Specified by:
        tryInsertCertificateBySpecialName in interface pgp.certificate_store.CertificateDirectory
        Throws:
        java.io.IOException
        pgp.certificate_store.exception.BadDataException
        pgp.certificate_store.exception.BadNameException
      • getCertificates

        public java.util.Iterator<pgp.certificate_store.Certificate> getCertificates()
        Specified by:
        getCertificates in interface pgp.certificate_store.CertificateDirectory
      • getFingerprints

        public java.util.Iterator<java.lang.String> getFingerprints()
        Specified by:
        getFingerprints in interface pgp.certificate_store.CertificateDirectory
      • getCertificateFingerprintsForSubkeyId

        public java.util.Set<java.lang.String> getCertificateFingerprintsForSubkeyId​(long subkeyId)
                                                                              throws java.io.IOException
        Specified by:
        getCertificateFingerprintsForSubkeyId in interface pgp.certificate_store.SubkeyLookup
        Throws:
        java.io.IOException
      • storeCertificateSubkeyIds

        public void storeCertificateSubkeyIds​(java.lang.String certificate,
                                              java.util.List<java.lang.Long> subkeyIds)
                                       throws java.io.IOException
        Specified by:
        storeCertificateSubkeyIds in interface pgp.certificate_store.SubkeyLookup
        Throws:
        java.io.IOException