Compoze Software, Inc.

com.compoze.exchange.webdav
Class MailFolder


java.lang.Object

  |

  +--com.compoze.exchange.webdav.AbstractItem

        |

        +--com.compoze.exchange.webdav.Folder

              |

              +--com.compoze.exchange.webdav.MailFolder

All Implemented Interfaces:
java.lang.Cloneable, IItem, java.io.Serializable

public class MailFolder
extends Folder
implements java.io.Serializable

This class extends Folder to represent a folder that primarily contains mail message items. This class provides methods to retrieve collections of mail messages.

The following example gets those messages with the subject "Test message subject" and are sorted by the date received:

   //  Prepare a filter to find messages with subject of "Test message subject"
   MessageFilter filter = new MessageFilter();
   filter.setSubject("Test message subject", true);

   //  Sort Messages by date received
   SortOrder sortOrder = SortOrder.create(HttpMailProperty.DATE_RECEIVED, SortOrder.DESCENDING);

   //  Return first 10 rows
   RowRange range = RowRange.create(10);

   Messages messages = mailFolder.serverGetMessages(Message.getDefaultProperties(),
       filter, sortOrder, range);
 

See Also:
Serialized Form

Fields inherited from class com.compoze.exchange.webdav.Folder
m_folders, m_iRelDepth, m_messages
 
Constructor Summary
MailFolder(java.lang.String sName)
          Constructor.
 
Method Summary
 Messages getMessages()
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with Folder.serverGetMessages(List, SortOrder, RowRange)
 Messages getMessages(java.util.List props)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with Folder.serverGetMessages(List, SortOrder, RowRange)
 Messages getMessages(java.util.List props, MessageFilter filter)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetMessages(List, MessageFilter, SortOrder, RowRange)
 Messages getMessages(java.util.List props, MessageFilter filter, SortOrder sortOrder)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetMessages(List, MessageFilter, SortOrder, RowRange)
 Messages getMessages(java.util.List props, SortOrder sortOrder)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with Folder.serverGetMessages(List, SortOrder, RowRange)
 Messages getMessages(MessageFilter filter)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetMessages(List, MessageFilter, SortOrder, RowRange)
 Messages getMessages(MessageFilter filter, SortOrder sortOrder)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetMessages(List, MessageFilter, SortOrder, RowRange)
 Messages getMessages(SortOrder sortOrder)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with Folder.serverGetMessages(List, SortOrder, RowRange)
 Messages serverGetMessages(java.util.List properties, int iScope, MessageFilter filter, SortOrder order, RowRange range)
          Queries the server for a list of messages.
 Messages serverGetMessages(java.util.List properties, MessageFilter filter, SortOrder order, RowRange range)
          Queries the server for a list of messages.
 
Methods inherited from class com.compoze.exchange.webdav.Folder
addItem, addItem, clone, createFilename, deleteItem, deleteItem, equals, getDefaultProperties, getFolder, getFolder, getFolders, getFolders, getFolders, getFolders, getFolders, getFolders, getFolders, getFolders, getFolders, getFolders, getFolders, getFolders, getFolders, getFolders, getFolders, getFolders, getFolders, getFolders, getFolders, getFolders, getItems, getItems, getItems, getItems, getItems, getItems, getItems, getItems, getItems, getItems, getItems, getItems, getItems, getItems, getItems, getItems, getItems, getItems, getLocalFolders, getLocalItems, getLocalMessages, getMessageCount, getProperties, getRelativeDepth, getSize, getType, getUnreadCount, getUnreadCount, getUnreadMessageCount, getVisibleCount, getVisibleCount, getVisibleCount, getVisibleCount, hasSubFolders, isDeletedItemsFolder, isDraftsFolder, isInboxFolder, isOutboxFolder, isSentItemsFolder, rename, serverAddItem, serverAddItem, serverDelete, serverDeleteItem, serverDeleteItem, serverGetFolders, serverGetFolders, serverGetFolders, serverGetFolders, serverGetMessageCount, serverGetMessageCount, serverGetMessages, serverGetMessages, serverGetMessages, serverGetUnreadMessageCount, serverRename, serverUpdate, setRelativeDepth, setType, toString
 
Methods inherited from class com.compoze.exchange.webdav.AbstractItem
copy, copy, copy, createFilename, delete, equals, getComment, getContentClass, getCreationDate, getDateLastModified, getDisplayName, getFile, getHRef, getID, getParentFolder, getPermanentURL, getUID, isFolder, isHidden, isReadOnly, isRoot, move, move, move, serverCopyTo, serverCopyTo, serverCopyTo, serverCopyTo, serverGetParentFolder, serverMoveTo, serverMoveTo, serverMoveTo, serverMoveTo, serverUpdate, setComment, setContentClass, setContentClass, setHidden, setReadOnly, setReleased, setType, setUID, update, update, validate
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MailFolder


public MailFolder(java.lang.String sName)
Constructor.
Parameters:
sName - name of the folder
Method Detail

serverGetMessages


public Messages serverGetMessages(java.util.List properties,
                                  MessageFilter filter,
                                  SortOrder order,
                                  RowRange range)
                           throws ExchangeException
Queries the server for a list of messages.
Parameters:
properties - list of AbstractProperty objects representing Exchange WebDAV properties to query from the Exchange store (must not be null)
filter - the conditions to search by
order - the order to sort by
range - the range of rows to return
Returns:
a list of Message objects
Throws:
ExchangeException - if a problem occurred while interacting with the Exchange store
ExchangeRuntimeException - if this object has been released and can no longer be used
java.lang.IllegalArgumentException - if properties are not specified

