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
API | OS 5.0 | OS 6.0 | OS 7.0 | PlayBook | Ripple |
---|---|---|---|---|---|
blackberry.pim.Task | Y | Y | Y | Y | |
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 ID | OS 5.0 | OS 6.0 | OS 7.0 | PlayBook | Ripple |
---|---|---|---|---|---|
<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 Only) |
---|
This API does not require a <permission> element to be declared in the configuration document of your BlackBerry WebWorks Application. |
API Summary
Constructors
Properties
blackberry.pim.Task
blackberry.pim.Task () |
Supported Platform(s)
- BlackBerry OS 5.0+- Ripple Emulator
Description
The Task object is an instance object, where if a new instance is desired, it must be created using the new keyword.
Code Example(s)
<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>
find
static Task[] find([filter: blackberry.find.FilterExpression], [orderBy: String], [maxReturn: Number], [isAscending: Boolean]) |
Supported Platform(s)
- BlackBerry OS 5.0+- Ripple Emulator
Description
This method finds the tasks that match the regular expression provided.
Parameter | Type | Description |
---|---|---|
filter |
blackberry.find.FilterExpression
Optional |
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 |
String
Optional |
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 |
Number
Optional |
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 |
Boolean
Optional |
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. |
remove
void remove() |
Supported Platform(s)
- BlackBerry OS 5.0+- Ripple Emulator
Description
This method will remove a Task from the PIM storage.
save
void save() |
Supported Platform(s)
- BlackBerry OS 5.0+- Ripple Emulator
Description
This method will save the changes made to the Task object.
Properties:
Property | Type | Description | Supported Platform(s) |
---|---|---|---|
categories |
The list of categories associated to the task.
|
- BlackBerry OS 5.0+
- Ripple Emulator |
|
due | Date |
The due date for this task.
|
- BlackBerry OS 5.0+
- Ripple Emulator |
note | String |
Contains a more complete description than the summary field.
|
- BlackBerry OS 5.0+
- Ripple Emulator |
priority | Number |
This specifies the priority of the task. Value can be one of the 'Priority' constants. Default value is PRIORITY_NORMAL.
|
- BlackBerry OS 5.0+
- Ripple Emulator |
recurrence | Recurrence |
This is the rule to store how this task should be repeated if any.
|
- BlackBerry OS 5.0+
- Ripple Emulator |
reminder | Reminder |
This is the rule to store how the user should be reminded about the task.
|
- BlackBerry OS 5.0+
- Ripple Emulator |
status | Number |
Current status of this task. Value can be one of the 'Status' constants. Default value is NOT_STARTED.
|
- BlackBerry OS 5.0+
- Ripple Emulator |
summary | String |
Contains a brief description of the task.
|
- BlackBerry OS 5.0+
- Ripple Emulator |
uid |
String
readonly |
Contains the unique ID of the object. It is the primary key and would be automatically generated. This field is read-only.
|
- BlackBerry OS 5.0+
- Ripple Emulator |
Constants:
Property | Type | Description | Supported Platform(s) |
---|---|---|---|
NOT_STARTED | Number |
Constant representing the NOT_STARTED status
|
- BlackBerry OS 5.0+
- Ripple Emulator |
IN_PROGRESS | Number |
Constant representing the IN_PROGRESS status
|
- BlackBerry OS 5.0+
- Ripple Emulator |
COMPLETED | Number |
Constant representing the COMPLETED status
|
- BlackBerry OS 5.0+
- Ripple Emulator |
WAITING | Number |
Constant representing the WAITING status
|
- BlackBerry OS 5.0+
- Ripple Emulator |
DEFERRED | Number |
Constant representing the DEFERRED status
|
- BlackBerry OS 5.0+
- Ripple Emulator |
PRIORITY_HIGH | Number |
Constant representing the HIGH priority
|
- BlackBerry OS 5.0+
- Ripple Emulator |
PRIORITY_NORMAL | Number |
Constant representing the NORMAL priority
|
- BlackBerry OS 5.0+
- Ripple Emulator |
PRIORITY_LOW | Number |
Constant representing the LOW priority
|
- BlackBerry OS 5.0+
- Ripple Emulator |
Documentation generated by JsDoc Toolkit 2.4.0 on Sun Dec 30 2012 13:31:20 GMT-0500 (EST)