Interface ConvocationAcademyAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface ConvocationAcademyAssignmentSession extends 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 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 a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.
      Returns:
      false if mapping is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canAssignConvocationsToAcademy

      boolean canAssignConvocationsToAcademy(Id academyId)
      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 a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer assignment operations to unauthorized users.
      Parameters:
      academyId - the Id of the Academy
      Returns:
      false if mapping is not authorized, true otherwise
      Throws:
      NullArgumentException - academyId is null
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableAcademyIds

      IdList getAssignableAcademyIds(Id academyId) throws OperationFailedException
      Gets a list of academies including and under the given academy node in which any convocation can be assigned.
      Parameters:
      academyId - the Id of the Academy
      Returns:
      list of assignable academy Ids
      Throws:
      NullArgumentException - academyId is null
      OperationFailedException - 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 - the Id of the Academy
      convocationId - the Id of the Convocation
      Returns:
      list of assignable academy Ids
      Throws:
      NullArgumentException - academyId or convocationId is null
      OperationFailedException - 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 existing Convocation to an Academy .
      Parameters:
      convocationId - the Id of the Convocation
      academyId - the Id of the Academy
      Throws:
      AlreadyExistsException - convocationId is already assigned to academyId
      NotFoundException - convocationId or academyId not found
      NullArgumentException - convocationId or academyId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignConvocationFromAcademy

      void unassignConvocationFromAcademy(Id convocationId, Id academyId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Removes a Convocation from an Academy .
      Parameters:
      convocationId - the Id of the Convocation
      academyId - the Id of the Academy
      Throws:
      NotFoundException - convocationId or academyId not found or convocationId not assigned to academyId
      NullArgumentException - convocationId or academyId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • reassignConvocationToAcademy

      void reassignConvocationToAcademy(Id convocationId, Id fromAcademyId, Id toAcademyId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Moves a Convocation from one Academy to another. Mappings to other Academies are unaffected.
      Parameters:
      convocationId - the Id of the Convocation
      fromAcademyId - the Id of the current Academy
      toAcademyId - the Id of the destination Academy
      Throws:
      AlreadyExistsException - convocationId already assigned to toAcademyId
      NotFoundException - convocationId, fromAcademyId , or toAcademyId not found or convocationId not mapped to fromAcademyId
      NullArgumentException - convocationId, fromAcademyId , or toAcademyId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.