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

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

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

The delete operations delete Realms. It is safer to remove all mappings to the Realm catalogs before deletion.

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

MethodcanCreateRealms
Description

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

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

Parametersosid.type.Type[]realmRecordTypesarray of types
Returnboolean true if Realm creation using the specified record Types is supported, false otherwise
ErrorsNULL_ARGUMENT realmRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetRealmFormForCreate
Description

Gets the realm form for creating new realms. A new form should be requested for each create transaction.

Parametersosid.type.Type[]realmRecordTypesarray of types
Returnosid.personnel.RealmFormthe realm form
ErrorsNULL_ARGUMENT realmRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDcannot get form for requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateRealm
Description

Creates a new Realm.

Parametersosid.personnel.RealmFormrealmFormthe form for this Realm
Returnosid.personnel.Realmthe new Realm
ErrorsILLEGAL_STATE realmForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT realmForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED realmForm did not originate from getRealmFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateRealms
Description

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

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

Parametersosid.id.IdrealmIdthe Id of the Realm
Returnosid.personnel.RealmFormthe realm form
ErrorsNOT_FOUND realmId is not found
NULL_ARGUMENT realmId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateRealm
Description

Updates an existing realm.

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

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

Deletes a Realm.

Parametersosid.id.IdrealmIdthe Id of the Realm to remove
ErrorsNOT_FOUND realmId not found
NULL_ARGUMENT realmId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageRealmAliases
Description

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

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

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