com.atlassian.confluence.mail
Class ThreadBuilder

java.lang.Object
  extended bycom.atlassian.confluence.mail.ThreadBuilder

public class ThreadBuilder
extends Object

Magical bean that takes a message, and builds a thread of related messages. You can only use a ThreadBuilder once.

The basic steps are: (1) Gather all related messages by doing exhaustive searches on message-ids, references and subject-lines. (2) Try to parent each message by its message-id and references. (3) Try to parent the remainder of messages by subject.

I assure you, when I wrote this class I understood it. Unfortunately, I can make no guarantees about still understanding it in a few months time. This is probably a bad sign. -- c

Does everything through Lucene, so if your search index is messed up, you don't get any threading.


Constructor Summary
ThreadBuilder()
           
 
Method Summary
 ThreadNode buildThreadAround(String spaceKey, String messageId)
          From a message-id, determine the thread in which that message is contained.
 void setLuceneConnection(LuceneConnection luceneConnection)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadBuilder

public ThreadBuilder()
Method Detail

setLuceneConnection

public void setLuceneConnection(LuceneConnection luceneConnection)

buildThreadAround

public ThreadNode buildThreadAround(String spaceKey,
                                    String messageId)
From a message-id, determine the thread in which that message is contained. All messages in the thread must belong to the same space.

Parameters:
spaceKey - the space in which the message is stored
messageId - the message-id of the message to thread
Returns:
a ThreadNode object representing the thread in which the message is contained


Confluence is developed by Atlassian.