From 2758c3efb87a5d0fcf385f818a3cc7286e491454 Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Thu, 25 Aug 2022 11:40:22 +0200 Subject: [PATCH] Add javadoc --- .../backend/FileBasedCertificateDirectoryBackend.java | 11 +++++++++++ .../subkey_lookup/InMemorySubkeyLookupFactory.java | 3 +++ .../pgp/cert_d/subkey_lookup/SubkeyLookupFactory.java | 3 +++ 3 files changed, 17 insertions(+) diff --git a/pgp-cert-d-java/src/main/java/pgp/cert_d/backend/FileBasedCertificateDirectoryBackend.java b/pgp-cert-d-java/src/main/java/pgp/cert_d/backend/FileBasedCertificateDirectoryBackend.java index e5750e8..def57e6 100644 --- a/pgp-cert-d-java/src/main/java/pgp/cert_d/backend/FileBasedCertificateDirectoryBackend.java +++ b/pgp-cert-d-java/src/main/java/pgp/cert_d/backend/FileBasedCertificateDirectoryBackend.java @@ -35,12 +35,20 @@ import java.util.Iterator; import java.util.List; import java.util.regex.Pattern; +/** + * Implementation of {@link PGPCertificateDirectory.Backend} which stores certificates in a directory structure. + * + * @see Shared PGP Certificate Directory + */ public class FileBasedCertificateDirectoryBackend implements PGPCertificateDirectory.Backend { private abstract static class Lazy { abstract E get() throws BadDataException; } + /** + * Locking mechanism which uses a lock file to synchronize write-access to the store. + */ private static class FileLockingMechanism implements PGPCertificateDirectory.LockingMechanism { private final File lockFile; @@ -364,6 +372,9 @@ public class FileBasedCertificateDirectoryBackend implements PGPCertificateDirec return getTag(certFile); } + /** + * Class to resolve file names from certificate fingerprints / special names. + */ public static class FilenameResolver { private final File baseDirectory; diff --git a/pgp-cert-d-java/src/main/java/pgp/cert_d/subkey_lookup/InMemorySubkeyLookupFactory.java b/pgp-cert-d-java/src/main/java/pgp/cert_d/subkey_lookup/InMemorySubkeyLookupFactory.java index a224c64..98e006c 100644 --- a/pgp-cert-d-java/src/main/java/pgp/cert_d/subkey_lookup/InMemorySubkeyLookupFactory.java +++ b/pgp-cert-d-java/src/main/java/pgp/cert_d/subkey_lookup/InMemorySubkeyLookupFactory.java @@ -6,6 +6,9 @@ package pgp.cert_d.subkey_lookup; import java.io.File; +/** + * Factory class to instantiate {@link InMemorySubkeyLookup} objects. + */ public class InMemorySubkeyLookupFactory implements SubkeyLookupFactory { @Override public SubkeyLookup createFileBasedInstance(File baseDirectory) { diff --git a/pgp-cert-d-java/src/main/java/pgp/cert_d/subkey_lookup/SubkeyLookupFactory.java b/pgp-cert-d-java/src/main/java/pgp/cert_d/subkey_lookup/SubkeyLookupFactory.java index 442e9ef..a958b84 100644 --- a/pgp-cert-d-java/src/main/java/pgp/cert_d/subkey_lookup/SubkeyLookupFactory.java +++ b/pgp-cert-d-java/src/main/java/pgp/cert_d/subkey_lookup/SubkeyLookupFactory.java @@ -6,6 +6,9 @@ package pgp.cert_d.subkey_lookup; import java.io.File; +/** + * Factory class to instantiate different {@link SubkeyLookup} implementations. + */ public interface SubkeyLookupFactory { /**