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

Command: deletecalendar

Purpose

This command deletes a user’s calendar.

Parameters

Table 7–3 deletecalendars Parameter

Parameter  

Types  

Purposes  

Required  

Default  

calid

string 

The name of the calendar to delete. 

N/A 

id

unique identifier string 

The session identifier. 

N/A 

fmt-out

string 

The format for the returned data. 

Two format types: 

text/calendar

text/xml

text/calendar

         

unsubscribe

integer (0,1)

Determines if deleted calendars should be removed from the user’s subscribed calendar list. 

0 = Do not unsubscribe

1 = Unsubscribe deleted calendars

1

Description

Use this command to delete a user’s calendar. You must pass in the calid, which is the name of the calendar to delete.

Only users with administrative privilege can use this command, unless the ics.conf parameter service.wcap.allowdeletecalendars is set to “yes” (which is the default).

Returns

The returned output is the formatted output from a call to fetchcomponents_by_range.

Error Codes

If the operation is successful, the error number of 0 is appended to the error string. If the calid doesn’t exist in the database, the delete_layer_errno[x] value is set to 1, where x is the calendar’s index in the passed calid list. In addition, the errno variable contains the error: FAILED: CALENDAR_DOES_NOT_EXIST (29).

Example

For example, sending this URL deletes the calendar named newcal.


http://calendarserver/deletecalendar.wcap
               ?id=b5q2o8ve2rk02nv9t6
               &calid=newcal