Task

The Task object represents a Task entry that would be in your PIM task list. This Task object can be used for manipulating Task PIM information.


Supported Platform(s)

- BlackBerry OS 5.0+
- Ripple Emulator
View Supported Platform Table
APIBB5.0BB6.0BB7.0PB1.0PB2.0BB10Ripple
blackberry.pim.Task Y Y Y      Y
blackberry.pim.Task.find Y Y Y      Y
remove Y Y Y      Y
save Y Y Y      Y
categories Y Y Y      Y
due Y Y Y      Y
note Y Y Y      Y
priority Y Y Y      Y
recurrence Y Y Y      Y
reminder Y Y Y      Y
status Y Y Y      Y
summary Y Y Y      Y
uid Y Y Y      Y
NOT_STARTED Y Y Y      Y
IN_PROGRESS Y Y Y      Y
COMPLETED Y Y Y      Y
WAITING Y Y Y      Y
DEFERRED Y Y Y      Y
PRIORITY_HIGH Y Y Y      Y
PRIORITY_NORMAL Y Y Y      Y
PRIORITY_LOW 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.find" /> Y Y Y      Y
<feature id="blackberry.pim.Recurrence" /> Y Y Y      Y
<feature id="blackberry.pim.Reminder" /> Y Y Y      Y
<feature id="blackberry.pim.Task" /> 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.

Constructors


Functions


Properties

void categories
Date due
String note
Number priority
Recurrence recurrence
Reminder reminder
Number status
String summary
String uid

Constants

Number NOT_STARTED
Number IN_PROGRESS
Number COMPLETED
Number WAITING
Number DEFERRED
Number PRIORITY_HIGH
Number PRIORITY_NORMAL
Number PRIORITY_LOW

Constructors

blackberry.pim.Task ()

The Task object is an instance object, where if a new instance is desired, it must be created using the new keyword.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator


Code Example:
<script type="text/javascript">
  // Create our Task 
  var newTask = new blackberry.pim.Task(); 
  newTask.summary = "Get Groceries"; 
  newTask.note = "Pick up eggs, and Milk";  
  newTask.priority = blackberry.pim.Task.PRIORITY_HIGH;   
  newTask.save(); 
</script>

Functions

static Task[] blackberry.pim.Task.find ([filter : blackberry.find.FilterExpression], [orderBy : String], [maxReturn : Number], [isAscending : Boolean])


This method finds the tasks that match the regular expression provided.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator


Parameters
filter Optional expression parameter that defines the search criteria for the find. If no value is provided the method will return all the Tasks on the device.
orderBy Optional 'orderBy' parameter specifying the field which the results will be sorted by. If 'isAscending' is not specified or 'isAscending' is true, the sort results will be in an ascending order. If 'isAscending' is false, the sort results will be in a descending order.
maxReturn Optional integer parameter specifying the maximum number of results to return from the find. If not specified or set to -1, it will return all results found.
isAscending Optional 'isAscending' parameter specifying whether the sort order is ascending or descending. If not specified or set to true, the results sorted by the field specified by 'orderBy' will be in an ascending order. If set to false, the sort results will be in a descending order. If no 'orderBy' value is specified, 'isAscending' is neglected.

void remove ()


This method will remove a Task from the PIM storage.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

void save ()


This method will save the changes made to the Task object.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

Properties

void categories


The list of categories associated to the task.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

Date due


The due date for this task.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

String note


Contains a more complete description than the summary field.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

Number priority


This specifies the priority of the task. Value can be one of the 'Priority' constants. Default value is PRIORITY_NORMAL.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

Recurrence recurrence


This is the rule to store how this task should be repeated if any.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

Reminder reminder


This is the rule to store how the user should be reminded about the task.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

Number status


Current status of this task. Value can be one of the 'Status' constants. Default value is NOT_STARTED.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

String summary


Contains a brief description of the task.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

readonly String uid


Contains the unique ID of the object. It is the primary key and would be automatically generated. This field is read-only.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

Constants

static Number NOT_STARTED


Constant representing the NOT_STARTED status


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

static Number IN_PROGRESS


Constant representing the IN_PROGRESS status


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

static Number COMPLETED


Constant representing the COMPLETED status


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

static Number WAITING


Constant representing the WAITING status


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

static Number DEFERRED


Constant representing the DEFERRED status


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

static Number PRIORITY_HIGH


Constant representing the HIGH priority


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

static Number PRIORITY_NORMAL


Constant representing the NORMAL priority


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

static Number PRIORITY_LOW


Constant representing the LOW priority


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

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