OSID Logo
OSID Specifications
inventory package
Version 3.0.0
Release Candidate Preview
Interfaceosid.inventory.StockForm
Implementsosid.OsidObjectForm
osid.OsidFederateableForm
Description

This is the form for creating and updating Stocks. Like all OsidForm objects, 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.

MethodgetSKUMetadata
Description

Gets the metadata for sku.

Returnosid.Metadatametadata for the sku
CompliancemandatoryThis method must be implemented.
MethodsetSKU
Description

Sets the SKU.

Parametersstringskuthe new SKU
ErrorsINVALID_ARGUMENT sku is invalid
NO_ACCESS Metadata.isReadOnly() is true
NULL_ARGUMENT sku is null
CompliancemandatoryThis method must be implemented.
MethodclearSKU
Description

Removes the SKU.

ErrorsNO_ACCESS Metadata.isRequired() is true or Metadata.isReadOnly() is true
CompliancemandatoryThis method must be implemented.
MethodgetModelsMetadata
Description

Gets the metadata for models in this stock.

Returnosid.Metadatametadata for the models
CompliancemandatoryThis method must be implemented.
MethodsetModels
Description

Sets the models.

Parametersosid.id.Id[]modelsthe new models
ErrorsINVALID_ARGUMENT models is invalid
NO_ACCESS Metadata.isReadOnly() is true
NULL_ARGUMENT models is null
CompliancemandatoryThis method must be implemented.
MethodclearModels
Description

Removes the models.

ErrorsNO_ACCESS Metadata.isRequired() is true or Metadata.isReadOnly() is true
CompliancemandatoryThis method must be implemented.
MethodgetLocationDescriptionMetadata
Description

Gets the metadata for location string.

Returnosid.Metadatametadata for the location string
CompliancemandatoryThis method must be implemented.
MethodsetLocationDescription
Description

Sets the location string.

Parametersstringlocationthe new location description
ErrorsINVALID_ARGUMENT location is invalid
NO_ACCESS Metadata.isReadOnly() is true
NULL_ARGUMENT location is null
CompliancemandatoryThis method must be implemented.
MethodclearLocationDescription
Description

Removes the location description.

ErrorsNO_ACCESS Metadata.isRequired() is true or Metadata.isReadOnly() is true
CompliancemandatoryThis method must be implemented.
MethodgetLocationsMetadata
Description

Gets the metadata for locations in this stock.

Returnosid.Metadatametadata for the locations
CompliancemandatoryThis method must be implemented.
MethodsetLocations
Description

Sets the locations.

Parametersosid.id.Id[]locationsthe new locations
ErrorsINVALID_ARGUMENT locations is invalid
NO_ACCESS Metadata.isReadOnly() is true
NULL_ARGUMENT locations is null
CompliancemandatoryThis method must be implemented.
MethodclearLocations
Description

Removes the locations.

ErrorsNO_ACCESS Metadata.isRequired() is true or Metadata.isReadOnly() is true
CompliancemandatoryThis method must be implemented.
MethodgetStockFormRecord
Description

Gets the StockFormRecord corresponding to the given stock record Type.

Parametersosid.type.TypestockRecordTypea stock record type
Returnosid.inventory.records.StockFormRecordthe stock form record
ErrorsNULL_ARGUMENT stockRecordType is null
OPERATION_FAILEDunable to complete request
UNSUPPORTED hasRecordType(stockRecordType) is false
CompliancemandatoryThis method must be implemented.