microsoft.exchange.webservices.data
Class GroupMemberCollection

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

public final class GroupMemberCollection
extends ComplexPropertyCollection<GroupMember>

Represents a collection of members of GroupMember type.


Constructor Summary
GroupMemberCollection()
          * Initializes a new instance.
 
Method Summary
 void add(GroupMember member)
          * Adds a member to the collection.
 void addContactEmailAddress(Contact contact, EmailAddressKey emailAddressKey)
          * Adds a member that is linked to a specific e-mail address of a contact.
 void addContactGroup(ItemId contactGroupId)
          * Adds a member linked to a Contact Group.
 void addDirectoryContact(java.lang.String smtpAddress)
          * Adds a member linked to an Active Directory contact.
 void addDirectoryContact(java.lang.String address, java.lang.String routingType)
          * Adds a member linked to an Active Directory contact.
 void addDirectoryPublicFolder(java.lang.String smtpAddress)
          * Adds a member linked to a mail-enabled Public Folder.
 void addDirectoryUser(java.lang.String smtpAddress)
          * Adds a member linked to an Active Directory user.
 void addDirectoryUser(java.lang.String address, java.lang.String routingType)
          * Adds a member linked to an Active Directory user.
 void addOneOff(java.lang.String displayName, java.lang.String smtpAddress)
          * Adds a one-off member.
 void addOneOff(java.lang.String displayName, java.lang.String address, java.lang.String routingType)
          * Adds a one-off member.
 void addPersonalContact(ItemId contactId)
          * Adds a member linked to a contact?s first available e-mail address.
 void addPersonalContact(ItemId contactId, java.lang.String addressToLink)
          * Adds a member linked to a specific contact?s e-mail address.
 void addPublicGroup(java.lang.String smtpAddress)
          * Adds a member linked to a Public Group.
 void addRange(java.util.Iterator<GroupMember> members)
          * Adds multiple members to the collection.
 void clear()
          Clears the collection.
protected  void clearChangeLog()
          Clears the change log.
protected  GroupMember createComplexProperty(java.lang.String xmlElementName)
          * Creates a GroupMember object from an XML element name.
 GroupMember find(java.lang.String key)
          Finds the member with the specified key in the collection.Members that have not yet been saved do not have a key.
protected  java.lang.String getCollectionItemXmlElementName(GroupMember member)
          * Retrieves the XML element name corresponding to the provided GroupMember object.
protected  void internalValidate()
          Validates this instance.
 boolean remove(GroupMember member)
          * Removes a member from the collection.
 void removeAt(int index)
          * Removes a member at the specified index.
 boolean writeDeleteUpdateToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer, ServiceObject ewsObject)
          * Writes the deletion update to XML.
 boolean writeSetUpdateToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer, ServiceObject ownerObject, PropertyDefinition propertyDefinition)
          * Writes the update to XML.
 
Methods inherited from class microsoft.exchange.webservices.data.ComplexPropertyCollection
complexPropertyChanged, contains, getAddedItems, getCount, getItems, getModifiedItems, getPropertyAtIndex, getRemovedItems, indexOf, internalAdd, internalClear, internalRemove, internalRemoveAt, itemChanged, iterator, loadFromXml, loadFromXml, removeFromChangeLog, shouldWriteToXml, updateFromXml, writeElementsToXml, writeToXml
 
Methods inherited from class microsoft.exchange.webservices.data.ComplexProperty
addOnChangeEvent, canSetFieldValue, changed, clearChangeEvents, func, getNamespace, 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

GroupMemberCollection

public GroupMemberCollection()
* Initializes a new instance.

Method Detail

getCollectionItemXmlElementName

protected java.lang.String getCollectionItemXmlElementName(GroupMember member)
* Retrieves the XML element name corresponding to the provided GroupMember object.

Specified by:
getCollectionItemXmlElementName in class ComplexPropertyCollection<GroupMember>
Parameters:
member - the member
Returns:
The XML element name corresponding to the provided GroupMember object

find

public GroupMember find(java.lang.String key)
                 throws java.lang.Exception
Finds the member with the specified key in the collection.Members that have not yet been saved do not have a key.

Parameters:
key - the key
Returns:
The member with the specified key
Throws:
java.lang.Exception - the exception

clear

public void clear()
Clears the collection.


add

public void add(GroupMember member)
         throws java.lang.Exception
* Adds a member to the collection.

Parameters:
member - the member
Throws:
java.lang.Exception - the exception

addRange

public void addRange(java.util.Iterator<GroupMember> members)
              throws java.lang.Exception
* Adds multiple members to the collection.

Parameters:
members - the members
Throws:
java.lang.Exception - the exception

addContactGroup

public void addContactGroup(ItemId contactGroupId)
                     throws java.lang.Exception
* Adds a member linked to a Contact Group.

Parameters:
contactGroupId - the contact group id
Throws:
java.lang.Exception - the exception

addPersonalContact

public void addPersonalContact(ItemId contactId,
                               java.lang.String addressToLink)
                        throws java.lang.Exception
* Adds a member linked to a specific contact?s e-mail address.

