Avaya Client Services API Reference (OS X)

- Main Page
- Classes
- Files
- Related Pages

- Class List
- Class Index
- Class Hierarchy
- Class Members

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< CSContactGroupDelegate > | delegate
| 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...
CSCapability * | renameGroupCapability
| Capability indicating whether this contact group can be renamed. More...
CSCapability * | addContactsCapability
| Capability indicating whether this contact group can add new contacts. More...
CSCapability * | removeContactsCapability
| 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

  contacts | Set of CSContact objects to be added to a group
  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.

- (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

  contacts | array of CSContact objects to be removed from a group
  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.

- (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

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

## Property Documentation

- (CSCapability*) addContactsCapability
| read nonatomic assign

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
| read write nonatomic weak

This delegate responsible for handling updates for this contact group.

- (NSSet<CSContact *>*) groupMembers
| read nonatomic assign

Set of contacts associated with group.

Returns
  Set of CSContact members of group

- (NSString*) name
| read nonatomic assign

Name of the group of contacts.

Returns
  Name of the group of contacts.

- (CSCapability*) removeContactsCapability
| read nonatomic assign

Capability indicating whether this contact group can remove contacts.

Returns
  CSCapability object describing whether the Contact Group supports removing contacts.

- (CSCapability*) renameGroupCapability
| read nonatomic assign

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:

- CSContactGroup.h