Interface ObjectiveObjectiveBankAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface ObjectiveObjectiveBankAssignmentSession extends OsidSession

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

  • Method Details

    • canAssignObjectives

      boolean canAssignObjectives()
      Tests if this user can alter objective/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.
    • canAssignObjectivesToObjectiveBank

      boolean canAssignObjectivesToObjectiveBank(Id objectiveBankId)
      Tests if this user can alter objective/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 objective 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.
    • getAssignableObjectiveBankIdsForObjective

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

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

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

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