Sun Java System Calendar Server 6 2005Q4 Developer's Guide

Command: deletecomponents_by_range

Purpose

Delete events and todos from a calendar in a specified range.


Note –

ENS notifications for appid are not yet implemented.


Parameters

Table 7–4 deletecomponents_by_range Parameters

Parameter  

Type  

Purpose  

Required  

Default  

appid

string 

A runtime parameter (not stored in the database) that specifies which application is making the request. ENS uses this parameter to determine which X-Tokens to return. Does not affect WCAP command output. 

For more information on the ENS X-Tokens, see the Sun Java System Communications Services 6 2005Q4 Event Notification Service Guide.

N/A 

calid

string 

Semicolon-separated list of calendar identifiers from which to delete events and todos. 

The calid can be supplied in two formats: 

  • string - calendar identifier

  • mailto:rfc822addr - An email address appended to “mailto:”. The address is mapped to a user with an LDAP lookup, and then the user’s default calendar ID is used. Returns: X-SICS-EMAIL and X-NSCP-CALPROPS-RELATIVE-CALID

Current user’s calid

dtend

Date-Time string 

End time and date of events or todos to be deleted. 

A value of 0 means delete all events and todos up to the end of time. This value must be in coordinated universal time.

0

dtstart

Date-Time string) 

Start time and date of events or todos to be deleted. 

A value of 0 means delete all events and todos from the beginning of time. This value must be in coordinated universal time.

0

fmt-out

string 

The format for the returned data. 

Two format types: 

text/calendar

text/xml

id

unique identifier string 

The session identifier. 

N/A 

smtp

integer (0, 1)

Send email cancellation to user with no calendar. 

0 = No

1 = Yes

1

Description

Use this command to delete the events and todos that fall completely within the specified range from the specified calendars. If a range is not specified, it deletes all events and todos. The range parameters, dtstart and dtend, should be specified in UTC time (the ’Z’ must be on the end). Otherwise, results are unpredictable.

Error Codes

If the operation is successful, the error number of 0 is appended to the error string, If an error occurs while deleting from the calendar, the delete_layer_errno[x] value is set to 1, where x is the calendar’s index in the passed calid list. In addition, errno contains the error: FAILED: DELETECOMPONENTS_BY_RANGE_FAILED (21).

Example

For example, assuming the user has read access to the calendars jdoe and john, the following URL deletes all events and todos from those two calendars:


http://deletecomponents_by_range.wcap
              ?id=2342347923479asdf
              &calid=jdoe;john
              &dtstart=0
              &dtend=0