|
Compoze Software, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.compoze.exchange.webdav.AbstractItem | +--com.compoze.exchange.webdav.Folder | +--com.compoze.exchange.webdav.ContactFolder
This class extends Folder
to represent a folder that primarily
contains contact items. This class provides access methods to retrieve
collections of contacts. Below is an example of how these methods
are used:
// Prepare a list of properties to return from the query LinkedList returnProps = new LinkedList(Contact.getDefaultProperties()); returnProps.add(ContactsProperty.EMAIL1); returnProps.add(ContactsProperty.BIRTHDAY); returnProps.add(ContactsProperty.WEDDING_ANNIVERSARY); // Prepare a filter with fields containing the name "John" set ContactFilter filter = new ContactFilter(); filter.setGivenName("Skip"); filter.setSurname("O'Grudnick); // Sort contacts by surname, given name, and then middle name in ascending order SortOrder sortOrder = SortOrder.create(ContactsProperty.SURNAME, SortOrder.ASCENDING); tOrder.setSortOrder(ContactsProperty.GIVEN_NAME, SortOrder.ASCENDING); sortOrder.setSortOrder(ContactsProperty.MIDDLE_NAME, SortOrder.ASCENDING); Contacts contacts = contactFolder.getContacts(returnProps, filter, sortOrder);
In the first section of the code we want to specify only the properties we want returned. To do this we
instantiate a list and add the properties. There is a set of default properties that are required to return.
The default properties are attained by either calling Contact.getProperties()
or
adding the properties individually.
In the next section of the code we want to query for contacts that match a criteria. To do this we instantiate a ContactFilter object. Within this filter rules are set and when the query is made, only those contacts that match the criteria are returned.
In the last section of the code we want the results sorted. To do this we instantiate a SortOrder object, and set the properties we want to sort by.
Fields inherited from class com.compoze.exchange.webdav.Folder |
m_folders, m_iRelDepth, m_messages |
Constructor Summary | |
ContactFolder(java.lang.String sName)
Constructor. |
Method Summary | |
Contacts |
getContacts()
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetContacts(List, SortOrder, RowRange) |
Contacts |
getContacts(ContactFolderFilter filter)
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetContacts(List, ContactFolderFilter, SortOrder, RowRange) |
Contacts |
getContacts(ContactFolderFilter filter,
SortOrder sortOrder)
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetContacts(List, ContactFolderFilter, SortOrder, RowRange) |
Contacts |
getContacts(java.util.List props)
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetContacts(List, SortOrder, RowRange) |
Contacts |
getContacts(java.util.List props,
ContactFolderFilter filter)
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetContacts(List, ContactFolderFilter, SortOrder, RowRange) |
Contacts |
getContacts(java.util.List props,
ContactFolderFilter filter,
SortOrder sortOrder)
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetContacts(List, ContactFolderFilter, SortOrder, RowRange) |
Contacts |
getContacts(java.util.List properties,
ContactFolderFilter filter,
SortOrder order,
RowRange range)
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetContacts(List, ContactFolderFilter, SortOrder, RowRange) |
Contacts |
getContacts(java.util.List properties,
int iScope,
ContactFolderFilter filter,
SortOrder order,
RowRange range)
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetContacts(List, int, ContactFolderFilter, SortOrder, RowRange) |
Contacts |
getContacts(java.util.List props,
SortOrder sortOrder)
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetContacts(List, SortOrder, RowRange) |
Contacts |
getContacts(java.util.List properties,
SortOrder order,
RowRange range)
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetContacts(List, SortOrder, RowRange) |
Contacts |
getContacts(SortOrder sortOrder)
Deprecated. This method has been deprecated and will be removed by version 3.1. Replaced with serverGetContacts(List, SortOrder, RowRange) |
Contacts |
serverGetContacts(java.util.List properties,
ContactFolderFilter filter,
SortOrder order,
RowRange range)
Queries the server for a list of contacts. |
Contacts |
serverGetContacts(java.util.List properties,
int iScope,
ContactFolderFilter filter,
SortOrder order,
RowRange range)
Queries the server for a list of contacts. |
Contacts |
serverGetContacts(java.util.List properties,
SortOrder order,
RowRange range)
Queries the server for a list of contacts. |
Methods inherited from class com.compoze.exchange.webdav.AbstractItem |
copy, copy, copy, createFilename, delete, equals, getComment, getContentClass, getCreationDate, getDateLastModified, getDisplayName, getFile, getHRef, getID, getParentFolder, getPermanentURL, getUID, isFolder, isHidden, isReadOnly, isRoot, move, move, move, serverCopyTo, serverCopyTo, serverCopyTo, serverCopyTo, serverGetParentFolder, serverMoveTo, serverMoveTo, serverMoveTo, serverMoveTo, serverUpdate, setComment, setContentClass, setContentClass, setHidden, setReadOnly, setReleased, setType, setUID, update, update, validate |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ContactFolder(java.lang.String sName)
sName
- name of the folderMethod Detail |
public Contacts serverGetContacts(java.util.List properties, SortOrder order, RowRange range) throws ExchangeException
properties
- list of AbstractProperty
objects representing
Exchange WebDAV properties to query from the Exchange store
(must not be null
)order
- the order to sort byrange
- the range of rows to returnContact
or DistributionList
objectsExchangeException
- if a problem occurred while interacting with the Exchange storeExchangeRuntimeException
- if this object has been released and can no longer be usedjava.lang.IllegalArgumentException
- if properties are not specifiedpublic Contacts serverGetContacts(java.util.List properties, ContactFolderFilter filter, SortOrder order, RowRange range) throws ExchangeException
properties
- list of AbstractProperty
objects representing
Exchange WebDAV properties to query from the Exchange store
(must not be null
)filter
- the conditions to search byorder
- the order to sort byrange
- the range of rows to returnContact
or DistributionList
objectsExchangeException
- if a problem occurred while interacting with the Exchange storeExchangeRuntimeException
- if this object has been released and can no longer be usedjava.lang.IllegalArgumentException
- if properties are not specifiedpublic Contacts serverGetContacts(java.util.List properties, int iScope, ContactFolderFilter filter, SortOrder order, RowRange range) throws ExchangeException
If no sort order is provided (order == null
), the following
sort order is used:
ContactsProperty.SURNAME
, SortOrder.ASCENDING
ContactsProperty.GIVEN_NAME
, SortOrder.ASCENDING
ContactsProperty.MIDDLE_NAME
, SortOrder.ASCENDING
HttpMailProperty.DATE_RECEIVED
, SortOrder.ASCENDING
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
.
properties
- list of AbstractProperty
objects representing
Exchange WebDAV properties to query from the Exchange store
(must not be null
)iScope
- the scope of the searchfilter
- the conditions to search byorder
- the order to sort byrange
- the range of rows to returnContact
or DistributionList
objectsExchangeException
- if a problem occurred while interacting with the Exchange storeExchangeRuntimeException
- if this object has been released and can no longer be usedjava.lang.IllegalArgumentException
- if properties are not specifiedpublic Contacts getContacts(java.util.List properties, SortOrder order, RowRange range) throws ExchangeException
serverGetContacts(List, SortOrder, RowRange)
properties
- list of AbstractProperty
objects representing
Exchange WebDAV properties to query from the Exchange store
(must not be null
)order
- the order to sort byrange
- the range of rows to returnContact
or DistributionList
objectsExchangeException
- if a problem occurred while interacting with the Exchange storeExchangeRuntimeException
- if this object has been released and can no longer be usedjava.lang.IllegalArgumentException
- if properties are not specifiedpublic Contacts getContacts(java.util.List properties, ContactFolderFilter filter, SortOrder order, RowRange range) throws ExchangeException
serverGetContacts(List, ContactFolderFilter, SortOrder, RowRange)
properties
- list of AbstractProperty
objects representing
Exchange WebDAV properties to query from the Exchange store
(must not be null
)filter
- the conditions to search byorder
- the order to sort byrange
- the range of rows to returnContact
or DistributionList
objectsExchangeException
- if a problem occurred while interacting with the Exchange storeExchangeRuntimeException
- if this object has been released and can no longer be usedjava.lang.IllegalArgumentException
- if properties are not specifiedpublic Contacts getContacts(java.util.List properties, int iScope, ContactFolderFilter filter, SortOrder order, RowRange range) throws ExchangeException
serverGetContacts(List, int, ContactFolderFilter, SortOrder, RowRange)
If no sort order is provided (order == null
), the following
sort order is used:
ContactsProperty.SURNAME
, SortOrder.ASCENDING
ContactsProperty.GIVEN_NAME
, SortOrder.ASCENDING
ContactsProperty.MIDDLE_NAME
, SortOrder.ASCENDING
HttpMailProperty.DATE_RECEIVED
, SortOrder.ASCENDING
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
.
properties
- list of AbstractProperty
objects representing
Exchange WebDAV properties to query from the Exchange store
(must not be null
)iScope
- the scope of the searchfilter
- the conditions to search byorder
- the order to sort byrange
- the range of rows to returnContact
or DistributionList
objectsExchangeException
- if a problem occurred while interacting with the Exchange storeExchangeRuntimeException
- if this object has been released and can no longer be usedjava.lang.IllegalArgumentException
- if properties are not specifiedpublic Contacts getContacts() throws ExchangeException
serverGetContacts(List, SortOrder, RowRange)
Contact
or DistributionList
objectsExchangeException
- if a problem occurred while interacting with the Exchange storeExchangeRuntimeException
- if this object has been released and can no longer be usedpublic Contacts getContacts(java.util.List props) throws ExchangeException
serverGetContacts(List, SortOrder, RowRange)
props
- list of properties (see Contact
) to have returned from the queryContact
or DistributionList
objectsExchangeException
- if a problem occurred while interacting with the Exchange storeExchangeRuntimeException
- if this object has been released and can no longer be usedjava.lang.IllegalArgumentException
- if properties are not specifiedpublic Contacts getContacts(java.util.List props, SortOrder sortOrder) throws ExchangeException
serverGetContacts(List, SortOrder, RowRange)
props
- list of properties (see Contact
) to have returned from the querysortOrder
- the order to sort byContact
or DistributionList
objectsExchangeException
- if a problem occurred while interacting with the Exchange storeExchangeRuntimeException
- if this object has been released and can no longer be usedjava.lang.IllegalArgumentException
- if properties are not specifiedpublic Contacts getContacts(java.util.List props, ContactFolderFilter filter) throws ExchangeException
serverGetContacts(List, ContactFolderFilter, SortOrder, RowRange)
props
- list of properties (see Contact
) to have returned from the queryfilter
- the filter to search byContact
or DistributionList
objectsExchangeException
- if a problem occurred while interacting with the Exchange storeExchangeRuntimeException
- if this object has been released and can no longer be usedjava.lang.IllegalArgumentException
- if properties are not specifiedpublic Contacts getContacts(SortOrder sortOrder) throws ExchangeException
serverGetContacts(List, SortOrder, RowRange)
sortOrder
- the order to sort byContact
or DistributionList
objectsExchangeException
- if a problem occurred while interacting with the Exchange storeExchangeRuntimeException
- if this object has been released and can no longer be usedpublic Contacts getContacts(ContactFolderFilter filter) throws ExchangeException
serverGetContacts(List, ContactFolderFilter, SortOrder, RowRange)
filter
- the filter to search byContact
or DistributionList
objectsExchangeException
- if a problem occurred while interacting with the Exchange storeExchangeRuntimeException
- if this object has been released and can no longer be usedpublic Contacts getContacts(ContactFolderFilter filter, SortOrder sortOrder) throws ExchangeException
serverGetContacts(List, ContactFolderFilter, SortOrder, RowRange)
filter
- the filter to search bysortOrder
- the order to sort byContact
or DistributionList
objectsExchangeException
- if a problem occurred while interacting with the Exchange storeExchangeRuntimeException
- if this object has been released and can no longer be usedpublic Contacts getContacts(java.util.List props, ContactFolderFilter filter, SortOrder sortOrder) throws ExchangeException
serverGetContacts(List, ContactFolderFilter, SortOrder, RowRange)
props
- list of properties (see Contact
) to have returned from the queryfilter
- the filter to search bysortOrder
- the order to sort byContact
or DistributionList
objectsExchangeException
- if a problem occurred while interacting with the Exchange storeExchangeRuntimeException
- if this object has been released and can no longer be usedjava.lang.IllegalArgumentException
- if properties are not specified
|
Compoze Software, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |