OSID Logo
OSID Specifications
profile package
Version 3.0.0
Release Candidate Preview
Interfaceosid.profile.ProfileAdminSession
Implementsosid.OsidSession
Description

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

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

The delete operations delete Profiles.

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

MethodcanCreateProfiles
Description

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

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

Parametersosid.type.Type[]profileRecordTypesarray of profile recod types
Returnboolean true if Profile creation using the specified Types is supported, false otherwise
ErrorsNULL_ARGUMENT profileRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetProfileFormForCreate
Description

Gets the profile form for creating new profiles. A new form should be requested for each create transaction.

Parametersosid.type.Type[]profileRecordTypesarray of profile recod types
Returnosid.profile.ProfileFormthe profile form
ErrorsNULL_ARGUMENT profileRecordTypes is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form with requested record types
CompliancemandatoryThis method must be implemented.
MethodcreateProfile
Description

Creates a new Profile.

Parametersosid.profile.ProfileFormprofileFormthe form for this Profile
Returnosid.profile.Profilethe new Profile
ErrorsILLEGAL_STATE profileForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT profileForm is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED profileForm did not originate from getProfileFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateProfiles
Description

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

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

Parametersosid.id.IdprofileIdthe Id of the Profile
Returnosid.profile.ProfileFormthe profile form
ErrorsNOT_FOUND profileId is not found
NULL_ARGUMENT profileId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodupdateProfile
Description

Updates an existing profile.

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

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

Deletes a Profile.

Parametersosid.id.IdprofileIdthe Id of the Profile to remove
ErrorsNOT_FOUND profileId not found
NULL_ARGUMENT profileId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageProfileAliases
Description

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

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

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