Module: UU::DigitalWorkspace::Calendar

Extended by:
Calendar
Included in:
Calendar
Defined in:
uu_digitalworkspace-0.27.16/lib/uu/digital_workspace/calendar/calendar_get_busy_time_list.rb,
uu_digitalworkspace-0.27.16/lib/uu/digital_workspace/calendar.rb,
uu_digitalworkspace-0.27.16/lib/uu/digital_workspace/calendar/calendar_busy_time_attributes.rb

Overview

Module Calendar

Defined Under Namespace

Classes: CalendarBusyTimeAttributes, CalendarGetBusyTimeList

Constant Summary

PATH =

Service path

'uu/os/Calendar'

Instance Method Summary (collapse)

Instance Method Details

- (UU::OS::REST::ResultList<Calendar::CalendarGetBusyTimeList, Calendar::CalendarBusyTimeAttributes>) get_busy_time_list(role_uri, criteria)

Returns list of digital workspace calendar blocks for the specified user according to the specified parameters time_min and time_max. The maximum time difference between time_min and time_max is six weeks.

Examples:

UU::DigitalWorkspace::Calendar.get_busy_time_list('ues:TERRITORY:ROLE',
   :access_role_uri => "ues:TERRITORY:ACCESS_ROLE",
   :time_min => "2014-07-01T09:00:00.000+01:00",
   :time_max => "2014-07-31T18:00:00.000+01:00")

Parameters:

  • role_uri (String, UU::OS::UESURI)

    Not nil. URI of the role, access role or personal role. User's list of time blocks in the calendar is derived from the primary cast in case that role is entered and access_role_uri is not. User is known in case that access role or personal role is entered. Parameter must be filled, otherwise the command fails.

  • criteria (UU::DigitalWorkspace::Calendar::CalendarGetBusyTimeList)

    Specific options.

Options Hash (criteria):

  • :access_role_uri (String, UU::OS::UESURI)

    URI of the user’s access role. Entered access role must be cast to the role specified in command main entity. Parameter can be used if the main entity is the role (not Access Role, not Personal Role).

  • :time_min (String)

    Not nil. The start of the time interval, where blocks of time with date_start equal or later than entered value in this parameter will be returned in the result. The entered value must be in ISO 8601 format.

  • :time_max (String)

    Not nil. The end of the time interval, where blocks of time with date_end equal or former than entered value in this parameter will be returned in the result. The entered value must be in ISO 8601 format.

Returns:



30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'uu_digitalworkspace-0.27.16/lib/uu/digital_workspace/calendar.rb', line 30

def get_busy_time_list(role_uri, criteria)
  svc = UU::OS::REST::RemoteClient.new(Calendar)
  dto = UU::DigitalWorkspace::Calendar::CalendarGetBusyTimeList.new(criteria)

  svc.add_parameter('timeMin', dto.time_min)
  svc.add_parameter('timeMax', dto.time_max)
  svc.add_parameter('accessRoleUri', dto.access_role_uri)

  UU::OS::QoS::QoSHandler.auto_retry do
    res = svc.get('getBusyTimeList', UU::OS::UESURI.new(role_uri))
    return UU::OS::REST::ResultList.new(Calendar::CalendarGetBusyTimeList, Calendar::CalendarBusyTimeAttributes, res)
  end
end