|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Represnts a list of PIM items.
A PIMList contains PIMItem objects and maintains
the list of valid fields for each item.
For more information about this class or about the personal information management (PIM) API, refer to The PDA Profile specification (JSR-000075) for the J2ME(TM) Platform.
PIMItem,
EventList,
ToDoList,
ContactList| Field Summary | ||
static String |
UNCATEGORIZED
Represents all PIM items which do not have an associated category. |
|
| Method Summary | ||
void |
addCategory(String category)
Adds a category to the PIMList. |
|
void |
close()
Closes this list, releasing it's resources to memory. |
|
void |
deleteCategory(String category,
boolean deleteUnassignedItems)
Removes a category from the PIMList. |
|
String |
getArrayElementLabel(int stringArrayField,
int arrayElement)
Returns the label associated with an element of a String array field. |
|
String |
getAttributeLabel(int attribute)
Returns the label associated with an attribute. |
|
String[] |
getCategories()
Returns a string array containing the names of all categories that are currently supported by this PIMList. |
|
int |
getFieldDataType(int field)
Returns an integer representing the data type associated with this field. |
|
String |
getFieldLabel(int field)
Returns the label associated with this field. |
|
String |
getName()
Returns the name of the list. |
|
int[] |
getSupportedArrayElements(int stringArrayField)
Returns an array of integers representing all supported elements of a string array for a given field. |
|
int[] |
getSupportedAttributes(int field)
Returns an array containing the integer representations of all supported attributes for the specified field. |
|
int[] |
getSupportedFields()
Returns an array of integers representing all fields that are supported in this list. |
|
boolean |
isCategory(String category)
Returns a boolean indicating whether or not the specified category name is valid for this list. |
|
boolean |
isSupportedArrayElement(int stringArrayField,
int arrayElement)
Returns a boolean that indicates whether or not a given array element is supported by the specified field. |
|
boolean |
isSupportedAttribute(int field,
int attribute)
Returns a boolean indicating whether or not the specified attribute is supported in a given field within the list. |
|
boolean |
isSupportedField(int field)
Returns a boolean indicating whether or not the specified field is supported. |
|
Enumeration |
items()
Returns an enumeration of all items in the list. |
|
Enumeration |
items(PIMItem matching)
Returns an enumeration of all items that match the fields contained within a specified PIMItem. |
|
Enumeration |
items(String matching)
Returns an enumeration of all items that match the fields contained within a specified string. |
|
Enumeration |
itemsByCategory(String category)
Returns an enumeration of all items in the PIM list that match the provided category. |
|
int |
maxCategories()
Returns the maximum number of categories that this PIMList
can have. |
|
int |
maxValues(int field)
Returns an integer indicating whether or not a specified field can support multiple values. |
|
void |
renameCategory(String currentCategory,
String newCategory)
Renames an existing category. |
|
int |
stringArraySize(int stringArrayField)
Returns the size of a string array for a given field. |
|
| Field Detail |
public static final String UNCATEGORIZED
renameCategory(java.lang.String, java.lang.String)| Method Detail |
public void addCategory(String category) throws PIMException
PIMList.
If the specified name already exists in the list, the method call returns as though successful.
category - A string representing the name of a category.PIMException - Thrown if an error occurs with the list or if the
list has already been closed.
public void close()
throws PIMException
The list can no longer be accessed. Any attempts will result in a PIMExeption.
PIMException - Thrown if the list has already been closed or if an
error occurs.public void deleteCategory(String category, boolean deleteUnassignedItems) throws PIMException
PIMList.
If the specified name does not already exist in the lists, the method call returns as though successful.
category - A string representing the name of an existing category.deleteUnassignedItems - Determines whether or not to delete items
which are left unassigned.PIMException - Thrown if an error occurs with the list or if the
list has already been closed.public String getArrayElementLabel(int stringArrayField, int arrayElement)
The isSupportedField(int) should be used to verify the
validity of the field before invoking this method.
stringArrayfield - An integer representing the String array field
containing the element for which to return the
label.arrayElement - An integer representing the element in the String array for
which to return the label.public String getAttributeLabel(int attribute)
attribute - An integer representing the attribute for which to return the
label.public String[] getCategories() throws PIMException
PIMList.
If there are no associated categories, or if the list does not support categories, the array will be zero-length.
public int getFieldDataType(int field)
The isSupportedField(int) should be used to verify the
validity of the field before invoking this method.
field - The field to check against.public String getFieldLabel(int field)
The isSupportedField(int) should be used to verify the
validity of the field before invoking this method.
field - An integer representing the field for which to return the
label.public String getName()
public int[] getSupportedArrayElements(int stringArrayField)
stringArrayField - The field to check.public int[] getSupportedAttributes(int field)
field - An integer representing the field to check.public int[] getSupportedFields()
public boolean isCategory(String category) throws PIMException
category - A string representing the name of a category.
public boolean isSupportedArrayElement(int stringArrayField,
int arrayElement)
stringArrayField - The field to check.arrayElement - The element in the array to check.
public boolean isSupportedAttribute(int field,
int attribute)
field - An integer representing a field in the list.attribute - The attribute to check.public boolean isSupportedField(int field)
field - An integer representing the field.public Enumeration items() throws PIMException
PIMException - Thrown if an error occurs with the list, or the list
has already been closed.public Enumeration items(PIMItem matching) throws PIMException
PIMItem.
The enumeration will contain items with fields that match those specified within
the PIMItem argument, as well as any extra fields contained
within the item. Only fields that have data associated with them will be
used for matching.
The matching algorithm works as follows:
matching - The PIMItem used for matching fields.PIMItems.PIMException - Thrown if an error occurs with the list, or if the
list has already been closed.public Enumeration items(String matching) throws PIMException
The enumeration will contain items with fields that match those specified within
the PIMitem argument, as well as any extra fields contained
within the item. Only fields that have data associated with them will be
used for matching.
The matching algorithm works as follows:
matching - The string used for matching fields.PIMItems.PIMException - Thrown if an error occurs with the list, or if the
list has already been closed.public Enumeration itemsByCategory(String category) throws PIMException
Category matching rules:
UNCATEGORIZED returns an enumeration of all
PIM items of the PIM list that have no category assignments.
UNCATEGORIZED.
String.equals() comparison.
category - The category to find matching items with.PIMException - If an error occurs or the list is no longer accessible or closed.SecurityException - If the application is not given permission to read the PIM list or the list is opened WRITE_ONLY.public int maxCategories()
PIMList
can have.
public int maxValues(int field)
field - An integer representing the field to check.public void renameCategory(String currentCategory, String newCategory) throws PIMException
All existing items within the current category will be changed to reference the new category. If the new category name matches a pre-existing category name, all references will be moved to the existing category.
currentCategory - The current category name.newCategory - The new category name.PIMException - Thrown if an error occurs with the list, the
category names are not found, or the list is no longer accessible.public int stringArraySize(int stringArrayField)
stringArrayField - The field to check.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Copyright 1999-2007 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.