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

Command: set_calprops

Purpose

Set the calendar properties of a calendar.

Parameters

Table 7–29 set_calprops Parameters

Parameter  

Type  

Purpose  

Required  

Default  

acl 

string 

A semicolon-separated list of strings specifying the new value of the access control entries. 

""

cal

encoded string 

A list of parameters to decode. 

There can be multiple instances of this parameter. 

N/A 

calid

string 

Identifier of the calendar to modify. 

N/A 

categories

string 

A semicolon-separated list of strings containing the new categories the calendar belongs to. 

N/A 

charset

string 

The character set for the calendar. 

N/A 

description

string 

The description of the calendar. 

N/A 

doublebooking

integer 

Allow or disallow double booking. 

1 = Allow double booking.

0 = Disallow double booking.

N/A 

fbinclude

integer 

Specifies whether the calendar can be used in any free/busy lookup. 

1 = Include the calendar.

0 = Do not include the calendar.

If you want to remove the calendar from the free/busy lookup list, pass in fbinclude=0.

N/A 

fbinclude

integer (0,1)

Specifies whether the calendar is used for calculating the free-busy time for this user. 

0 = Do not include this calendar in the free-busy lookup calculation.

1 = Include this calendar in the free-busy calculation.

N/A 

fmt-out

string 

The format for the returned data. 

The three format types: 

text/calendartext/xml

text/calendar

id

unique identifier string 

The session identifier. 

N/A 

lang

string 

The language of the calendar. 

N/A 

master

string 

The email contact for the calendar. 

N/A 

multiple

integer 

The number of calendars for which to set these preferences. 

0

name

string 

The new text name of the calendar. 

N/A 

owners

string 

A semicolon-separated list of strings containing he new list non-primary owners. 

N/A 

read

integer 

This parameter has been deprecated in favor of the acl parameter. It remains here only for backwards compatibility.

The new read-access value of the calendar. The value can be one of the following: 

0 PRIVATE1 PUBLIC 4 PRIMARY_OWNER_ONLY

N/A 

tzid

string 

The new time zone identifier for this calendar. 

""

write

integer 

This parameter has been deprecated in favor of the acl parameter. It remains here only for backwards compatibility.

The new write-access value of the calendar. The value can be one of the following: 

0 PRIVATE1 PUBLIC 4 PRIMARY_OWNER_ONLY

N/A 

Description

This command is an update command, that is, it only changes the values of the parameters you specify. It is not necessary to supply all parameters in the command, only the ones you want to change. Calendar properties are special states of a calendar, which includes the calendar's name, read and write permission values (acl parameter), the list of owners, and the list of categories.

Use set_calprops to do the following:

Single Calendar Example

Here is a sample URL that sets calendar properties: (The calid parameter is required.)

http://calendarserver?set_calprops.wcap
                     ?id=dfasdfzd3ds
                     &calid=jdoe
                     &categories=business;meeting
                     &name=John%39s%32Calendar

Multiple Calendars Example

To set properties of several calendars at one time, set the multiple parameter to the number of calendars to be set, then pass a cal parameter for each calendar. The cal parameter contains an encoded string with the complete property parameter list for the identified calendar. In this string, replace all special characters with a percent character (%), followed by the hexadecimal ASCII code for the special character. ASCII hex codes for common special characters are as follows:

Character  

Code  

=

%3D

&

%26

""

%22

For example, the following URL modifies three calendars with ID's xxxx, yyyy, and zzzz, setting the descriptions to X-Calendar, Y-Calendar, and Z-Calendar, respectively:

http://calendarserver?id=fasdfzd3ds
                     &multiple=3
                     &cal=calid%3Dxxxx%26description%3DX-Calendar
                     &cal=calid%3Dyyyy%26description%3DY-Calendar
                     &cal=calid%3Dzzzz%26description%3DZ-Calendar

This is the equivalent of the following three URL's:

http://calendarserver?id=fasdfzd3ds&calid=xxxx&desc=X-Calendar
http://calendarserver?id=fasdfzd3ds&calid=yyyy&desc=Y-Calendar
http://calendarserver?id=fasdfzd3ds&calid=zzzz&desc=Z-Calendar

In the example, notice that since the multiple parameter is set to 3, there are three instances of the cal parameter. The value of each cal parameter is an encoded list of parameters and their values. The server decodes each cal parameter and set the properties appropriately.

Access Control Entries

See Access Control Information, in the Common Topics section at the front of this chapter. Note that due to limitations of the user interface, it is advisable to limit the number of individuals listed in the ACE's to a maximum of 75 per calendar.

Double Booking

If the ics.conf parameter user.allow.doublebook is set to “yes”, then:

However, if the user.allow.doublebook parameter is set to “no”, then double booking is disallowed, no matter what the calendar property is set to.

Freebusy Access

See Free-busy Calendars, in the Common Topics section at the front of this chapter.

Choosing a Different Language or Character Set

See Changing Language or Character Set, in the Common Topics section at the front of this chapter.