Interface AwardAcademyAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface AwardAcademyAssignmentSession extends OsidSession

This session provides methods to re-assign Awards to Academies . An Award may map to multiple Academies and removing the last reference to an Award 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 an Award to another Academy is not a copy operation (eg: does not change its Id ).

  • Method Details

    • canAssignAwards

      boolean canAssignAwards()
      Tests if this user can alter award/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.
    • canAssignAwardsToAcademy

      boolean canAssignAwardsToAcademy(Id academyId)
      Tests if this user can alter award/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 award 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.
    • getAssignableAcademyIdsForAward

      IdList getAssignableAcademyIdsForAward(Id academyId, Id awardId) throws OperationFailedException
      Gets a list of academies including and under the given academy node in which a specific award can be assigned.
      Parameters:
      academyId - the Id of the Academy
      awardId - the Id of the Award
      Returns:
      list of assignable academy Ids
      Throws:
      NullArgumentException - academyId or awardId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • assignAwardToAcademy

      void assignAwardToAcademy(Id awardId, Id academyId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an existing Award to an Academy .
      Parameters:
      awardId - the Id of the Award
      academyId - the Id of the Academy
      Throws:
      AlreadyExistsException - awardId is already assigned to academyId
      NotFoundException - awardId or academyId not found
      NullArgumentException - awardId or academyId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignAwardFromAcademy

      void unassignAwardFromAcademy(Id awardId, Id academyId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Removes an Award from an Academy .
      Parameters:
      awardId - the Id of the Award
      academyId - the Id of the Academy
      Throws:
      NotFoundException - awardId or academyId not found or awardId not asigned to academyId
      NullArgumentException - awardId or academyId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • reassignAwardToAcademy

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