public interface ProfileEntryProfileAssignmentSession extends OsidSession
This session provides methods to re-assign profile entries to
Profile.
A ProfileEntry
may map to multiple
Profile
objects and removing the last reference to a
ProfileEntry
is the equivalent of deleting it. Each Profile
may have its own authorizations governing who is allowed to
operate on it.
Moving or adding a reference of a ProfileEntry
to
another Profile
is not a copy operation (eg: does not
change its Id
).
Modifier and Type | Method and Description |
---|---|
void |
assignProfileEntryToProfile(Id profileEntryId,
Id profileId)
Adds an existing
ProfileEntry to a Profile. |
boolean |
canAssignProfileEntries()
Tests if this user can alter profile entry/profile mappings.
|
boolean |
canAssignProfileEntriesToProfile(Id profileId)
Tests if this user can alter profile entry/profile mappings.
|
IdList |
getAssignableProfileIds(Id profileId)
Gets a list of profile including and under the given profile node in
which any profile entry can be assigned.
|
IdList |
getAssignableProfileIdsForProfileEntry(Id profileId,
Id profileEntryId)
Gets a list of profile including and under the given profile node in
which a specific profile entry can be assigned.
|
void |
reassignProfileEntryToProfile(Id profileEntryId,
Id fromProfileId,
Id toProfileId)
Moves a
ProfileEntry from one Profile to
another. |
void |
unassignProfileEntryFromProfile(Id profileEntryId,
Id profileId)
Removes a
ProfileEntry from a Profile. |
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canAssignProfileEntries()
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 canAssignProfileEntriesToProfile(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 getAssignableProfileIdsForProfileEntry(Id profileId, Id profileEntryId) throws OperationFailedException
profileId
- the Id
of the Profile
profileEntryId
- the Id
of the
ProfileEntry
Ids
NullArgumentException
- profileId
or
profileEntryId
is null
OperationFailedException
- unable to complete requestmandatory
- This method must be implemented. void assignProfileEntryToProfile(Id profileEntryId, Id profileId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
ProfileEntry
to a Profile.
profileEntryId
- the Id
of the
ProfileEntry
profileId
- the Id
of the Profile
AlreadyExistsException
- profileEntryId
is already assigned to profileId
NotFoundException
- profileEntryId
or
profileId
not foundNullArgumentException
- profileEntryId
or profileId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void unassignProfileEntryFromProfile(Id profileEntryId, Id profileId) throws NotFoundException, OperationFailedException, PermissionDeniedException
ProfileEntry
from a Profile.
profileEntryId
- the Id
of the
ProfileEntry
profileId
- the Id
of the Profile
NotFoundException
- profileEntryId
or
profileId
not found or profileEntryId
not assigned to profileId
NullArgumentException
- profileEntryId
or profileId
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void reassignProfileEntryToProfile(Id profileEntryId, Id fromProfileId, Id toProfileId) throws NotFoundException, OperationFailedException, PermissionDeniedException
ProfileEntry
from one Profile
to
another. Mappings to other Profiles
are unaffected.profileEntryId
- the Id
of the
ProfileEntry
fromProfileId
- the Id
of the current
Profile
toProfileId
- the Id
of the destination
Profile
NotFoundException
- profileEntryId,
fromProfileId,
or toProfileId
not found
or profileEntryId
not mapped to
fromProfileId
NullArgumentException
- profileEntryId,
fromProfileId,
or toProfileId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.