com.atlassian.confluence.mail.archive
Class ThreadBuilder

java.lang.Object
  extended by com.atlassian.confluence.mail.archive.ThreadBuilder

public class ThreadBuilder
extends java.lang.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(com.atlassian.bonnie.ILuceneConnection luceneConnection)
           
 
Method Summary
 ThreadNode buildThreadAround(java.lang.String spaceKey, java.lang.String messageId)
          From a message-id, determine the thread in which that message is contained.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadBuilder

public ThreadBuilder(com.atlassian.bonnie.ILuceneConnection luceneConnection)
Method Detail

buildThreadAround

public ThreadNode buildThreadAround(java.lang.String spaceKey,
                                    java.lang.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


Copyright © 2003-2014 Atlassian. All Rights Reserved.