You are currently viewing a snapshot of www.mozilla.org taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to www.mozilla.org, please file a bug.



All Packages  This Package  Class Hierarchy  Class Search  Index

Interface grendel.view.IThreadable


interface  IThreadable
{
          // Methods 9
     public abstract Enumeration allElements();
     public abstract boolean isDummy();
     public abstract IThreadable makeDummy();
     public abstract Object messageThreadID();
     public abstract Object[] messageThreadReferences();
     public abstract void setChild(Object);
     public abstract void setNext(Object);
     public abstract String simplifiedSubject();
     public abstract boolean subjectIsReply();
}



Methods


allElements

   public abstract Enumeration allElements() 

Returns each subsequent element in the set of messages of which this IThreadable is the root. Order is unimportant.



messageThreadID

   public abstract Object messageThreadID() 

Returns an object identifying this message. Generally this will be a representation of the contents of the Message-ID header. It may be a String, or it may be something else; the only constraint is that equals and hashCode work properly on it. (That is, two ID objects are equal and hash the same if they represent the same underlying ID-string.)



messageThreadReferences

   public abstract Object[] messageThreadReferences() 

Returns the IDs of the set of messages referenced by this one. This list should be ordered from oldest-ancestor to youngest-ancestor. As for the messageThreadID method, the contents of this array may be any type of object, so long as equals and hashCode work properly on them.



simplifiedSubject

   public abstract String simplifiedSubject() 

When no references are present, subjects will be used to thread together messages. This method should return a threadable subject: two messages with the same simplifiedSubject will be considered to belong to the same thread. This string should not have `Re:' on the front, and may have been simplified in whatever other ways seem appropriate.

This is a String of Unicode characters, and should have had any encodings (such as RFC 2047 charset encodings) removed first.

If you aren't interested in threading by subject at all, return null.



subjectIsReply

   public abstract boolean subjectIsReply() 

Whether the original subject was one that appeared to be a reply (that is, had a `Re:' or some other indicator.) When threading by subject, this property is used to tell whether two messages appear to be siblings, or in a parent/child relationship.



setNext

   public abstract void setNext(Object next) 

When the proper thread order has been computed, these two methods will be called on each IThreadable in the chain, to set up the proper tree structure.



setChild

   public abstract void setChild(Object kid) 


makeDummy

   public abstract IThreadable makeDummy() 

Creates a dummy parent object.

With some set of messages, the only way to achieve proper threading is to introduce an element into the tree which represents messages which are not present in the set: for example, when two messages share a common ancestor, but that ancestor is not in the set. This method is used to make a placeholder for those sorts of ancestors. It should return an object which is also a IThreadable. The setNext() and setChild() methods will be used on this placeholder, as either the object or the argument, just as for other elements of the tree.



isDummy

   public abstract boolean isDummy() 

This should return true of dummy messages, false otherwise. It is legal to pass dummy messages in with the list returned by elements(); the isDummy() method is the mechanism by which they are noted and ignored.



All Packages  This Package  Class Hierarchy  Class Search  Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.4