mirror of
https://codeberg.org/PGPainless/cert-d-java.git
synced 2025-09-09 11:19:41 +02:00
Rename MergeCallback to CertificateMerger
This commit is contained in:
parent
dd2877ccee
commit
96b22ff40a
6 changed files with 30 additions and 30 deletions
|
@ -54,12 +54,12 @@ public interface CertificateDirectory {
|
|||
|
||||
/**
|
||||
* Insert a certificate into the store.
|
||||
* If an instance of the certificate is already present in the store, the given {@link MergeCallback} will be
|
||||
* If an instance of the certificate is already present in the store, the given {@link CertificateMerger} will be
|
||||
* used to merge both the existing and the new instance of the {@link Certificate}. The resulting merged certificate
|
||||
* will be stored in the store and returned.
|
||||
*
|
||||
* This method will block until a write-lock on the store can be acquired. If you cannot afford blocking,
|
||||
* consider to use {@link #tryInsertCertificate(InputStream, MergeCallback)} instead.
|
||||
* consider to use {@link #tryInsertCertificate(InputStream, CertificateMerger)} instead.
|
||||
*
|
||||
* @param data input stream containing the new certificate instance
|
||||
* @param merge callback for merging with an existing certificate instance
|
||||
|
@ -69,12 +69,12 @@ public interface CertificateDirectory {
|
|||
* @throws InterruptedException in case the inserting thread gets interrupted
|
||||
* @throws BadDataException if the data stream does not contain valid OpenPGP data
|
||||
*/
|
||||
Certificate insertCertificate(InputStream data, MergeCallback merge)
|
||||
Certificate insertCertificate(InputStream data, CertificateMerger merge)
|
||||
throws IOException, InterruptedException, BadDataException;
|
||||
|
||||
/**
|
||||
* Insert a certificate into the store.
|
||||
* If an instance of the certificate is already present in the store, the given {@link MergeCallback} will be
|
||||
* If an instance of the certificate is already present in the store, the given {@link CertificateMerger} will be
|
||||
* used to merge both the existing and the new instance of the {@link Certificate}. The resulting merged certificate
|
||||
* will be stored in the store and returned.
|
||||
*
|
||||
|
@ -90,19 +90,19 @@ public interface CertificateDirectory {
|
|||
* @throws IOException in case of an IO-error
|
||||
* @throws BadDataException if the data stream does not contain valid OpenPGP data
|
||||
*/
|
||||
Certificate tryInsertCertificate(InputStream data, MergeCallback merge)
|
||||
Certificate tryInsertCertificate(InputStream data, CertificateMerger merge)
|
||||
throws IOException, BadDataException;
|
||||
|
||||
/**
|
||||
* Insert a certificate into the store.
|
||||
* The certificate will be stored under the given special name instead of its fingerprint.
|
||||
*
|
||||
* If an instance of the certificate is already present under the special name in the store, the given {@link MergeCallback} will be
|
||||
* If an instance of the certificate is already present under the special name in the store, the given {@link CertificateMerger} will be
|
||||
* used to merge both the existing and the new instance of the {@link Certificate}. The resulting merged certificate
|
||||
* will be stored in the store and returned.
|
||||
*
|
||||
* This method will block until a write-lock on the store can be acquired. If you cannot afford blocking,
|
||||
* consider to use {@link #tryInsertCertificateBySpecialName(String, InputStream, MergeCallback)} instead.
|
||||
* consider to use {@link #tryInsertCertificateBySpecialName(String, InputStream, CertificateMerger)} instead.
|
||||
*
|
||||
* @param specialName special name of the certificate
|
||||
* @param data input stream containing the new certificate instance
|
||||
|
@ -114,14 +114,14 @@ public interface CertificateDirectory {
|
|||
* @throws BadDataException if the certificate file does not contain valid OpenPGP data
|
||||
* @throws BadNameException if the special name is unknown
|
||||
*/
|
||||
Certificate insertCertificateBySpecialName(String specialName, InputStream data, MergeCallback merge)
|
||||
Certificate insertCertificateBySpecialName(String specialName, InputStream data, CertificateMerger merge)
|
||||
throws IOException, InterruptedException, BadDataException, BadNameException;
|
||||
|
||||
/**
|
||||
* Insert a certificate into the store.
|
||||
* The certificate will be stored under the given special name instead of its fingerprint.
|
||||
*
|
||||
* If an instance of the certificate is already present under the special name in the store, the given {@link MergeCallback} will be
|
||||
* If an instance of the certificate is already present under the special name in the store, the given {@link CertificateMerger} will be
|
||||
* used to merge both the existing and the new instance of the {@link Certificate}. The resulting merged certificate
|
||||
* will be stored in the store and returned.
|
||||
*
|
||||
|
@ -139,7 +139,7 @@ public interface CertificateDirectory {
|
|||
* @throws BadDataException if the data stream does not contain valid OpenPGP data
|
||||
* @throws BadNameException if the special name is not known
|
||||
*/
|
||||
Certificate tryInsertCertificateBySpecialName(String specialName, InputStream data, MergeCallback merge)
|
||||
Certificate tryInsertCertificateBySpecialName(String specialName, InputStream data, CertificateMerger merge)
|
||||
throws IOException, BadDataException, BadNameException;
|
||||
|
||||
/**
|
||||
|
|
|
@ -9,7 +9,7 @@ import java.io.IOException;
|
|||
/**
|
||||
* Merge a given certificate (update) with an existing certificate.
|
||||
*/
|
||||
public interface MergeCallback {
|
||||
public interface CertificateMerger {
|
||||
|
||||
/**
|
||||
* Merge the given certificate data with the existing certificate and return the result.
|
Loading…
Add table
Add a link
Reference in a new issue