Compoze Software, Inc.

com.compoze.exchange.webdav
Class Folder


java.lang.Object

  |

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

        |

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

All Implemented Interfaces:
java.lang.Cloneable, IItem, java.io.Serializable
Direct Known Subclasses:
CalendarFolder, ContactFolder, JournalFolder, Mailbox, MailFolder, NoteFolder, TaskFolder

public class Folder
extends AbstractItem
implements java.io.Serializable, java.lang.Cloneable

This class extends AbstractItem to represent an item that is a folder in the Exchange Store.

The following table contains the properties defined in the Exchange store schema and mappings to their corresponding Java enumeration and methods:

Exchange Store Property Property Enumeration Java Methods
DAV:childcount DavProperty.CHILD_COUNT getSize()
DAV:visiblecount DavProperty.VISIBLE_COUNT getMessageCount()
http://schemas.microsoft.com/exchange/outlookfolderclass ExchangeProperty.OUTLOOK_FOLDER_CLASS getType()
AbstractItem.setType(IOutlookType)
urn:schemas:httpmail:unreadcount HttpMailProperty.UNREAD_COUNT getUnreadMessageCount()

See Also:
Serialized Form

Field Summary
protected  Folders m_folders
           
protected  int m_iRelDepth
           
protected  Messages m_messages
           
 
Constructor Summary
  Folder(java.lang.String sName)
          Constructor.
  Folder(java.lang.String sName, OutlookFolderType type)
          Constructor.
protected Folder(java.lang.String sName, OutlookFolderType outlookFolderClass, ContentClass contentClass)
          Constructor.
  Folder(java.lang.String sName, java.lang.String sType)
          Constructor.
protected Folder(java.lang.String sName, java.lang.String sOutlookFolderClass, java.lang.String sContentClass)
          Constructor.
 
Method Summary
 void addItem(IItem item)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverAddItem(IItem)
 void addItem(IItem item, boolean bServerRefresh)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverAddItem(IItem, boolean)
 java.lang.Object clone()
          Creates and returns a copy of this object.
protected  java.lang.String createFilename(int iIndex)
          Creates the filename for this folder.
 void deleteItem(IItem item)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverDeleteItem(IItem)
 void deleteItem(UniqueID id)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverDeleteItem(UniqueID)
 boolean equals(java.lang.Object o, java.util.Locale locale)
          Indicates whether some other Folder object is "equal to" this one.
static java.util.List getDefaultProperties()
          Gets a list of default properties pertaining to a folder.
 Folder getFolder(java.lang.String sFolderPath)
          Gets a specified folder under this folder.
 Folder getFolder(java.lang.String sFolderPath, boolean bCreate)
          Gets a specified folder under this folder.
 Folders getFolders()
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetFolders(List, SortOrder, RowRange)
 Folders getFolders(FolderFilter filter)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetFolders(List, FolderFilter, SortOrder, RowRange)
 Folders getFolders(FolderFilter filter, int iDepth)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetFolders(List, int, FolderFilter, SortOrder, RowRange)
 Folders getFolders(FolderFilter filter, SortOrder sortOrder)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetFolders(List, FolderFilter, SortOrder, RowRange)
 Folders getFolders(FolderFilter filter, SortOrder sortOrder, int iDepth)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetFolders(List, int, FolderFilter, SortOrder, RowRange)
 Folders getFolders(int iDepth)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetFolders(List, int, FolderFilter, SortOrder, RowRange)
 Folders getFolders(java.util.List props)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetFolders(List, SortOrder, RowRange)
 Folders getFolders(java.util.List props, FolderFilter filter)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetFolders(List, FolderFilter, SortOrder, RowRange)
 Folders getFolders(java.util.List props, FolderFilter filter, int iDepth)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetFolders(List, int, FolderFilter, SortOrder, RowRange)
 Folders getFolders(java.util.List props, FolderFilter filter, SortOrder sortOrder)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetFolders(List, FolderFilter, SortOrder, RowRange)
 Folders getFolders(java.util.List props, FolderFilter filter, SortOrder sortOrder, int iDepth)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetFolders(List, int, FolderFilter, SortOrder, RowRange)
 Folders getFolders(java.util.List properties, FolderFilter filter, SortOrder order, RowRange range)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetFolders(List, FolderFilter, SortOrder, RowRange)
 Folders getFolders(java.util.List props, FolderFilter filter, SortOrder sortOrder, RowRange range, int iDepth)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetFolders(List, int, FolderFilter, SortOrder, RowRange)
 Folders getFolders(java.util.List props, int iDepth)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetFolders(List, int, FolderFilter, SortOrder, RowRange)
 Folders getFolders(java.util.List properties, int iScope, FolderFilter filter, SortOrder order, RowRange range)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetFolders(List, int, FolderFilter, SortOrder, RowRange)
 Folders getFolders(java.util.List props, SortOrder sortOrder)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetFolders(List, SortOrder, RowRange)
 Folders getFolders(java.util.List props, SortOrder sortOrder, int iDepth)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetFolders(List, int, FolderFilter, SortOrder, RowRange)
 Folders getFolders(java.util.List properties, SortOrder order, RowRange range)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetFolders(List, SortOrder, RowRange)
 Folders getFolders(SortOrder sortOrder)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetFolders(List, SortOrder, RowRange)
 Folders getFolders(SortOrder sortOrder, int iDepth)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetFolders(List, int, FolderFilter, SortOrder, RowRange)
 Items getItems()
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetMessages(List, int, AbstractMessageFilter, SortOrder, RowRange)
 Items getItems(AbstractMessageFilter filter)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetMessages(List, int, AbstractMessageFilter, SortOrder, RowRange)
 Items getItems(AbstractMessageFilter filter, int iDepth)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetMessages(List, int, AbstractMessageFilter, SortOrder, RowRange)
 Items getItems(AbstractMessageFilter filter, SortOrder sortOrder)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetMessages(List, int, AbstractMessageFilter, SortOrder, RowRange)
 Items getItems(AbstractMessageFilter filter, SortOrder sortOrder, int iDepth)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetMessages(List, int, AbstractMessageFilter, SortOrder, RowRange)
 Items getItems(int iDepth)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetMessages(List, int, AbstractMessageFilter, SortOrder, RowRange)
 Items getItems(java.util.List props)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetMessages(List, int, AbstractMessageFilter, SortOrder, RowRange)
 Items getItems(java.util.List props, AbstractMessageFilter filter)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetMessages(List, int, AbstractMessageFilter, SortOrder, RowRange)
 Items getItems(java.util.List props, AbstractMessageFilter filter, int iDepth)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetMessages(List, int, AbstractMessageFilter, SortOrder, RowRange)
 Items getItems(java.util.List props, AbstractMessageFilter filter, SortOrder sortOrder)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetMessages(List, int, AbstractMessageFilter, SortOrder, RowRange)
 Items getItems(java.util.List props, AbstractMessageFilter filter, SortOrder sortOrder, int iDepth)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetMessages(List, int, AbstractMessageFilter, SortOrder, RowRange)
 Items getItems(java.util.List props, AbstractMessageFilter filter, SortOrder sortOrder, RowRange range)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetMessages(List, int, AbstractMessageFilter, SortOrder, RowRange)
 Items getItems(java.util.List props, AbstractMessageFilter filter, SortOrder sortOrder, RowRange range, int iDepth)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetMessages(List, int, AbstractMessageFilter, SortOrder, RowRange)
 Items getItems(java.util.List props, int iDepth)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetMessages(List, int, AbstractMessageFilter, SortOrder, RowRange)
 Items getItems(java.util.List props, SortOrder sortOrder)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetMessages(List, int, AbstractMessageFilter, SortOrder, RowRange)
 Items getItems(java.util.List props, SortOrder sortOrder, int iDepth)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetMessages(List, int, AbstractMessageFilter, SortOrder, RowRange)
 Items getItems(SortOrder sortOrder)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetMessages(List, int, AbstractMessageFilter, SortOrder, RowRange)
 Items getItems(SortOrder sortOrder, int iDepth)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetMessages(List, int, AbstractMessageFilter, SortOrder, RowRange)
 Folders getLocalFolders()
          Gets a collection of sub-folders for this folder.
 Items getLocalItems()
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with getLocalMessages()
 Messages getLocalMessages()
          Gets a collection of messages for this folder.
 int getMessageCount()
          Gets the number of messages in the folder.
