Appointment

The Appointment object represents an appointment in your calendar.


Supported Platform(s)

- BlackBerry OS 5.0+
- Ripple Emulator
View Supported Platform Table
APIBB5.0BB6.0BB7.0PB1.0PB2.0BB10Ripple
blackberry.pim.Appointment Y Y Y      Y
blackberry.pim.Appointment.find Y Y Y      Y
remove Y Y Y      Y
save Y Y Y      Y
allDay Y Y Y      Y
attendees Y Y Y      Y
end Y Y Y      Y
freeBusy Y Y Y      Y
location Y Y Y      Y
note Y Y Y      Y
recurrence Y Y Y      Y
reminder Y Y Y      Y
start Y Y Y      Y
summary Y Y Y      Y
uid Y Y Y      Y
FREE Y Y Y      Y
TENTATIVE Y Y Y      Y
BUSY Y Y Y      Y
OUT_OF_OFFICE 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.Appointment" /> Y Y Y      Y
<feature id="blackberry.pim.Attendee" /> 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.find" /> 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

Appointment[] blackberry.pim.Appointment.find
void remove
void save

Properties

Boolean allDay
Attendee attendees
Date end
Number freeBusy
String location
String note
Recurrence recurrence
Reminder reminder
Date start
String summary
String uid

Constants

Number FREE
Number TENTATIVE
Number BUSY
Number OUT_OF_OFFICE

Constructors

blackberry.pim.Appointment ([service : Service])

This Appointment object can be used for manipulating calendar appointments. The Appointment 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


Parameters
service Optional parameter specifying which service to create this appointment for. If not provided, the default device service is used.

Code Example:
<script type="text/javascript">
  //Create our Event
  var newAppt = new blackberry.pim.Appointment();
  newAppt.location = "Your office";
  newAppt.summary = "Talk about new project";
  newAppt.freeBusy = blackberry.pim.Appointment.FREE;

  // Create our hour time slot
  var start = new Date();
  newAppt.start = start;
  var end = new Date();
  end.setHours(start.getHours() + 1);
  newAppt.end = end;

  // Create Attendee
  var attendees = [];
  var onlyAttendee = new blackberry.pim.Attendee();
  onlyAttendee.address = "john@foo.com";
  onlyAttendee.type = blackberry.pim.Attendee.INVITED;
  attendees.push(onlyAttendee);

  newAppt.attendees = attendees;
  newAppt.save();
</script>

Functions

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


Looks up the appointments that match the regular expression provided.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator


Parameters
filter optional parameter that defines the search criteria for the find. If no value is provided, the method will return all the appointments on the device.
orderBy optional 'orderBy' parameter specifying the field which the results will be sorted by. If 'isAscending' is not supplied 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 supplied or set to -1, it will return all results found.
service optional parameter to define which service you wish to search for your appointments. If not provided the default service for appointments will be used.
isAscending optional 'isAscending' parameter specifying whether the sort order is ascending or descending. If not supplied 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 ()


Removes an event from the PIM storage.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

void save ()


Saves the changes made to the Appointment object.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

Properties

Boolean allDay


Boolean field denoting whether the appointment is an all day event.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

Attendee attendees


The list of attendees that will be invited to this appointment.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

Date end


The end date for this appointment.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

Number freeBusy


The free/busy status for the appointment. Value can be one of the FreeBusy options.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

String location


Holds the location information for this appointment, for example, a meeting room name.


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

Recurrence recurrence


This is the rule to store how this appointment 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 appointment.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

Date start


The start date for this appointment.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

String summary


Contains a brief description of the appointment.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

readonly String uid


Represents the unique ID of the appointment.


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

Constants

static Number FREE


Marks time as free in calendar


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

static Number TENTATIVE


Mark time as tentative in calendar


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

static Number BUSY


Mark time as busy in calendar


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

static Number OUT_OF_OFFICE


Mark time as out of office in calendar


Supported Platforms
 - BlackBerry OS 5.0+
 - Ripple Emulator

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