Interface ActivityObjectiveBankSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface ActivityObjectiveBankSession extends OsidSession

This session provides methods to retrieve Activity to ObjectiveBank mappings. An Activity 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

    • canLookupActivityObjectiveBankMappings

      boolean canLookupActivityObjectiveBankMappings()
      Tests if this user can perform lookups of activity/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 Activity 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.
    • getActivityIdsByObjectiveBank

      IdList getActivityIdsByObjectiveBank(Id objectiveBankId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the list of Activity Ids associated with an ObjectiveBank .
      Parameters:
      objectiveBankId - Id of the ObjectiveBank
      Returns:
      list of related activity 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.
    • getActivitiesByObjectiveBank

      ActivityList getActivitiesByObjectiveBank(Id objectiveBankId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the list of Activities associated with an ObjectiveBank .
      Parameters:
      objectiveBankId - Id of the ObjectiveBank
      Returns:
      list of related activities
      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.
    • getActivityIdsByObjectiveBanks

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

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

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

      Gets the list of ObjectiveBanks mapped to a Activity .
      Parameters:
      activityId - Id of a Activity
      Returns:
      list of objective bank Ids
      Throws:
      NotFoundException - activityId is not found
      NullArgumentException - activityId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.