Package com.avaya.clientservices.contact
Interface ContactGroup
-
public interface ContactGroupRepresents contact group object which exposes all possible contact group details. It allows to add and remove contacts to/from group and update name of the group.
Contact gorups can be created by using
ContactServicemethodContactService.createContactGroup(String, Collection, CreateContactGroupCompletionHandler)and deleted by methodContactService.deleteContactGroup(ContactGroup, ContactCompletionHandler).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddContactGroupListener(ContactGroupListener contactGroupListener)Adds the contact group listener to get updates for this contact group.voidaddContacts(java.util.Collection<Contact> contacts, ContactGroupOperationCompletionHandler completionHandler)Adds new contacts to a group Operation fails if at least one contact can't be added to a group due to capability not allowed.CapabilitygetAddContactCapability()Returns Capability indicating whether this contact group can add new contacts.java.util.Collection<Contact>getGroupMembers()Returns collection of contacts associated with group.java.lang.StringgetName()Returns name of the group of contacts.CapabilitygetRemoveContactCapability()Returns Capability indicating whether this contact group can remove contacts.CapabilitygetRenameGroupCapability()Returns Capability indicating whether this contact group can be renamed.voidremoveContactGroupListener(ContactGroupListener contactGroupListener)Removes the contact group listener to stop getting updates for this contact group.voidremoveContacts(java.util.Collection<Contact> contacts, ContactGroupOperationCompletionHandler completionHandler)Removes contacts from a group Operation fails if at least one contact can't be removed from group due to capability not allowed.voidrenameGroup(java.lang.String newName, ContactGroupOperationCompletionHandler completionHandler)Renames group.
-
-
-
Method Detail
-
addContactGroupListener
void addContactGroupListener(ContactGroupListener contactGroupListener)
Adds the contact group listener to get updates for this contact group.- Parameters:
contactGroupListener- The listener to register with this object.
-
removeContactGroupListener
void removeContactGroupListener(ContactGroupListener contactGroupListener)
Removes the contact group listener to stop getting updates for this contact group.- Parameters:
contactGroupListener- The listener to unregister from this object.
-
getName
java.lang.String getName()
Returns name of the group of contacts.- Returns:
- Name of the group of contacts.
-
getGroupMembers
java.util.Collection<Contact> getGroupMembers()
Returns collection of contacts associated with group.- Returns:
- collection of
Contact) objects of group.
-
getRenameGroupCapability
Capability getRenameGroupCapability()
Returns Capability indicating whether this contact group can be renamed.- Returns:
Capabilityobject describing whether the Contact Group supports renaming.
-
getAddContactCapability
Capability getAddContactCapability()
Returns Capability indicating whether this contact group can add new contacts.- Returns:
Capabilityobject describing whether the Contact Group supports adding new contacts.
-
getRemoveContactCapability
Capability getRemoveContactCapability()
Returns Capability indicating whether this contact group can remove contacts.- Returns:
Capabilityobject describing whether the Contact Group supports removing contacts.
-
renameGroup
void renameGroup(java.lang.String newName, ContactGroupOperationCompletionHandler completionHandler)Renames group. Renaming of the group results in raising onCollectionChanged events on DataRetrievalWatcher - group deleted, group added.- Parameters:
newName- New name of the group of contacts. Group name length is limited by the server. There are some characters not allowed to be present in group name (< > , ").completionHandler- A block to be called when the operation is completed. If the operation was successful this parameter is nil. If an error occurred it contains an object describing the error.
-
addContacts
void addContacts(java.util.Collection<Contact> contacts, ContactGroupOperationCompletionHandler completionHandler)
Adds new contacts to a group Operation fails if at least one contact can't be added to a group due to capability not allowed. Entire collection remains unchanged in this case. Providing contact as argument which already exists in group treated as Success operation.- Parameters:
contacts- collection ofContactobjects to be added to a groupcompletionHandler- A block to be called when the operation is completed. If the operation was successful this parameter is nil. If an error occurred it contains an object describing the error.
-
removeContacts
void removeContacts(java.util.Collection<Contact> contacts, ContactGroupOperationCompletionHandler completionHandler)
Removes contacts from a group Operation fails if at least one contact can't be removed from group due to capability not allowed. Entire collection remains unchanged in this case. Providing contact as argument which doesn't exist in group treated as Success operation.- Parameters:
contacts- collection ofContactobjects to be removed from a groupcompletionHandler- A block to be called when the operation is completed. If the operation was successful this parameter is nil. If an error occurred it contains an object describing the error.
-
-