Interface Order

All Superinterfaces:
Aggregateable, Browsable, Extensible, Identifiable, OsidObject

public interface Order extends OsidObject, Aggregateable

An Order .

  • Method Details

    • getCustomerId

      Id getCustomerId()
      Gets the Id of the customer.
      Returns:
      the customer Id
      Compliance:
      mandatory - This method must be implemented.
    • getCustomer

      Resource getCustomer() throws OperationFailedException
      Gets the customer.
      Returns:
      the customer
      Throws:
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getItemIds

      IdList getItemIds()
      Gets the Ids of the items.
      Returns:
      the item Ids
      Compliance:
      mandatory - This method must be implemented.
    • getItems

      Gets the items.
      Returns:
      the items
      Throws:
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getTotalCost

      Currency getTotalCost()
      Gets the total cost for this order.
      Returns:
      the total cost
      Compliance:
      mandatory - This method must be implemented.
    • isAtomic

      boolean isAtomic()
      Tests if all the items are processed atomically.
      Returns:
      true if the order is atomic, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • isSubmitted

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

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

      Id getSubmitterId()
      Gets the resource Id who submitted the order.
      Returns:
      the submitting resource Id
      Throws:
      IllegalStateException - isSubmitted() is false
      Compliance:
      mandatory - This method must be implemented.
    • getSubmitter

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

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

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

      boolean isClosed()
      Tests if all this order is closed or canceled.
      Returns:
      true if the order is closed, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getClosedDate

      DateTime getClosedDate()
      Gets the date this order has been closed.
      Returns:
      the date closed
      Throws:
      IllegalStateException - isClosed() is false
      Compliance:
      mandatory - This method must be implemented.
    • getCloserId

      Id getCloserId()
      Gets the resource Id who closed the order.
      Returns:
      the closing resource Id
      Throws:
      IllegalStateException - isClosed() is false
      Compliance:
      mandatory - This method must be implemented.
    • getCloser

      Gets the resource who closed the order.
      Returns:
      the closing resource
      Throws:
      IllegalStateException - isClosed() is false
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getClosingAgentId

      Id getClosingAgentId()
      Gets the agent Id who closed the order.
      Returns:
      the closing agent Id
      Throws:
      IllegalStateException - isClosed() is false
      Compliance:
      mandatory - This method must be implemented.
    • getClosingAgent

      Agent getClosingAgent() throws OperationFailedException
      Gets the agent who closed the order.
      Returns:
      the closing agent
      Throws:
      IllegalStateException - isClosed() is false
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getOrderRecord

      OrderRecord getOrderRecord(Type orderRecordType) throws OperationFailedException
      Gets the order record corresponding to the given Order record Type .This method is used to retrieve an object implementing the requested record. The orderRecordType may be the Type returned in getRecordTypes() or any of its parents in a Type hierarchy where hasRecordType(orderRecordType) is true .
      Parameters:
      orderRecordType - the type of order record to retrieve
      Returns:
      the order record
      Throws:
      NullArgumentException - orderRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(orderRecordType) is false
      Compliance:
      mandatory - This method must be implemented.