Interface ItemForm

All Superinterfaces:
Extensible, Identifiable, OsidBrowsableForm, OsidExtensibleForm, OsidForm, OsidIdentifiableForm, OsidObjectForm, Suppliable
All Known Subinterfaces:
ItemBatchForm

public interface ItemForm extends OsidObjectForm

This is the form for creating and updating Items. Like all OsidForms, various data elements may be set here for use in the create and update methods in the ItemAdminSession. For each data element that may be set, metadata may be examined to provide display hints or data constraints.

  • Method Details

    • getStockMetadata

      Metadata getStockMetadata()
      Gets the metadata for stock.
      Returns:
      metadata for the stock
      Compliance:
      mandatory - This method must be implemented.
    • setStock

      void setStock(Id stockId)
      Sets the stock Id.
      Parameters:
      stockId - the new stock
      Throws:
      InvalidArgumentException - stockId is invalid
      NoAccessException - Metadata.isReadOnly() is true
      NullArgumentException - stockId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearStock

      void clearStock()
      Removes the stock.
      Throws:
      NoAccessException - Metadata.isRequired() is true or Metadata.isReadOnly() is true
      Compliance:
      mandatory - This method must be implemented.
    • getPropertyTagMetadata

      Metadata getPropertyTagMetadata()
      Gets the metadata for serial number.
      Returns:
      metadata for the serial number
      Compliance:
      mandatory - This method must be implemented.
    • setPropertyTag

      void setPropertyTag(String property)
      Sets the property tag.
      Parameters:
      property - the new property tag
      Throws:
      InvalidArgumentException - property is invalid
      NoAccessException - Metadata.isReadOnly() is true
      NullArgumentException - property is null
      Compliance:
      mandatory - This method must be implemented.
    • clearPropertyTag

      void clearPropertyTag()
      Removes the property tag.
      Throws:
      NoAccessException - Metadata.isRequired() is true or Metadata.isReadOnly() is true
      Compliance:
      mandatory - This method must be implemented.
    • getSerialNumberMetadata

      Metadata getSerialNumberMetadata()
      Gets the metadata for serial number.
      Returns:
      metadata for the serial number
      Compliance:
      mandatory - This method must be implemented.
    • setSerialNumber

      void setSerialNumber(String serial)
      Sets the serial number.
      Parameters:
      serial - the new serial number
      Throws:
      InvalidArgumentException - serial is invalid
      NoAccessException - Metadata.isReadOnly() is true
      NullArgumentException - serial is null
      Compliance:
      mandatory - This method must be implemented.
    • clearSerialNumber

      void clearSerialNumber()
      Removes the serial number.
      Throws:
      NoAccessException - Metadata.isRequired() is true or Metadata.isReadOnly() is true
      Compliance:
      mandatory - This method must be implemented.
    • getLocationDescriptionMetadata

      Metadata getLocationDescriptionMetadata()
      Gets the metadata for location description.
      Returns:
      metadata for the location description
      Compliance:
      mandatory - This method must be implemented.
    • setLocationDescription

      void setLocationDescription(String location)
      Sets the location description.
      Parameters:
      location - the new location description
      Throws:
      InvalidArgumentException - location is invalid
      NoAccessException - Metadata.isReadOnly() is true
      NullArgumentException - location is null
      Compliance:
      mandatory - This method must be implemented.
    • clearLocationDescription

      void clearLocationDescription()
      Removes the location description.
      Throws:
      NoAccessException - Metadata.isRequired() is true or Metadata.isReadOnly() is true
      Compliance:
      mandatory - This method must be implemented.
    • getLocationMetadata

      Metadata getLocationMetadata()
      Gets the metadata for location.
      Returns:
      metadata for the location
      Compliance:
      mandatory - This method must be implemented.
    • setLocation

      void setLocation(Id locationId)
      Sets the location.
      Parameters:
      locationId - the new location
      Throws:
      InvalidArgumentException - locationId is invalid
      NoAccessException - Metadata.isReadOnly() is true
      NullArgumentException - locationId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearLocation

      void clearLocation()
      Removes the location.
      Throws:
      NoAccessException - Metadata.isRequired() is true or Metadata.isReadOnly() is true
      Compliance:
      mandatory - This method must be implemented.
    • getItemMetadata

      Metadata getItemMetadata()
      Gets the metadata for the item.
      Returns:
      metadata for the locitemation
      Compliance:
      mandatory - This method must be implemented.
    • setItem

      void setItem(Id itemId)
      Sets the item to which this item is a part.
      Parameters:
      itemId - the new parent item
      Throws:
      InvalidArgumentException - itemId is invalid
      NoAccessException - Metadata.isReadOnly() is true
      NullArgumentException - itemId is null
      Compliance:
      mandatory - This method must be implemented.
    • clearItem

      void clearItem()
      Removes the item.
      Throws:
      NoAccessException - Metadata.isRequired() is true or Metadata.isReadOnly() is true
      Compliance:
      mandatory - This method must be implemented.
    • getItemFormRecord

      ItemFormRecord getItemFormRecord(Type itemRecordType) throws OperationFailedException
      Gets the ItemFormRecord corresponding to the given item record Type.
      Parameters:
      itemRecordType - an item record type
      Returns:
      the item form record
      Throws:
      NullArgumentException - itemRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(itemRecordType) is false
      Compliance:
      mandatory - This method must be implemented.