OSID Logo
OSID Specifications
resourcing package
Version 3.0.0
Release Candidate Preview
Interfaceosid.resourcing.AvailabilityLookupSession
Implementsosid.OsidSession
Description

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 Availabilities with the AvailabilityAdminSession.
  • 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.

MethodgetFoundryId
Description

Gets the Foundry Id associated with this session.

Returnosid.id.Idthe Foundry Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetFoundry
Description

Gets the Foundry associated with this session.

Returnosid.resourcing.Foundrythe foundry
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanLookupAvailabilities
Description

Tests if this user can perform Availability 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 not offer lookup operations to unauthorized users.

Returnboolean false if lookup methods are not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoduseComparativeAvailabilityView
Description

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.

CompliancemandatoryThis method is must be implemented.
MethodusePlenaryAvailabilityView
Description

A complete view of the Availability 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.

CompliancemandatoryThis method is must be implemented.
MethoduseFederatedFoundryView
Description

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.

CompliancemandatoryThis method is must be implemented.
MethoduseIsolatedFoundryView
Description

Isolates the view for methods in this session. An isolated view restricts retrievals to this foundry only.

CompliancemandatoryThis method is must be implemented.
MethoduseEffectiveAvailabilityView
Description

Only availabilities whose effective dates are current are returned by methods in this session.

CompliancemandatoryThis method is must be implemented.
MethoduseAnyEffectiveAvailabilityView
Description

All availabilities of any effective dates are returned by methods in this session.

CompliancemandatoryThis method is must be implemented.
MethodgetAvailability
Description

Gets the Availability specified by its Id.

In plenary mode, the exact Id is found or a NOT_FOUND results. Otherwise, the returned Availability may have a different Id than requested, such as the case where a duplicate Id was assigned to an Availability and 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.

Parametersosid.id.IdavailabilityIdthe Id of the Availability to retrieve
Returnosid.resourcing.Availabilitythe returned Availability
ErrorsNOT_FOUNDno Availability found with the given Id
NULL_ARGUMENT availabilityId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetAvailabilitiesByIds
Description

Gets an AvailabilityList corresponding to the given IdList.

In plenary mode, the returned list contains all of the availabilities 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 Availabilities may 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.

Parametersosid.id.IdListavailabilityIdsthe list of Ids to retrieve
Returnosid.resourcing.AvailabilityListthe returned Availability list
ErrorsNOT_FOUNDan Id was not found
NULL_ARGUMENT availabilityIds is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetAvailabilitiesByGenusType
Description

Gets an AvailabilityList corresponding to the given availability genus Type which does not include availabilities of types derived from the specified Type.

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.

Parametersosid.type.TypeavailabilityGenusTypean availability genus type
Returnosid.resourcing.AvailabilityListthe returned Availability list
ErrorsNULL_ARGUMENT availabilityGenusType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetAvailabilitiesByParentGenusType
Description

Gets an AvailabilityList corresponding to the given availability genus Type and include any additional availabilities with genus types derived from the specified Type.

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.

Parametersosid.type.TypeavailabilityGenusTypean availability genus type
Returnosid.resourcing.AvailabilityListthe returned Availability list
ErrorsNULL_ARGUMENT availabilityGenusType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetAvailabilitiesByRecordType
Description

Gets an AvailabilityList containing the given availability record Type.

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.

Parametersosid.type.TypeavailabilityRecordTypean availability record type
Returnosid.resourcing.AvailabilityListthe returned Availability list
ErrorsNULL_ARGUMENT availabilityRecordType is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetAvailabilitiesOnDate
Description

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.

Parametersosid.calendaring.DateTimefromstart of date range
osid.calendaring.DateTimetoend of date range
Returnosid.resourcing.AvailabilityListthe returned Availability list
ErrorsINVALID_ARGUMENT from is greater than to
NULL_ARGUMENT from or to is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetAvailabilitiesForResource
Description

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.

Parametersosid.id.IdresourceIda resource Id
Returnosid.resourcing.AvailabilityListthe returned Availability list
ErrorsNULL_ARGUMENT resourceId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetAvailabilitiesForResourceOnDate
Description

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.

Parametersosid.id.IdresourceIda resource Id
osid.calendaring.DateTimefromstart of date range
osid.calendaring.DateTimetoend of date range
Returnosid.resourcing.AvailabilityListthe returned Availability list
ErrorsINVALID_ARGUMENT from is greater than to
NULL_ARGUMENT resourceId, from, or to is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetAvailabilitiesForJob
Description

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.

Parametersosid.id.IdjobIda job Id
Returnosid.resourcing.AvailabilityListthe returned Availability list
ErrorsNULL_ARGUMENT jobId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetAvailabilitiesForJobOnDate
Description

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.

Parametersosid.id.IdjobIda job Id
osid.calendaring.DateTimefromstart of date range
osid.calendaring.DateTimetoend of date range
Returnosid.resourcing.AvailabilityListthe returned Availability list
ErrorsINVALID_ARGUMENT from is greater than to
NULL_ARGUMENT jobId, from, or to is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetAvailabilitiesForResourceAndJob
Description

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.

Parametersosid.id.IdresourceIda resource Id
osid.id.IdjobIda job Id
Returnosid.resourcing.AvailabilityListthe returned Availability list
ErrorsNULL_ARGUMENT resourceId or jobId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetAvailabilitiesForResourceAndJobOnDate
Description

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.

Parametersosid.id.IdresourceIda resource Id
osid.id.IdjobIda job Id
osid.calendaring.DateTimefromstart of date range
osid.calendaring.DateTimetoend of date range
Returnosid.resourcing.AvailabilityListthe returned Availability list
ErrorsINVALID_ARGUMENT from is greater than to
NULL_ARGUMENT resourceId, jobId, from, or to is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodgetAvailabilities
Description

Gets all availabilities.

In plenary mode, the returned list contains all of the availabilities, including duplicates, or an error results if an Id in the supplied list is not found or inaccessible. Otherwise, inaccessible Availabilities may 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.

Returnosid.resourcing.AvailabilityListthe returned Availability list
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.