You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by bt...@apache.org on 2020/04/22 02:31:48 UTC
[james-project] 08/37: JAMES-2997 step #6 Remove
AttachmentManager::storeAttachmentsForMessage unused method
This is an automated email from the ASF dual-hosted git repository.
btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git
commit af96d34897b32a24a8353e727f28987a93e7c03d
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Fri Jan 17 10:29:58 2020 +0700
JAMES-2997 step #6 Remove AttachmentManager::storeAttachmentsForMessage unused method
Correlating the inputs with the generated message ids is non trivial (might
require some 'temporary' correlation ids), and is unused nor tested.
Thus I would rather not like to pay the price of this complexity in an already
that big changeset.
---
.../src/main/java/org/apache/james/mailbox/AttachmentManager.java | 4 ----
.../java/org/apache/james/mailbox/store/StoreAttachmentManager.java | 5 -----
2 files changed, 9 deletions(-)
diff --git a/mailbox/api/src/main/java/org/apache/james/mailbox/AttachmentManager.java b/mailbox/api/src/main/java/org/apache/james/mailbox/AttachmentManager.java
index 946ea37..99722a1 100644
--- a/mailbox/api/src/main/java/org/apache/james/mailbox/AttachmentManager.java
+++ b/mailbox/api/src/main/java/org/apache/james/mailbox/AttachmentManager.java
@@ -21,14 +21,12 @@ package org.apache.james.mailbox;
import java.io.IOException;
import java.io.InputStream;
-import java.util.Collection;
import java.util.List;
import org.apache.james.mailbox.exception.AttachmentNotFoundException;
import org.apache.james.mailbox.exception.MailboxException;
import org.apache.james.mailbox.model.Attachment;
import org.apache.james.mailbox.model.AttachmentId;
-import org.apache.james.mailbox.model.MessageId;
import org.reactivestreams.Publisher;
public interface AttachmentManager extends AttachmentContentLoader {
@@ -41,8 +39,6 @@ public interface AttachmentManager extends AttachmentContentLoader {
Publisher<Attachment> storeAttachment(String contentType, InputStream attachmentContent, MailboxSession mailboxSession);
- void storeAttachmentsForMessage(Collection<Attachment> attachments, MessageId ownerMessageId, MailboxSession mailboxSession) throws MailboxException;
-
InputStream loadAttachmentContent(AttachmentId attachmentId, MailboxSession mailboxSession) throws AttachmentNotFoundException, IOException;
@Override
diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreAttachmentManager.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreAttachmentManager.java
index 98ca7f1..9d281fb 100644
--- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreAttachmentManager.java
+++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreAttachmentManager.java
@@ -82,11 +82,6 @@ public class StoreAttachmentManager implements AttachmentManager {
.storeAttachmentForOwner(contentType, attachmentContent, mailboxSession.getUser());
}
- @Override
- public void storeAttachmentsForMessage(Collection<Attachment> attachments, MessageId ownerMessageId, MailboxSession mailboxSession) throws MailboxException {
- attachmentMapperFactory.getAttachmentMapper(mailboxSession).storeAttachmentsForMessage(attachments, ownerMessageId);
- }
-
private boolean userHasAccessToAttachment(AttachmentId attachmentId, MailboxSession mailboxSession) {
try {
return isExplicitlyAOwner(attachmentId, mailboxSession)
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org