2022-03-01 15:19:01 +01:00
|
|
|
// SPDX-FileCopyrightText: 2022 Paul Schaub <vanitasvitae@fsfe.org>
|
|
|
|
//
|
|
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
|
|
|
package pgp.cert_d;
|
|
|
|
|
|
|
|
import java.io.IOException;
|
|
|
|
import java.io.InputStream;
|
|
|
|
import java.util.Iterator;
|
|
|
|
|
|
|
|
import pgp.certificate_store.exception.BadDataException;
|
|
|
|
import pgp.certificate_store.exception.BadNameException;
|
|
|
|
import pgp.certificate_store.Certificate;
|
2022-07-04 18:48:19 +02:00
|
|
|
import pgp.certificate_store.CertificateMerger;
|
2022-03-01 15:19:01 +01:00
|
|
|
|
|
|
|
public interface SharedPGPCertificateDirectory {
|
|
|
|
|
|
|
|
LockingMechanism getLock();
|
|
|
|
|
|
|
|
Certificate getByFingerprint(String fingerprint)
|
|
|
|
throws IOException, BadNameException, BadDataException;
|
|
|
|
|
|
|
|
Certificate getBySpecialName(String specialName)
|
|
|
|
throws IOException, BadNameException, BadDataException;
|
|
|
|
|
|
|
|
Certificate getByFingerprintIfChanged(String fingerprint, String tag)
|
|
|
|
throws IOException, BadNameException, BadDataException;
|
|
|
|
|
|
|
|
Certificate getBySpecialNameIfChanged(String specialName, String tag)
|
|
|
|
throws IOException, BadNameException, BadDataException;
|
|
|
|
|
2022-07-04 18:48:19 +02:00
|
|
|
Certificate insert(InputStream data, CertificateMerger merge)
|
2022-03-01 15:19:01 +01:00
|
|
|
throws IOException, BadDataException, InterruptedException;
|
|
|
|
|
2022-07-04 18:48:19 +02:00
|
|
|
Certificate tryInsert(InputStream data, CertificateMerger merge)
|
2022-03-01 15:19:01 +01:00
|
|
|
throws IOException, BadDataException;
|
|
|
|
|
2022-07-04 18:48:19 +02:00
|
|
|
Certificate insertWithSpecialName(String specialName, InputStream data, CertificateMerger merge)
|
2022-03-01 15:19:01 +01:00
|
|
|
throws IOException, BadDataException, BadNameException, InterruptedException;
|
|
|
|
|
2022-07-04 18:48:19 +02:00
|
|
|
Certificate tryInsertWithSpecialName(String specialName, InputStream data, CertificateMerger merge)
|
2022-03-01 15:19:01 +01:00
|
|
|
throws IOException, BadDataException, BadNameException;
|
|
|
|
|
|
|
|
Iterator<Certificate> items();
|
|
|
|
|
|
|
|
Iterator<String> fingerprints();
|
|
|
|
}
|