microsoft.exchange.webservices.data
Class FolderIdCollection

java.lang.Object
  extended by microsoft.exchange.webservices.data.ComplexProperty
      extended by microsoft.exchange.webservices.data.ComplexPropertyCollection<FolderId>
          extended by microsoft.exchange.webservices.data.FolderIdCollection
All Implemented Interfaces:
java.lang.Iterable<FolderId>

public final class FolderIdCollection
extends ComplexPropertyCollection<FolderId>

Represents a collection of folder Ids.


Constructor Summary
protected FolderIdCollection()
          Initializes a new instance of the class.
 
Method Summary
 void add(FolderId folderId)
          Adds a folder Id to the collection.
 FolderId add(WellKnownFolderName folderName)
          Adds a well-known folder to the collection.
 void clear()
          Clears the collection.
protected  FolderId createComplexProperty(java.lang.String xmlElementName)
          Creates the complex property.
protected  java.lang.String getCollectionItemXmlElementName(FolderId complexProperty)
          Gets the name of the collection item XML element.
 boolean remove(FolderId folderId)
          Removes the specified folder Id from the collection.
 boolean remove(WellKnownFolderName folderName)
          Removes the specified well-known folder from the collection.
 void removeAt(int index)
          Removes the folder Id at the specified index.
 
Methods inherited from class microsoft.exchange.webservices.data.ComplexPropertyCollection
clearChangeLog, complexPropertyChanged, contains, getAddedItems, getCount, getItems, getModifiedItems, getPropertyAtIndex, getRemovedItems, indexOf, internalAdd, internalClear, internalRemove, internalRemoveAt, itemChanged, iterator, loadFromXml, loadFromXml, removeFromChangeLog, shouldWriteToXml, updateFromXml, writeDeleteUpdateToXml, writeElementsToXml, writeSetUpdateToXml, writeToXml
 
Methods inherited from class microsoft.exchange.webservices.data.ComplexProperty
addOnChangeEvent, canSetFieldValue, changed, clearChangeEvents, func, getNamespace, internalValidate, readAttributesFromXml, readTextValueFromXml, removeChangeEvent, setNamespace, tryReadElementFromXml, tryReadElementFromXmlToPatch, updateFromXml, validate, writeAttributesToXml, writeToXml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FolderIdCollection

protected FolderIdCollection()
Initializes a new instance of the class.

Method Detail

createComplexProperty

protected FolderId createComplexProperty(java.lang.String xmlElementName)
Creates the complex property.

Specified by:
createComplexProperty in class ComplexPropertyCollection<FolderId>
Parameters:
xmlElementName - Name of the XML element.
Returns:
Complex property instance.

add

public void add(FolderId folderId)
         throws java.lang.Exception
Adds a folder Id to the collection.

Parameters:
folderId - The folder Id to add.
Throws:
java.lang.Exception - the exception

getCollectionItemXmlElementName

protected java.lang.String getCollectionItemXmlElementName(FolderId complexProperty)
Gets the name of the collection item XML element.

Specified by:
getCollectionItemXmlElementName in class ComplexPropertyCollection<FolderId>
Parameters:
complexProperty - accepts FolderId
Returns:
XML element name.

add

public FolderId add(WellKnownFolderName folderName)
Adds a well-known folder to the collection.

Parameters:
folderName - the folder name
Returns:
A FolderId encapsulating the specified Id.

clear

public void clear()
Clears the collection.


removeAt

public void removeAt(int index)
Removes the folder Id at the specified index.

Parameters:
index - The zero-based index of the folder Id to remove.

remove

public boolean remove(FolderId folderId)
               throws java.lang.Exception
Removes the specified folder Id from the collection.

Parameters:
folderId - The folder Id to remove from the collection.
Returns:
True if the folder id was successfully removed from the collection, false otherwise.
Throws:
java.lang.Exception - the exception

remove

public boolean remove(WellKnownFolderName folderName)
Removes the specified well-known folder from the collection.

Parameters:
folderName - The well-knwon folder to remove from the collection.
Returns:
True if the well-known folder was successfully removed from the collection, false otherwise.