Class AgendaAvailabilityServiceImpl

java.lang.Object
org.exoplatform.agenda.service.AgendaAvailabilityServiceImpl
All Implemented Interfaces:
org.exoplatform.agenda.service.AgendaAvailabilityService

@Service public class AgendaAvailabilityServiceImpl extends Object implements org.exoplatform.agenda.service.AgendaAvailabilityService
The one place free/busy is computed, and the one place it is guarded.

See AgendaAvailabilityService for the two rules — the calendar ACL floor and the target's own sharing setting that may widen it — and why they live here rather than in each surface.

  • Constructor Details

    • AgendaAvailabilityServiceImpl

      @Autowired public AgendaAvailabilityServiceImpl(org.exoplatform.agenda.service.AgendaEventService agendaEventService, org.exoplatform.social.core.manager.IdentityManager identityManager, org.exoplatform.social.core.space.spi.SpaceService spaceService, org.exoplatform.agenda.service.AgendaUserSettingsService agendaUserSettingsService)
      Builds the service.
      Parameters:
      agendaEventService - the event service the busy times are read from
      identityManager - used to resolve the asking and target identities
      spaceService - used by the calendar ACL to resolve space membership, and to decide whether two users share a space
      agendaUserSettingsService - owner of each user's sharing choice
  • Method Details

    • getAvailability

      public List<org.exoplatform.agenda.model.UserAvailability> getAvailability(List<Long> targetIdentityIds, ZonedDateTime start, ZonedDateTime end, long userIdentityId) throws IllegalAccessException
      Specified by:
      getAvailability in interface org.exoplatform.agenda.service.AgendaAvailabilityService
      Throws:
      IllegalAccessException
    • getBusyTime

      public List<org.exoplatform.agenda.model.UserBusyTime> getBusyTime(List<Long> targetIdentityIds, ZonedDateTime start, ZonedDateTime end, long userIdentityId)
      Specified by:
      getBusyTime in interface org.exoplatform.agenda.service.AgendaAvailabilityService
    • suggestMeetingTime

      public List<org.exoplatform.agenda.model.TimeBlock> suggestMeetingTime(List<Long> attendeeIdentityIds, Duration duration, ZonedDateTime windowStart, ZonedDateTime windowEnd, boolean morningsOnly, boolean afternoonsOnly, int limit, long userIdentityId) throws IllegalAccessException
      Specified by:
      suggestMeetingTime in interface org.exoplatform.agenda.service.AgendaAvailabilityService
      Throws:
      IllegalAccessException
    • getConflicts

      public org.exoplatform.agenda.model.AvailabilityConflicts getConflicts(List<Long> attendeeIdentityIds, ZonedDateTime start, ZonedDateTime end, long userIdentityId)
      Specified by:
      getConflicts in interface org.exoplatform.agenda.service.AgendaAvailabilityService
    • rankDateOptionsByAvailability

      public List<org.exoplatform.agenda.model.EventDateOption> rankDateOptionsByAvailability(List<org.exoplatform.agenda.model.EventDateOption> dateOptions, List<Long> attendeeIdentityIds, long userIdentityId)
      Specified by:
      rankDateOptionsByAvailability in interface org.exoplatform.agenda.service.AgendaAvailabilityService