Interface ConvocationAcademyAssignmentSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session provides methods to re-assign Convocations to
Academies . A Convocation may map to multiple
Academies and removing the last reference to a Convocation 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 Convocation to another Academy
is not a copy operation (eg: does not change its Id ).
-
Method Summary
Modifier and TypeMethodDescriptionvoidassignConvocationToAcademy(Id convocationId, Id academyId) Adds an existingConvocationto anAcademy.booleanTests if this user can alter convocation/academy mappings.booleancanAssignConvocationsToAcademy(Id academyId) Tests if this user can alter convocation/academy mappings.getAssignableAcademyIds(Id academyId) Gets a list of academies including and under the given academy node in which any convocation can be assigned.getAssignableAcademyIdsForConvocation(Id academyId, Id convocationId) Gets a list of academies including and under the given academy node in which a specific convocation can be assigned.voidreassignConvocationToAcademy(Id convocationId, Id fromAcademyId, Id toAcademyId) Moves aConvocationfrom oneAcademyto another.voidunassignConvocationFromAcademy(Id convocationId, Id academyId) Removes aConvocationfrom 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
-
canAssignConvocations
boolean canAssignConvocations()Tests if this user can alter convocation/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.
-
canAssignConvocationsToAcademy
Tests if this user can alter convocation/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 convocation 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.
-
getAssignableAcademyIdsForConvocation
IdList getAssignableAcademyIdsForConvocation(Id academyId, Id convocationId) throws OperationFailedException Gets a list of academies including and under the given academy node in which a specific convocation can be assigned.- Parameters:
academyId- theIdof theAcademyconvocationId- theIdof theConvocation- Returns:
- list of assignable academy
Ids - Throws:
NullArgumentException-academyIdorconvocationIdisnullOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
assignConvocationToAcademy
void assignConvocationToAcademy(Id convocationId, Id academyId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Adds an existingConvocationto anAcademy.- Parameters:
convocationId- theIdof theConvocationacademyId- theIdof theAcademy- Throws:
AlreadyExistsException-convocationIdis already assigned toacademyIdNotFoundException-convocationIdoracademyIdnot foundNullArgumentException-convocationIdoracademyIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
unassignConvocationFromAcademy
void unassignConvocationFromAcademy(Id convocationId, Id academyId) throws NotFoundException, OperationFailedException, PermissionDeniedException Removes aConvocationfrom anAcademy.- Parameters:
convocationId- theIdof theConvocationacademyId- theIdof theAcademy- Throws:
NotFoundException-convocationIdoracademyIdnot found orconvocationIdnot assigned toacademyIdNullArgumentException-convocationIdoracademyIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
reassignConvocationToAcademy
void reassignConvocationToAcademy(Id convocationId, Id fromAcademyId, Id toAcademyId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException Moves aConvocationfrom oneAcademyto another. Mappings to otherAcademiesare unaffected.- Parameters:
convocationId- theIdof theConvocationfromAcademyId- theIdof the currentAcademytoAcademyId- theIdof the destinationAcademy- Throws:
AlreadyExistsException-convocationIdalready assigned totoAcademyIdNotFoundException-convocationId, fromAcademyId, ortoAcademyIdnot found orconvocationIdnot mapped tofromAcademyIdNullArgumentException-convocationId, fromAcademyId, ortoAcademyIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-