microsoft.exchange.webservices.data.property.complex
Class GroupMemberCollection

java.lang.Object
  extended by microsoft.exchange.webservices.data.property.complex.ComplexProperty
      extended by microsoft.exchange.webservices.data.property.complex.ComplexPropertyCollection<GroupMember>
          extended by microsoft.exchange.webservices.data.property.complex.GroupMemberCollection
All Implemented Interfaces:
Iterable<GroupMember>, ICustomXmlUpdateSerializer, ISelfValidate, ComplexFunctionDelegate<EwsServiceXmlReader>, IComplexPropertyChangedDelegate<GroupMember>

public final class GroupMemberCollection
extends ComplexPropertyCollection<GroupMember>
implements ICustomXmlUpdateSerializer

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(String smtpAddress)
          Adds a member linked to an Active Directory contact.
 void addDirectoryContact(String address, String routingType)
          Adds a member linked to an Active Directory contact.
 void addDirectoryPublicFolder(String smtpAddress)
          Adds a member linked to a mail-enabled Public Folder.
 void addDirectoryUser(String smtpAddress)
          Adds a member linked to an Active Directory user.
 void addDirectoryUser(String address, String routingType)
          Adds a member linked to an Active Directory user.
 void addOneOff(String displayName, String smtpAddress)
          Adds a one-off member.
 void addOneOff(String displayName, String address, 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, String addressToLink)
          Adds a member linked to a specific contact?s e-mail address.
 void addPublicGroup(String smtpAddress)
          Adds a member linked to a Public Group.
 void addRange(Iterator<GroupMember> members)
          Adds multiple members to the collection.
 void clear()
          Clears the collection.
 void clearChangeLog()
          Clears the change log.
protected  GroupMember createComplexProperty(String xmlElementName)
          Creates a GroupMember object from an XML element name.
 GroupMember find(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  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(EwsServiceXmlWriter writer, ServiceObject ewsObject)
          Writes the deletion update to XML.
 boolean writeSetUpdateToXml(EwsServiceXmlWriter writer, ServiceObject ownerObject, PropertyDefinition propertyDefinition)
          Writes the update to XML.
 
Methods inherited from class microsoft.exchange.webservices.data.property.complex.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.property.complex.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 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(String key)
                 throws 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:
Exception - the exception

clear

public void clear()
Clears the collection.


add

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

Parameters:
member - the member
Throws:
Exception - the exception

addRange

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

Parameters:
members - the members
Throws:
Exception - the exception

addContactGroup

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

Parameters:
contactGroupId - the contact group id
Throws:
Exception - the exception

addPersonalContact

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

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

addPersonalContact

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

Parameters:
contactId - the contact id
Throws:
Exception - the exception

addDirectoryUser

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

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

addDirectoryUser

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

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

addDirectoryContact

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

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

addDirectoryContact

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

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

addPublicGroup

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

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

addDirectoryPublicFolder

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

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

addOneOff

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

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

addOneOff

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

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

addContactEmailAddress

public void addContactEmailAddress(Contact contact,
                                   EmailAddressKey emailAddressKey)
                            throws 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:
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(EwsServiceXmlWriter writer,
                                   ServiceObject ownerObject,
                                   PropertyDefinition propertyDefinition)
                            throws Exception
Writes the update to XML.

Specified by:
writeSetUpdateToXml in interface ICustomXmlUpdateSerializer
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:
Exception - the exception

writeDeleteUpdateToXml

public boolean writeDeleteUpdateToXml(EwsServiceXmlWriter writer,
                                      ServiceObject ewsObject)
Writes the deletion update to XML.

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

createComplexProperty

protected GroupMember createComplexProperty(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

public void clearChangeLog()
Clears the change log.

Overrides:
clearChangeLog in class ComplexPropertyCollection<GroupMember>

internalValidate

protected void internalValidate()
                         throws Exception
Validates this instance.

Overrides:
internalValidate in class ComplexProperty
Throws:
Exception


Copyright © 2012–2015 Microsoft. All rights reserved.