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

This session creates, updates, and deletes Availabilities. The data for create and update is provided by the consumer via the form object. OsidForms are requested for each create or update and may not be reused.

Create and update operations differ in their usage. To create an Availability, an AvailabilityForm is requested using getAvailabilityFormForCreate() specifying the desired relationship peers and record Types or none if no record Types are needed. The returned AvailabilityForm will indicate that it is to be used with a create operation and can be used to examine metdata or validate data prior to creation. Once the AvailabilityForm is submiited to a create operation, it cannot be reused with another create operation unless the first operation was unsuccessful. Each AvailabilityForm corresponds to an attempted transaction.

For updates, AvailabilityForms are requested to the Availability Id that is to be updated using getAvailabilityFormForUpdate(). Similarly, the AvailabilityForm has metadata about the data that can be updated and it can perform validation before submitting the update. The AvailabilityForm can only be used once for a successful update and cannot be reused.

The delete operations delete Availabilities. To unmap an Availability from the current Foundry, the AvailabilityFoundryAssignmentSession should be used. These delete operations attempt to remove the Availability itself thus removing it from all known Foundry catalogs.

This session includes an Id aliasing mechanism to assign an external Id to an internally assigned Id.

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.
MethodcanCreateAvailabilities
Description

Tests if this user can create Availabilities. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating an Availability will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.

Returnboolean false if Availability creation is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanCreateAvailabilityWithRecordTypes
Description

Tests if this user can create a single Availability using the desired record types. While ResourcingManager.getAvailabilityRecordTypes() can be used to examine which records are supported, this method tests which record(s) are required for creating a specific Availability. Providing an empty array tests if an Availability can be created with no records.

Parametersosid.type.Type[]availabilityRecordTypesarray of availability record types
Returnboolean true if Availability creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT availabilityRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetAvailabilityFormForCreate
Description

Gets the availability form for creating new availabilities. A new form should be requested for each create transaction.

Parametersosid.id.IdresourceIdthe Id for the resource
osid.id.IdjobIdthe Id for the job
osid.type.Type[]availabilityRecordTypesarray of availability record types
Returnosid.resourcing.AvailabilityFormthe availability form
ErrorsNOT_FOUND resourceId or jobId is not found
NULL_ARGUMENT resourceId, jobId, or availabilityRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateAvailability
Description

Creates a new Availability.

Parametersosid.resourcing.AvailabilityFormavailabilityFormthe form for this Availability
Returnosid.resourcing.Availabilitythe new Availability
ErrorsILLEGAL_STATE availabilityForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT availabilityForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED availabilityForm did not originate from getAvailabilityFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateAvailabilities
Description

Tests if this user can update Availabilities. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating an Availability will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer update operations to an unauthorized user.

Returnboolean false if Availability modification is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetAvailabilityFormForUpdate
Description

Gets the availability form for updating an existing availability. A new availability form should be requested for each update transaction.

Parametersosid.id.IdavailabilityIdthe Id of the Availability
Returnosid.resourcing.AvailabilityFormthe availability form
ErrorsNOT_FOUND availabilityId is not found
NULL_ARGUMENT availabilityId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateAvailability
Description

Updates an existing availability.

Parametersosid.resourcing.AvailabilityFormavailabilityFormthe form containing the elements to be updated
ErrorsILLEGAL_STATE availabilityForm already used in an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT availabilityForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED availabilityForm did not originate from getAvailabilityFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeleteAvailabilities
Description

Tests if this user can delete Availabilities. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting an Availability will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer delete operations to an unauthorized user.

Returnboolean false if Availability deletion is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoddeleteAvailability
Description

Deletes an Availability.

Parametersosid.id.IdavailabilityIdthe Id of the Availability to remove
ErrorsNOT_FOUND availabilityId not found
NULL_ARGUMENT availabilityId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageAvailabilityAliases
Description

Tests if this user can manage Id aliases for Availabilities. A return of true does not guarantee successful authorization. A return of false indicates that it is known changing an alias will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer alias operations to an unauthorized user.

Returnboolean false if Availability aliasing is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodaliasAvailability
Description

Adds an Id to an Availability for the purpose of creating compatibility. The primary Id of the Availability is determined by the provider. The new Id performs as an alias to the primary Id . If the alias is a pointer to another availability, it is reassigned to the given availability Id.

Parametersosid.id.IdavailabilityIdthe Id of an Availability
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND availabilityId not found
NULL_ARGUMENT availabilityId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.