Interface OsidRequest

All Superinterfaces:
Browsable, Extensible, Identifiable, OsidObject
All Known Subinterfaces:
RegistrationRequest

public interface OsidRequest extends OsidObject

OsidRequest is the top level interface for OsidObjects used to submit and process transactional requests. An OsidRequest typically has a submitting Agent and is acommpanied by a set of request item Subjugateables reprsenting the parts or line items of the OsidReques t.

OsidRequests have an explicit state model:
  • not submitted
  • submitted
  • processed
  • error
  • cancelled

Additional states may be added through an OsidRecord or orchestrated Process .

  • Method Details

    • getPostingDate

      DateTime getPostingDate()
      Gets the posting date of the request.
      Returns:
      the request date
      Compliance:
      mandatory - This method must be implemented.
    • getRequesterId

      Id getRequesterId()
      Gets the Id of the requester.
      Returns:
      the resource Id
      Compliance:
      mandatory - This method must be implemented.
    • getRequester

      Resource getRequester() throws OperationFailedException
      Gets the requester.
      Returns:
      the resource
      Throws:
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • isSubmitted

      boolean isSubmitted()
      Tests if this request has been submitted.
      Returns:
      true if this request has been submitted, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getSubmittedDate

      DateTime getSubmittedDate()
      Gets the date the request was submitted.
      Returns:
      the submission date
      Throws:
      IllegalStateException - isSubmitted() is false
      Compliance:
      mandatory - This method must be implemented.
    • getSubmitterId

      Id getSubmitterId()
      Gets the Id of the submittor.
      Returns:
      the resource Id
      Compliance:
      mandatory - This method must be implemented.
    • getSubmitter

      Resource getSubmitter() throws OperationFailedException
      Gets the submittor.
      Returns:
      the resource
      Throws:
      IllegalStateException - isSubmitted() is false
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getSubmittingAgentId

      Id getSubmittingAgentId()
      Gets the Id of the submitting agent.
      Returns:
      the submitting agent Id
      Throws:
      IllegalStateException - isSubmitted() is false
      Compliance:
      mandatory - This method must be implemented.
    • getSubmittingAgent

      Agent getSubmittingAgent() throws OperationFailedException
      Gets the submitting agent.
      Returns:
      the submitting agent
      Throws:
      IllegalStateException - isSubmitted() is false
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • isCanceled

      boolean isCanceled()
      Tests if this request has been canceled.
      Returns:
      true if this request has been canceled, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getCanceledDate

      DateTime getCanceledDate()
      Gets the date the request was canceled.
      Returns:
      the cancel date
      Throws:
      IllegalStateException - isCanceled() is false
      Compliance:
      mandatory - This method must be implemented.
    • isProcessed

      boolean isProcessed()
      Tests if this request has been processed.
      Returns:
      true if this request has been processed, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getProcessedDate

      DateTime getProcessedDate()
      Gets the date the request processing completed.
      Returns:
      the procsssed date
      Throws:
      IllegalStateException - isProcessed() is false
      Compliance:
      mandatory - This method must be implemented.
    • hasError

      boolean hasError()
      Tests if this request has been processed but not fulfilled due to error.
      Returns:
      true if this request has error, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getErrorId

      Id getErrorId()
      Gets the Id of the error state.
      Returns:
      the state Id
      Throws:
      IllegalStateException - hasError() is false
      Compliance:
      mandatory - This method must be implemented.
    • getError

      State getError() throws OperationFailedException
      Gets the error state.
      Returns:
      the state
      Throws:
      IllegalStateException - hasError() is false
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.