Interface ConferralAcademyAssignmentSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods to re-assign Conferrals to
Academies . A Conferral may map to multiple Academies and
removing the last reference to a Conferral is the equivalent of
deleting it. Each Academy may have its own authorizations
governing who is allowed to operate on it.
Adding a reference of a Conferral to another Academy
is not a copy operation (eg: does not change its Id ).
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignConferralToAcademy(Id conferralId, Id academyId) Adds an existingConferralto anAcademy.booleanTests if this user can alter conferral/academy mappings.booleancanAssignConferralsToAcademy(Id academyId) Tests if this user can alter conferral/academy mappings.getAssignableAcademyIds(Id academyId) Gets a list of academies including and under the given academy node in which any conferral can be assigned.getAssignableAcademyIdsForConferral(Id academyId, Id conferralId) Gets a list of academies including and under the given academy node in which a specific conferral can be assigned.voidreassignConferralToAcademy(Id conferralId, Id fromAcademyId, Id toAcademyId) Moves aConferralfrom oneAcademyto another.voidunassignConferralFromAcademy(Id conferralId, Id academyId) Removes aConferralfrom anAcademy.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
-
canAssignConferrals
boolean canAssignConferrals()Tests if this user can alter conferral/academy 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.
-
canAssignConferralsToAcademy
Tests if this user can alter conferral/academy 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:
academyId- theIdof theAcademy- Returns:
falseif mapping is not authorized,trueotherwise- Throws:
NullArgumentException-academyIdisnull- Compliance:
mandatory- This method must be implemented.
-
getAssignableAcademyIds
Gets a list of academies including and under the given academy node in which any conferral can be assigned.- Parameters:
academyId- theIdof theAcademy- Returns:
- list of assignable academy
Ids - Throws:
NullArgumentException-academyIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getAssignableAcademyIdsForConferral
IdList getAssignableAcademyIdsForConferral(Id academyId, Id conferralId) throws OperationFailedException Gets a list of academies including and under the given academy node in which a specific conferral can be assigned.- Parameters:
academyId- theIdof theAcademyconferralId- theIdof theConferral- Returns:
- list of assignable academy
Ids - Throws:
NullArgumentException-academyIdorconferralIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
assignConferralToAcademy
void assignConferralToAcademy(Id conferralId, Id academyId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds an existingConferralto anAcademy.- Parameters:
conferralId- theIdof theConferralacademyId- theIdof theAcademy- Throws:
AlreadyExistsException-conferralIdis already assigned toacademyIdNotFoundException-conferralIdoracademyIdnot foundNullArgumentException-conferralIdoracademyIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
unassignConferralFromAcademy
void unassignConferralFromAcademy(Id conferralId, Id academyId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes aConferralfrom anAcademy.- Parameters:
conferralId- theIdof theConferralacademyId- theIdof theAcademy- Throws:
NotFoundException-conferralIdoracademyIdnot found orconferralIdnot assigned toacademyIdNullArgumentException-conferralIdoracademyIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
reassignConferralToAcademy
void reassignConferralToAcademy(Id conferralId, Id fromAcademyId, Id toAcademyId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Moves aConferralfrom oneAcademyto another. Mappings to otherAcademiesare unaffected.- Parameters:
conferralId- theIdof theConferralfromAcademyId- theIdof the currentAcademytoAcademyId- theIdof the destinationAcademy- Throws:
AlreadyExistsException-conferralIdalready assigned totoAcademyIdNotFoundException-conferralId, fromAcademyId, ortoAcademyIdnot found orconferralIdnot mapped tofromAcademyIdNullArgumentException-conferralId, fromAcademyId, ortoAcademyIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-