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

This session creates, updates, and deletes Jobs. 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 a Job, a JobForm is requested using getJobFormForCreate() specifying the desired relationship peers and record Types or none if no record Types are needed. The returned JobForm 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 JobForm is submiited to a create operation, it cannot be reused with another create operation unless the first operation was unsuccessful. Each JobForm corresponds to an attempted transaction.

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

The delete operations delete Jobs. To unmap a Job from the current Foundry, the JobFormAssignmentSession should be used. These delete operations attempt to remove the Job 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.
MethodcanCreateJobs
Description

Tests if this user can create Jobs. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a Job 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 Job creation is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanCreateJobWithRecordTypes
Description

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

Parametersosid.type.Type[]jobRecordTypesarray of job record types
Returnboolean true if Job creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT jobRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetJobFormForCreate
Description

Gets the job form for creating new jobs. A new form should be requested for each create transaction.

Parametersosid.type.Type[]jobRecordTypesarray of job record types
Returnosid.resourcing.JobFormthe job form
ErrorsNULL_ARGUMENT jobRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form with requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateJob
Description

Creates a new Job.

Parametersosid.resourcing.JobFormjobFormthe form for this Job
Returnosid.resourcing.Jobthe new Job
ErrorsILLEGAL_STATE jobForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT jobForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED jobForm did not orginiate from getJobFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateJobs
Description

Tests if this user can update Jobs. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a Job 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 Job modification is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetJobFormForUpdate
Description

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

Parametersosid.id.IdjobIdthe Id of the Job
Returnosid.resourcing.JobFormthe job form
ErrorsNOT_FOUND jobId is not found
NULL_ARGUMENT jobId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateJob
Description

Updates an existing job.

Parametersosid.resourcing.JobFormjobFormthe form containing the elements to be updated
ErrorsILLEGAL_STATE jobForm already used in an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT jobId or jobForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED jobForm did not orginiate from getJobFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeleteJobs
Description

Tests if this user can delete Jobs. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting a Job 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 Job deletion is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoddeleteJob
Description

Deletes a Job.

Parametersosid.id.IdjobIdthe Id of the Job to remove
ErrorsNOT_FOUND jobId not found
NULL_ARGUMENT jobId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageJobAliases
Description

Tests if this user can manage Id aliases for Jobs. 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 Job aliasing is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodaliasJob
Description

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

Parametersosid.id.IdjobIdthe Id of a Job
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND jobId not found
NULL_ARGUMENT jobId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.