Compoze Software, Inc.

com.compoze.exchange.webdav
Class Items


java.lang.Object

  |

  +--java.util.AbstractCollection

        |

        +--java.util.AbstractList

              |

              +--java.util.AbstractSequentialList

                    |

                    +--com.compoze.exchange.webdav.Items

All Implemented Interfaces:
java.util.Collection, java.util.List
Direct Known Subclasses:
Folders, Messages

public class Items
extends java.util.AbstractSequentialList

This class implements a collection of Exchange Store items (folders, mail messages, contacts, etc.).

The following properties should be included in request to query the Exchange store:

The following example shows how to walk through a collection of Exchange messages:

 Items   messages = folder.getMessages();
 Iterator iterator = messages.iterator();

 while (iterator.hasNext())
      {
      Message message = (Message) iterator.next();
      System.out.println(message);
      }
 


Inner Class Summary
 class Items.ItemListIterator
          An iterator for lists that allows the programmer to traverse the list in either direction and modify the list during iteration.
 
Field Summary
protected  Folder m_parentFolder
           
protected  Session m_session
           
protected  java.lang.String m_sSql
           
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
protected Items()
          Constructor.
 
Method Summary
 void add(int iIndex, java.lang.Object o)
           
 boolean add(java.lang.Object o)
          Adds message to this collection.
 void clear()
          Removes all messages from this collection.
 Items.ItemListIterator itemListIterator(int iIndex)
           
 java.util.ListIterator listIterator(int iIndex)
           
protected  void loadItems(java.util.Collection responses, int iDepth)
          Loads collection with items.
 int size()
          Returns the number of elements in the list.
 
Methods inherited from class java.util.AbstractSequentialList
addAll, get, iterator, remove, set
 
Methods inherited from class java.util.AbstractList
equals, hashCode, indexOf, lastIndexOf, listIterator, removeRange, subList
 
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray
 

Field Detail

m_parentFolder


protected Folder m_parentFolder

m_session


protected Session m_session

m_sSql


protected java.lang.String m_sSql
Constructor Detail

Items


protected Items()
Constructor.
Parameters:
parentFolder - the parent folder
session - the session associated with this collection of messages
Method Detail

size


public int size()
Returns the number of elements in the list.
Overrides:
size in class java.util.AbstractCollection
Returns:
the number of elements in this list

add


public boolean add(java.lang.Object o)
Adds message to this collection. This method will make a request to create the message within the Exchange Store.
Overrides:
add in class java.util.AbstractList
Parameters:
message - the message to insert into collection
Returns:
true if message is inserted into the collection; false otherwise
Throws:
ClassCastException - if the class of the specified element prevents it from being added to this collection
ExchangeRuntimeException - if a problem occurred while connecting to or interaction with Exchange Server

add


public void add(int iIndex,
                java.lang.Object o)
Overrides:
add in class java.util.AbstractSequentialList

clear


public void clear()
Removes all messages from this collection. By default, this method will make a request to the Exchange Store to remove all messages under this collection's parent folder.
Overrides:
clear in class java.util.AbstractList
Throws:
ExchangeRuntimeException - if a problem occurred while connecting to or interaction with Exchange Server

loadItems


protected void loadItems(java.util.Collection responses,
                         int iDepth)
                  throws ExchangeException
Loads collection with items.
Parameters:
sSQL - the SQL statement to query for items
Throws:
ExchangeException - if a problem occurred while connecting to or interaction with Exchange Server

listIterator


public java.util.ListIterator listIterator(int iIndex)
Overrides:
listIterator in class java.util.AbstractSequentialList

itemListIterator


public Items.ItemListIterator itemListIterator(int iIndex)

Compoze Software, Inc.

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