Interface CreateResponse

All Superinterfaces:
OsidCapsule

public interface CreateResponse extends OsidCapsule

CreateResponses are returned from bulk create operations. Batch-oriented methods are executed on a best effort basis unless wrapped in Transaction that supports an atomic commit() . Batch methods may be invoked outside of a Transaction where some of the items supplied may fail.

Bulk create operations accept a list of OsidForms and to be created. There is one CreateResponse returned for every OsidForm supplied but not necessarily in the same order. The created Id in the response is the newly created Id is the create item was successful.

  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the Id of the newly created object.
    Gets the error message for an unsuccessful item within the create operation.
    Gets the form Id corresponding to this response.
    boolean
    Tests if this item within the create operation was successful.
  • Method Details

    • getFormId

      Id getFormId()
      Gets the form Id corresponding to this response.
      Returns:
      the form Id
      Compliance:
      mandatory - This method must be implemented.
    • isSuccessful

      boolean isSuccessful()
      Tests if this item within the create operation was successful.
      Returns:
      true if the create operation was successful, false if it was not successful
      Compliance:
      mandatory - This method must be implemented.
    • getCreatedId

      Id getCreatedId()
      Gets the Id of the newly created object.
      Returns:
      the reference object Id
      Throws:
      IllegalStateException - isSuccessful() is false
      Compliance:
      mandatory - This method must be implemented.
    • getErrorMessage

      DisplayText getErrorMessage()
      Gets the error message for an unsuccessful item within the create operation.
      Returns:
      the message
      Throws:
      IllegalStateException - isSuccessful() is true
      Compliance:
      mandatory - This method must be implemented.