serverGetMessages


public Messages serverGetMessages(java.util.List properties,
                                  int iScope,
                                  MessageFilter filter,
                                  SortOrder order,
                                  RowRange range)
                           throws ExchangeException
Queries the server for a list of messages.

If no sort order is provided (order == null), the following sort order is used:

DO NOT SORT BY HttpMailProperty.SUBJECT. This property is not searchable because its value is only calculated when used and not stored in the Exchange store. Use HttpMailProperty.NORMALIZED_SUBJECT or MailHeaderProperty.SUBJECT.

Parameters:
properties - list of AbstractProperty objects representing Exchange WebDAV properties to query from the Exchange store (must not be null)
iScope - the scope of the search
filter - the conditions to search by
order - the order to sort by
range - the range of rows to return
Returns:
a list of Message objects
Throws:
ExchangeException - if a problem occurred while interacting with the Exchange store
ExchangeRuntimeException - if this object has been released and can no longer be used
java.lang.IllegalArgumentException - if properties are not specified

getMessages


public Messages getMessages()
                     throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with Folder.serverGetMessages(List, SortOrder, RowRange)

Queries the server for a list of messages.
Returns:
a list of Message objects
Throws:
ExchangeException - if a problem occurred while interacting with the Exchange store
ExchangeRuntimeException - if this object has been released and can no longer be used
java.lang.IllegalArgumentException - if properties are not specified

getMessages


public Messages getMessages(java.util.List props)
                     throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with Folder.serverGetMessages(List, SortOrder, RowRange)

Queries the server for a list of messages.
Parameters:
props - list of properties (see Message and Meeting) to have returned from the query.
Returns:
a list of Message objects
Throws:
ExchangeException - if a problem occurred while interacting with the Exchange store
ExchangeRuntimeException - if this object has been released and can no longer be used
java.lang.IllegalArgumentException - if properties are not specified
See Also:
Message.getDefaultProperties(), Message.getProperties()

getMessages


public Messages getMessages(java.util.List props,
                            SortOrder sortOrder)
                     throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with Folder.serverGetMessages(List, SortOrder, RowRange)

Queries the server for a list of messages.
Parameters:
props - list of properties (see Message and Meeting) to have returned from the query.
sortOrder - the order to sort by.
Returns:
a list of Message objects
Throws:
ExchangeException - if a problem occurred while interacting with the Exchange store
ExchangeRuntimeException - if this object has been released and can no longer be used
java.lang.IllegalArgumentException - if properties are not specified
See Also:
Message.getDefaultProperties(), Message.getProperties()

getMessages


public Messages getMessages(java.util.List props,
                            MessageFilter filter)
                     throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetMessages(List, MessageFilter, SortOrder, RowRange)

Queries the server for a list of messages.
Parameters:
props - list of properties (see Message and Meeting) to have returned from the query.
filter - the filter to search by.
Returns:
a list of Message objects
Throws:
ExchangeException - if a problem occurred while interacting with the Exchange store
ExchangeRuntimeException - if this object has been released and can no longer be used
java.lang.IllegalArgumentException - if properties are not specified
See Also:
Message.getDefaultProperties(), Message.getProperties()

getMessages


public Messages getMessages(SortOrder sortOrder)
                     throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with Folder.serverGetMessages(List, SortOrder, RowRange)

Queries the server for a list of messages.
Parameters:
sortOrder - the order to sort by
Returns:
a list of Message objects
Throws:
ExchangeException - if a problem occurred while interacting with the Exchange store
ExchangeRuntimeException - if this object has been released and can no longer be used
java.lang.IllegalArgumentException - if properties are not specified

getMessages


public Messages getMessages(MessageFilter filter)
                     throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetMessages(List, MessageFilter, SortOrder, RowRange)

Queries the server for a list of messages.
Parameters:
filter - the filter to search by.
Returns:
a list of Message objects
Throws:
ExchangeException - if a problem occurred while interacting with the Exchange store
ExchangeRuntimeException - if this object has been released and can no longer be used
java.lang.IllegalArgumentException - if properties are not specified

getMessages


public Messages getMessages(MessageFilter filter,
                            SortOrder sortOrder)
                     throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetMessages(List, MessageFilter, SortOrder, RowRange)

Queries the server for a list of messages.
Parameters:
filter - the filter to search by.
sortOrder - the order to sort by.
Returns:
a list of Message objects
Throws:
ExchangeException - if a problem occurred while interacting with the Exchange store
ExchangeRuntimeException - if this object has been released and can no longer be used
java.lang.IllegalArgumentException - if properties are not specified

getMessages


public Messages getMessages(java.util.List props,
                            MessageFilter filter,
                            SortOrder sortOrder)
                     throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetMessages(List, MessageFilter, SortOrder, RowRange)

Queries the server for a list of messages.
Parameters:
props - list of properties (see Message and Meeting) to have returned from the query.
filter - the filter to search by.
sortOrder - the order to sort by.
Returns:
a list of Message objects
Throws:
ExchangeException - if a problem occurred while interacting with the Exchange store
ExchangeRuntimeException - if this object has been released and can no longer be used
java.lang.IllegalArgumentException - if properties are not specified
See Also:
Message.getDefaultProperties(), Message.getProperties()

Compoze Software, Inc.

Copyright ©1999-2003 Compoze Software, Inc. All rights reserved.