OSID Logo
OSID Specifications
personnel package
Version 3.0.0
Release Candidate Preview
Interfaceosid.personnel.PositionAdminSession
Implementsosid.OsidSession
Description

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

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

The delete operations delete Positions. To unmap a Position from the current Realm, the PositionRealmAssignmentSession should be used. These delete operations attempt to remove the Position itself thus removing it from all known Realm catalogs.

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

MethodgetRealmId
Description

Gets the Realm Id associated with this session.

Returnosid.id.Idthe Realm Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetRealm
Description

Gets the Realm associated with this session.

Returnosid.personnel.Realmthe realm
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanCreatePositions
Description

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

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

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

Parametersosid.type.Type[]positionRecordTypesarray of position record types
Returnboolean true if Position creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT positionRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetPositionFormForCreate
Description

Gets the position form for creating new positions. A new form should be requested for each create transaction.

Parametersosid.id.IdorganizationIdthe organization Id to which this position belongs
osid.type.Type[]positionRecordTypesarray of position record types to be included in the create operation or an empty list if none
Returnosid.personnel.PositionFormthe position form
ErrorsNOT_FOUND organizationId is not found
NULL_ARGUMENT organizationId or positionRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDcannot get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreatePosition
Description

Creates a new Position.

Parametersosid.personnel.PositionFormpositionFormthe form for this Position
Returnosid.personnel.Positionthe new Position
ErrorsILLEGAL_STATE positionForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT positionForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED positionForm did not originate from getPositionFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdatePositions
Description

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

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

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

Parametersosid.id.IdpositionIdthe Id of the Position
Returnosid.personnel.PositionFormthe position form
ErrorsNOT_FOUND positionId is not found
NULL_ARGUMENT positionId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdatePosition
Description

Updates an existing position.

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

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

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

Deletes a Position.

Parametersosid.id.IdpositionIdthe Id of the Position to remove
ErrorsNOT_FOUND positionId not found
NULL_ARGUMENT positionId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManagePositionAliases
Description

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

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

Parametersosid.id.IdpositionIdthe Id of a Position
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTS aliasId is in use as a primary Id
NOT_FOUND positionId not found
NULL_ARGUMENT positionId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.