|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface GroupsListView
A group list is a list of all groups defined for a contact manager.
Within a group list, each group is assigned a unique numeric identifier.
Each group belongs to a unique group list.
GroupsListView
instances provide:
The GroupsListView
class also provides a factory method to create a GroupView
instance.
Multiple GroupsListView
instances may be created by the same or different
applications. Although they may represent the same groups list, each of them has its
own state.
This particularly applies to the current enumeration progress, which is specific to
each instance.
Method Summary | |
---|---|
int |
addGroup(byte[] name,
short nameOffset,
short nameLength)
Creates a new group and adds it to the groups list. |
GroupView |
createGroupViewInstance()
Factory method used to create a GroupView instance. |
int |
getNumberOfGroups()
Returns the number of groups in the groups list. |
boolean |
hasMoreGroups()
Checks if there are more groups in the current group enumeration. |
void |
removeGroup(int groupIdentifier)
Removes a group from the groups list. |
void |
selectGroup(GroupView groupView,
int groupIdentifier)
Binds a GroupView instance to a group that matches the provided
groupIdentifier . |
int |
selectNextGroup(GroupView groupView)
Binds a GroupView instance with the next group in the current enumeration. |
void |
startEnumeration()
Starts a new enumeration of all groups in the list. |
void |
startEnumeration(int contactIdentifier)
Stars the enumeration of all groups in the groups list, that contain a specific contact. |
Method Detail |
---|
GroupView createGroupViewInstance()
Factory method used to create a GroupView
instance.
The instance is initially created in the DESELECTED state.
See the description of the GroupView
interface for detailed information
about its complete life cycle.
The new instance is owned by the calling application.
GroupView
instancevoid startEnumeration()
Starts a new enumeration of all groups in the list.
GroupsListView
instance can process one enumeration at a time.nextGroup()
.
void startEnumeration(int contactIdentifier)
Stars the enumeration of all groups in the groups list, that contain a specific contact.
In addition to the filtering mechanism described here, all requirements of the method
startEnumeration()
apply to this method.
contactIdentifier
- identifier of the contact to look forboolean hasMoreGroups()
Checks if there are more groups in the current group enumeration.
true
if there is at least one more group in the current enumerationint selectNextGroup(GroupView groupView)
Binds a GroupView
instance with the next group in the current enumeration.
The order in which the groups are enumerated is unspecified.
After successful operation, the GroupView
instance is in the SELECTED state,
and is bound to the next group in the current enumeration.
If the current enumeration has not been started, or already reached its end,
or after unsuccessful operation for any reason, the GroupView
instance
is in DESELECTED state.
groupView
- GroupView
instance to bind to the next group in the enumeration.
void selectGroup(GroupView groupView, int groupIdentifier)
Binds a GroupView
instance to a group that matches the provided
groupIdentifier
.
After successful operation, the GroupView
instance is in SELECTED state,
and is bound to the selected group.
After unsuccessful operation, the GroupView
instance is in DESELECTED state.
groupView
- GroupView
instance to bind with the next group that
matches the identifier.groupIdentifier
- group identifier of group to get
uicc.contactmanager.ContactManagerException
:
- WRONG_IDENTIFIER
if the list contains no group with the
groupIdentifier
provided.int addGroup(byte[] name, short nameOffset, short nameLength)
Creates a new group and adds it to the groups list.
The new group is set with the provided group name, in a way that is similar to a call to
method GroupView.setGroupName()
with the parameters name
, nameOffset
and nameLength
.
When a group is added to a groups list, any enumeration over the same groups list currently in progress may or may not include the new group, depending on the implementation.
name
- name of the group to setnameOffset
- offset in name buffernameLength
- length of name buffer
void removeGroup(int groupIdentifier)
Removes a group from the groups list.
This method fails in the following cases:
GroupView
instance is currently bound to the removed group.GroupsListView
related the same contact manager, other than the method's target.
groupIdentifier
- identifier of the group to be removed from the list
uicc.contactmanager.ContactManagerException
- with the following reasons:
WRONG_IDENTIFIER
if groupIdentifier
does not identify any group in the groups list.ITEM_SELECTED
if the group to be removed is currently selected by
a GroupView
instance.ENUMERATION_IN_PROGRESS
if a conflicting enumeration is
currently in progress.int getNumberOfGroups()
Returns the number of groups in the groups list.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |