Calendar ===================== The calendar can provide information about events from Calendars in `iCalendar `_ format. Related resources ----------------- Component repository: - Browse component repository: `caldavcalendar `_. - ``git clone https://projects.cit-ec.uni-bielefeld.de/git/lsp-csra.caldavcalender.git`` System startup: - The calendar can be found in ``lsp-csra-base.sh`` on the ``situation`` tab. - The component script is called ``caldavcalendar_server``. Related projects: - iCalendar specification `RFC2445`_. .. _section-calendar-calendars: 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. [#sogo]_ CITEC_1_112 The official reservations calendar of the csra. [#sogo]_ ======================== ========================================================================= 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 ```` in scopes must be replaced by a namei from the :ref:`section-calendar-calendars` section for the specific calendar. Calendar content ^^^^^^^^^^^^^^^^^^^^ The complete calendar content is published at startup and can be requested at runtime. ============================================================== ========================== Scope (+ Method) Type ============================================================== ========================== ``/apartment/calendar//content/`` `CalendarComponents`_ ``/apartment/calendar//completeContent()`` `CalendarComponents`_ ============================================================== ========================== 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//starts/`` `CalendarComponents`_ ``/apartment/calendar//ends/`` `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 ============================ =================== 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//alarm`` `CalendarComponents`_ ================================================================= ======================== 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//alarm`` `CalendarQuery`_ `CalendarQueryResult`_ =============================================== ====================== ====================== Examples -------------- Find out which calendars are currently accessable: .. code-block:: bash :emphasize-lines: 1,4 > $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-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: .. code-block:: java :emphasize-lines: 7,12,14,18 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: .. code-block:: bash :emphasize-lines: 6,10,13 $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 }'\ ')' .. _CalendarList: http://docs.cor-lab.de//rst-manual/trunk/html/generated/sandbox/package-rst-calendar.html#rst.calendar.CalendarList .. _CalendarComponents: http://docs.cor-lab.de//rst-manual/trunk/html/generated/sandbox/package-rst-calendar.html#rst.calendar.CalendarComponents .. _CalendarQuery: http://docs.cor-lab.de//rst-manual/trunk/html/generated/sandbox/package-rst-calendar.html#rst.calendar.CalendarQuery .. _CalendarQueryResult: http://docs.cor-lab.de//rst-manual/trunk/html/generated/sandbox/package-rst-calendar.html#rst.calendar.CalendarQueryResult .. _RFC2445: http://tools.ietf.org/html/rfc2445 .. [#sogo] To get access to the sogo calendars of the csra user one needs to enter the users password when the calendar application starts.