Class CalendarResourceDAO

All Implemented Interfaces:
LogEnabled, Component, Contextualizable, Serviceable

Calendar Resource DAO
  • Field Details

    • ROLE

      public static final String ROLE
      Avalon Role
  • Constructor Details

  • Method Details

    • deleteResource

      Delete a calendar
      Parameters:
      id - The id of the calendar
      Returns:
      The result map with id, parent id and message keys
    • getResources

      Get the resources from project
      Returns:
      the list of resources
    • getProjectResources

      Get all resources from given projets
      Parameters:
      project - the project
      Returns:
      All resources as JSON
    • getCalendarResourceData

      Get calendar info
      Parameters:
      calendarResource - The calendar
      Returns:
      the calendar data in a map
    • addResource

      public Map<String,Object> addResource(String title, String icon, String instructions, boolean renameIfExists)
      Add a calendar
      Parameters:
      title - The resource title
      icon - The resource icon
      instructions - The resource instructions
      renameIfExists - True to rename if existing
      Returns:
      The result map with id, parentId and name keys
    • editResource

      public Map<String,Object> editResource(String id, String title, String icon, String instructions)
      Edit a resource
      Parameters:
      id - The id of the resource
      title - The resource title
      icon - The resource icon
      instructions - The resource instructions
      Returns:
      The result map with id, parentId and name keys
    • loadResourcesWithAvailability

      public List<Map<String,Object>> loadResourcesWithAvailability(String eventId, String startDateAsStr, String endDateAsStr, String eventStartDateAsStr, String eventEndDateAsStr, String recurrenceType, boolean isFullDay, String originalOccurrenceStartAsStr, String zoneIdAsString)
      Get all available resources between two dates for a given id
      Parameters:
      eventId - the event id
      startDateAsStr - The start date.
      endDateAsStr - The end date.
      eventStartDateAsStr - The start date.
      eventEndDateAsStr - The end date.
      recurrenceType - The recurrence type.
      isFullDay - Is the event full day
      originalOccurrenceStartAsStr - original occurrence start date
      zoneIdAsString - The zone ID used for the dates
      Returns:
      All available resources as JSON
    • _getEvents

      protected List<CalendarEvent> _getEvents(ZonedDateTime startDate, ZonedDateTime endDate)
      Get the events between two dates
      Parameters:
      startDate - Begin date
      endDate - End date
      Returns:
      the list of events