uicc.contactmanager
Interface GroupView

All Superinterfaces:
ContactsListView

public interface GroupView
extends ContactsListView

Groups are collections of contacts from a contact list.

The groups are very similar to the contact list; however, while the contact list contains all the contact manager's contacts, groups only represent a subset of the contacts contained in the contact manager's contact list.
Therefore, while a contact always belongs to a unique contact list, it may belong to one or more groups, or none.
While contacts are assigned a unique identifier by their contact list, the very same unique identifier is used to identify them in all the groups they may belong to.

Each group belongs to a unique group list.

In addition to the methods inherited from ContactsListView, the GroupView class provides methods to retrieve and set a group name.

Because of the different ownership rules described above between the contacts list and the groups, the semantics of methods inherited from ContactsListView slightly differ. These differences are listed below:

A GroupView instance may successively represent multiple groups throughout its lifetime.
It is good practice, for an application that needs to manipulate groups, to create one GroupView instance at installation, that will be re-used throughout the application's lifetime.

An instance is necessarily in one of the following states:

More detailed description of the behavior of a GroupView instance in these states is given below:


Method Summary
 void deselect()
           If this instance is in SELECTED state, the selected group is deselected.
 void getGroupName(byte[] name, short nameOffset, short maxNameLength)
          Gets the group name.
 void setGroupName(byte[] name, short nameOffset, short nameLength)
          Sets the group name.
 
Methods inherited from interface uicc.contactmanager.ContactsListView
addContact, createContactViewInstance, getNumberOfContacts, hasMoreContacts, removeContact, selectContact, selectNextContact, startEnumeration, startEnumeration
 

Method Detail

setGroupName

void setGroupName(byte[] name,
                  short nameOffset,
                  short nameLength)
Sets the group name.

Parameters:
name - name of the group to set
nameOffset - offset in name buffer
nameLength - length of name buffer

getGroupName

void getGroupName(byte[] name,
                  short nameOffset,
                  short maxNameLength)
Gets the group name.

Parameters:
name - buffer to store the name into
nameOffset - offset in name buffer
maxNameLength - maximum length of name buffer
Throws:
ArrayIndexOutOfBoundException - if nameOffset+the length of the group name > maxNameLength

deselect

void deselect()

If this instance is in SELECTED state, the selected group is deselected.

After a successful call to this method, the instance is in DESELECTED state.