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.
Modifier and Type | Method and Description |
---|---|
boolean |
canUnravelActviities()
Tests if this user can perform
Activity lookups. |
ActivityList |
expandActivities(IdList activityIds)
Expands the given recurring activities into a series of single-date
activities.
|
ActivityList |
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.
|
ActivityList |
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.
|
ActivityList |
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.
|
ActivityList |
getActivitiesByDate(DateTime datetime)
Gets a list of normalized unexpanded activities where the given date
falls within the span of a single activity meeting time.
|
ActivityList |
getActivtiesInDateRange(DateTime from,
DateTime to)
Gets a normalized list of unexpanded activities whose series falls
entirely within the given range inclusive
. |
CourseCatalog |
getCourseCatalog()
Gets the
CourseCatalog associated with this session. |
Id |
getCourseCatalogId()
Gets the
CourseCatalog Id associated
with this session. |
ActivityList |
getExplicitActivitiesByActivities(IdList activityIds)
Gets an
ActivityList corresponding to the given event
IdList where the activities were implcitly created from
the recurring series. |
Activity |
getExplicitActivityByActivity(Id activityId)
Gets the activity where the given activity
Id was
issued as part of a recurring series. |
long |
getNumberOfActivities(Id activityId)
Gets the number of activity meeting times in the recurring series.
|
long |
getNumberOfActivitiesInDateRange(Id activityId,
DateTime from,
DateTime to)
Gets the number of activity meeting times in the recurring series
between the given dates inclusive.
|
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.
|
void |
useFederatedCourseCatalogView()
Federates the view for methods in this session.
|
void |
useIsolatedCourseCatalogView()
Isolates the view for methods in this session.
|
void |
usePlenaryActivityView()
A complete view of the
Activity returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getCourseCatalogId()
CourseCatalog
Id
associated
with this session. CourseCatalog Id
associated with this
sessionmandatory
- This method must be implemented. CourseCatalog getCourseCatalog() throws OperationFailedException, PermissionDeniedException
CourseCatalog
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canUnravelActviities()
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. false
if lookup methods are not authorized,
true
otherwisemandatory
- This method must be implemented. void useComparativeActivityView()
mandatory
- This method is must be implemented. void usePlenaryActivityView()
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.mandatory
- This method is must be implemented. void useFederatedCourseCatalogView()
mandatory
- This method is must be implemented. void useIsolatedCourseCatalogView()
mandatory
- This method is must be implemented. Activity getExplicitActivityByActivity(Id activityId) throws NotFoundException, OperationFailedException, PermissionDeniedException
Id
was
issued as part of a recurring series.activityId
- an activity Id
Activity
NotFoundException
- activityId
is not
foundNullArgumentException
- activityId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ActivityList getExplicitActivitiesByActivities(IdList activityIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
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.activityIds
- the list of Ids
to retrieve Activity
listNotFoundException
- an Id was
not foundNullArgumentException
- eventIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ActivityList expandActivity(Id activityId) throws NotFoundException, OperationFailedException, PermissionDeniedException
activityId
- Id
of the Activity
Activity list
NotFoundException
- activityId was
not
foundNullArgumentException
- activityId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method is must be implemented. ActivityList expandActivityInDateRange(Id activityId, DateTime from, DateTime to) throws NotFoundException, OperationFailedException, PermissionDeniedException
activityId
- Id
of the Activity
from
- start dateto
- end date Activity list
InvalidArgumentException
- to
is less
than from
NotFoundException
- activityId was
not
foundNullArgumentException
- activityId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method is must be implemented. ActivityList expandActivities(IdList activityIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
activityIds
- the list of Ids
to expand Activity list
NotFoundException
- an Id was
not foundNullArgumentException
- activityIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ActivityList expandActivitiesInDateRange(Id activityIds, DateTime from, DateTime to) throws NotFoundException, OperationFailedException, PermissionDeniedException
activityIds
- the list of Ids
to expandfrom
- start dateto
- end date Activity list
InvalidArgumentException
- to
is less
than from
NotFoundException
- an Id was
not foundNullArgumentException
- activityIds
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method is must be implemented. ActivityList getActivitiesByDate(DateTime datetime) throws OperationFailedException, PermissionDeniedException
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.datetime
- a date Activity
listNullArgumentException
- datetime
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. ActivityList getActivtiesInDateRange(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException
.
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.from
- start dateto
- end date Activity
listInvalidArgumentException
- to
is less
than from
NullArgumentException
- from
or
to
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. long getNumberOfActivities(Id activityId) throws NotFoundException, OperationFailedException, PermissionDeniedException
activityId
- Id
of the recurring Activity
NotFoundException
- activityId was
not
foundNullArgumentException
- activityId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method is must be implemented. long getNumberOfActivitiesInDateRange(Id activityId, DateTime from, DateTime to) throws NotFoundException, OperationFailedException, PermissionDeniedException
activityId
- Id
of the recurring Activity
from
- start dateto
- end dateInvalidArgumentException
- to
is less
than from
NotFoundException
- activityId was
not
foundNullArgumentException
- activityId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method is must be implemented.