Interface CalendarSearchSession

All Superinterfaces:
AutoCloseable, CalendarQuerySession, Closeable, OsidSession, OsidSession

public interface CalendarSearchSession extends CalendarQuerySession

This session provides methods for searching among Calendar objects. The search query is constructed using the CalendarQuery .

getCalendarsByQuery() is the basic search method and returns a list of Calendar objects.A more advanced search may be performed with getCalendarsBySearch() .It accepts a CalendarSearch in addition to the query for the purpose of specifying additional options affecting the entire search, such as ordering. getCalendarsBySearch() returns a CalendarSearchResults that can be used to access the resulting CalendarList or be used to perform a search within the result set through CalendarSearch .

Calendars may have a query record indicated by their respective record types. The query record is accessed via the CalendarQuery .

  • Method Details

    • canSearchCalendars

      boolean canSearchCalendars()
      Tests if this user can perform Calendar searches. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer search operations to unauthorized users.
      Specified by:
      canSearchCalendars in interface CalendarQuerySession
      Returns:
      false if search methods are not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getCalendarSearch

      CalendarSearch getCalendarSearch()
      Gets a calendar search.
      Returns:
      a calendar search
      Compliance:
      mandatory - This method must be implemented.
    • getCalendarSearchOrder

      CalendarSearchOrder getCalendarSearchOrder()
      Gets a calendar search order. The CalendarSearchOrder is supplied to a CalendarSearch to specify the ordering of results.
      Returns:
      the calendar search order
      Compliance:
      mandatory - This method must be implemented.
    • getCalendarsBySearch

      CalendarSearchResults getCalendarsBySearch(CalendarQuery calendarQuery, CalendarSearch calendarSearch) throws OperationFailedException, PermissionDeniedException
      Gets the search results matching the given search query using the given search.
      Parameters:
      calendarQuery - the calendar query
      calendarSearch - the calendar search
      Returns:
      the calendar search results
      Throws:
      NullArgumentException - calendarQuery or calendarSearch is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - calendarQuery or calendarSearch is not of this service
      Compliance:
      mandatory - This method must be implemented.
    • getCalendarQueryFromInspector

      CalendarQuery getCalendarQueryFromInspector(CalendarQueryInspector calendarQueryInspector)
      Gets a calendar query from an inspector. The inspector is available from an CalendarSearchResults .
      Parameters:
      calendarQueryInspector - a calendar query inspector
      Returns:
      the calendar query
      Throws:
      NullArgumentException - calendarQueryInspector is null
      UnsupportedException - calendarQueryInspector is not of this service
      Compliance:
      mandatory - This method must be implemented.