|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FoldersCollection
A collection of Exchange folders.
The collection allows to get, iterate over and add new folders.
This class implements the Iterable interface allowing it to be a target of the foreach statement.
Method Summary | |
---|---|
ExchangeFolder |
add(FolderContentType folderType,
java.lang.String folderName)
Adds a new folder to this collection. |
ExchangeFolder |
get(java.lang.String folderPath)
Returns a folder from this collection for the specified name or path. |
FoldersIterator |
iterator()
Returns an iterator over the folders contained in this collection. |
Methods inherited from interface com.moyosoft.exchange.util.ExchangeCollection |
---|
getAt, getCount |
Method Detail |
---|
FoldersIterator iterator()
This method never returns null; an empty iterator is returned if this collection is empty.
iterator
in interface java.lang.Iterable<ExchangeFolder>
ExchangeFolder
ExchangeFolder get(java.lang.String folderPath) throws ExchangeServiceException
Example code:
Exchange exchange = new Exchange("hostname", "username", "password");
ExchangeFolder folder = exchange.getTopFolder().
getFolders().get("Contacts/My contacts subfolder");
ExchangeServiceException
- if any errors occur during the communication with Exchange.ExchangeFolder add(FolderContentType folderType, java.lang.String folderName) throws ExchangeServiceException
folderType
- the type of items the folder will contain.folderName
- the display name of the new folder.
ExchangeServiceException
- if any errors occur during the communication with Exchange.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |