Interface Item

All Superinterfaces:
Browsable, Extensible, Identifiable, OsidObject, OsidRelationship, Temporal

public interface Item extends OsidRelationship

A Item represents a collection of orders. Like all OSID objects, a Item is identified by its Id and any persisted references should use the Id .

An Item may have multiple unit prices for different types of currencies, such as one for payment and one for credits. Each line item cost type should be lined up with the unit price type.

  • Method Details

    • getOrderId

      Id getOrderId()
      Gets the order Id for this item.
      Returns:
      the order Id
      Compliance:
      mandatory - This method must be implemented.
    • getOrder

      Order getOrder() throws OperationFailedException
      Gets the order for this item.
      Returns:
      the order
      Throws:
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • isDerived

      boolean isDerived()
      Tests if the item is a derived item as opposed to one that has been explicitly selected.
      Returns:
      true if this item is derived, false otherwise
      Compliance:
      mandatory - This method must be implemented.
    • getProductId

      Id getProductId()
      Gets the product Id for this item.
      Returns:
      the product Id
      Compliance:
      mandatory - This method must be implemented.
    • getProduct

      Product getProduct() throws OperationFailedException
      Gets the product for this item.
      Returns:
      the product
      Throws:
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getUnitPriceIds

      IdList getUnitPriceIds()
      Gets the price Ids for this item.
      Returns:
      the price Ids
      Compliance:
      mandatory - This method must be implemented.
    • getUnitPrices

      PriceList getUnitPrices() throws OperationFailedException
      Gets the prices for this item. There may be different price types for a single item.
      Returns:
      the prices
      Throws:
      OperationFailedException - unable to complete request
      Compliance:
      mandatory - This method must be implemented.
    • getQuantity

      long getQuantity()
      Gets the quantity of the product.
      Returns:
      the quantity of the product
      Compliance:
      mandatory - This method must be implemented.
    • getCosts

      CostList getCosts()
      Gets the line item costs.
      Returns:
      the costs.
      Compliance:
      mandatory - This method must be implemented.
    • getItemRecord

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