org.apache.james.mailboxmanager.torque
Class MessageRowUtils

java.lang.Object
  extended by org.apache.james.mailboxmanager.torque.MessageRowUtils

public class MessageRowUtils
extends java.lang.Object


Field Summary
static byte[] BYTES_HEADER_FIELD_VALUE_SEP
           
static byte[] BYTES_NEW_LINE
           
 
Constructor Summary
MessageRowUtils()
           
 
Method Summary
static MessageResult.Content createBodyContent(MessageRow messageRow)
           
static MessageResult.Content createFullContent(MessageRow messageRow, java.util.List headers)
           
static java.util.List createHeaders(MessageRow messageRow)
           
static java.util.Comparator getUidComparator()
          Gets a comparator that evaluates MessageRow's on the basis of their UIDs.
static MessageResult loadMessageResult(MessageRow messageRow, MessageResult.FetchGroup fetchGroup)
           
static java.io.InputStream toInput(MessageRow row)
           
static MessageFlags[] toMessageFlags(java.util.Collection messageRows)
          Converts MessageRow to MessageFlags.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BYTES_NEW_LINE

public static final byte[] BYTES_NEW_LINE

BYTES_HEADER_FIELD_VALUE_SEP

public static final byte[] BYTES_HEADER_FIELD_VALUE_SEP
Constructor Detail

MessageRowUtils

public MessageRowUtils()
Method Detail

toMessageFlags

public static MessageFlags[] toMessageFlags(java.util.Collection messageRows)
                                     throws org.apache.torque.TorqueException
Converts MessageRow to MessageFlags.

Parameters:
messageRows - Collectio of MessageRow, not null
Returns:
MessageFlags, not null
Throws:
org.apache.torque.TorqueException

createHeaders

public static java.util.List createHeaders(MessageRow messageRow)
                                    throws org.apache.torque.TorqueException
Throws:
org.apache.torque.TorqueException

createBodyContent

public static MessageResult.Content createBodyContent(MessageRow messageRow)
                                               throws org.apache.torque.TorqueException
Throws:
org.apache.torque.TorqueException

createFullContent

public static MessageResult.Content createFullContent(MessageRow messageRow,
                                                      java.util.List headers)
                                               throws org.apache.torque.TorqueException
Throws:
org.apache.torque.TorqueException

loadMessageResult

public static MessageResult loadMessageResult(MessageRow messageRow,
                                              MessageResult.FetchGroup fetchGroup)
                                       throws org.apache.torque.TorqueException,
                                              MailboxManagerException
Throws:
org.apache.torque.TorqueException
MailboxManagerException

toInput

public static java.io.InputStream toInput(MessageRow row)
                                   throws org.apache.torque.TorqueException
Throws:
org.apache.torque.TorqueException

getUidComparator

public static java.util.Comparator getUidComparator()
Gets a comparator that evaluates MessageRow's on the basis of their UIDs.

Returns:
Comparator, not null


Copyright © 2002-2008 The Apache Software Foundation. All Rights Reserved.