Avaya Client Services API Reference (iOS)
Instance Methods | Properties | List of all members
CSContactGroup Class Reference

Represents contact group object which exposes all possible contact group details. More...

#import <CSContactGroup.h>

Inherits NSObject.

Instance Methods

(void) - renameGroup:completionHandler:
 Renames group. More...
 
(void) - addContacts:completionHandler:
 Adds new contacts to a group. More...
 
(void) - removeContacts:completionHandler:
 Removes contacts from a group. More...
 

Properties

id< CSContactGroupDelegatedelegate
 This delegate responsible for handling updates for this contact group. More...
 
NSString * name
 Name of the group of contacts. More...
 
NSSet< CSContact * > * groupMembers
 Set of contacts associated with group. More...
 
CSCapabilityrenameGroupCapability
 Capability indicating whether this contact group can be renamed. More...
 
CSCapabilityaddContactsCapability
 Capability indicating whether this contact group can add new contacts. More...
 
CSCapabilityremoveContactsCapability
 Capability indicating whether this contact group can remove contacts. More...
 

Detailed Description

Represents 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 groups can be created by using ContactService method createContactGroupWithName:name members:members completionHandler:completionHandler and deleted by method deleteContactGroup:(CSContactGroup *)group completionHandler:completionHandler.

Method Documentation

- (void) addContacts: (NSSet< CSContact * > *)  contacts
completionHandler: (void(^)(NSError *error))  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
contactsSet of CSContact objects to be added to a group
completionHandlerA 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.
- (void) removeContacts: (NSSet< CSContact * > *)  contacts
completionHandler: (void(^)(NSError *error))  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
contactsarray of CSContact objects to be removed from a group
completionHandlerA 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.
- (void) renameGroup: (NSString *)  newName
completionHandler: (void(^)(NSError *error))  completionHandler 

Renames group.

Renaming of the group results in raising 2 events on CSContactServiceDelegate - didDeleteContactGroups and didAddContactGroups.

Parameters
newNameNew 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 (&lt; &gt; , ").
completionHandlerA 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.

Property Documentation

- (CSCapability*) addContactsCapability
readnonatomicassign

Capability indicating whether this contact group can add new contacts.

Returns
CSCapability object describing whether the Contact Group supports adding new contacts.
- (id<CSContactGroupDelegate>) delegate
readwritenonatomicweak

This delegate responsible for handling updates for this contact group.

- (NSSet<CSContact *>*) groupMembers
readnonatomicassign

Set of contacts associated with group.

Returns
Set of CSContact members of group
- (NSString*) name
readnonatomicassign

Name of the group of contacts.

Returns
Name of the group of contacts.
- (CSCapability*) removeContactsCapability
readnonatomicassign

Capability indicating whether this contact group can remove contacts.

Returns
CSCapability object describing whether the Contact Group supports removing contacts.
- (CSCapability*) renameGroupCapability
readnonatomicassign

Capability indicating whether this contact group can be renamed.

Returns
CSCapability object describing whether the Contact Group supports renaming.

The documentation for this class was generated from the following file: