Class GroupMemberCollection
- java.lang.Object
-
- microsoft.exchange.webservices.data.property.complex.ComplexProperty
-
- microsoft.exchange.webservices.data.property.complex.ComplexPropertyCollection<GroupMember>
-
- 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
Constructors Constructor Description GroupMemberCollection()Initializes a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(GroupMember member)Adds a member to the collection.voidaddContactEmailAddress(Contact contact, EmailAddressKey emailAddressKey)Adds a member that is linked to a specific e-mail address of a contact.voidaddContactGroup(ItemId contactGroupId)Adds a member linked to a Contact Group.voidaddDirectoryContact(String smtpAddress)Adds a member linked to an Active Directory contact.voidaddDirectoryContact(String address, String routingType)Adds a member linked to an Active Directory contact.voidaddDirectoryPublicFolder(String smtpAddress)Adds a member linked to a mail-enabled Public Folder.voidaddDirectoryUser(String smtpAddress)Adds a member linked to an Active Directory user.voidaddDirectoryUser(String address, String routingType)Adds a member linked to an Active Directory user.voidaddOneOff(String displayName, String smtpAddress)Adds a one-off member.voidaddOneOff(String displayName, String address, String routingType)Adds a one-off member.voidaddPersonalContact(ItemId contactId)Adds a member linked to a contact?s first available e-mail address.voidaddPersonalContact(ItemId contactId, String addressToLink)Adds a member linked to a specific contact?s e-mail address.voidaddPublicGroup(String smtpAddress)Adds a member linked to a Public Group.voidaddRange(Iterator<GroupMember> members)Adds multiple members to the collection.voidclear()Clears the collection.voidclearChangeLog()Clears the change log.protected GroupMembercreateComplexProperty(String xmlElementName)Creates a GroupMember object from an XML element name.GroupMemberfind(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 StringgetCollectionItemXmlElementName(GroupMember member)Retrieves the XML element name corresponding to the provided GroupMember object.protected voidinternalValidate()Validates this instance.booleanremove(GroupMember member)Removes a member from the collection.voidremoveAt(int index)Removes a member at the specified index.booleanwriteDeleteUpdateToXml(EwsServiceXmlWriter writer, ServiceObject ewsObject)Writes the deletion update to XML.booleanwriteSetUpdateToXml(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
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
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:
getCollectionItemXmlElementNamein classComplexPropertyCollection<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 idaddressToLink- 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 exceptionException- 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 addressroutingType- the routing type- Throws:
ServiceLocalException- the service local exceptionException- 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 exceptionException- 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 addressroutingType- the routing type- Throws:
ServiceLocalException- the service local exceptionException- 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 exceptionException- 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 exceptionException- the exception
-
addOneOff
public void addOneOff(String displayName, String address, String routingType) throws Exception
Adds a one-off member.- Parameters:
displayName- the display nameaddress- the addressroutingType- 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 namesmtpAddress- 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 contactemailAddressKey- 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:
writeSetUpdateToXmlin interfaceICustomXmlUpdateSerializer- Overrides:
writeSetUpdateToXmlin classComplexPropertyCollection<GroupMember>- Parameters:
writer- the writerownerObject- the owner objectpropertyDefinition- 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:
writeDeleteUpdateToXmlin interfaceICustomXmlUpdateSerializer- Overrides:
writeDeleteUpdateToXmlin classComplexPropertyCollection<GroupMember>- Parameters:
writer- the writerewsObject- 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:
createComplexPropertyin classComplexPropertyCollection<GroupMember>- Parameters:
xmlElementName- the xml element name- Returns:
- An GroupMember object
-
clearChangeLog
public void clearChangeLog()
Clears the change log.- Overrides:
clearChangeLogin classComplexPropertyCollection<GroupMember>
-
internalValidate
protected void internalValidate() throws Exception
Validates this instance.- Overrides:
internalValidatein classComplexProperty- Throws:
Exception
-
-