public interface StockForm extends OsidObjectForm, OsidFederateableForm
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.
Modifier and Type | Method and Description |
---|---|
void |
clearLocationDescription()
Removes the location description.
|
void |
clearLocations()
Removes the locations.
|
void |
clearModels()
Removes the models.
|
void |
clearSKU()
Removes the SKU.
|
Metadata |
getLocationDescriptionMetadata()
Gets the metadata for location string.
|
Metadata |
getLocationsMetadata()
Gets the metadata for locations in this stock.
|
Metadata |
getModelsMetadata()
Gets the metadata for models in this stock.
|
Metadata |
getSKUMetadata()
Gets the metadata for sku.
|
StockFormRecord |
getStockFormRecord(Type stockRecordType)
Gets the
StockFormRecord corresponding to the given
stock record Type. |
void |
setLocationDescription(java.lang.String location)
Sets the location string.
|
void |
setLocations(Id[] locations)
Sets the locations.
|
void |
setModels(Id[] models)
Sets the models.
|
void |
setSKU(java.lang.String sku)
Sets the SKU.
|
clearDescription, clearDisplayName, clearGenusType, getDescriptionMetadata, getDisplayNameMetadata, getGenusTypeMetadata, setDescription, setDisplayName, setGenusType
getRequiredRecordTypes
getRecordTypes, hasRecordType
getDefaultLocale, getInvalidMetadata, getJournalCommentMetadata, getLocales, getValidationMessages, isForUpdate, isValid, setJournalComment, setLocale
getId, isCurrent
Metadata getSKUMetadata()
mandatory
- This method must be implemented. void setSKU(java.lang.String sku)
sku
- the new SKUInvalidArgumentException
- sku
is
invalidNoAccessException
- Metadata.isReadOnly()
is true
NullArgumentException
- sku
is
null
mandatory
- This method must be implemented. void clearSKU()
NoAccessException
- Metadata.isRequired()
is true
or Metadata.isReadOnly()
is true
mandatory
- This method must be implemented. Metadata getModelsMetadata()
mandatory
- This method must be implemented. void setModels(Id[] models)
models
- the new modelsInvalidArgumentException
- models
is
invalidNoAccessException
- Metadata.isReadOnly()
is true
NullArgumentException
- models
is
null
mandatory
- This method must be implemented. void clearModels()
NoAccessException
- Metadata.isRequired()
is true
or Metadata.isReadOnly()
is true
mandatory
- This method must be implemented. Metadata getLocationDescriptionMetadata()
mandatory
- This method must be implemented. void setLocationDescription(java.lang.String location)
location
- the new location descriptionInvalidArgumentException
- location
is
invalidNoAccessException
- Metadata.isReadOnly()
is true
NullArgumentException
- location
is
null
mandatory
- This method must be implemented. void clearLocationDescription()
NoAccessException
- Metadata.isRequired()
is true
or Metadata.isReadOnly()
is true
mandatory
- This method must be implemented. Metadata getLocationsMetadata()
mandatory
- This method must be implemented. void setLocations(Id[] locations)
locations
- the new locationsInvalidArgumentException
- locations
is
invalidNoAccessException
- Metadata.isReadOnly()
is true
NullArgumentException
- locations
is
null
mandatory
- This method must be implemented. void clearLocations()
NoAccessException
- Metadata.isRequired()
is true
or Metadata.isReadOnly()
is true
mandatory
- This method must be implemented. StockFormRecord getStockFormRecord(Type stockRecordType) throws OperationFailedException
StockFormRecord
corresponding to the given
stock record Type.
stockRecordType
- a stock record typeNullArgumentException
- stockRecordType
is null
OperationFailedException
- unable to complete requestUnsupportedException
-
hasRecordType(stockRecordType)
is false
mandatory
- This method must be implemented.