static java.util.List getProperties()
          Gets a list of properties pertaining to a folder.
 int getRelativeDepth()
          Gets the depth of this folder relative to the query
 int getSize()
          Gets the total number of items under this folder, including subfolders.
 java.lang.String getType()
          Gets the type of this folder.
 long getUnreadCount()
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with getUnreadMessageCount()
 long getUnreadCount(boolean bQueryWebStore)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetUnreadMessageCount()
 int getUnreadMessageCount()
          Gets the number of unread messages in the folder.
 long getVisibleCount()
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with getMessageCount()
 long getVisibleCount(AbstractMessageFilter filter)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetMessageCount(AbstractMessageFilter)
 long getVisibleCount(AbstractMessageFilter filter, int iScope)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetMessageCount(AbstractMessageFilter, int)
 long getVisibleCount(boolean bQueryWebStore)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetMessageCount(AbstractMessageFilter)
 boolean hasSubFolders()
          Returns whether this folder has visible child folders
 boolean isDeletedItemsFolder()
          Gets whether this folder is the user's "Deleted Items" folder.
 boolean isDraftsFolder()
          Gets whether this folder is the user's "Drafts" folder.
 boolean isInboxFolder()
          Gets whether this folder is the user's "Inbox" folder.
 boolean isOutboxFolder()
          Gets whether this folder is the user's "Outbox" folder.
 boolean isSentItemsFolder()
          Gets whether this folder is the user's "Sent Items" folder.
 void rename(java.lang.String sName)
          Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverRename(String)
 void serverAddItem(IItem item)
          Requests the server to add an item to this folder.
 void serverAddItem(IItem item, boolean bServerRefresh)
          Requests the server to add an item to this folder.
 void serverDelete()
          Requests the server to delete the folder (the folder is removed permanently).
 void serverDeleteItem(IItem item)
          Requests the server to delete an item from this folder.
 void serverDeleteItem(UniqueID id)
          Requests the server to delete an item from this folder.
 Folders serverGetFolders(java.util.List properties, FolderFilter filter, SortOrder order, RowRange range)
          Queries the server for a list of folders.
 Folders serverGetFolders(java.util.List properties, int iScope, FolderFilter filter, SortOrder order, RowRange range)
          Queries the server for a list of folders.
 Folders serverGetFolders(java.util.List properties, int iScope, FolderFilter filter, SortOrder order, RowRange range, java.lang.String[] asExpandIDs)
          Queries the server for a list of folders.
 Folders serverGetFolders(java.util.List properties, SortOrder order, RowRange range)
          Queries the server for a list of folders.
 int serverGetMessageCount(AbstractMessageFilter filter)
          Queries the server for the number of messages in the folder.
 int serverGetMessageCount(AbstractMessageFilter filter, int iScope)
          Queries the server for the number of messages in the folder.
 Messages serverGetMessages(java.util.List properties, AbstractMessageFilter filter, SortOrder order, RowRange range)
          Queries the server for a list of messages (contacts, appointments, task, journal entries, or mail messages, etc).
 Messages serverGetMessages(java.util.List properties, int iScope, AbstractMessageFilter filter, SortOrder order, RowRange range)
          Queries the server for a list of messages (contacts, appointments, task, journal entries, or mail messages, etc).
 Messages serverGetMessages(java.util.List properties, SortOrder order, RowRange range)
          Queries the server for a list of messages (contacts, appointments, task, journal entries, or mail messages, etc).
 int serverGetUnreadMessageCount()
          Queries the server for the number of unread messages in the folder.
 void serverRename(java.lang.String sName)
          Requests the server to rename this folder.
 void serverUpdate(boolean bServerRefresh)
          Requests the server to update the folder of any changed properties.
protected  void setRelativeDepth(Folders folders, java.lang.String sParentPath)
          Calculates the relative depth for each folder in a list of folders
 void setType(java.lang.String sType)
          Sets the type of this folder.
 java.lang.String toString()
          Returns a string representation of the object.
 
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
 

