Interface ProfileEntryEnablerProfileAssignmentSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods to re-assign ProfileEntryEnabler
to Profile mappings. A ProfileEntryEnabler may appear in
multiple Profile objects and removing the last reference to a
ProfileEntryEnabler 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 ProfileEntryEnabler to another
Profile is not a copy operation (eg: does not change its Id ).
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignProfileEntryEnablerToProfile(Id profileEntryEnablerId, Id profileId) Adds an existingProfileEntryEnablerto aProfile.booleanTests if this user can alter profile entry enabler/profile mappings.booleancanAssignProfileEntryEnablersToProfile(Id profileId) Tests if this user can alter profile entry enabler/profile mappings.getAssignableProfileIds(Id profileId) Gets a list of profiles including and under the given profile node in which any profile entry enabler can be assigned.getAssignableProfileIdsForProfileEntryEnabler(Id profileId, Id profileEntryEnablerId) Gets a list of profiles including and under the given profile node in which a specific profile entry enabler can be assigned.voidreassignProfileEntryEnablerToProfile(Id profileEntryEnablerId, Id fromProfileId, Id toProfileId) Moves aProfileEntryEnablerfrom oneProfileto another.voidunassignProfileEntryEnablerFromProfile(Id profileEntryEnablerId, Id profileId) Removes aProfileEntryEnablerfrom 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
-
canAssignProfileEntryEnablers
boolean canAssignProfileEntryEnablers()Tests if this user can alter profile entry enabler/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 lookup operations to unauthorized users.- Returns:
falseif mapping is not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
canAssignProfileEntryEnablersToProfile
Tests if this user can alter profile entry enabler/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 lookup 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 profiles including and under the given profile node in which any profile entry enabler 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.
-
getAssignableProfileIdsForProfileEntryEnabler
IdList getAssignableProfileIdsForProfileEntryEnabler(Id profileId, Id profileEntryEnablerId) throws OperationFailedException Gets a list of profiles including and under the given profile node in which a specific profile entry enabler can be assigned.- Parameters:
profileId- theIdof theProfileprofileEntryEnablerId- theIdof theProfileEntryEnabler- Returns:
- list of assignable profile
Ids - Throws:
NullArgumentException-profileIdorprofileEntryEnablerIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
assignProfileEntryEnablerToProfile
void assignProfileEntryEnablerToProfile(Id profileEntryEnablerId, Id profileId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds an existingProfileEntryEnablerto aProfile.- Parameters:
profileEntryEnablerId- theIdof theProfileEntryEnablerprofileId- theIdof theProfile- Throws:
AlreadyExistsException-profileEntryEnablerIdis already assigned toprofileIdNotFoundException-profileEntryEnablerIdorprofileIdnot foundNullArgumentException-profileEntryEnablerIdorprofileIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
unassignProfileEntryEnablerFromProfile
void unassignProfileEntryEnablerFromProfile(Id profileEntryEnablerId, Id profileId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes aProfileEntryEnablerfrom aProfile.- Parameters:
profileEntryEnablerId- theIdof theProfileEntryEnablerprofileId- theIdof theProfile- Throws:
NotFoundException-profileEntryEnablerIdorprofileIdnot found orprofileEntryEnablerIdnot assigned toprofileIdNullArgumentException-profileEntryEnablerIdorprofileIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
reassignProfileEntryEnablerToProfile
void reassignProfileEntryEnablerToProfile(Id profileEntryEnablerId, Id fromProfileId, Id toProfileId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Moves aProfileEntryEnablerfrom oneProfileto another. Mappings to otherProfilesare unaffected.- Parameters:
profileEntryEnablerId- theIdof theProfileEntryEnablerfromProfileId- theIdof the currentProfiletoProfileId- theIdof the destinationProfile- Throws:
AlreadyExistsException-profileEntryEnablerIdalready assigned totoProfileIdNotFoundException-profileEntryEnablerId, fromProfileId, ortoProfileIdnot found orprofileEntryEnablerIdnot mapped tofromProfileIdNullArgumentException-profileEntryEnablerId, fromProfileId, ortoProfileIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-