public interface ProfileItemProfileAssignmentSession extends OsidSession
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
).
Modifier and Type | Method and Description |
---|---|
void |
assignProfileItemToProfile(Id profileItemId,
Id profileId)
Adds an existing
ProfileItem to a Profile. |
boolean |
canAssignProfileItems()
Tests if this user can alter profile/item mappings.
|
boolean |
canAssignProfileItemsToProfile(Id profileId)
Tests if this user can alter profile/item mappings.
|
IdList |
getAssignableProfileIds(Id profileId)
Gets a list of profile including and under the given profile node in
which any profile item can be assigned.
|
IdList |
getAssignableProfileIdsForProfileItem(Id profileId,
Id profileItemId)
Gets a list of profile including and under the given profile node in
which a specific profile item can be assigned.
|
void |
reassignProfileItemToProfile(Id profileItemId,
Id fromProfileId,
Id toProfileId)
Moves a
ProfileItem from one Profile to
another. |
void |
unassignProfileItemFromProfile(Id profileItemId,
Id profileId)
Removes a
ProfileItem from a Profile. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canAssignProfileItems()
PERMISSION_DENIED.
This is intended as a hint to
an application that may opt not to offer assignment operations to
unauthorized users. false
if mapping is not authorized, true
otherwisemandatory
- This method must be implemented. boolean canAssignProfileItemsToProfile(Id profileId)
PERMISSION_DENIED.
This is intended as a hint to
an application that may opt not to offer assignment operations to
unauthorized users.profileId
- the Id
of the Profile
false
if mapping is not authorized, true
otherwiseNullArgumentException
- profileId
is
null
mandatory
- This method must be implemented. IdList getAssignableProfileIds(Id profileId) throws OperationFailedException
profileId
- the Id
of the Profile
Ids
NullArgumentException
- profileId
is
null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. IdList getAssignableProfileIdsForProfileItem(Id profileId, Id profileItemId) throws OperationFailedException
profileId
- the Id
of the Profile
profileItemId
- the Id
of the ProfileItem
Ids
NullArgumentException
- profileId
or
profileItemId
is null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. void assignProfileItemToProfile(Id profileItemId, Id profileId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
ProfileItem
to a Profile.
profileItemId
- the Id
of the ProfileItem
profileId
- the Id
of the Profile
AlreadyExistsException
- profileItemId
is already assigned to profileId
NotFoundException
- profileItemId
or
profileId
not foundNullArgumentException
- profileItemId
or
profileId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void unassignProfileItemFromProfile(Id profileItemId, Id profileId) throws NotFoundException, OperationFailedException, PermissionDeniedException
ProfileItem
from a Profile.
profileItemId
- the Id
of the ProfileItem
profileId
- the Id
of the Profile
NotFoundException
- profileItemId
or
profileId
not found or profileItemId
not assigned to profileId
NullArgumentException
- profileItemId
or
profileId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void reassignProfileItemToProfile(Id profileItemId, Id fromProfileId, Id toProfileId) throws NotFoundException, OperationFailedException, PermissionDeniedException
ProfileItem
from one Profile
to
another. Mappings to other Profiles
are unaffected.profileItemId
- the Id
of the ProfileItem
fromProfileId
- the Id
of the current
Profile
toProfileId
- the Id
of the destination
Profile
NotFoundException
- profileItemId,
fromProfileId,
or toProfileId
not found
or profileItemId
not mapped to
fromProfileId
NullArgumentException
- profileItemId,
fromProfileId,
or toProfileId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.