1.3. Calendar¶
The calendar can provide information about events from Calendars in iCalendar format.
1.3.2. Calendars¶
Currently the following calendars can be accessed in the csra.
calendar_name | Description |
---|---|
LSP_CSRA_Raumblockung | Reservations of and events in the csra apartments. |
LSP_CSRA_Termine | Events around the csra project. |
Personal_Calendar | The personal calendar of the csra user. [1] |
CITEC_1_112 | The official reservations calendar of the csra. [1] |
1.3.3. Interfaces¶
The set of available calendars is published at startup and can be requested at runtime.
Scope (+ Method) | Type |
---|---|
/apartment/calendar/ |
CalendarList |
/apartment/calendar/calendarList() |
CalendarList |
For every calendar a set of services is provided. The <calendar_name>
in scopes must
be replaced by a namei from the Calendars section for the
specific calendar.
1.3.3.1. Calendar content¶
The complete calendar content is published at startup and can be requested at runtime.
Scope (+ Method) | Type |
---|---|
/apartment/calendar/<calendar_name>/content/ |
CalendarComponents |
/apartment/calendar/<calendar_name>/completeContent() |
CalendarComponents |
1.3.3.2. Event start/end notification¶
All calendars inform about events at different time points relative to their start and end time.
Scope (Informer) | Type |
---|---|
/apartment/calendar/<calendar_name>/starts/<time_subscope> |
CalendarComponents |
/apartment/calendar/<calendar_name>/ends/<time_subscope> |
CalendarComponents |
The following times are notified.
Time until start/end | time_subscope |
---|---|
60 Minutes | inonehour |
30 Minutes | inhalfanhour |
15 Minutes | infifteenminutes |
10 Minutes | intenminutes |
5 Minutes | infiveminutes |
1 Minutes | inoneminute |
0 Minutes | now |
1.3.3.3. Event alarm notification¶
Because every calendar event can be combined with an alarm (see RFC2445) the corresponding events are published at the alarm time.
Scope (Informer) | Type |
---|---|
/apartment/calendar/<calendar_name>/alarm |
CalendarComponents |
1.3.3.4. Event service¶
It is possible to request all events of a specific time period in a calendar.
Scope (Local Server) + Method | Parameter Type | Return Type |
---|---|---|
/apartment/calendar/<calendar_name>/alarm |
CalendarQuery | CalendarQueryResult |
1.3.4. Examples¶
Find out which calendars are currently accessable:
> $prefix/bin/rsb-toolscl call \
-I $prefix/share/rst0.17/proto/sandbox \
-l $prefix/share/rst0.17/proto/'**'/CalendarList.proto \
'spread:/apartment/calendar/calendarList()'
#<CALENDAR-LIST {100B4AF823}>
Calendar-Id:
"Personal_Calendar"
"LSP_CSRA_Raumblockung"
"LSP_CSRA_Termine"
"CITEC_1_112"
Get all apartment blocking events between now and in one hour using java:
RemoteServer server = Factory
.getInstance()
.createRemoteServer("/apartment/calendar/LSP_CSRA_Termine/");
server.activate();
CalendarQuery request = CalendarQuery.newBuilder()
.setSearchEvents(true)
.setSearchTodos(false)
.setCalculateTimePeriods(true)
.setStartTime(DateTime.newBuilder()
.setTimezoneId("UTC")
.setMillisecondsSinceEpoch(System.currentTimeMillis())
.build())
.setEndTime(DateTime.newBuilder()
.setTimezoneId("UTC")
.setMillisecondsSinceEpoch(System.currentTimeMillis() + ONE_HOUR_MILLIS)
.build())
.build();
CalendarQueryResult result = server.call("calendarEvents", request);
Get all apartment blocking events between tomorrow 8 o’clock and tomorrow 16 o’clock using rsb-tools:
$prefix/bin/rsb-toolscl call \
-I $prefix/share/rst0.17/proto/sandbox \
-I $prefix/share/rst0.17/proto/stable \
-l $prefix/share/rst0.17/proto/'**/CalendarQuery.proto' \
-l $prefix/share/rst0.17/proto/'**/CalendarQueryResult.proto' \
'spread:/apartment/calendar/LSP_CSRA_Raumblockung/calendarEvents('\
'pb:.rst.calendar.CalendarQuery:{'\
'start_time: {'\
' timezone_id: "UTC" '\
' milliseconds_since_epoch: '$(date -u -d "tomorrow 8:00" +%s%N | cut -b1-13)' }'\
'end_time: { '\
' timezone_id: "UTC" '\
' milliseconds_since_epoch: '$(date -u -d "tomorrow 16:00" +%s%N | cut -b1-13)' }'\
'search_events: true '\
'search_todos: false }'\
')'
[1] | (1, 2) To get access to the sogo calendars of the csra user one needs to enter the users password when the calendar application starts. |