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

This session provides methods to re-assign ProfileItems to Profiles. A ProfileItem may map to multiple Profiles and removing the last reference to a ProfileItem is the equivalent of deleting it. Each Profile may have its own authorizations governing who is allowed to operate on it.

Adding a reference of a ProfileItem to another Profile is not a copy operation (eg: does not change its Id ).

MethodcanAssignProfileItems
Description

Tests if this user can alter profile/item mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping 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 assignment operations to unauthorized users.

Returnboolean false if mapping is not authorized, true otherwise
CompliancemandatoryThis method must be implemented.
MethodcanAssignProfileItemsToProfile
Description

Tests if this user can alter profile/item mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known mapping 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 assignment operations to unauthorized users.

Parametersosid.id.IdprofileIdthe Id of the Profile
Returnboolean false if mapping is not authorized, true otherwise
ErrorsNULL_ARGUMENT profileId is null
CompliancemandatoryThis method must be implemented.
MethodgetAssignableProfileIds
Description

Gets a list of profile including and under the given profile node in which any profile item can be assigned.

Parametersosid.id.IdprofileIdthe Id of the Profile
Returnosid.id.IdListlist of assignable profile Ids
ErrorsNULL_ARGUMENT profileId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodgetAssignableProfileIdsForProfileItem
Description

Gets a list of profile including and under the given profile node in which a specific profile item can be assigned.

Parametersosid.id.IdprofileIdthe Id of the Profile
osid.id.IdprofileItemIdthe Id of the ProfileItem
Returnosid.id.IdListlist of assignable profile Ids
ErrorsNULL_ARGUMENT profileId or profileItemId is null
OPERATION_FAILEDunable to complete request
CompliancemandatoryThis method must be implemented.
MethodassignProfileItemToProfile
Description

Adds an existing ProfileItem to a Profile.

Parametersosid.id.IdprofileItemIdthe Id of the ProfileItem
osid.id.IdprofileIdthe Id of the Profile
ErrorsALREADY_EXISTS profileItemId is already assigned to profileId
NOT_FOUND profileItemId or profileId not found
NULL_ARGUMENT profileItemId or profileId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodunassignProfileItemFromProfile
Description

Removes a ProfileItem from a Profile.

Parametersosid.id.IdprofileItemIdthe Id of the ProfileItem
osid.id.IdprofileIdthe Id of the Profile
ErrorsNOT_FOUND profileItemId or profileId not found or profileItemId not assigned to profileId
NULL_ARGUMENT profileItemId or profileId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodreassignProfileItemToProfile
Description

Moves a ProfileItem from one Profile to another. Mappings to other Profiles are unaffected.

Parametersosid.id.IdprofileItemIdthe Id of the ProfileItem
osid.id.IdfromProfileIdthe Id of the current Profile
osid.id.IdtoProfileIdthe Id of the destination Profile
ErrorsNOT_FOUND profileItemId, fromProfileId, or toProfileId not found or profileItemId not mapped to fromProfileId
NULL_ARGUMENT profileItemId, fromProfileId, or toProfileId is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.