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

CSAPI Interface Samples

The distribution includes sample code for three of the CSAPI interfaces in the csapi/samples directory. You can use these files as templates in building your own CSAPI modules.

The following sample modules are provided:

Table 1–1 CSAPI Interface Samples

CSAPI Module Sample  

Description  

Authentication

This sample overrides the default login authentication mechanism, using local authentication to validate users. The sample works on SolarisTM and on Windows:

On Solaris, it uses the pam library to authenticate against the local /etc/passwd file or NIS.

On Windows, it uses the WIN32 API LogonUser, which authenticates against Microsoft clients. In order for this sample to work properly on Windows, the administrator must enable the privilege for users to log on using batch jobs. You can do this from within the UserManager Administrative Tool, under the Policies/User Rights section.

DataTranslator

This sample overrides the default format translation of incoming and outgoing data. It shows how to convert icalendar data into Microsoft Outlook CSV format. CSV format is a simple line-oriented file, where each entry has its own line and properties are separated by commas.

UserAttributes

This sample overrides the default mechanism for storing and retrieving user attributes. It shows how to use the Berkeley database to store local user preferences. This code works on all supported platforms. The database is a simple table-driven key-value pair. The key for storing user preferences is a string stored as $user.$pref. The key must be unique.