public interface TimePeriodLookupSession extends OsidSession
This session provides methods for retrieving TimePeriod
objects. The TimePeriod represents a period of time in
which to manage recurring events.
This session defines views that offer differing behaviors when retrieving multiple objects.
TimePeriodAdminSession. Time periods may have an additional records indicated by their
respective record types. The record may not be accessed through a cast of
the TimePeriod.
| Modifier and Type | Method and Description |
|---|---|
boolean |
canLookupTimePeriods()
Tests if this user can perform
TimePeriod lookups. |
Calendar |
getCalendar()
Gets the
Calendar associated with this session. |
Id |
getCalendarId()
Gets the
Calendar Id associated with
this session. |
TimePeriod |
getTimePeriod(Id timePeriodId)
Gets the
TimePeriod specified by its Id. |
TimePeriodList |
getTimePeriods()
Gets all
TimePeriods. |
TimePeriodList |
getTimePeriodsByDate(DateTime datetime)
Gets a
TimePeriodList containing the given
DateTime. |
TimePeriodList |
getTimePeriodsByGenusType(Type timePeriodGenusType)
Gets a
TimePeriodList corresponding to the given time
period genus Type which does not include time periods
of genus types derived from the specified Type. |
TimePeriodList |
getTimePeriodsByIds(IdList timePeriodIds)
Gets a
TimePeriodList corresponding to the given
IdList. |
TimePeriodList |
getTimePeriodsByParentGenusType(Type timePeriodGenusType)
Gets a
TimePeriodList corresponding to the given time
period genus Type and include any additional time
periods with genus types derived from the specified Type. |
TimePeriodList |
getTimePeriodsByRecordType(Type timePeriodRecordType)
Gets a
TimePeriodList containing the given time period
record Type. |
TimePeriodList |
getTimePeriodsInDateRange(DateTime start,
DateTime end)
Gets a
TimePeriodList corresponding to the given
DateTime. |
void |
useComparativeTimePeriodView()
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 |
useFederatedCalendarView()
Federates the view for methods in this session.
|
void |
useIsolatedCalendarView()
Isolates the view for methods in this session.
|
void |
usePlenaryTimePeriodView()
A complete view of the
TimePeriod returns is desired. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionscloseId getCalendarId()
Calendar Id associated with
this session. Calendar Id associated with this sessionmandatory - This method must be implemented. Calendar getCalendar() throws OperationFailedException, PermissionDeniedException
Calendar associated with this session. Calendar associated with this sessionOperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. boolean canLookupTimePeriods()
TimePeriod 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 useComparativeTimePeriodView()
mandatory - This method is must be implemented. void usePlenaryTimePeriodView()
TimePeriod 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 useFederatedCalendarView()
mandatory - This method is must be implemented. void useIsolatedCalendarView()
mandatory - This method is must be implemented. TimePeriod getTimePeriod(Id timePeriodId) throws NotFoundException, OperationFailedException, PermissionDeniedException
TimePeriod specified by its Id.
In plenary mode, the exact Id is found or a
NOT_FOUND results. Otherwise, the returned TimePeriod
may have a different Id than requested, such as
the case where a duplicate Id was assigned to a
TimePeriod and retained for compatibility.timePeriodId - Id of the TimePeriod
NotFoundException - timePeriodId not
foundNullArgumentException - timePeriodId is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method is must be implemented. TimePeriodList getTimePeriodsByIds(IdList timePeriodIds) throws NotFoundException, OperationFailedException, PermissionDeniedException
TimePeriodList corresponding to the given
IdList. In plenary mode, the returned list contains all of the
time periods specified 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 TimePeriods may be omitted from the list
and may present the elements in any order including returning a unique
set.timePeriodIds - the list of Ids to retrieve TimePeriod listNotFoundException - an Id was not foundNullArgumentException - rimePeriodIds is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. TimePeriodList getTimePeriodsByGenusType(Type timePeriodGenusType) throws OperationFailedException, PermissionDeniedException
TimePeriodList corresponding to the given time
period genus Type which does not include time periods
of genus types derived from the specified Type. In
plenary mode, the returned list contains all known time periods or an
error results. Otherwise, the returned list may contain only those
time periods that are accessible through this session.timePeriodGenusType - a time period genus type TimePeriod listNullArgumentException - timePeriodGenusType
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. TimePeriodList getTimePeriodsByParentGenusType(Type timePeriodGenusType) throws OperationFailedException, PermissionDeniedException
TimePeriodList corresponding to the given time
period genus Type and include any additional time
periods with genus types derived from the specified Type.
In plenary mode, the returned list contains all known time
periods or an error results. Otherwise, the returned list may contain
only those time periods that are accessible through this session.timePeriodGenusType - a time period genus type TimePeriod listNullArgumentException - timePeriodGenusType
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. TimePeriodList getTimePeriodsByRecordType(Type timePeriodRecordType) throws OperationFailedException, PermissionDeniedException
TimePeriodList containing the given time period
record Type. In plenary mode, the returned list
contains all known time periods or an error results. Otherwise, the
returned list may contain only those time periods that are accessible
through this session.timePeriodRecordType - a time period record type TimePeriod listNullArgumentException - timePeriodRecordType
is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. TimePeriodList getTimePeriodsByDate(DateTime datetime) throws OperationFailedException, PermissionDeniedException
TimePeriodList containing the given
DateTime. Time periods containing the given date are matched.
In plenary mode, the returned list contains all of the time periods
specified 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 TimePeriods may be omitted from the list
and may present the elements in any order including returning a unique
set.datetime - a date TimePeriod listNullArgumentException - datetime is
null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. TimePeriodList getTimePeriodsInDateRange(DateTime start, DateTime end) throws OperationFailedException, PermissionDeniedException
TimePeriodList corresponding to the given
DateTime. Time periods whose start end end times are included
in the given date range are matched.In plenary mode, the returned list
contains all of the time periods specified 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 TimePeriods may
be omitted from the list and may present the elements in any order
including returning a unique set.start - start of daterangeend - end of date range TimePeriod listInvalidArgumentException - end is less
than start NullArgumentException - start or
end is null OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented. TimePeriodList getTimePeriods() throws OperationFailedException, PermissionDeniedException
TimePeriods. In plenary mode, the returned
list contains all known time periods or an error results. Otherwise,
the returned list may contain only those time periods that are
accessible through this session. TimePeriodList OperationFailedException - unable to complete requestPermissionDeniedException - authorization failuremandatory - This method must be implemented.