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

View Supported Platform Table

APIOS 5.0OS 6.0OS 7.0PlayBookRipple
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 IDOS 5.0OS 6.0OS 7.0PlayBookRipple
<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.

API Summary


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.



Documentation generated by JsDoc Toolkit 2.4.0 on Sun Dec 30 2012 13:31:16 GMT-0500 (EST)