Interface AcknowledgementSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface AcknowledgementSession extends OsidSession

This session defines methods for evaluating and responding to inquiries for users.

  • Method Details

    • getInquestId

      Id getInquestId()
      Gets the Inquest Id associated with this session.
      Returns:
      the Inquest Id associated with this session
      Compliance:
      mandatory - This method must be implemented.
    • getInquest

      Gets the Inquest associated with this session.
      Returns:
      the inquest
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canGetMyInquiries

      boolean canGetMyInquiries()
      Tests if this user can perform Inquiry lookups. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PERMISSION_DENIED . This is intended as a hint to an application that may not offer lookup operations to unauthorized users.
      Returns:
      false if lookup methods are not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getMyInquiries

      Gets the inquiries needing a response for the resource related to this agent.
      Parameters:
      auditId - the Id of an Audit
      Returns:
      the returned InquiryList
      Throws:
      NullArgumentException - auditId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • canRespond

      boolean canRespond()
      Tests if this user can create responses. A return of true does not guarantee successful authorization. A return of false indicates that it is known creating a Response will result in a PERMISSION_DENIED . This is intended as a hint to an application that may opt not to offer create operations to an unauthorized user.
      Returns:
      false if Response creation is not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • canCreateResponseWithRecordTypes

      boolean canCreateResponseWithRecordTypes(Type[] responseRecordTypes)
      Tests if this user can create a single Response using the desired record types. While ControlManager.getResponseRecordTypes() can be used to examine which records are supported, this method tests which record(s) are required for creating a specific Response . Providing an empty array tests if a Response can be created with no records.
      Parameters:
      responseRecordTypes - array of response record types
      Returns:
      true if Response creation using the specified record Types is supported, false otherwise
      Throws:
      NullArgumentException - responseRecordTypes is null
      Compliance:
      mandatory - This method must be implemented.
    • getResponseForm

      ResponseForm getResponseForm(Id inquiryId, Type[] responseRecordTypes) throws NotFoundException, OperationFailedException, PermissionDeniedException
      Gets the response form for creating new responses from this agent. A new form should be requested for each create transaction.
      Parameters:
      inquiryId - the Id for the inquiry
      responseRecordTypes - array of response record types
      Returns:
      the response form
      Throws:
      NotFoundException - inquiryId is not found
      NullArgumentException - inquiryId or responseRecordTypes is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - unable to get form for requested record types
      Compliance:
      mandatory - This method must be implemented.
    • respond

      Creates a new Response from this agent.
      Parameters:
      responseForm - the form for this Response
      Returns:
      the new Response
      Throws:
      IllegalStateException - responseForm already used in a create transaction
      InvalidArgumentException - one or more of the form elements is invalid
      NullArgumentException - responseForm is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      UnsupportedException - responseForm did not originate from getResponseFormForCreate()
      Compliance:
      mandatory - This method must be implemented.