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

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

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

The delete operations delete Competencies. To unmap a Competency from the current Foundry, the CompetencyFoundryAssignmentSession should be used. These delete operations attempt to remove the Competency 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.

MethodgetJobId
Description

Gets the Job Id associated with this session.

Returnosid.id.Idthe Job Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetJob
Description

Gets the Job associated with this session.

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

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

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

Parametersosid.type.Type[]competencyRecordTypesarray of competency record types
Returnboolean true if Competency creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT competencyRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetCompetencyFormForCreate
Description

Gets the competency form for creating new competencies. A new form should be requested for each create transaction.

Parametersosid.type.Type[]competencyRecordTypesarray of competency record types
Returnosid.resourcing.CompetencyFormthe competency form
ErrorsNULL_ARGUMENT competencyRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateCompetency
Description

Creates a new Competency.

Parametersosid.resourcing.CompetencyFormcompetencyFormthe form for this Competency
Returnosid.resourcing.Competencythe new Competency
ErrorsILLEGAL_STATE competencyForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT competencyForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED competencyForm did not originate from getCompetencyFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateCompetencies
Description

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

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

Parametersosid.id.IdcompetencyIdthe Id of the Competency
Returnosid.resourcing.CompetencyFormthe competency form
ErrorsNOT_FOUND competencyId is not found
NULL_ARGUMENT competencyId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateCompetency
Description

Updates an existing competency.

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

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

Deletes a Competency.

Parametersosid.id.IdcompetencyIdthe Id of the Competency to remove
ErrorsNOT_FOUND competencyId not found
NULL_ARGUMENT competencyId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageCompetencyAliases
Description

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

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

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