Field Detail

m_iRelDepth


protected int m_iRelDepth

m_folders


protected Folders m_folders

m_messages


protected Messages m_messages
Constructor Detail

Folder


public Folder(java.lang.String sName)
Constructor.
Parameters:
sName - the name of the folder (may not be null or empty).

Folder


public Folder(java.lang.String sName,
              OutlookFolderType type)
Constructor.
Parameters:
sName - the name of the folder (may not be null or empty).
type - the type of folder.

Folder


public Folder(java.lang.String sName,
              java.lang.String sType)
Constructor.
Parameters:
sName - the name of the folder (may not be null or empty).
sType - the type of the folder.

Folder


protected Folder(java.lang.String sName,
                 OutlookFolderType outlookFolderClass,
                 ContentClass contentClass)
Constructor.
Parameters:
sName - the name of the folder (may not be null or empty).
outlookFolderClass - the type of the folder.
contentClass - the content class of the folder (may not be null or empty).

Folder


protected Folder(java.lang.String sName,
                 java.lang.String sOutlookFolderClass,
                 java.lang.String sContentClass)
Constructor.
Parameters:
sName - the name of the folder (may not be null or empty).
sOutlookFolderClass - the type of the folder.
sContentClass - the content class of the folder (may not be null or empty).
Method Detail

isInboxFolder


public boolean isInboxFolder()
                      throws ExchangeException
Gets whether this folder is the user's "Inbox" folder.
Returns:
true if folder is "Inbox" folder; false otherwise
Throws:
ExchangeException - if a problem occurred while connecting to or interaction with Exchange Server.

isOutboxFolder


public boolean isOutboxFolder()
                       throws ExchangeException
Gets whether this folder is the user's "Outbox" folder.
Returns:
true if folder is "Outbox" folder; false otherwise
Throws:
ExchangeException - if a problem occurred while connecting to or interaction with Exchange Server.

isDeletedItemsFolder


public boolean isDeletedItemsFolder()
                             throws ExchangeException
Gets whether this folder is the user's "Deleted Items" folder.
Returns:
true if folder is "Deleted Items" folder; false otherwise
Throws:
ExchangeException - if a problem occurred while connecting to or interaction with Exchange Server.

isDraftsFolder


public boolean isDraftsFolder()
                       throws ExchangeException
Gets whether this folder is the user's "Drafts" folder.
Returns:
true if folder is "Drafts" folder; false otherwise
Throws:
ExchangeException - if a problem occurred while connecting to or interaction with Exchange Server.

isSentItemsFolder


public boolean isSentItemsFolder()
                          throws ExchangeException
Gets whether this folder is the user's "Sent Items" folder.
Returns:
true if folder is "Sent Items" folder; false otherwise
Throws:
ExchangeException - if a problem occurred while connecting to or interaction with Exchange Server.

getVisibleCount


public long getVisibleCount()
                     throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with getMessageCount()

Gets the number of visible items in this folder, not including subfolders. Calling this method will not make a query to Exchange web store.
Returns:
the number of visible items
Throws:
ExchangeException - if a problem occurred while connecting to or interaction with Exchange Server
ExchangeRuntimeException - if this object has been released and can no longer be used
See Also:
DavProperty.VISIBLE_COUNT

getVisibleCount


public long getVisibleCount(boolean bQueryWebStore)
                     throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetMessageCount(AbstractMessageFilter)

Gets the number of visible items in this folder, not including subfolders. The Exchange web store is queried for the visible count if bQueryWebStore is set true.
Parameters:
bQueryWebStore - true queries the Exchage store for the visible count
Returns:
the number of visible items
Throws:
ExchangeException - if a problem occurred while connecting to or interaction with Exchange Server
ExchangeRuntimeException - if this object has been released and can no longer be used
See Also:
DavProperty.VISIBLE_COUNT

getVisibleCount


public long getVisibleCount(AbstractMessageFilter filter)
                     throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetMessageCount(AbstractMessageFilter)

Gets the count of visible items (contacts, appointments, etc) that meet the filter's criteria. This does not include hidden items. If the specified filter is null, a count of all visible items within this folder is returned.

To get just the message count (not including subfolders) within this folder, ensure setIsFolder condition is set (false) on the specified filter. If the specified filter is null, a default filter is used with the setIsFolder condition is set to false.

Parameters:
filter - the conditions to filter by or null.
Returns:
the count of visible items.
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
See Also:
DavProperty.VISIBLE_COUNT

getVisibleCount


public long getVisibleCount(AbstractMessageFilter filter,
                            int iScope)
                     throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetMessageCount(AbstractMessageFilter, int)

Gets the count of visible items (contacts, appointments, etc) that meet the filter's criteria. This does not include hidden items. If the specified filter is null, a count of all visible items within this folder is returned. If the specified scope is deep traversal, a count of visible items from this folder and all subfolders is returned.

To get just the message count (not including subfolders) within this folder, ensure setIsFolder condition is set (false) on the specified filter. If the specified filter is null, a default filter is used with the setIsFolder condition is set to false.

Parameters:
filter - the conditions to filter by or null.
iScope - the scope of the search to conduct.
Returns:
the count of visible items.
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
See Also:
DavProperty.VISIBLE_COUNT, IScope

getMessageCount


public int getMessageCount()
                    throws ExchangeException
Gets the number of messages in the folder.
Returns:
the number of messages in the folder
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used
See Also:
DavProperty.VISIBLE_COUNT

serverGetMessageCount


public int serverGetMessageCount(AbstractMessageFilter filter)
                          throws ExchangeException
Queries the server for the number of messages in the folder.
Parameters:
filter - the conditions to filter by or null
Returns:
the number of messages in the folder
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
See Also:
DavProperty.VISIBLE_COUNT

serverGetMessageCount


public int serverGetMessageCount(AbstractMessageFilter filter,
                                 int iScope)
                          throws ExchangeException
Queries the server for the number of messages in the folder.
Parameters:
filter - the conditions to filter by or null
iScope - the scope of the search to conduct
Returns:
the number of messages in the folder
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
See Also:
DavProperty.VISIBLE_COUNT, IScope

