From cae655b02074fed4e7f2ca45e1a0db78039a819c Mon Sep 17 00:00:00 2001 From: ameba23 Date: Tue, 18 May 2021 11:50:50 +0200 Subject: [PATCH] JavaDoc comments --- .../api/socialbackup/SocialBackupManager.java | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/briar-api/src/main/java/org/briarproject/briar/api/socialbackup/SocialBackupManager.java b/briar-api/src/main/java/org/briarproject/briar/api/socialbackup/SocialBackupManager.java index 8905617ce..f8f4522ac 100644 --- a/briar-api/src/main/java/org/briarproject/briar/api/socialbackup/SocialBackupManager.java +++ b/briar-api/src/main/java/org/briarproject/briar/api/socialbackup/SocialBackupManager.java @@ -1,6 +1,5 @@ package org.briarproject.briar.api.socialbackup; -import org.briarproject.bramble.api.contact.Contact; import org.briarproject.bramble.api.contact.ContactId; import org.briarproject.bramble.api.db.DbException; import org.briarproject.bramble.api.db.Transaction; @@ -50,15 +49,33 @@ public interface SocialBackupManager extends void createBackup(Transaction txn, List custodianIds, int threshold) throws DbException; + /** + * Returns a collection of social backup message headers + */ @Override Collection getMessageHeaders( Transaction txn, ContactId contactId) throws DbException; + /** + * Determines whether you hold a shard belonging to a given contact + */ boolean amCustodian(Transaction txn, ContactId contactId); - ReturnShardPayload getReturnShardPayload(Transaction txn, ContactId contactId) + /** + * Retrieves the shard and encrypted backup you hold for a given contact + * + * @throws DbException if you are not a custodian for the given contact + */ + ReturnShardPayload getReturnShardPayload(Transaction txn, + ContactId contactId) throws DbException; + /** + * Retrieves the shard and encrypted backup you hold for a given contact + * encoded with BDF + * + * @throws DbException if you are not a custodian for the given contact + */ byte[] getReturnShardPayloadBytes(Transaction txn, ContactId contactId) throws DbException; }