Interface ActivityUnravellingSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, 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 Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can performActivitylookups.expandActivities(IdList activityIds) Expands the given recurring activities into a series of single-date activities.expandActivitiesInDateRange(Id activityIds, DateTime from, DateTime to) Expands the given recurring activities into a series of single-date activities that fall within the given date range inclusive.expandActivity(Id activityId) 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.expandActivityInDateRange(Id activityId, DateTime from, DateTime to) Expands the given activity into a series of single-date activities that fall within the given date range inclusive.getActivitiesByDate(DateTime datetime) Gets a list of normalized unexpanded activities where the given date falls within the span of a single activity meeting time.getActivtiesInDateRange(DateTime from, DateTime to) Gets a normalized list of unexpanded activities whose series falls entirely within the given range inclusive.Gets theCourseCatalogassociated with this session.Gets theCourseCatalogIdassociated with this session.getExplicitActivitiesByActivities(IdList activityIds) Gets anActivityListcorresponding to the given eventIdListwhere the activities were implcitly created from the recurring series.getExplicitActivityByActivity(Id activityId) Gets the activity where the given activityIdwas issued as part of a recurring series.longgetNumberOfActivities(Id activityId) Gets the number of activity meeting times in the recurring series.longgetNumberOfActivitiesInDateRange(Id activityId, DateTime from, DateTime to) Gets the number of activity meeting times in the recurring series between the given dates inclusive.voidThe returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error.voidFederates the view for methods in this session.voidIsolates the view for methods in this session.voidA complete view of theActivityreturns is desired.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
getCourseCatalogId
Id getCourseCatalogId()Gets theCourseCatalogIdassociated with this session.- Returns:
- the
CourseCatalog Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getCourseCatalog
Gets theCourseCatalogassociated with this session.- Returns:
- the course catalog
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canUnravelActviities
boolean canUnravelActviities()Tests if this user can performActivitylookups. 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 aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer lookup operations to unauthorized users.- Returns:
falseif lookup methods are not authorized,trueotherwise- 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 theActivityreturns 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 activityIdwas issued as part of a recurring series.- Parameters:
activityId-an activity Id- Returns:
- the returned
Activity - Throws:
NotFoundException-activityIdis not foundNullArgumentException-activityIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getExplicitActivitiesByActivities
ActivityList getExplicitActivitiesByActivities(IdList activityIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets anActivityListcorresponding to the given eventIdListwhere 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 theIdlist, in the order of the list, including duplicates, or an error results if anIdin 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 ofIdsto retrieve- Returns:
- the returned
Activitylist - Throws:
NotFoundException- anId wasnot foundNullArgumentException-eventIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
expandActivity
ActivityList expandActivity(Id activityId) throws NotFoundException, OperationFailedException, PermissionDeniedException 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-Idof theActivity- Returns:
- the returned
Activity list - Throws:
NotFoundException-activityId wasnot foundNullArgumentException-activityIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- 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-Idof theActivityfrom- start dateto- end date- Returns:
- the returned
Activity list - Throws:
InvalidArgumentException-tois less thanfromNotFoundException-activityId wasnot foundNullArgumentException-activityIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-
expandActivities
ActivityList expandActivities(IdList activityIds) throws NotFoundException, OperationFailedException, PermissionDeniedException 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 ofIdsto expand- Returns:
- the returned
Activity list - Throws:
NotFoundException- anId wasnot foundNullArgumentException-activityIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- 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 ofIdsto expandfrom- start dateto- end date- Returns:
- the returned
Activity list - Throws:
InvalidArgumentException-tois less thanfromNotFoundException- anId wasnot foundNullArgumentException-activityIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-
getActivitiesByDate
ActivityList getActivitiesByDate(DateTime datetime) throws OperationFailedException, PermissionDeniedException 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
Activitylist - Throws:
NullArgumentException-datetimeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getActivtiesInDateRange
ActivityList getActivtiesInDateRange(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException 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 dateto- end date- Returns:
- the returned
Activitylist - Throws:
InvalidArgumentException-tois less thanfromNullArgumentException-fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- 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-Idof the recurringActivity- Returns:
- the number of meeting times
- Throws:
NotFoundException-activityId wasnot foundNullArgumentException-activityIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- 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-Idof the recurringActivityfrom- start dateto- end date- Returns:
- the number of meeting times
- Throws:
InvalidArgumentException-tois less thanfromNotFoundException-activityId wasnot foundNullArgumentException-activityIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-