OSID Logo
OSID Specifications
personnel package
Version 3.0.0
Interfaceosid.personnel.PersonAdminSession
Implementsosid.OsidSession
Implemented Byosid.personnel.batch.PersonBatchAdminSession
Used Byosid.personnel.PersonnelManager
osid.personnel.PersonnelProxyManager
Description

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

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

The delete operations delete Persons . To unmap a Person from the current Realm , the PersonRealmAssignmentSession should be used. These delete operations attempt to remove the Person 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.
MethodcanCreatePersons
Description

Tests if this user can create persons. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a Person 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.

Returnbooleanfalse if Person creation is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanCreatePersonWithRecordTypes
Description

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

Parametersosid.type.Type[]personRecordTypesarray of person record types
Returnbooleantrue if Person creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENTpersonRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetPersonFormForCreate
Description

Gets the person form for creating new persons. A new form should be requested for each create transaction.

Parametersosid.type.Type[]personRecordTypesarray of person record types to be included in the create operation or an empty list if none
Returnosid.personnel.PersonFormthe person form
ErrorsNULL_ARGUMENTpersonRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDcannot get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreatePerson
Description

Creates a new Person .

Parametersosid.personnel.PersonFormpersonFormthe form for this Person
Returnosid.personnel.Personthe new Person
ErrorsILLEGAL_STATEpersonForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENTpersonForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDpersonForm did not originate from getPersonFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdatePersons
Description

Tests if this user can update persons. A return of true does not guarantee successful authorization. A return of false indicates that it is known updating a Person 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.

Returnbooleanfalse if Person modification is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodgetPersonFormForUpdate
Description

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

Parametersosid.id.IdpersonIdthe Id of the Person
Returnosid.personnel.PersonFormthe person form
ErrorsNOT_FOUNDpersonId is not found
NULL_ARGUMENTpersonId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdatePerson
Description

Updates an existing person.

Parametersosid.personnel.PersonFormpersonFormthe form containing the elements to be updated
ErrorsILLEGAL_STATEpersonForm already used in an update transaction
INVALID_ARGUMENTthe form contains an invalid value
NULL_ARGUMENTpersonForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDpersonForm did not originate from getPersonFormForUpdate()
CompliancemandatoryThis method must be implemented.
MethodcanDeletePersons
Description

Tests if this user can delete persons. A return of true does not guarantee successful authorization. A return of false indicates that it is known deleting an Person 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.

Returnbooleanfalse if Person deletion is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethoddeletePerson
Description

Deletes a Person .

Parametersosid.id.IdpersonIdthe Id of the Person to remove
ErrorsNOT_FOUNDpersonId not found
NULL_ARGUMENTpersonId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManagePersonAliases
Description

Tests if this user can manage Id aliases for Persons . 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.

Returnbooleanfalse if Person aliasing is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodaliasPerson
Description

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

Parametersosid.id.IdpersonIdthe Id of a Person
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTSaliasId is in use as a primary Id
NOT_FOUNDpersonId not found
NULL_ARGUMENTpersonId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.