Sun Java System Calendar Server 6.3 WCAP Developer's Guide

Calendar Server WCAP Attachment Support

Attachments can be stored as part of an event using the storeevents command over the http post command. Attachment data resides in an internal data store events separate from the database where events and tasks are stored. Each attachment is assigned a unique ID, called an attachment ID. Events and tasks contain the attachment ID's rather than the actual attachment data. The following is a list of attachment features:


Note –

As part of the new attachment support model, the old attachment parameter has been deprecated. However, for backwards compatibility, it remains functional.


There are two parts that comprise the attachment support solution:

Attachment Store

The attachment store acts as a repository for the Calendar Server attachments.

The following features encapsulate the functionality of the attachment store:

Life Cycle of Attachment in Calendar Server

The life cycle of an attachment explains the process of creating, sending, storing, and deleting an attachment from the Calendar Server. The following example illustrates the life cycle of an attachment by explaining the procedure to attach a file from your system and delete it in the Calendar Server:

  1. Click the New Event link in the Calendar, to create a new event in the Communications Express.

    The New Event window opens up. You need to specify the event details such as Title, Start Time, End Time, Type, Privacy, people to invite and so on for the new event.

  2. Click Add Attachment icon in the Attachments section, to add file as an attachment.

    The Attach File window opens up.

    1. Click the Browse button.

    2. Select the file that you want to attach from the File Upload dialog box.

    3. Click the Add icon to add the file in the attachments list.

      You can see the name and size of the file in the attachments list. You can add multiple attachments to the list by clicking the Browse button and selecting the required files. You can also delete the selected attachments from the list by clicking the Delete icon in the Action tab.

    4. Click the Attach icon to add the selected attachments in the Attachments list box in the New event window.

    5. Click the Save icon to save the attachment.

      The saved attachment is displayed as an event against the corresponding timing in the Calendar.

    Calendar Server issues storeevents.wcap command, which provides all the information about the attachment. Calendar Server stores the attachment file in the attachment store and keeps a reference to the attachment within the event structure. For more information on the storeevents command, refer the storeevents.wcap section.

  3. Click the event at any point of time to view its details.

    Communications Express issues the fetchevents_by_id and provides the Calendar Server with all the information about the attachment. It also sends fetchattach=0. For more information on fetchevents_by_id command, refer the fetchevents_by_id.wcap section. In response to the fetchevents_by_id command, the server provides information about the attachment such as attachment id, size of attachment, URL to retrieve the attachment, client id if any was supplied, the file name of the original file attached and so on.

    The client displays the attachment in the form of a URL.

  4. Click the URL to view the attached file.

    Communications Express issues fetchattachment.wcap command to the server. The server sends back the data about the attachment in the form of HTTP response.

  5. Delete the attachment (at any point of time) from the event.

    Communications Express issues the storeevents command and supplies the deleteid parameter along with it. The deleteid parameter contains the ID of the attachment to be deleted. The server deletes the attachment from the back-end attachment store.