Interface ActivityObjectiveBankAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface ActivityObjectiveBankAssignmentSession extends OsidSession

This session provides methods to re-assign Activities to ObjectiveBanks . An Activity may map to multiple ObjectiveBanks and removing the last reference to a Activity is the equivalent of deleting it. Each ObjectiveBank may have its own authorizations governing who is allowed to operate on it.

Moving or adding a reference of an Activity to another ObjectiveBank is not a copy operation (eg: does not change its Id ).

  • Method Details

    • canAssignActivities

      boolean canAssignActivities()
      Tests if this user can alter activity/objective bank 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.
    • canAssignActivitiesToObjectiveBank

      boolean canAssignActivitiesToObjectiveBank(Id objectiveBankId)
      Tests if this user can alter activity/objective bank 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:
      objectiveBankId - the Id of the ObjectiveBank
      Returns:
      false if mapping is not authorized, true otherwise
      Throws:
      NullArgumentException - objectiveBankId is null
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableObjectiveBankIds

      IdList getAssignableObjectiveBankIds(Id objectiveBankId) throws OperationFailedException
      Gets a list of objective banks including and under the given objective bank node in which any activity can be assigned.
      Parameters:
      objectiveBankId - the Id of the ObjectiveBank
      Returns:
      list of assignable objective bank Ids
      Throws:
      NullArgumentException - objectiveBankId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableObjectiveBankIdsForActivity

      IdList getAssignableObjectiveBankIdsForActivity(Id objectiveBankId, Id activityId) throws OperationFailedException
      Gets a list of objective banks including and under the given objective bank node in which a specific activity can be assigned.
      Parameters:
      objectiveBankId - the Id of the ObjectiveBank
      activityId - the Id of the Activity
      Returns:
      list of assignable objective bank Ids
      Throws:
      NullArgumentException - activityId or objectiveBankId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • assignActivityToObjectiveBank

      void assignActivityToObjectiveBank(Id activityId, Id objectiveBankId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an existing Activity to a ObjectiveBank .
      Parameters:
      activityId - the Id of the Activity
      objectiveBankId - the Id of the ObjectiveBank
      Throws:
      AlreadyExistsException - activityId already mapped to objectiveBankId
      NotFoundException - activityId or objectiveBankId not found
      NullArgumentException - activityId or objectiveBankId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignActivityFromObjectiveBank

      void unassignActivityFromObjectiveBank(Id activityId, Id objectiveBankId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Removes a Activity from a ObjectiveBank .
      Parameters:
      activityId - the Id of the Activity
      objectiveBankId - the Id of the ObjectiveBank
      Throws:
      NotFoundException - activityId or objectiveBankId not found or activityId not mapped to objectiveBankId
      NullArgumentException - activityId or objectiveBankId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • reassignActivityToObjectiveBank

      void reassignActivityToObjectiveBank(Id activityId, Id fromObjectiveBankId, Id toObjectiveBankId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Moves an Activity from one ObjectiveBank to another. Mappings to other ObjectiveBanks are unaffected.
      Parameters:
      activityId - the Id of the Activity
      fromObjectiveBankId - the Id of the current ObjectiveBank
      toObjectiveBankId - the Id of the destination ObjectiveBank
      Throws:
      AlreadyExistsException - activityId already assigned to toObjectiveBankId
      NotFoundException - activityId, fromObjectiveBankId , or toObjectiveBankId not found or activityId not mapped to fromObjectiveBankId
      NullArgumentException - activityId, fromObjectiveBankId , or toObjectiveBankId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.