This is an automated email from the ASF dual-hosted git repository. rcordier pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/james-project.git
commit 9c0c4b16764bc61476a84027a998816d4d84251f Author: quanth <[email protected]> AuthorDate: Mon Jun 14 10:39:48 2021 +0700 JAMES-3516 Implement naive ThreadIdGuessing --- .../mail/NaiveThreadIdGuessingAlgorithmImpl.java | 35 ++++++++++++++++++++++ .../store/mail/ThreadIdGuessingAlgorithm.java | 32 ++++++++++++++++++++ 2 files changed, 67 insertions(+) diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/NaiveThreadIdGuessingAlgorithmImpl.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/NaiveThreadIdGuessingAlgorithmImpl.java new file mode 100644 index 0000000..5dec27a --- /dev/null +++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/NaiveThreadIdGuessingAlgorithmImpl.java @@ -0,0 +1,35 @@ +/****************************************************************** + * Licensed to the Apache Software Foundation (ASF) under one * + * or more contributor license agreements. See the NOTICE file * + * distributed with this work for additional information * + * regarding copyright ownership. The ASF licenses this file * + * to you under the Apache License, Version 2.0 (the * + * "License"); you may not use this file except in compliance * + * with the License. You may obtain a copy of the License at * + * * + * http://www.apache.org/licenses/LICENSE-2.0 * + * * + * Unless required by applicable law or agreed to in writing, * + * software distributed under the License is distributed on an * + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * + * KIND, either express or implied. See the License for the * + * specific language governing permissions and limitations * + * under the License. * + ******************************************************************/ + +package org.apache.james.mailbox.store.mail; + +import java.util.List; + +import org.apache.james.core.Username; +import org.apache.james.mailbox.model.MessageId; +import org.apache.james.mailbox.model.ThreadId; +import org.apache.james.mailbox.store.mail.model.MimeMessageId; +import org.apache.james.mailbox.store.mail.model.Subject; + +public class NaiveThreadIdGuessingAlgorithmImpl implements ThreadIdGuessingAlgorithm { + @Override + public ThreadId guessThreadId(Username username, MessageId messageId, MimeMessageId thisMimeMessageId, MimeMessageId inReplyTo, List<MimeMessageId> references, Subject subject) { + return ThreadId.fromBaseMessageId(messageId); + } +} diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/ThreadIdGuessingAlgorithm.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/ThreadIdGuessingAlgorithm.java new file mode 100644 index 0000000..a468e8e --- /dev/null +++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/mail/ThreadIdGuessingAlgorithm.java @@ -0,0 +1,32 @@ +/****************************************************************** + * Licensed to the Apache Software Foundation (ASF) under one * + * or more contributor license agreements. See the NOTICE file * + * distributed with this work for additional information * + * regarding copyright ownership. The ASF licenses this file * + * to you under the Apache License, Version 2.0 (the * + * "License"); you may not use this file except in compliance * + * with the License. You may obtain a copy of the License at * + * * + * http://www.apache.org/licenses/LICENSE-2.0 * + * * + * Unless required by applicable law or agreed to in writing, * + * software distributed under the License is distributed on an * + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * + * KIND, either express or implied. See the License for the * + * specific language governing permissions and limitations * + * under the License. * + ******************************************************************/ + +package org.apache.james.mailbox.store.mail; + +import java.util.List; + +import org.apache.james.core.Username; +import org.apache.james.mailbox.model.MessageId; +import org.apache.james.mailbox.model.ThreadId; +import org.apache.james.mailbox.store.mail.model.MimeMessageId; +import org.apache.james.mailbox.store.mail.model.Subject; + +public interface ThreadIdGuessingAlgorithm { + ThreadId guessThreadId(Username username, MessageId messageId, MimeMessageId thisMimeMessageId, MimeMessageId inReplyTo, List<MimeMessageId> references, Subject subject); +} --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
