Add javadoc

This commit is contained in:
Paul Schaub 2022-08-25 11:40:22 +02:00
parent 4ce9f46846
commit 2758c3efb8
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
3 changed files with 17 additions and 0 deletions

View file

@ -35,12 +35,20 @@ import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.regex.Pattern; import java.util.regex.Pattern;
/**
* Implementation of {@link PGPCertificateDirectory.Backend} which stores certificates in a directory structure.
*
* @see <a href="https://sequoia-pgp.gitlab.io/pgp-cert-d/#name-implementation">Shared PGP Certificate Directory</a>
*/
public class FileBasedCertificateDirectoryBackend implements PGPCertificateDirectory.Backend { public class FileBasedCertificateDirectoryBackend implements PGPCertificateDirectory.Backend {
private abstract static class Lazy<E> { private abstract static class Lazy<E> {
abstract E get() throws BadDataException; 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 static class FileLockingMechanism implements PGPCertificateDirectory.LockingMechanism {
private final File lockFile; private final File lockFile;
@ -364,6 +372,9 @@ public class FileBasedCertificateDirectoryBackend implements PGPCertificateDirec
return getTag(certFile); return getTag(certFile);
} }
/**
* Class to resolve file names from certificate fingerprints / special names.
*/
public static class FilenameResolver { public static class FilenameResolver {
private final File baseDirectory; private final File baseDirectory;

View file

@ -6,6 +6,9 @@ package pgp.cert_d.subkey_lookup;
import java.io.File; import java.io.File;
/**
* Factory class to instantiate {@link InMemorySubkeyLookup} objects.
*/
public class InMemorySubkeyLookupFactory implements SubkeyLookupFactory { public class InMemorySubkeyLookupFactory implements SubkeyLookupFactory {
@Override @Override
public SubkeyLookup createFileBasedInstance(File baseDirectory) { public SubkeyLookup createFileBasedInstance(File baseDirectory) {

View file

@ -6,6 +6,9 @@ package pgp.cert_d.subkey_lookup;
import java.io.File; import java.io.File;
/**
* Factory class to instantiate different {@link SubkeyLookup} implementations.
*/
public interface SubkeyLookupFactory { public interface SubkeyLookupFactory {
/** /**