Parameters:
contactId - the contact id
addressToLink - the address to link
Throws:
java.lang.Exception - the exception

addPersonalContact

public void addPersonalContact(ItemId contactId)
                        throws java.lang.Exception
* Adds a member linked to a contact?s first available e-mail address.

Parameters:
contactId - the contact id
Throws:
java.lang.Exception - the exception

addDirectoryUser

public void addDirectoryUser(java.lang.String smtpAddress)
                      throws ServiceLocalException,
                             java.lang.Exception
* Adds a member linked to an Active Directory user.

Parameters:
smtpAddress - the smtp address
Throws:
ServiceLocalException - the service local exception
java.lang.Exception - the exception

addDirectoryUser

public void addDirectoryUser(java.lang.String address,
                             java.lang.String routingType)
                      throws ServiceLocalException,
                             java.lang.Exception
* Adds a member linked to an Active Directory user.

Parameters:
address - the address
routingType - the routing type
Throws:
ServiceLocalException - the service local exception
java.lang.Exception - the exception

addDirectoryContact

public void addDirectoryContact(java.lang.String smtpAddress)
                         throws ServiceLocalException,
                                java.lang.Exception
* Adds a member linked to an Active Directory contact.

Parameters:
smtpAddress - the smtp address
Throws:
ServiceLocalException - the service local exception
java.lang.Exception - the exception

addDirectoryContact

public void addDirectoryContact(java.lang.String address,
                                java.lang.String routingType)
                         throws ServiceLocalException,
                                java.lang.Exception
* Adds a member linked to an Active Directory contact.

Parameters:
address - the address
routingType - the routing type
Throws:
ServiceLocalException - the service local exception
java.lang.Exception - the exception

addPublicGroup

public void addPublicGroup(java.lang.String smtpAddress)
                    throws ServiceLocalException,
                           java.lang.Exception
* Adds a member linked to a Public Group.

Parameters:
smtpAddress - the smtp address
Throws:
ServiceLocalException - the service local exception
java.lang.Exception - the exception

addDirectoryPublicFolder

public void addDirectoryPublicFolder(java.lang.String smtpAddress)
                              throws ServiceLocalException,
                                     java.lang.Exception
* Adds a member linked to a mail-enabled Public Folder.

Parameters:
smtpAddress - the smtp address
Throws:
ServiceLocalException - the service local exception
java.lang.Exception - the exception

addOneOff

public void addOneOff(java.lang.String displayName,
                      java.lang.String address,
                      java.lang.String routingType)
               throws java.lang.Exception
* Adds a one-off member.

Parameters:
displayName - the display name
address - the address
routingType - the routing type
Throws:
java.lang.Exception - the exception

addOneOff

public void addOneOff(java.lang.String displayName,
                      java.lang.String smtpAddress)
               throws java.lang.Exception
* Adds a one-off member.

Parameters:
displayName - the display name
smtpAddress - the smtp address
Throws:
java.lang.Exception - the exception

addContactEmailAddress

public void addContactEmailAddress(Contact contact,
                                   EmailAddressKey emailAddressKey)
                            throws java.lang.Exception
* Adds a member that is linked to a specific e-mail address of a contact.

Parameters:
contact - the contact
emailAddressKey - the email address key
Throws:
java.lang.Exception - the exception

removeAt

public void removeAt(int index)
* Removes a member at the specified index.

Parameters:
index - the index

remove

public boolean remove(GroupMember member)
* Removes a member from the collection.

Parameters:
member - the member
Returns:
True if the group member was successfully removed from the collection, false otherwise.

writeSetUpdateToXml

public boolean writeSetUpdateToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer,
                                   ServiceObject ownerObject,
                                   PropertyDefinition propertyDefinition)
                            throws java.lang.Exception
* Writes the update to XML.

Overrides:
writeSetUpdateToXml in class ComplexPropertyCollection<GroupMember>
Parameters:
writer - the writer
ownerObject - the owner object
propertyDefinition - the property definition
Returns:
True if property generated serialization.
Throws:
java.lang.Exception - the exception

writeDeleteUpdateToXml

public boolean writeDeleteUpdateToXml(microsoft.exchange.webservices.data.EwsServiceXmlWriter writer,
                                      ServiceObject ewsObject)
* Writes the deletion update to XML.

Overrides:
writeDeleteUpdateToXml in class ComplexPropertyCollection<GroupMember>
Parameters:
writer - the writer
ewsObject - the ews object
Returns:
True if property generated serialization.

createComplexProperty

protected GroupMember createComplexProperty(java.lang.String xmlElementName)
* Creates a GroupMember object from an XML element name.

Specified by:
createComplexProperty in class ComplexPropertyCollection<GroupMember>
Parameters:
xmlElementName - the xml element name
Returns:
An GroupMember object

clearChangeLog

protected void clearChangeLog()
Clears the change log.

Overrides:
clearChangeLog in class ComplexPropertyCollection<GroupMember>

internalValidate

protected void internalValidate()
                         throws java.lang.Exception
Validates this instance.

Overrides:
internalValidate in class ComplexProperty
Throws:
java.lang.Exception