Interface ObjectiveObjectiveBankSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface ObjectiveObjectiveBankSession extends OsidSession

This session provides methods to retrieve Objective to ObjectiveBank mappings. An Objective may appear in multiple ObjectiveBanks .Each ObjectiveBank may have its own authorizations governing who is allowed to look at it.

This lookup session defines two views:

  • comparative view: elements may be silently omitted or re-ordered
  • plenary view: provides a complete result set or is an error condition
  • Method Details

    • canLookupObjectiveObjectiveBankMappings

      boolean canLookupObjectiveObjectiveBankMappings()
      Tests if this user can perform lookups of objective/objective bank mappings. A return of true does not guarantee successful authorization. A return of false indicates that it is known lookup 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 lookup operations to unauthorized users.
      Returns:
      false if looking up mappings is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • useComparativeObjectiveBankView

      void useComparativeObjectiveBankView()
      The returns from the lookup methods may omit or translate elements based on this session, such as authorization, and not result in an error. This view is used when greater interoperability is desired at the expense of precision.
      Compliance:
      mandatory - This method is must be implemented.
    • usePlenaryObjectiveBankView

      void usePlenaryObjectiveBankView()
      A complete view of the Objective and ObjectiveBank returns is desired. Methods will return what is requested or result in an error. This view is used when greater precision is desired at the expense of interoperability.
      Compliance:
      mandatory - This method is must be implemented.
    • getObjectiveIdsByObjectiveBank

      IdList getObjectiveIdsByObjectiveBank(Id objectiveBankId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the list of Objective Ids associated with an ObjectiveBank .
      Parameters:
      objectiveBankId - Id of the ObjectiveBank
      Returns:
      list of related objectives
      Throws:
      NotFoundException - objectiveBankId is not found
      NullArgumentException - objectiveBankId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getObjectivesByObjectiveBank

      ObjectiveList getObjectivesByObjectiveBank(Id objectiveBankId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the list of Objectives associated with an ObjectiveBank .
      Parameters:
      objectiveBankId - Id of the ObjectiveBank
      Returns:
      list of related objective Ids
      Throws:
      NotFoundException - objectiveBankId is not found
      NullArgumentException - objectiveBankId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getObjectiveIdsByObjectiveBanks

      IdList getObjectiveIdsByObjectiveBanks(IdList objectiveBankIds) throws OperationFailedException, PermissionDeniedException
      Gets the list of Objective Ids corresponding to a list of ObjectiveBanks .
      Parameters:
      objectiveBankIds - list of objective bank Ids
      Returns:
      list of objective Ids
      Throws:
      NullArgumentException - objectiveBankIds is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getObjectivesByObjectiveBanks

      ObjectiveList getObjectivesByObjectiveBanks(IdList objectiveBankIds) throws OperationFailedException, PermissionDeniedException
      Gets the list of Objectives corresponding to a list of ObjectiveBanks .
      Parameters:
      objectiveBankIds - list of objective bank Ids
      Returns:
      list of objectives
      Throws:
      NullArgumentException - objectiveBankIds is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getObjectiveBankIdsByObjective

      IdList getObjectiveBankIdsByObjective(Id objectiveId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the list of ObjectiveBank Ids mapped to an Objective .
      Parameters:
      objectiveId - Id of an Objective
      Returns:
      list of objective bank Ids
      Throws:
      NotFoundException - objectiveId is not found
      NullArgumentException - objectiveId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • getObjectiveBanksByObjective

      ObjectiveBankList getObjectiveBanksByObjective(Id objectiveId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the list of ObjectiveBanks mapped to an Objective .
      Parameters:
      objectiveId - Id of an Objective
      Returns:
      list of objective banks
      Throws:
      NotFoundException - objectiveId is not found
      NullArgumentException - objectiveId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.