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

This session creates and removes job constrainers. The data for create and update is provided via the JobConstrainerForm.

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

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

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

Parametersosid.type.Type[]jobConstrainerRecordTypesarray of job constrainer record types
Returnboolean true if JobConstrainer creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT jobConstrainerRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetJobConstrainerFormForCreate
Description

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

Parametersosid.type.Type[]jobConstrainerRecordTypesarray of job constrainer record types
Returnosid.resourcing.rules.JobConstrainerFormthe job constrainer form
ErrorsNULL_ARGUMENT jobConstrainerRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form with requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateJobConstrainer
Description

Creates a new JobConstrainer.

Parametersosid.resourcing.rules.JobConstrainerFormjobConstrainerFormthe form for this JobConstrainer
Returnosid.resourcing.rules.JobConstrainerthe new JobConstrainer
ErrorsILLEGAL_STATE jobConstrainerForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT jobConstrainerForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED jobConstrainerForm did not originate from getJobConstrainerFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateJobConstrainers
Description

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

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

Parametersosid.id.IdjobConstrainerIdthe Id of the JobConstrainer
Returnosid.resourcing.rules.JobConstrainerFormthe job constrainer form
ErrorsNOT_FOUND jobConstrainerId is not found
NULL_ARGUMENT jobConstrainerId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateJobConstrainer
Description

Updates an existing job constrainer.

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

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

Deletes a JobConstrainer.

Parametersosid.id.IdjobConstrainerIdthe Id of the JobConstrainer to remove
ErrorsNOT_FOUND jobConstrainerId not found
NULL_ARGUMENT jobConstrainerId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageJobConstrainerAliases
Description

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

Adds an Id to a JobConstrainer for the purpose of creating compatibility. The primary Id of the JobConstrainer 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 constrainer. it is reassigned to the given job constrainer Id.

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