Category
The Category object defines APIs necessary to access and manipulate categories in the PIM database.
Supported Platform(s)
- BlackBerry OS 5.0+
- Ripple Emulator
API | OS 5.0 | OS 6.0 | OS 7.0 | PlayBook | Ripple |
---|---|---|---|---|---|
addCategory | Y | Y | Y | Y | |
deleteCategory | Y | Y | Y | Y | |
getCategories | Y | Y | Y | Y |
Configuration Document Settings
To use all of the API described for this object, you must ensure the following settings are in your configuration document:
You must declare the feature element(s) below in your configuration document:
Feature ID | OS 5.0 | OS 6.0 | OS 7.0 | PlayBook | Ripple |
---|---|---|---|---|---|
<feature id="blackberry.pim.category" /> | Y | Y | Y | Y |
Permission Elements (PlayBook Only) |
---|
This API does not require a <permission> element to be declared in the configuration document of your BlackBerry WebWorks Application. |
addCategory
static void addCategory(categoryName : String) |
Supported Platform(s)
- BlackBerry OS 5.0+- Ripple Emulator
Description
Adds the provided category to the PIM database. Category names are case sensitive.
Parameter | Type | Description |
---|---|---|
categoryName | String | String representing a category. |
Code Example(s)
<script type="text/javascript"> function createNewCategory(newCategoryName) { blackberry.pim.category.addCategory(newCategoryName); } </script>
deleteCategory
static void deleteCategory(categoryName : String) |
Supported Platform(s)
- BlackBerry OS 5.0+- Ripple Emulator
Description
Deletes the indicated category from the PIM database. If the indicated category is not in the PIM database, this method is treated as successfully completing. Category names are case sensitive.
Parameter | Type | Description |
---|---|---|
categoryName | String | String category. |
getCategories
static String[] getCategories() |
Supported Platform(s)
- BlackBerry OS 5.0+- Ripple Emulator
Description
Returns the categories defined for the PIM database. If there are no categories defined for the PIM database, then a zero length array is returned.