Identifying Calendars

A calendar is identified by a namespace and a name.

These are defined as follows:

  • namespace   - a convenient grouping for calendars. A namespace is not compulsory; for example, the default Base calendar SYSTEM does not have a namespace.
  • name   - a name for the individual calendar. It must be unique within the namespace, but not necessarily across the whole system.

A calendar also has a version number. The calendar is created at version 0 and the version number is incremented by one each time a change is made. However the version does not form part of the calendar's identity, in the sense that it does not have to be passed when retrieving a calendar using the getCalendar operation.

The version number is used to implement optimistic locking (see http://c2.com/cgi/wiki?OptimisticLocking for details) when calling save and update operations, in order to prevent multiple clients from changing the same calendar.

For example:

Request:
<wor:saveCalendarEntry version="1" namespace="LONDON" name="UK_PUBLIC_HOLIDAYS"  start="2012-06-01T00:00:00Z" end="2012-06-30T00:00:00Z">
    <create-working-day description="JUBILEE" all-day="true" start="2012-06-05T00:00:01Z" end="2012-06-05T23:59:59Z" free-busy="BUSY"/>
</wor:saveCalendarEntry>
Response:
<saveCalendarEntryResponse end="2012-06-30T00:00:00Z" name="UK_PUBLIC_HOLIDAYS" namespace="LONDON" start="2012-06-01T00:00:00Z" version="2" xmlns="http://workcal.api.dac.n2.tibco.com">