Interface ActivityUnravellingSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface ActivityUnravellingSession extends OsidSession

This session provides methods for retrieving and expanding activities.

This session defines views that offer differing behaviors when retrieving multiple objects.

  • comparative view: elements may be silently omitted or re-ordered
  • plenary view: provides a complete set or is an error condition
  • isolated course catalog view: All activity methods in this session operate, retrieve and pertain to activities defined explicitly in the current course catalog.
  • federated course catalog view: All activity event in this session operate, retrieve and pertain to all activities defined in this course catalog and any other cours ecatalogs implicitly available in this course catalog through course catalog inheritence.
  • Method Details

    • getCourseCatalogId

      Id getCourseCatalogId()
      Gets the CourseCatalog Id associated with this session.
      Returns:
      the CourseCatalog Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getCourseCatalog

      Gets the CourseCatalog associated with this session.
      Returns:
      the course catalog
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canUnravelActviities

      boolean canUnravelActviities()
      Tests if this user can perform Activity lookups. 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 lookup operations to unauthorized users.
      Returns:
      false if lookup methods are not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • useComparativeActivityView

      void useComparativeActivityView()
      The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error. This view is used when greater interoperability is desired at the expense of precision.
      Compliance:
      mandatory - This method is must be implemented.
    • usePlenaryActivityView

      void usePlenaryActivityView()
      A complete view of the Activity returns is desired. Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.
      Compliance:
      mandatory - This method is must be implemented.
    • useFederatedCourseCatalogView

      void useFederatedCourseCatalogView()
      Federates the view for methods in this session. A federated view will include activities in course catalogs which are children of this course catalog in the course catalog hierarchy.
      Compliance:
      mandatory - This method is must be implemented.
    • useIsolatedCourseCatalogView

      void useIsolatedCourseCatalogView()
      Isolates the view for methods in this session. An isolated view restricts lookups to this course catalog only.
      Compliance:
      mandatory - This method is must be implemented.
    • getExplicitActivityByActivity

      Activity getExplicitActivityByActivity(Id activityId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the activity where the given activity Id was issued as part of a recurring series.
      Parameters:
      activityId - an activity Id
      Returns:
      the returned Activity
      Throws:
      NotFoundException - activityId is not found
      NullArgumentException - activityId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getExplicitActivitiesByActivities

      ActivityList getExplicitActivitiesByActivities(IdList activityIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets an ActivityList corresponding to the given event IdList where the activities were implcitly created from the recurring series. In plenary mode, the returned list contains all of the activities corresponding to the events in the Id list, in the order of the list, including duplicates, or an error results if an Id in the supplied list is not found or inaccessible. Otherwise, inaccessible activities may be omitted from the list and may present the elements in any order including returning a unique set.
      Parameters:
      activityIds - the list of Ids to retrieve
      Returns:
      the returned Activity list
      Throws:
      NotFoundException - an Id was not found
      NullArgumentException - eventIds is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • expandActivity

      Expands the given activity into a series of single-date activities In plenary mode, the returned list contains all of the activities in the series, including duplicates, or an error results. In comparative mode, activities may be omitted from the list and may present the elements in any order, including providing a unique set.
      Parameters:
      activityId - Id of the Activity
      Returns:
      the returned Activity list
      Throws:
      NotFoundException - activityId was not found
      NullArgumentException - activityId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method is must be implemented.
    • expandActivityInDateRange

      ActivityList expandActivityInDateRange(Id activityId, DateTime from, DateTime to) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Expands the given activity into a series of single-date activities that fall within the given date range inclusive. In plenary mode, the returned list contains all of the activities in the series, including duplicates, or an error results. In comparative mode, activities may be omitted from the list and may present the elements in any order, including providing a unique set.
      Parameters:
      activityId - Id of the Activity
      from - start date
      to - end date
      Returns:
      the returned Activity list
      Throws:
      InvalidArgumentException - to is less than from
      NotFoundException - activityId was not found
      NullArgumentException - activityId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method is must be implemented.
    • expandActivities

      Expands the given recurring activities into a series of single-date activities. In plenary mode, the returned list contains all of the activities in the series, including duplicates, or an error results. In comparative mode, activities may be omitted from the list and may present the elements in any order, including providing a unique set.
      Parameters:
      activityIds - the list of Ids to expand
      Returns:
      the returned Activity list
      Throws:
      NotFoundException - an Id was not found
      NullArgumentException - activityIds is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • expandActivitiesInDateRange

      ActivityList expandActivitiesInDateRange(Id activityIds, DateTime from, DateTime to) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Expands the given recurring activities into a series of single-date activities that fall within the given date range inclusive. In plenary mode, the returned list contains all of the activities in the series, including duplicates, or an error results. In comparative mode, activities may be omitted from the list and may present the elements in any order, including providing a unique set.
      Parameters:
      activityIds - the list of Ids to expand
      from - start date
      to - end date
      Returns:
      the returned Activity list
      Throws:
      InvalidArgumentException - to is less than from
      NotFoundException - an Id was not found
      NullArgumentException - activityIds is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method is must be implemented.
    • getActivitiesByDate

      Gets a list of normalized unexpanded activities where the given date falls within the span of a single activity meeting time. In plenary mode, the returned list contains all known activities or an error results. Otherwise, the returned list may contain only those activities that are accessible through this session.
      Parameters:
      datetime - a date
      Returns:
      the returned Activity list
      Throws:
      NullArgumentException - datetime is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getActivtiesInDateRange

      Gets a normalized list of unexpanded activities whose series falls entirely within the given range inclusive. In plenary mode, the returned list contains all known activities or an error results. Otherwise, the returned list may contain only those activities that are accessible through this session.
      Parameters:
      from - start date
      to - end date
      Returns:
      the returned Activity list
      Throws:
      InvalidArgumentException - to is less than from
      NullArgumentException - from or to is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getNumberOfActivities

      long getNumberOfActivities(Id activityId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the number of activity meeting times in the recurring series.
      Parameters:
      activityId - Id of the recurring Activity
      Returns:
      the number of meeting times
      Throws:
      NotFoundException - activityId was not found
      NullArgumentException - activityId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method is must be implemented.
    • getNumberOfActivitiesInDateRange

      long getNumberOfActivitiesInDateRange(Id activityId, DateTime from, DateTime to) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the number of activity meeting times in the recurring series between the given dates inclusive.
      Parameters:
      activityId - Id of the recurring Activity
      from - start date
      to - end date
      Returns:
      the number of meeting times
      Throws:
      InvalidArgumentException - to is less than from
      NotFoundException - activityId was not found
      NullArgumentException - activityId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method is must be implemented.