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

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

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

The delete operations delete Commissions. To unmap a Commission from the current Foundry, the CommissionFoundryAssignmentSession should be used. These delete operations attempt to remove the Commission 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.
MethodcanCreateCommissions
Description

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

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

Parametersosid.type.Type[]commissionRecordTypesarray of commission record types
Returnboolean true if Commission creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT commissionRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetCommissionFormForCreate
Description

Gets the commission form for creating new commissions. A new form should be requested for each create transaction.

Parametersosid.id.IdresourceIdthe Id for the resource
osid.id.IdworkIdthe Id for the work
osid.type.Type[]commissionRecordTypesarray of commission record types
Returnosid.resourcing.CommissionFormthe commission form
ErrorsNOT_FOUND resourceId or workId is not found
NULL_ARGUMENT resourceId, workId, or commissionRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateCommission
Description

Creates a new Commission.

Parametersosid.resourcing.CommissionFormcommissionFormthe form for this Commission
Returnosid.resourcing.Commissionthe new Commission
ErrorsILLEGAL_STATE commissionForm already used for a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT commissionForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED commissionForm did no originate from getCommissionFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateCommissions
Description

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

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

Parametersosid.id.IdcommissionIdthe Id of the Commission
Returnosid.resourcing.CommissionFormthe commission form
ErrorsNOT_FOUND commissionId is not found
NULL_ARGUMENT commissionId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateCommission
Description

Updates an existing commission.

Parametersosid.resourcing.CommissionFormcommissionFormthe form containing the elements to be updated
ErrorsILLEGAL_STATE commissionForm already used for an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENT commissionForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED commissionForm did no originate from getCommissionFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeleteCommissions
Description

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

Deletes a Commission.

Parametersosid.id.IdcommissionIdthe Id of the Commission to remove
ErrorsNOT_FOUND commissionId not found
NULL_ARGUMENT commissionId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageCommissionAliases
Description

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

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

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