Interface ProfileEntryProfileAssignmentSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, 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 ).
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignProfileEntryToProfile(Id profileEntryId, Id profileId) Adds an existingProfileEntryto aProfile.booleanTests if this user can alter profile entry/profile mappings.booleancanAssignProfileEntriesToProfile(Id profileId) Tests if this user can alter profile entry/profile mappings.getAssignableProfileIds(Id profileId) Gets a list of profile including and under the given profile node in which any profile entry can be assigned.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.voidreassignProfileEntryToProfile(Id profileEntryId, Id fromProfileId, Id toProfileId) Moves aProfileEntryfrom oneProfileto another.voidunassignProfileEntryFromProfile(Id profileEntryId, Id profileId) Removes aProfileEntryfrom aProfile.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
canAssignProfileEntries
boolean canAssignProfileEntries()Tests if this user can alter profile entry/profile 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 aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.- Returns:
falseif mapping is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canAssignProfileEntriesToProfile
Tests if this user can alter profile entry/profile 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 aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.- Parameters:
profileId- theIdof theProfile- Returns:
falseif mapping is not authorized,trueotherwise- Throws:
NullArgumentException-profileIdisnull- Compliance:
mandatory- This method must be implemented.
-
getAssignableProfileIds
Gets a list of profile including and under the given profile node in which any profile entry can be assigned.- Parameters:
profileId- theIdof theProfile- Returns:
- list of assignable profile
Ids - Throws:
NullArgumentException-profileIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getAssignableProfileIdsForProfileEntry
IdList getAssignableProfileIdsForProfileEntry(Id profileId, Id profileEntryId) throws OperationFailedException Gets a list of profile including and under the given profile node in which a specific profile entry can be assigned.- Parameters:
profileId- theIdof theProfileprofileEntryId- theIdof theProfileEntry- Returns:
- list of assignable profile
Ids - Throws:
NullArgumentException-profileIdorprofileEntryIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
assignProfileEntryToProfile
void assignProfileEntryToProfile(Id profileEntryId, Id profileId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds an existingProfileEntryto aProfile.- Parameters:
profileEntryId- theIdof theProfileEntryprofileId- theIdof theProfile- Throws:
AlreadyExistsException-profileEntryIdis already assigned toprofileIdNotFoundException-profileEntryIdorprofileIdnot foundNullArgumentException-profileEntryIdorprofileIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
unassignProfileEntryFromProfile
void unassignProfileEntryFromProfile(Id profileEntryId, Id profileId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes aProfileEntryfrom aProfile.- Parameters:
profileEntryId- theIdof theProfileEntryprofileId- theIdof theProfile- Throws:
NotFoundException-profileEntryIdorprofileIdnot found orprofileEntryIdnot assigned toprofileIdNullArgumentException-profileEntryIdorprofileIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
reassignProfileEntryToProfile
void reassignProfileEntryToProfile(Id profileEntryId, Id fromProfileId, Id toProfileId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Moves aProfileEntryfrom oneProfileto another. Mappings to otherProfilesare unaffected.- Parameters:
profileEntryId- theIdof theProfileEntryfromProfileId- theIdof the currentProfiletoProfileId- theIdof the destinationProfile- Throws:
AlreadyExistsException-profileEntryIdalready assigned totoProfileIdNotFoundException-profileEntryId, fromProfileId, ortoProfileIdnot found orprofileEntryIdnot mapped tofromProfileIdNullArgumentException-profileEntryId, fromProfileId, ortoProfileIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-