Interface StockForm

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

public interface StockForm extends OsidObjectForm, OsidFederateableForm

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

  • Method Details

    • getSKUMetadata

      Metadata getSKUMetadata()
      Gets the metadata for sku.
      Returns:
      metadata for the sku
      Compliance:
      mandatory - This method must be implemented.
    • setSKU

      void setSKU(String sku)
      Sets the SKU.
      Parameters:
      sku - the new SKU
      Throws:
      InvalidArgumentException - sku is invalid
      NoAccessException - Metadata.isReadOnly() is true
      NullArgumentException - sku is null
      Compliance:
      mandatory - This method must be implemented.
    • clearSKU

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

      Metadata getModelsMetadata()
      Gets the metadata for models in this stock.
      Returns:
      metadata for the models
      Compliance:
      mandatory - This method must be implemented.
    • setModels

      void setModels(Id[] models)
      Sets the models.
      Parameters:
      models - the new models
      Throws:
      InvalidArgumentException - models is invalid
      NoAccessException - Metadata.isReadOnly() is true
      NullArgumentException - models is null
      Compliance:
      mandatory - This method must be implemented.
    • clearModels

      void clearModels()
      Removes the models.
      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 text.
      Returns:
      metadata for the location string
      Compliance:
      mandatory - This method must be implemented.
    • setLocationDescription

      void setLocationDescription(String location)
      Sets the location string.
      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.
    • getLocationsMetadata

      Metadata getLocationsMetadata()
      Gets the metadata for locations in this stock.
      Returns:
      metadata for the locations
      Compliance:
      mandatory - This method must be implemented.
    • setLocations

      void setLocations(Id[] locations)
      Sets the locations.
      Parameters:
      locations - the new locations
      Throws:
      InvalidArgumentException - locations is invalid
      NoAccessException - Metadata.isReadOnly() is true
      NullArgumentException - locations is null
      Compliance:
      mandatory - This method must be implemented.
    • clearLocations

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

      StockFormRecord getStockFormRecord(Type stockRecordType) throws OperationFailedException
      Gets the StockFormRecord corresponding to the given stock record Type.
      Parameters:
      stockRecordType - a stock record type
      Returns:
      the stock form record
      Throws:
      NullArgumentException - stockRecordType is null
      OperationFailedException - unable to complete request
      UnsupportedException - hasRecordType(stockRecordType) is false
      Compliance:
      mandatory - This method must be implemented.