Interface CommitmentLookupSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods for examining event commitments.
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 calendar view: All event methods in this session
operate, retrieve and pertain to commitments defined explicitly in the
current calendar. Using an isolated view is useful for managing events
with the
CommitmentAdminSession. - federated calendar view: All commitment methods in this session operate, retrieve and pertain to all commitments defined in this calendar and any other calendars implicitly available in this calendar through calendar inheritence.
- effective commitment view: Commitment methods return only effective commitments
- any effective commitment view: Commitment methods return all commitments
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can lookup event commitments.Gets theCalendarassociated with this session.Gets theCalendarIdassociated with this session.getCommitment(Id commitmentId) Gets theCommitmentspecified by itsId.Gets all commitments.getCommitmentsByGenusType(Type commitmentGenusType) Gets the commitments for the given event genus type.getCommitmentsByGenusTypeForEvent(Id eventId, Type commitmentGenusType) Gets the commitments for the given event and commitment genus type including any genus types derived from the given genus type.getCommitmentsByGenusTypeForEventAndResource(Id eventId, Id resourceId, Type commitmentGenusType) Gets the commitments of the given genus type for the given event, resource, and commitment genus type including any genus types derived from the given genus type.getCommitmentsByGenusTypeForEventAndResourceOnDate(Id eventId, Id resourceId, Type commitmentGenusType, DateTime from, DateTime to) Gets aCommitmentListof the given genus type for the given event, resource, commitment genus type and effective during the entire given date range inclusive but not confined to the date range.getCommitmentsByGenusTypeForEventOnDate(Id eventId, Type commitmentGenusType, DateTime from, DateTime to) Gets aCommitmentListfor the given event and commitment genus type effective during the entire given date range inclusive but not confined to the date range.getCommitmentsByGenusTypeForResource(Id resourceId, Type commitmentGenusType) Gets the commitments for the given resource and commitment genus type including any genus types derived from the given genus type.getCommitmentsByGenusTypeForResourceOnDate(Id resourceId, Type commitmentGenusType, DateTime from, DateTime to) Gets aCommitmentListfor the given resource, commitment genus type, and effective during the entire given date range inclusive but not confined to the date range.getCommitmentsByGenusTypeOnDate(Type commitmentGenusType, DateTime from, DateTime to) Gets aCommitmentListof the given genus type and effective during the entire given date range inclusive but not confined to the date range.getCommitmentsByIds(IdList commitmentIds) Gets aCommitmentListcorresponding to the givenIdList.getCommitmentsByParentGenusType(Type commitmentGenusType) Gets the commitments for the given event genus type and include any commitments with a genus type derived from the specified genus type.getCommitmentsByRecordType(Type commitmentRecordType) Gets aCommitmentListcontaining the given event commitment recordType.getCommitmentsForEvent(Id eventId) Gets the commitments for the given event.getCommitmentsForEventAndResource(Id eventId, Id resourceId) Gets the commitments for the given event and resource.getCommitmentsForEventAndResourceOnDate(Id eventId, Id resourceId, DateTime from, DateTime to) Gets aCommitmentListfor the given event and resource and effective during the entire given date range inclusive but not confined to the date range.getCommitmentsForEventOnDate(Id eventId, DateTime from, DateTime to) Gets aCommitmentListfor the given event and effective during the entire given date range inclusive but not confined to the date range.getCommitmentsForResource(Id resourceId) Gets the commitments for the given resource.getCommitmentsForResourceOnDate(Id resourceId, DateTime from, DateTime to) Gets aCommitmentListfor the given resource and effective during the entire given date range inclusive but not confined to the date range.getCommitmentsOnDate(DateTime from, DateTime to) Gets aCommitmentListeffective during the entire given date range inclusive but not confined to the date range.voidThe commitments in this lookup session return both effective and ineffective commitments.voidThe returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error.voidThe commitments in this lookup session return only commitments currently in effect.voidFederates the view for methods in this session.voidIsolates the view for methods in this session.voidA complete view of theCommitmentreturns 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
-
getCalendarId
Id getCalendarId()Gets theCalendarIdassociated with this session.- Returns:
- the
Calendar Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getCalendar
Gets theCalendarassociated with this session.- Returns:
- the
Calendarassociated with this session - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canLookupCommitments
boolean canLookupCommitments()Tests if this user can lookup event commitments. 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.
-
useComparativeCommitmentView
void useComparativeCommitmentView()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.
-
usePlenaryCommitmentView
void usePlenaryCommitmentView()A complete view of theCommitmentreturns 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.
-
useFederatedCalendarView
void useFederatedCalendarView()Federates the view for methods in this session. A federated view will include commitments in calendars which are children of this calendar in the calendar hierarchy.- Compliance:
mandatory- This method is must be implemented.
-
useIsolatedCalendarView
void useIsolatedCalendarView()Isolates the view for methods in this session. An isolated view restricts lookups to this calendar only.- Compliance:
mandatory- This method is must be implemented.
-
useEffectiveCommitmentView
void useEffectiveCommitmentView()The commitments in this lookup session return only commitments currently in effect.- Compliance:
mandatory- This method is must be implemented.
-
useAnyEffectiveCommitmentView
void useAnyEffectiveCommitmentView()The commitments in this lookup session return both effective and ineffective commitments.- Compliance:
mandatory- This method is must be implemented.
-
getCommitment
Commitment getCommitment(Id commitmentId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets theCommitmentspecified by itsId. In plenary mode, the exactIdis found or aNOT_FOUNDresults. Otherwise, the returnedCommitmentmay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to aCommitmentand retained for compatibility. In effective mode, commitments are returned that are currently effective. In any effective mode, effective commitments and those currently expired are returned.- Parameters:
commitmentId-Idof theCommitment- Returns:
- the commitment
- Throws:
NotFoundException-commitmentIdnot foundNullArgumentException-commitmentIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-
getCommitmentsByIds
CommitmentList getCommitmentsByIds(IdList commitmentIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets aCommitmentListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the commitments specified 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, inaccessibleCommitmentsmay be omitted from the list and may present the elements in any order including returning a unique set. In effective mode, commitments are returned that are currently effective. In any effective mode, effective commitments and those currently expired are returned.- Parameters:
commitmentIds- the list ofIdsto retrieve- Returns:
- the returned
Commitmentlist - Throws:
NotFoundException- anIdwas not foundNullArgumentException-commitmentIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCommitmentsByGenusType
CommitmentList getCommitmentsByGenusType(Type commitmentGenusType) throws OperationFailedException, PermissionDeniedException Gets the commitments for the given event genus type. In plenary mode, the returned list contains all known commitments or an error results. Otherwise, the returned list may contain only those commitments that are accessible through this session. In effective mode, commitments are returned that are currently effective. In any effective mode, effective commitments and those currently expired are returned.- Parameters:
commitmentGenusType- commitment genus type- Returns:
- list of commitments
- Throws:
NullArgumentException-commitmentGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-
getCommitmentsByParentGenusType
CommitmentList getCommitmentsByParentGenusType(Type commitmentGenusType) throws OperationFailedException, PermissionDeniedException Gets the commitments for the given event genus type and include any commitments with a genus type derived from the specified genus type. In plenary mode, the returned list contains all known commitments or an error results. Otherwise, the returned list may contain only those commitments that are accessible through this session. In effective mode, commitments are returned that are currently effective. In any effective mode, effective commitments and those currently expired are returned.- Parameters:
commitmentGenusType- commitment genus type- Returns:
- list of commitments
- Throws:
NullArgumentException-commitmentGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-
getCommitmentsByRecordType
CommitmentList getCommitmentsByRecordType(Type commitmentRecordType) throws OperationFailedException, PermissionDeniedException Gets aCommitmentListcontaining the given event commitment recordType. In plenary mode, the returned list contains all known commitments or an error results. Otherwise, the returned list may contain only those commitments that are accessible through this session. In effective mode, commitments are returned that are currently effective. In any effective mode, effective commitments and those currently expired are returned.- Parameters:
commitmentRecordType- a commitment record type- Returns:
- list of commitments
- Throws:
NullArgumentException-eventRecordTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCommitmentsOnDate
CommitmentList getCommitmentsOnDate(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets aCommitmentListeffective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known commitments or an error results. Otherwise, the returned list may contain only those commitments that are accessible through this session. In effective mode, commitments are returned that are currently effective. In any effective mode, effective commitments and those currently expired are returned.- Parameters:
from- starting dateto- ending date- Returns:
- list of commitments
- Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCommitmentsByGenusTypeOnDate
CommitmentList getCommitmentsByGenusTypeOnDate(Type commitmentGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets aCommitmentListof the given genus type and effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known commitments or an error results. Otherwise, the returned list may contain only those commitments that are accessible through this session. In effective mode, commitments are returned that are currently effective. In any effective mode, effective commitments and those currently expired are returned.- Parameters:
commitmentGenusType- a commitment genus typefrom- starting dateto- ending date- Returns:
- list of commitments
- Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-commitmentGenusType, from, ortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCommitmentsForEvent
CommitmentList getCommitmentsForEvent(Id eventId) throws OperationFailedException, PermissionDeniedException Gets the commitments for the given event. If the event is a recurring event, the commitments are returned for the recurring event only. In plenary mode, the returned list contains all of the commitments mapped to the eventIdor an error results if an Id in the supplied list is not found or inaccessible. Otherwise, inaccessibleCommitmentsmay be omitted from the list and may present the elements in any order including returning a unique set. In effective mode, commitments are returned that are currently effective. In any effective mode, effective commitments and those currently expired are returned.- Parameters:
eventId-Idof theEvent- Returns:
- list of commitments
- Throws:
NullArgumentException-eventIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-
getCommitmentsForEventOnDate
CommitmentList getCommitmentsForEventOnDate(Id eventId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets aCommitmentListfor the given event and effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known commitments or an error results. Otherwise, the returned list may contain only those commitments that are accessible through this session. In effective mode, commitments are returned that are currently effective. In any effective mode, effective commitments and those currently expired are returned.- Parameters:
eventId-Idof theEventfrom- starting dateto- ending date- Returns:
- list of commitments
- Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-eventId, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCommitmentsByGenusTypeForEvent
CommitmentList getCommitmentsByGenusTypeForEvent(Id eventId, Type commitmentGenusType) throws OperationFailedException, PermissionDeniedException Gets the commitments for the given event and commitment genus type including any genus types derived from the given genus type. If the event is a recurring event, the commitments are returned for the recurring event only. In plenary mode, the returned list contains all of the commitments mapped to the eventIdor an error results if an Id in the supplied list is not found or inaccessible. Otherwise, inaccessible commitments may be ommitted. In effective mode, commitments are returned that are currently effective. In any effective mode, effective commitments and those currently expired are returned.- Parameters:
eventId-Idof theEventcommitmentGenusType- commitment genus type- Returns:
- list of commitments
- Throws:
NullArgumentException-eventIdorcommitmentGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-
getCommitmentsByGenusTypeForEventOnDate
CommitmentList getCommitmentsByGenusTypeForEventOnDate(Id eventId, Type commitmentGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets aCommitmentListfor the given event and commitment genus type effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known commitments or an error results. Otherwise, the returned list may contain only those commitments that are accessible through this session. In effective mode, commitments are returned that are currently effective. In any effective mode, effective commitments and those currently expired are returned.- Parameters:
eventId-Idof theEventcommitmentGenusType- commitment genus typefrom- starting dateto- ending date- Returns:
- list of commitments
- Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-eventId, commitmentGenusType, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCommitmentsForResource
CommitmentList getCommitmentsForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException Gets the commitments for the given resource. In plenary mode, the returned list contains all of the commitments mapped to the resourceIdor an error results if an Id in the supplied list is not found or inaccessible. Otherwise, inaccessibleCommitmentsmay be omitted from the list and may present the elements in any order including returning a unique set. In effective mode, commitments are returned that are currently effective. In any effective mode, effective commitments and those currently expired are returned.- Parameters:
resourceId-Idof aResource- Returns:
- list of commitments
- Throws:
NullArgumentException-resourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-
getCommitmentsForResourceOnDate
CommitmentList getCommitmentsForResourceOnDate(Id resourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets aCommitmentListfor the given resource and effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known commitments or an error results. Otherwise, the returned list may contain only those commitments that are accessible through this session. In effective mode, commitments are returned that are currently effective. In any effective mode, effective commitments and those currently expired are returned.- Parameters:
resourceId-Idof theEventfrom- starting dateto- ending date- Returns:
- list of commitments
- Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-resourceId, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCommitmentsByGenusTypeForResource
CommitmentList getCommitmentsByGenusTypeForResource(Id resourceId, Type commitmentGenusType) throws OperationFailedException, PermissionDeniedException Gets the commitments for the given resource and commitment genus type including any genus types derived from the given genus type. In plenary mode, the returned list contains all of the commitments mapped to the resourceIdor an error results if an Id in the supplied list is not found or inaccessible. Otherwise, inaccessibleCommitmentsmay be omitted from the list and may present the elements in any order including returning a unique set. In effective mode, commitments are returned that are currently effective. In any effective mode, effective commitments and those currently expired are returned.- Parameters:
resourceId-Idof aResourcecommitmentGenusType- commitment genus type- Returns:
- list of commitments
- Throws:
NullArgumentException-resourceIdorcommitmentGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-
getCommitmentsByGenusTypeForResourceOnDate
CommitmentList getCommitmentsByGenusTypeForResourceOnDate(Id resourceId, Type commitmentGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets aCommitmentListfor the given resource, commitment genus type, and effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known commitments or an error results. Otherwise, the returned list may contain only those commitments that are accessible through this session. In effective mode, commitments are returned that are currently effective. In any effective mode, effective commitments and those currently expired are returned.- Parameters:
resourceId-Idof theEventcommitmentGenusType- commitment genus typefrom- starting dateto- ending date- Returns:
- list of commitments
- Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-resourceId, commitmentGenusType, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCommitmentsForEventAndResource
CommitmentList getCommitmentsForEventAndResource(Id eventId, Id resourceId) throws OperationFailedException, PermissionDeniedException Gets the commitments for the given event and resource. If the event is a recurring event, the commitments are returned for the recurring event only. In plenary mode, the returned list contains all of the commitments mapped to the eventIdor an error results if an Id in the supplied list is not found or inaccessible. Otherwise, inaccessibleCommitmentsmay be omitted from the list and may present the elements in any order including returning a unique set. In effective mode, commitments are returned that are currently effective. In any effective mode, effective commitments and those currently expired are returned.- Parameters:
eventId-Idof theEventresourceId-Idof aResource- Returns:
- list of commitments
- Throws:
NullArgumentException-eventIdorresourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-
getCommitmentsForEventAndResourceOnDate
CommitmentList getCommitmentsForEventAndResourceOnDate(Id eventId, Id resourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets aCommitmentListfor the given event and resource and effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known commitments or an error results. Otherwise, the returned list may contain only those commitments that are accessible through this session. In effective mode, commitments are returned that are currently effective. In any effective mode, effective commitments and those currently expired are returned.- Parameters:
eventId-Idof theEventresourceId-Idof aResourcefrom- starting dateto- ending date- Returns:
- list of commitments
- Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-eventId, resourceId, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCommitmentsByGenusTypeForEventAndResource
CommitmentList getCommitmentsByGenusTypeForEventAndResource(Id eventId, Id resourceId, Type commitmentGenusType) throws OperationFailedException, PermissionDeniedException Gets the commitments of the given genus type for the given event, resource, and commitment genus type including any genus types derived from the given genus type. If the event is a recurring event, the commitments are returned for the recurring event only. In plenary mode, the returned list contains all of the commitments mapped to the eventIdor an error results if an Id in the supplied list is not found or inaccessible. Otherwise, inaccessibleCommitmentsmay be omitted from the list and may present the elements in any order including returning a unique set. In effective mode, commitments are returned that are currently effective. In any effective mode, effective commitments and those currently expired are returned.- Parameters:
eventId-Idof theEventresourceId-Idof aResourcecommitmentGenusType- commitment genus type- Returns:
- list of commitments
- Throws:
NullArgumentException-eventId, resourceIdorcommitmentGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-
getCommitmentsByGenusTypeForEventAndResourceOnDate
CommitmentList getCommitmentsByGenusTypeForEventAndResourceOnDate(Id eventId, Id resourceId, Type commitmentGenusType, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets aCommitmentListof the given genus type for the given event, resource, commitment genus type and effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known commitments or an error results. Otherwise, the returned list may contain only those commitments that are accessible through this session. In effective mode, commitments are returned that are currently effective. In any effective mode, effective commitments and those currently expired are returned.- Parameters:
eventId-Idof theEventresourceId-Idof aResourcecommitmentGenusType- commitment genus typefrom- starting dateto- ending date- Returns:
- list of commitments
- Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-eventId, resourceId, commitmentGenusType, fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getCommitments
Gets all commitments. In plenary mode, the returned list contains all known commitments or an error results. Otherwise, the returned list may contain only those commitments that are accessible through this session. In effective mode, commitments are returned that are currently effective. In any effective mode, effective commitments and those currently expired are returned.- Returns:
- list of commitments
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method is must be implemented.
-