Interface ResponseInquestAssignmentSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface ResponseInquestAssignmentSession extends OsidSession

This session provides methods to re-assign Responses to Inquest mappings. A Response may appear in multiple Inquest objects and removing the last reference to a Response is the equivalent of deleting it. Each Inquest may have its own authorizations governing who is allowed to operate on it.

Adding a reference of a Response to another Inquest is not a copy operation (eg: does not change its Id ).

  • Method Details

    • canAssignResponses

      boolean canAssignResponses()
      Tests if this user can alter response/inquest 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 response is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canAssignResponsesToInquest

      boolean canAssignResponsesToInquest(Id inquestId)
      Tests if this user can alter response/inquest 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:
      inquestId - the Id of the Inquest
      Returns:
      false if mapping is not authorized, true otherwise
      Throws:
      NullArgumentException - inquestId is null
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableInquestIds

      IdList getAssignableInquestIds(Id inquestId) throws OperationFailedException
      Gets a list of inquests including and under the given inquest node in which any response can be assigned.
      Parameters:
      inquestId - the Id of the Inquest
      Returns:
      list of assignable inquest Ids
      Throws:
      NullArgumentException - inquestId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getAssignableInquestIdsForResponse

      IdList getAssignableInquestIdsForResponse(Id inquestId, Id responseId) throws OperationFailedException
      Gets a list of inquests including and under the given inquest node in which a specific response can be assigned.
      Parameters:
      inquestId - the Id of the Inquest
      responseId - the Id of the Response
      Returns:
      list of assignable inquest Ids
      Throws:
      NullArgumentException - inquestId or responseId is null
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • assignResponseToInquest

      void assignResponseToInquest(Id responseId, Id inquestId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Adds an existing Response to a Inquest .
      Parameters:
      responseId - the Id of the Response
      inquestId - the Id of the Inquest
      Throws:
      AlreadyExistsException - responseId is already assigned to inquestId
      NotFoundException - responseId or inquestId not found
      NullArgumentException - responseId or inquestId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • unassignResponseFromInquest

      void unassignResponseFromInquest(Id responseId, Id inquestId) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Removes a Response from a Inquest .
      Parameters:
      responseId - the Id of the Response
      inquestId - the Id of the Inquest
      Throws:
      NotFoundException - responseId or inquestId not found or responseId not assigned to inquestId
      NullArgumentException - responseId or inquestId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • reassignResponseToInquest

      void reassignResponseToInquest(Id responseId, Id fromInquestId, Id toInquestId) throws AlreadyExistsException, NotFoundException, OperationFailedException, PermissionDeniedException
      Moves a Response from one Inquest to another. Mappings to other Inquests are unaffected.
      Parameters:
      responseId - the Id of the Response
      fromInquestId - the Id of the current Inquest
      toInquestId - the Id of the destination toInquestId
      Throws:
      AlreadyExistsException - responseId already assigned to toUtilityId
      NotFoundException - responseId, fromInquestId , or toInquestId not found or responseId not mapped to fromInquestId
      NullArgumentException - responseId, fromInquestId , or toInquestId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.