getUnreadCount


public long getUnreadCount()
                    throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with getUnreadMessageCount()

Gets the number of unread messages in the folder.
Calling this methods will not query the Exchange store.
Returns:
the number of unread messages in the folder
See Also:
HttpMailProperty.UNREAD_COUNT

getUnreadCount


public long getUnreadCount(boolean bQueryWebStore)
                    throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetUnreadMessageCount()

Gets the number of unread messages in the folder.
Parameters:
bQueryWebStore - true queries the Exchage store for the visible count
Returns:
the number of unread messages in the folder
See Also:
HttpMailProperty.UNREAD_COUNT

getUnreadMessageCount


public int getUnreadMessageCount()
Gets the number of unread messages in the folder.
Returns:
the number of unread messages in the folder
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used
See Also:
HttpMailProperty.UNREAD_COUNT

serverGetUnreadMessageCount


public int serverGetUnreadMessageCount()
                                throws ExchangeException
Queries the server for the number of unread messages in the folder.
Returns:
the number of unread messages in the folder
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
See Also:
HttpMailProperty.UNREAD_COUNT

getSize


public int getSize()
Gets the total number of items under this folder, including subfolders. This property requires a deep traversal (IScope.DEEP) performed on this folder in order to get the correct result (use one of the getFolders() helper methods that requires specifying a scope).
Overrides:
getSize in class AbstractItem
Returns:
the number of items under this folder
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used
See Also:
DavProperty.CHILD_COUNT

getType


public java.lang.String getType()
Gets the type of this folder. See OutlookFolderType for a partial list of folder types.
Overrides:
getType in class AbstractItem
Returns:
the type of the folder.
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used.
See Also:
ExchangeProperty.OUTLOOK_FOLDER_CLASS

setType


public void setType(java.lang.String sType)
Sets the type of this folder. See OutlookFolderType for a partial list of folder types.
Overrides:
setType in class AbstractItem
Parameters:
stype - the type of the folder.
Throws:
ExchangeRuntimeException - if this object has been released and can no longer be used.
See Also:
ExchangeProperty.OUTLOOK_FOLDER_CLASS

getFolder


public Folder getFolder(java.lang.String sFolderPath)
                 throws ExchangeException
Gets a specified folder under this folder.

The path specified should be relative to this folder. For example, if a user is in the Inbox folder and wants the folder containing support email under Inbox (call it Support), that is found under another folder (call it Compoze), one would use the following path Compoze/Support. By default, this will not create folders if they don't exist.

Parameters:
sFolderPath - the path to the folder (may not be null or empty)
Returns:
the folder specified by the path or null if not found
Throws:
ExchangeException - if a problem occurred while connecting to or interaction with Exchange Server

getFolder


public Folder getFolder(java.lang.String sFolderPath,
                        boolean bCreate)
                 throws ExchangeException
Gets a specified folder under this folder.

The path specified should be relative to this folder. For example, if a user is in the Inbox folder and wants the folder containing support email under Inbox (call it Support), that is found under another folder (call it Compoze), one would use the following path Compoze/Support.

Parameters:
sFolderPath - the path to the folder (may not be null or empty)
bCreate - create folder if it does not exist
Returns:
the folder specified by the path or null if not found
Throws:
ExchangeException - if a problem occurred while connecting to or interaction with Exchange Server

getLocalFolders


public Folders getLocalFolders()
Gets a collection of sub-folders for this folder.
Use this method to retrieve folders stored locally in memory. This method will return a collection of folders stored in memory as a result of calling one of the other getFolders() methods first.
Returns:
a collection of sub-folders

getLocalItems


public Items getLocalItems()
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with getLocalMessages()

Gets a collection of items for this folder.
Use this method to retrieve items stored locally in memory. This method will return a collection of items stored in memory as a result of calling one of the other getItems() methods first.
Returns:
a collection of items.

getLocalMessages


public Messages getLocalMessages()
Gets a collection of messages for this folder.
Use this method to retrieve messages stored locally in memory. This method will return a collection of messages stored in memory as a result of calling one of the other serverGetMessages() methods first.
Returns:
a collection of items.

serverGetFolders


public Folders serverGetFolders(java.util.List properties,
                                SortOrder order,
                                RowRange range)
                         throws ExchangeException
Queries the server for a list of folders.
Parameters:
properties - list of AbstractProperty objects representing Exchange WebDAV properties to query from the Exchange store (must not be null)
order - the order to sort by
range - the range of rows to return
Returns:
a list of Folder 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

serverGetFolders


public Folders serverGetFolders(java.util.List properties,
                                FolderFilter filter,
                                SortOrder order,
                                RowRange range)
                         throws ExchangeException
Queries the server for a list of folders.
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 Folder 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

serverGetFolders


public Folders serverGetFolders(java.util.List properties,
                                int iScope,
                                FolderFilter filter,
                                SortOrder order,
                                RowRange range)
                         throws ExchangeException
Queries the server for a list of folders.

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 Folder 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

serverGetFolders


public Folders serverGetFolders(java.util.List properties,
                                int iScope,
                                FolderFilter filter,
                                SortOrder order,
                                RowRange range,
                                java.lang.String[] asExpandIDs)
                         throws ExchangeException
Queries the server for a list of folders.

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
list - of IDs to expand on, null expands none
Returns:
a list of Folder 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,
                                  SortOrder order,
                                  RowRange range)
                           throws ExchangeException
Queries the server for a list of messages (contacts, appointments, task, journal entries, or mail messages, etc).
Parameters:
properties - list of AbstractProperty objects representing Exchange WebDAV properties to query from the Exchange store (must not be null)
order - the order to sort by
range - the range of rows to return
Returns:
a list of AbstractMessage 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,
                                  AbstractMessageFilter filter,
                                  SortOrder order,
                                  RowRange range)
                           throws ExchangeException
Queries the server for a list of messages (contacts, appointments, task, journal entries, or mail messages, etc).
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 AbstractMessage 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,
                                  AbstractMessageFilter filter,
                                  SortOrder order,
                                  RowRange range)
                           throws ExchangeException
Queries the server for a list of messages (contacts, appointments, task, journal entries, or mail messages, etc).

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 AbstractMessage 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

