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

This session creates and removes ProfileEntries. An ProfileEntry may be defined using an Agent or a Resource. Create and delete methods exist for each type desired.

An explicit ProfileEntry is identified by the mapping among a Resource/Agent and ProfileItem. There can be only one explicit ProfileEntry for each triplet however multiple implicit ProfileEntries may exist.

When a profile entry is created, it is disabled until enableProfileEntry() is used.

Create and update operations differ in their usage. To create a ProfileEntry, a ProfileEntryForm is requested using geProfileEntryFormFormForCreate() specifying the profile item, resource or agent, and desired record Types or none if no record Types are needed. The returned ProfileEntryForm 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 ProfileEntryForm is submiited to a create operation, it cannot be reused with another create operation unless the first operation was unsuccessful. Each ProfileEntryForm corresponds to an attempted transaction.

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

The delete operations delete ProfileEntries. To unmap a ProfileEntry from the current Profile the ProfileEntryProfileAssignmentSession should be used. These delete operations attempt to remove the ProfileEntry itself thus removing it from all known Profile catalogs.

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

MethodgetProfileId
Description

Gets the Profile Id associated with this session.

Returnosid.id.Idthe Profile Id associated with this session
CompliancemandatoryThis method must be implemented.
MethodgetProfile
Description

Gets the Profile associated with this session.

Returnosid.profile.Profilethe Profile associated with this session
ErrorsOPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanCreateProfileEntries
Description

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

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

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

Parametersosid.type.Type[]profileEntryRecordTypesarray of profile entry types
Returnboolean true if ProfileEntry creation using the specified Types is supported, false otherwise
ErrorsNULL_ARGUMENT profileEntryRecordTypes is null
CompliancemandatoryThis method must be implemented.
MethodgetProfileEntryFormForCreateForAgent
Description

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

Parametersosid.id.IdagentIdthe agent Id
osid.id.IdprofileItemIdthe profile item Id
osid.type.Type[]profileEntryRecordTypesarray of profile entry types
Returnosid.profile.ProfileEntryFormthe profile entry form
ErrorsNOT_FOUND agentId or profileItemId is not found
NULL_ARGUMENT agentId or profileItemId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTEDunable to get form with requested record types
CompliancemandatoryThis method must be implemented.
MethodgetProfileEntryFormForCreateForResource
Description

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

Parametersosid.id.IdresourceIdthe resource Id
osid.id.IdprofileItemIdthe profile item Id
Returnosid.profile.ProfileEntryFormthe profile entry form
ErrorsNOT_FOUND resourceId or profileItemId is not found
NULL_ARGUMENT resourceId or profileItemId is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcreateProfileEntry
Description

Creates a new ProfileEntry.

Parametersosid.profile.ProfileEntryFormprofileEntryFormthe profile entry form
Returnosid.profile.ProfileEntry t he new ProfileEntry
ErrorsILLEGAL_STATE profileEntryForm already used in a create transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT profileEntryForm null
OPERATION_FAILED unable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED profileEntryForm did not originate from getprofileEntryFormForAgent() or getProfileEntryFormForResource()
CompliancemandatoryThis method must be implemented.
MethodcanUpdateProfileEntries
Description

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

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

Parametersosid.id.IdprofileEntryIdthe Id of the ProfileEntry
Returnosid.profile.ProfileEntryFormthe profile entry form
ErrorsNOT_FOUND profileEntryId is not found
NULL_ARGUMENT profileEntryId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodupdateProfileEntry
Description

Updates an existing profile entry.

Parametersosid.profile.ProfileEntryFormprofileEntryFormthe profile entry form
ErrorsILLEGAL_STATE profileEntryForm already used in an update transaction
INVALID_ARGUMENTone or more of the form elements is invalid
NULL_ARGUMENT profileEntryForm is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIEDauthorization failure
UNSUPPORTED profileEntryForm did not originate from getProfileEntryFormForCreate()
CompliancemandatoryThis method must be implemented.
MethodcanDeleteProfileEntries
Description

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

Deletes the ProfileEntry identified by the given Id.

Parametersosid.id.IdprofileEntryIdthe Id of the ProfileEntry to delete
ErrorsNOT_FOUNDan ProfileEntry was not found identified by the given Id
NULL_ARGUMENT profileEntryId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodcanManageProfileEntryAliases
Description

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

Adds an Id to an ProfileEntry for the purpose of creating compatibility. The primary Id of the ProfileEntry 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 entry it is reassigned to the given profile entry Id.

Parametersosid.id.IdprofileEntryIdthe Id of an ProfileEntry
osid.id.IdaliasIdthe alias Id
ErrorsALREADY_EXISTS aliasId is already assigned
NOT_FOUND profileEntryId not found
NULL_ARGUMENT profileEntryId or aliasId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.