Interface AvailabilityLookupSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session defines methods for retrieving availabilities.
This lookup session defines several views:
- comparative view: elements may be silently omitted or re-ordered
- plenary view: provides a complete result set or is an error condition
- isolated foundry view: All availability methods in this session
operate, retrieve and pertain to availabilities defined explicitly in
the current foundry. Using an isolated view is useful for managing
Availabilitieswith theAvailabilityAdminSession. - federated foundry view: All availability lookup methods in this session operate, retrieve and pertain to all availabilities defined in this foundry and any other availabilities implicitly available in this foundry through foundry inheritence.
- effective availability view: All availability lookup methods return availabilities where the current date falls in between the effective dates inclusive.
- any effective availability view: Availabilities of any effective date are returned from methods.
The methods useFederatedFoundryView() and
useIsolatedFoundryView() behave as a radio group and one should be
selected before invoking any lookup methods.
Availabilities may have an additional records indicated by their
respective record types. The record may not be accessed through a cast of
the Availabilities .
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests if this user can performAvailabilitylookups.Gets all availabilities.getAvailabilitiesByGenusType(Type availabilityGenusType) Gets anAvailabilityListcorresponding to the given availability genusTypewhich does not include availabilities of types derived from the specifiedType.getAvailabilitiesByIds(IdList availabilityIds) Gets anAvailabilityListcorresponding to the givenIdList.getAvailabilitiesByParentGenusType(Type availabilityGenusType) Gets anAvailabilityListcorresponding to the given availability genusTypeand include any additional availabilities with genus types derived from the specifiedType.getAvailabilitiesByRecordType(Type availabilityRecordType) Gets anAvailabilityListcontaining the given availability recordType.getAvailabilitiesForJob(Id jobId) Gets a list of availabilities for a job.getAvailabilitiesForJobOnDate(Id jobId, DateTime from, DateTime to) Gets a list of availabilities for a job and effective during the entire given date range inclusive but not confined to the date range.getAvailabilitiesForResource(Id resourceId) Gets a list of availabilities for a resource.getAvailabilitiesForResourceAndJob(Id resourceId, Id jobId) Gets a list of availabilities for a resource and job.getAvailabilitiesForResourceAndJobOnDate(Id resourceId, Id jobId, DateTime from, DateTime to) Gets a list of availabilities for a resource and job and effective during the entire given date range inclusive but not confined to the date range.getAvailabilitiesForResourceOnDate(Id resourceId, DateTime from, DateTime to) Gets a list of availabilities for a resource and effective during the entire given date range inclusive but not confined to the date range.getAvailabilitiesOnDate(DateTime from, DateTime to) Gets a list of availabilities effective during the entire given date range inclusive but not confined to the date range.getAvailability(Id availabilityId) Gets theAvailabilityspecified by itsId.Gets theFoundryassociated with this session.Gets theFoundryIdassociated with this session.voidAll availabilities of any effective dates are returned by methods in this session.voidThe returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error.voidOnly availabilities whose effective dates are current are returned by methods in this session.voidFederates the view for methods in this session.voidIsolates the view for methods in this session.voidA complete view of theAvailabilityreturns 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
-
getFoundryId
Id getFoundryId()Gets theFoundryIdassociated with this session.- Returns:
- the
Foundry Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getFoundry
Gets theFoundryassociated with this session.- Returns:
- the foundry
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canLookupAvailabilities
boolean canLookupAvailabilities()Tests if this user can performAvailabilitylookups. 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 not offer lookup operations to unauthorized users.- Returns:
falseif lookup methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
useComparativeAvailabilityView
void useComparativeAvailabilityView()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.
-
usePlenaryAvailabilityView
void usePlenaryAvailabilityView()A complete view of theAvailabilityreturns 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.
-
useFederatedFoundryView
void useFederatedFoundryView()Federates the view for methods in this session. A federated view will include availabilities in foundries which are children of this foundry in the foundry hierarchy.- Compliance:
mandatory- This method is must be implemented.
-
useIsolatedFoundryView
void useIsolatedFoundryView()Isolates the view for methods in this session. An isolated view restricts retrievals to this foundry only.- Compliance:
mandatory- This method is must be implemented.
-
useEffectiveAvailabilityView
void useEffectiveAvailabilityView()Only availabilities whose effective dates are current are returned by methods in this session.- Compliance:
mandatory- This method is must be implemented.
-
useAnyEffectiveAvailabilityView
void useAnyEffectiveAvailabilityView()All availabilities of any effective dates are returned by methods in this session.- Compliance:
mandatory- This method is must be implemented.
-
getAvailability
Availability getAvailability(Id availabilityId) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets theAvailabilityspecified by itsId. In plenary mode, the exactIdis found or aNOT_FOUNDresults. Otherwise, the returnedAvailabilitymay have a differentIdthan requested, such as the case where a duplicateIdwas assigned to anAvailabilityand retained for compatibility. In effective mode, availabilities are returned that are currently effective. In any effective mode, effective availabilities and those currently expired are returned.- Parameters:
availabilityId- theIdof theAvailabilityto retrieve- Returns:
- the returned
Availability - Throws:
NotFoundException- noAvailabilityfound with the givenIdNullArgumentException-availabilityIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getAvailabilitiesByIds
AvailabilityList getAvailabilitiesByIds(IdList availabilityIds) throws NotFoundException, OperationFailedException, PermissionDeniedException Gets anAvailabilityListcorresponding to the givenIdList. In plenary mode, the returned list contains all of the availabilities 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, inaccessibleAvailabilitiesmay be omitted from the list and may present the elements in any order including returning a unique set. In effective mode, availabilities are returned that are currently effective. In any effective mode, effective availabilities and those currently expired are returned.- Parameters:
availabilityIds- the list ofIdsto retrieve- Returns:
- the returned
Availabilitylist - Throws:
NotFoundException- anIdwas not foundNullArgumentException-availabilityIdsisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getAvailabilitiesByGenusType
AvailabilityList getAvailabilitiesByGenusType(Type availabilityGenusType) throws OperationFailedException, PermissionDeniedException Gets anAvailabilityListcorresponding to the given availability genusTypewhich does not include availabilities of types derived from the specifiedType. In plenary mode, the returned list contains all known availabilities or an error results. Otherwise, the returned list may contain only those availabilities that are accessible through this session. In effective mode, availabilities are returned that are currently effective. In any effective mode, effective availabilities and those currently expired are returned.- Parameters:
availabilityGenusType- an availability genus type- Returns:
- the returned
Availabilitylist - Throws:
NullArgumentException-availabilityGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getAvailabilitiesByParentGenusType
AvailabilityList getAvailabilitiesByParentGenusType(Type availabilityGenusType) throws OperationFailedException, PermissionDeniedException Gets anAvailabilityListcorresponding to the given availability genusTypeand include any additional availabilities with genus types derived from the specifiedType. In plenary mode, the returned list contains all known availabilities or an error results. Otherwise, the returned list may contain only those availabilities that are accessible through this session. In effective mode, availabilities are returned that are currently effective. In any effective mode, effective availabilities and those currently expired are returned.- Parameters:
availabilityGenusType- an availability genus type- Returns:
- the returned
Availabilitylist - Throws:
NullArgumentException-availabilityGenusTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getAvailabilitiesByRecordType
AvailabilityList getAvailabilitiesByRecordType(Type availabilityRecordType) throws OperationFailedException, PermissionDeniedException Gets anAvailabilityListcontaining the given availability recordType. In plenary mode, the returned list contains all known availabilities or an error results. Otherwise, the returned list may contain only those availabilities that are accessible through this session. In effective mode, availabilities are returned that are currently effective. In any effective mode, effective availabilities and those currently expired are returned.- Parameters:
availabilityRecordType- an availability record type- Returns:
- the returned
Availabilitylist - Throws:
NullArgumentException-availabilityRecordTypeisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getAvailabilitiesOnDate
AvailabilityList getAvailabilitiesOnDate(DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of availabilities effective during the entire given date range inclusive but not confined to the date range. In plenary mode, the returned list contains all known availabilities or an error results. Otherwise, the returned list may contain only those availabilities that are accessible through this session. In effective mode, availabilities are returned that are currently effective. In any effective mode, effective availabilities and those currently expired are returned.- Parameters:
from- start of date rangeto- end of date range- Returns:
- the returned
Availabilitylist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-fromortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getAvailabilitiesForResource
AvailabilityList getAvailabilitiesForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException Gets a list of availabilities for a resource. In plenary mode, the returned list contains all known availabilities or an error results. Otherwise, the returned list may contain only those availabilities that are accessible through this session. In effective mode, availabilities are returned that are currently effective. In any effective mode, effective availabilities and those currently expired are returned.- Parameters:
resourceId- a resourceId- Returns:
- the returned
Availabilitylist - Throws:
NullArgumentException-resourceIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getAvailabilitiesForResourceOnDate
AvailabilityList getAvailabilitiesForResourceOnDate(Id resourceId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of availabilities for a 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 availabilities or an error results. Otherwise, the returned list may contain only those availabilities that are accessible through this session. In effective mode, availabilities are returned that are currently effective. In any effective mode, effective availabilities and those currently expired are returned.- Parameters:
resourceId- a resourceIdfrom- start of date rangeto- end of date range- Returns:
- the returned
Availabilitylist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-resourceId, from, ortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getAvailabilitiesForJob
AvailabilityList getAvailabilitiesForJob(Id jobId) throws OperationFailedException, PermissionDeniedException Gets a list of availabilities for a job. In plenary mode, the returned list contains all known availabilities or an error results. Otherwise, the returned list may contain only those availabilities that are accessible through this session. In effective mode, availabilities are returned that are currently effective. In any effective mode, effective availabilities and those currently expired are returned.- Parameters:
jobId- a jobId- Returns:
- the returned
Availabilitylist - Throws:
NullArgumentException-jobIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getAvailabilitiesForJobOnDate
AvailabilityList getAvailabilitiesForJobOnDate(Id jobId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of availabilities for a job 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 availabilities or an error results. Otherwise, the returned list may contain only those availabilities that are accessible through this session. In effective mode, availabilities are returned that are currently effective. In any effective mode, effective availabilities and those currently expired are returned.- Parameters:
jobId- a jobIdfrom- start of date rangeto- end of date range- Returns:
- the returned
Availabilitylist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-jobId, from, ortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getAvailabilitiesForResourceAndJob
AvailabilityList getAvailabilitiesForResourceAndJob(Id resourceId, Id jobId) throws OperationFailedException, PermissionDeniedException Gets a list of availabilities for a resource and job. In plenary mode, the returned list contains all known availabilities or an error results. Otherwise, the returned list may contain only those availabilities that are accessible through this session. In effective mode, credits are returned that are currently effective. In any effective mode, effective credits and those currently expired are returned.- Parameters:
resourceId- a resourceIdjobId- a jobId- Returns:
- the returned
Availabilitylist - Throws:
NullArgumentException-resourceIdorjobIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getAvailabilitiesForResourceAndJobOnDate
AvailabilityList getAvailabilitiesForResourceAndJobOnDate(Id resourceId, Id jobId, DateTime from, DateTime to) throws OperationFailedException, PermissionDeniedException Gets a list of availabilities for a resource and job 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 availabilities or an error results. Otherwise, the returned list may contain only those availabilities that are accessible through this session. In effective mode, availabilities are returned that are currently effective. In any effective mode, effective availabilities and those currently expired are returned.- Parameters:
resourceId- a resourceIdjobId- a jobIdfrom- start of date rangeto- end of date range- Returns:
- the returned
Availabilitylist - Throws:
InvalidArgumentException-fromis greater thantoNullArgumentException-resourceId, jobId, from, ortoisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
getAvailabilities
Gets all availabilities. In plenary mode, the returned list contains all of the availabilities, including duplicates, or an error results if anIdin the supplied list is not found or inaccessible. Otherwise, inaccessibleAvailabilitiesmay be omitted from the list and may present the elements in any order including returning a unique set. In effective mode, availabilities are returned that are currently effective. In any effective mode, effective availabilities and those currently expired are returned.- Returns:
- the returned
Availabilitylist - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-