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
APIBB5.0BB6.0BB7.0PB1.0PB2.0BB10Ripple
blackberry.pim.category.addCategory Y Y Y      Y
blackberry.pim.category.deleteCategory Y Y Y      Y
blackberry.pim.category.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 IDBB5.0BB6.0BB7.0PB1.0PB2.0BB10Ripple
<feature id="blackberry.pim.category" /> Y Y Y      Y

Permission Elements (PlayBook and BlackBerry 10+)
This API does not require a <permission> element to be declared in the configuration document of your BlackBerry WebWorks Application.

Functions

static void blackberry.pim.category.addCategory (categoryName : String)


Adds the provided category to the PIM database. Category names are case sensitive.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator


Parameters
categoryName String representing a category.

Code Example:
<script type="text/javascript">
  function createNewCategory(newCategoryName) {
    blackberry.pim.category.addCategory(newCategoryName);
  }
</script>

static void blackberry.pim.category.deleteCategory (categoryName : String)


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.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator


Parameters
categoryName String category.

static String[] blackberry.pim.category.getCategories ()


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.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Feb 11 2013 14:51:04 GMT-0500 (EST)