getFolders


public Folders getFolders(java.util.List properties,
                          SortOrder order,
                          RowRange range)
                   throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetFolders(List, SortOrder, RowRange)

Queries the server for a list of folders.
Parameters:
properties - list of AbstractProperty objects representing Exchange WebDAV properties to query from the Exchange store (must not be null)
order - the order to sort by
range - the range of rows to return
Returns:
a list of Folder 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

getFolders


public Folders getFolders(java.util.List properties,
                          FolderFilter filter,
                          SortOrder order,
                          RowRange range)
                   throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetFolders(List, FolderFilter, SortOrder, RowRange)

Queries the server for a list of folders.
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 Folder 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

getFolders


public Folders getFolders(java.util.List properties,
                          int iScope,
                          FolderFilter filter,
                          SortOrder order,
                          RowRange range)
                   throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetFolders(List, int, FolderFilter, SortOrder, RowRange)

Queries the server for a list of folders.

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

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 folders
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

getFolders


public Folders getFolders()
                   throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetFolders(List, SortOrder, RowRange)

Queries the server for a list of folders.
Returns:
a list of Folder 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

getFolders


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

Queries the server for a list of folders.
Parameters:
props - a list of properties (see Folder to query for and return or null to return default properies.
Returns:
a list of Folder 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:
getDefaultProperties(), getProperties()

getFolders


public Folders getFolders(java.util.List props,
                          FolderFilter filter)
                   throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetFolders(List, FolderFilter, SortOrder, RowRange)

Queries the server for a list of folders.
Parameters:
props - a list of properties (see Folder to query for and return or null to return default properies.
filter - the conditions to filter by.
Returns:
a list of Folder 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:
getDefaultProperties(), getProperties()

getFolders


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

Queries the server for a list of folders.
Parameters:
props - a list of properties (see Folder to query for and return or null to return default properies.
sortOrder - the order to sort by.
Returns:
a list of Folder 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:
getDefaultProperties(), getProperties()

getFolders


public Folders getFolders(SortOrder sortOrder)
                   throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetFolders(List, SortOrder, RowRange)

Queries the server for a list of folders.
Parameters:
sortOrder - the order to sort by.
Returns:
a list of Folder 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

getFolders


public Folders getFolders(FolderFilter filter)
                   throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetFolders(List, FolderFilter, SortOrder, RowRange)

Queries the server for a list of folders.
Parameters:
filter - the conditions to filter by.
Returns:
a list of Folder 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

getFolders


public Folders getFolders(FolderFilter filter,
                          SortOrder sortOrder)
                   throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetFolders(List, FolderFilter, SortOrder, RowRange)

Queries the server for a list of folders.
Parameters:
filter - the conditions to filter by.
sortOrder - the order to sort by.
Returns:
a list of Folder 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
See Also:
getDefaultProperties(), getProperties()

getFolders


public Folders getFolders(java.util.List props,
                          FolderFilter filter,
                          SortOrder sortOrder)
                   throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetFolders(List, FolderFilter, SortOrder, RowRange)

Queries the server for a list of folders.
Parameters:
props - a list of properties (see Folder to query for and return or null to return default properies.
filter - the conditions to filter by.
sortOrder - the order to sort by.
Returns:
a list of Folder 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:
getDefaultProperties(), getProperties()

getFolders


public Folders getFolders(int iDepth)
                   throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetFolders(List, int, FolderFilter, SortOrder, RowRange)

Queries the server for a list of folders.

Specifying a shallow depth (IScope.SHALLOW_TRAVERSAL), only returns folders within this folder, not any subfolders. Specifying a deep depth (IScope.DEEP), not only returns folders within this folder, but also all subsequent subfolders.

Parameters:
iDepth - the depth (see IScope) of the search to conduct.
Returns:
a list of Folder 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:
getDefaultProperties(), getProperties()

getFolders


public Folders getFolders(java.util.List props,
                          int iDepth)
                   throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetFolders(List, int, FolderFilter, SortOrder, RowRange)

Queries the server for a list of folders.

Specifying a shallow depth (IScope.SHALLOW_TRAVERSAL), only returns folders within this folder, not any subfolders. Specifying a deep depth (IScope.DEEP), not only returns folders within this folder, but also all subsequent subfolders.

Parameters:
props - a list of properties (see Folder to query for and return or null to return default properies.
iDepth - the depth (see IScope) of the search to conduct.
Returns:
a list of Folder 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:
getDefaultProperties(), getProperties()

getFolders


public Folders getFolders(java.util.List props,
                          FolderFilter filter,
                          int iDepth)
                   throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetFolders(List, int, FolderFilter, SortOrder, RowRange)

Queries the server for a list of folders.

Specifying a shallow depth (IScope.SHALLOW_TRAVERSAL), only returns folders within this folder, not any subfolders. Specifying a deep depth (IScope.DEEP), not only returns folders within this folder, but also all subsequent subfolders.

Parameters:
props - a list of properties (see Folder to query for and return or null to return default properies.
filter - the conditions to filter by.
iDepth - the depth (see IScope) of the search to conduct.
Returns:
a list of Folder 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:
getDefaultProperties(), getProperties()

getFolders


public Folders getFolders(java.util.List props,
                          SortOrder sortOrder,
                          int iDepth)
                   throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetFolders(List, int, FolderFilter, SortOrder, RowRange)

Queries the server for a list of folders.

Specifying a shallow depth (IScope.SHALLOW_TRAVERSAL), only returns folders within this folder, not any subfolders. Specifying a deep depth (IScope.DEEP), not only returns folders within this folder, but also all subsequent subfolders.

Parameters:
props - a list of properties (see Folder to query for and return or null to return default properies.
sortOrder - the order to sort by.
iDepth - the depth (see IScope) of the search to conduct.
Returns:
a list of Folder 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:
getDefaultProperties(), getProperties()

getFolders


public Folders getFolders(SortOrder sortOrder,
                          int iDepth)
                   throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetFolders(List, int, FolderFilter, SortOrder, RowRange)

Queries the server for a list of folders.

Specifying a shallow depth (IScope.SHALLOW_TRAVERSAL), only returns folders within this folder, not any subfolders. Specifying a deep depth (IScope.DEEP), not only returns folders within this folder, but also all subsequent subfolders.

Parameters:
sortOrder - the order to sort by.
iDepth - the depth (see IScope) of the search to conduct.
Returns:
a list of Folder 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

getFolders


public Folders getFolders(FolderFilter filter,
                          int iDepth)
                   throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetFolders(List, int, FolderFilter, SortOrder, RowRange)

Queries the server for a list of folders.

Specifying a shallow depth (IScope.SHALLOW_TRAVERSAL), only returns folders within this folder, not any subfolders. Specifying a deep depth (IScope.DEEP), not only returns folders within this folder, but also all subsequent subfolders.

Parameters:
filter - the conditions to filter by.
iDepth - the depth (see IScope) of the search to conduct.
Returns:
a list of Folder 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

getFolders


public Folders getFolders(FolderFilter filter,
                          SortOrder sortOrder,
                          int iDepth)
                   throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetFolders(List, int, FolderFilter, SortOrder, RowRange)

Queries the server for a list of folders.

Specifying a shallow depth (IScope.SHALLOW_TRAVERSAL), only returns folders within this folder, not any subfolders. Specifying a deep depth (IScope.DEEP), not only returns folders within this folder, but also all subsequent subfolders.

Parameters:
filter - the conditions to filter by.
sortOrder - the order to sort by.
iDepth - the depth (see IScope) of the search to conduct.
Returns:
a list of Folder 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

getFolders


public Folders getFolders(java.util.List props,
                          FolderFilter filter,
                          SortOrder sortOrder,
                          int iDepth)
                   throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetFolders(List, int, FolderFilter, SortOrder, RowRange)

Queries the server for a list of folders.

Specifying a shallow depth (IScope.SHALLOW_TRAVERSAL), only returns folders within this folder, not any subfolders. Specifying a deep depth (IScope.DEEP), not only returns folders within this folder, but also all subsequent subfolders.

Parameters:
props - a list of properties (see Folder to query for and return or null to return default properies.
filter - the conditions to filter by.
sortOrder - the order to sort by.
iDepth - the depth (see IScope) of the search to conduct.
Returns:
a list of Folder 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:
getDefaultProperties(), getProperties()

getFolders


public Folders getFolders(java.util.List props,
                          FolderFilter filter,
                          SortOrder sortOrder,
                          RowRange range,
                          int iDepth)
                   throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetFolders(List, int, FolderFilter, SortOrder, RowRange)

Queries the server for a list of folders.

Specifying a shallow depth (IScope.SHALLOW_TRAVERSAL), only returns folders within this folder, not any subfolders. Specifying a deep depth (IScope.DEEP), not only returns folders within this folder, but also all subsequent subfolders.

Parameters:
props - a list of properties (see Folder to query for and return or null to return default properies.
filter - the conditions to filter by.
sortOrder - the order to sort by.
range - the rows to return or null to return all rows.
iDepth - the depth (see IScope) of the search to conduct.
Returns:
a list of Folder 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:
getDefaultProperties(), getProperties()

getItems


public Items getItems()
               throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetMessages(List, int, AbstractMessageFilter, SortOrder, RowRange)

Gets a list of all items that are not folders for this folder, with the default properties returned and by default sorted by the name of the item.
Returns:
a list of AbstractMessage 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

getItems


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

Gets a list of all items that are not folders for this folder, with the specified properties returned and by default sorted by the name of the item.
Parameters:
props - a list of property objects to query for and return or null to return all properies
Returns:
a list of AbstractMessage 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

getItems


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

Gets a list of all items that are not folders for this folder, with the specified properties returned and sorted by the specified sort order.
Parameters:
props - a list of property objects to query for and return or null to return all properies
sortOrder - the order to sort by
Returns:
a list of AbstractMessage 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

getItems


public Items getItems(SortOrder sortOrder)
               throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetMessages(List, int, AbstractMessageFilter, SortOrder, RowRange)

Gets a list of all items that are not folders for this folder, with the default properties returned and sorted by the specified sort order.
Parameters:
sortOrder - the order to sort by
Returns:
a list of AbstractMessage 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

getItems


public Items getItems(int iDepth)
               throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetMessages(List, int, AbstractMessageFilter, SortOrder, RowRange)

Gets a list of all items that are not folders for this folder given a specified depth, with the default properties returned and by default sorted by the name of the item.

Specifying a shallow depth (IScope.SHALLOW_TRAVERSAL), only returns items within this folder. Specifying a deep depth (IScope.DEEP), not only returns items within this folder, but also all subsequent items.

Parameters:
iDepth - the depth of the search to conduct
Returns:
a list of AbstractMessage 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

getItems


public Items getItems(java.util.List props,
                      int iDepth)
               throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetMessages(List, int, AbstractMessageFilter, SortOrder, RowRange)

Gets a list of all items that are not folders for this folder given a specified depth, with the specified properties returned and by default sorted by the name of the item.

Specifying a shallow depth (IScope.SHALLOW_TRAVERSAL), only returns items within this folder. Specifying a deep depth (IScope.DEEP), not only returns items within this folder, but also all subsequent items.

Parameters:
props - a list of property objects to query for and return or null to return all properies
iDepth - the depth of the search to conduct
Returns:
a list of AbstractMessage 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

getItems


public Items getItems(java.util.List props,
                      SortOrder sortOrder,
                      int iDepth)
               throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetMessages(List, int, AbstractMessageFilter, SortOrder, RowRange)

Gets a list of all items that are not folders for this folder given a specified depth, with the specified properties returned and sorted by the specified sort order.

Specifying a shallow depth (IScope.SHALLOW_TRAVERSAL), only returns items within this folder. Specifying a deep depth (IScope.DEEP), not only returns items within this folder, but also all subsequent items.

Parameters:
props - a list of property objects to query for and return or null to return all properies
sortOrder - the order to sort by
iDepth - the depth of the search to conduct
Returns:
a list of AbstractMessage 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

getItems


public Items getItems(SortOrder sortOrder,
                      int iDepth)
               throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetMessages(List, int, AbstractMessageFilter, SortOrder, RowRange)

Gets a list of all items that are not folders for this folder given a specified depth, with the default properties returned and sorted by specified sort order.

Specifying a shallow depth (IScope.SHALLOW_TRAVERSAL), only returns items within this folder. Specifying a deep depth (IScope.DEEP), not only returns items within this folder, but also all subsequent items.

Parameters:
sortOrder - the order to sort by
iDepth - the depth of the search to conduct
Returns:
a list of AbstractMessage 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

getItems


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

Gets a list of messages (contacts, appointments, task, journal entries, or mail messages, etc) containing the specified properties that meet the filter's criteria.
Parameters:
props - a list of properties (see AbstractMessage or any known subclasses) to query for and return or null to return default properies.
filter - the conditions to filter by.
Returns:
a list of AbstractMessage 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

getItems


public Items getItems(AbstractMessageFilter filter)
               throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetMessages(List, int, AbstractMessageFilter, SortOrder, RowRange)

Gets a list of messages (contacts, appointments, task, journal entries, or mail messages, etc) that meet the filter's criteria.
Parameters:
filter - the conditions to filter by.
Returns:
a list of AbstractMessage 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

getItems


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

Gets a list of messages (contacts, appointments, task, journal entries, or mail messages, etc) that meet the filter's criteria in the specified order.
Parameters:
filter - the conditions to filter by.
sortOrder - the order to sort by.
Returns:
a list of AbstractMessage 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

getItems


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

Gets a list of messages (contacts, appointments, task, journal entries, or mail messages, etc) containing the specified propeties that meet the filter's criteria in the specified order.
Parameters:
props - a list of properties (see AbstractMessage or any known subclasses) to query for and return or null to return default properies.
filter - the conditions to filter by.
sortOrder - the order to sort by.
Returns:
a list of AbstractMessage 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

getItems


public Items getItems(java.util.List props,
                      AbstractMessageFilter filter,
                      SortOrder sortOrder,
                      RowRange range)
               throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetMessages(List, int, AbstractMessageFilter, SortOrder, RowRange)

Gets a list of messages (contacts, appointments, task, journal entries, or mail messages, etc) containing the specified propeties that meet the filter's criteria in the specified order.
Parameters:
props - a list of properties (see AbstractMessage or any known subclasses) to query for and return or null to return default properies.
filter - the conditions filter by.
sortOrder - the order to sort by.
range - the rows to return.
Returns:
a list of AbstractMessage 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

getItems


public Items getItems(java.util.List props,
                      AbstractMessageFilter filter,
                      int iDepth)
               throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetMessages(List, int, AbstractMessageFilter, SortOrder, RowRange)

Gets a list of messages (contacts, appointments, task, journal entries, or mail messages, etc) containing the specified propeties that meet the filter's criteria.

Specifying a shallow depth (IScope.SHALLOW_TRAVERSAL), only returns items within this folder. Specifying a deep depth (IScope.DEEP), not only returns items within this folder, but also all subsequent items.

Parameters:
props - a list of properties (see AbstractMessage or any known subclasses) to query for and return or null to return default properies.
filter - the conditions to filter by.
iDepth - the depth of the search to conduct.
Returns:
a list of AbstractMessage 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

getItems


public Items getItems(AbstractMessageFilter filter,
                      int iDepth)
               throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetMessages(List, int, AbstractMessageFilter, SortOrder, RowRange)

Gets a list of messages (contacts, appointments, task, journal entries, or mail messages, etc) that meet the filter's criteria.

Specifying a shallow depth (IScope.SHALLOW_TRAVERSAL), only returns items within this folder. Specifying a deep depth (IScope.DEEP), not only returns items within this folder, but also all subsequent items.

Parameters:
filter - the conditions to filter by.
iDepth - the depth of the search to conduct
Returns:
a list of AbstractMessage 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

getItems


public Items getItems(AbstractMessageFilter filter,
                      SortOrder sortOrder,
                      int iDepth)
               throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetMessages(List, int, AbstractMessageFilter, SortOrder, RowRange)

Gets a list of messages (contacts, appointments, task, journal entries, or mail messages, etc) that meet the filter's criteria in the specified order.

Specifying a shallow depth (IScope.SHALLOW_TRAVERSAL), only returns items within this folder. Specifying a deep depth (IScope.DEEP), not only returns items within this folder, but also all subsequent items.

Parameters:
filter - the conditions to filter by.
sortOrder - the order to sort by.
iDepth - the depth of the search to conduct.
Returns:
a list of AbstractMessage objects
Throws:
ExchangeException - if a problem occurred while connecting to or interaction with Exchange Server
ExchangeRuntimeException - if this object has been released and can no longer be used

getItems


public Items getItems(java.util.List props,
                      AbstractMessageFilter filter,
                      SortOrder sortOrder,
                      int iDepth)
               throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetMessages(List, int, AbstractMessageFilter, SortOrder, RowRange)

Gets a list of messages (contacts, appointments, task, journal entries, or mail messages, etc) containing the specified propeties that meet the filter's criteria in the specified order.

Specifying a shallow depth (IScope.SHALLOW_TRAVERSAL), only returns items within this folder. Specifying a deep depth (IScope.DEEP), not only returns items within this folder, but also all subsequent items.

Parameters:
props - a list of properties (see AbstractMessage or any known subclasses) to query for and return or null to return default properies.
filter - the conditions to filter by.
sortOrder - the order to sort by.
iDepth - the depth of the search to conduct.
Returns:
a list of AbstractMessage 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

getItems


public Items getItems(java.util.List props,
                      AbstractMessageFilter filter,
                      SortOrder sortOrder,
                      RowRange range,
                      int iDepth)
               throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetMessages(List, int, AbstractMessageFilter, SortOrder, RowRange)

Gets a list of messages (contacts, appointments, task, journal entries, or mail messages, etc) containing the specified propeties that meet the filter's criteria in the specified order.

Specifying a shallow depth (IScope.SHALLOW_TRAVERSAL), only returns items within this folder. Specifying a deep depth (IScope.DEEP), not only returns items within this folder, but also all subsequent items.

Parameters:
props - a list of properties (see AbstractMessage or any known subclasses) to query for and return or null to return default properies.
filter - the conditions to filter by.
sortOrder - the order to sort by.
iDepth - the depth of the search to conduct.
Returns:
a list of AbstractMessage 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

addItem


public void addItem(IItem item)
             throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverAddItem(IItem)

Adds an item to this folder.

If an item already exists with the same name as the specified item, an ItemExistsException is thrown.

Parameters:
item - item to add
Throws:
ExchangeException - if a problem occurred while connecting to or interaction with Exchange Server .

serverAddItem


public void serverAddItem(IItem item)
                   throws ExchangeException
Requests the server to add an item to this folder.
Parameters:
item - the item to add
Throws:
ExchangeException - if a problem occurred while connecting to or interaction with Exchange Server
ExchangeRuntimeException - if this object has been released and can no longer be used
ItemExistsException - if an item already exists with the same name as the specified item

addItem


public void addItem(IItem item,
                    boolean bServerRefresh)
             throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverAddItem(IItem, boolean)

Adds an item to this folder.

Calling this method requesting a refresh (bServerRefresh = true) causes a lookup to the Exchange store to retrieve the most current properties (including those set by the Exchange store).

Parameters:
item - the item to add
bServerRefresh - true to request a refresh performed by the Exchange store; false otherwise
Throws:
ExchangeException - if a problem occurred while connecting to or interaction with Exchange Server
ItemExistsException - if an item already exists with the same name as the specified item

serverAddItem


public void serverAddItem(IItem item,
                          boolean bServerRefresh)
                   throws ExchangeException
Requests the server to add an item to this folder.
Parameters:
item - the item to add
bServerRefresh - true requests the server to refresh the properties
Throws:
ExchangeException - if a problem occurred while connecting to or interaction with Exchange Server
ExchangeRuntimeException - if this object has been released and can no longer be used
ItemExistsException - if an item already exists with the same name as the specified item

deleteItem


public void deleteItem(IItem item)
                throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverDeleteItem(IItem)

Deletes an item from this folder.
Parameters:
item - the item to delete.

serverDeleteItem


public void serverDeleteItem(IItem item)
                      throws ExchangeException
Requests the server to delete an item from this folder.
Parameters:
item - the item to delete.
Throws:
ExchangeException - if a problem occurred while connecting to or interaction with Exchange Server
ExchangeRuntimeException - if this object has been released and can no longer be used

deleteItem


public void deleteItem(UniqueID id)
                throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverDeleteItem(UniqueID)

Deletes an item from this folder.
Parameters:
id - the unique id of the item to delete.

serverDeleteItem


public void serverDeleteItem(UniqueID id)
                      throws ExchangeException
Requests the server to delete an item from this folder.
Parameters:
id - the unique id of the item to delete.
Throws:
ExchangeException - if a problem occurred while connecting to or interaction with Exchange Server
ExchangeRuntimeException - if this object has been released and can no longer be used

serverUpdate


public void serverUpdate(boolean bServerRefresh)
                  throws ExchangeException
Requests the server to update the folder of any changed properties.

If the folder does not exist in the Exchange store, it is created, else the existing folder is updated.

Overrides:
serverUpdate in class AbstractItem
Parameters:
bServerRefresh - true requests the server to refresh the properties
Throws:
ExchangeException - if a problem occurred while connecting to or interaction with Exchange Server
ExchangeRuntimeException - if this object has been released and can no longer be used

serverDelete


public void serverDelete()
                  throws ExchangeException
Requests the server to delete the folder (the folder is removed permanently).
Overrides:
serverDelete in class AbstractItem
Throws:
ExchangeException - if a problem occurred while connecting to or interaction with Exchange Server
ExchangeRuntimeException - if this object has been released and can no longer be used

serverRename


public void serverRename(java.lang.String sName)
                  throws ExchangeException
Requests the server to rename this folder.
Parameters:
sName - the name to rename to.
Throws:
ExchangeException - if a problem occurred while connecting to or interaction with Exchange Server
ExchangeRuntimeException - if this object has been released and can no longer be used

rename


public void rename(java.lang.String sName)
            throws ExchangeException
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverRename(String)

Renames this folder.
Parameters:
sName - the name to rename to.

clone


public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Creates and returns a copy of this object.
Overrides:
clone in class AbstractItem
Returns:
a clone of this instance.
Throws:
java.lang.CloneNotSupportedException - if the object's class does not support the Cloneable interface.

equals


public boolean equals(java.lang.Object o,
                      java.util.Locale locale)
Indicates whether some other Folder object is "equal to" this one.
Overrides:
equals in class AbstractItem
Parameters:
o - the object with which to compare.
locale - a locale for string comparisons.
Returns:
true if this object is the same as the object argument; false otherwise.

toString


public java.lang.String toString()
Returns a string representation of the object.
Overrides:
toString in class AbstractItem
Returns:
the string representation of the object.

createFilename


protected java.lang.String createFilename(int iIndex)
Creates the filename for this folder.
Overrides:
createFilename in class AbstractItem
Parameters:
iIndex - the index to append
Returns:
the filename
See Also:
AbstractItem.createFilename(int)

getDefaultProperties


public static java.util.List getDefaultProperties()
Gets a list of default properties pertaining to a folder.
Following is the list of properties returned:
Returns:
a list (unmodifiable) of properties.
See Also:
AbstractItem.getDefaultProperties()

getProperties


public static java.util.List getProperties()
Gets a list of properties pertaining to a folder.
Returns:
a list (unmodifiable) of properties.
See Also:
AbstractItem.getProperties()

getRelativeDepth


public int getRelativeDepth()
Gets the depth of this folder relative to the query
Returns:
the relative depth

setRelativeDepth


protected void setRelativeDepth(Folders folders,
                                java.lang.String sParentPath)
Calculates the relative depth for each folder in a list of folders
Parameters:
folders - the folders to set the relative depth for
sParentPath - the full path of the parent

hasSubFolders


public boolean hasSubFolders()
                      throws ExchangeException
Returns whether this folder has visible child folders
Returns:
true if has child folders, false otherwise
Throws:
ExchangeException -  

Compoze Software, Inc.

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