public interface ItemForm extends OsidObjectForm
This is the form for creating and updating Items. Like
all OsidForm objects, 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.
| Modifier and Type | Method and Description |
|---|---|
void |
clearAccount()
Removes the account.
|
void |
clearAmount()
Removes the amount.
|
void |
clearCategory()
Removes the category.
|
void |
clearDebit()
Removes the debit flag.
|
void |
clearProduct()
Removes the product.
|
void |
clearRecurringInterval()
Removes the recurring interval and sets the item as a one-time charge.
|
Metadata |
getAccountMetadata()
Gets the metadata for the general ledger account.
|
Metadata |
getAmountMetadata()
Gets the metadata for the amount.
|
Metadata |
getCategoryMetadata()
Gets the metadata for the category.
|
Metadata |
getDebitMetadata()
Gets the metadata for the debit flag.
|
ItemFormRecord |
getItemFormRecord(Type itemRecordType)
Gets the
ItemFormRecord corresponding to the given item
record Type. |
Metadata |
getProductMetadata()
Gets the metadata for the product.
|
Metadata |
getRecurringIntervalMetadata()
Gets the metadata for the recurring interval.
|
void |
setAccount(Id accountId)
Sets the general ledger account.
|
void |
setAmount(boolean debit)
Sets the debit flag.
|
void |
setAmount(Currency amount)
Sets the amount.
|
void |
setCategory(Id categoryId)
Sets the category.
|
void |
setProduct(Id productId)
Sets the product.
|
void |
setRecurringInterval(Duration interval)
Sets the recurring interval.
|
clearDescription, clearDisplayName, clearGenusType, getDescriptionMetadata, getDisplayNameMetadata, getGenusTypeMetadata, setDescription, setDisplayName, setGenusTypegetRequiredRecordTypesgetRecordTypes, hasRecordTypegetDefaultLocale, getInvalidMetadata, getJournalCommentMetadata, getLocales, getValidationMessages, isForUpdate, isValid, setJournalComment, setLocalegetId, isCurrentMetadata getCategoryMetadata()
mandatory - This method must be implemented. void setCategory(Id categoryId)
categoryId - the new categoryInvalidArgumentException - categoryId is
invalidNoAccessException - Metadata.isReadOnly()
is true NullArgumentException - categoryId is
null mandatory - This method must be implemented. void clearCategory()
NoAccessException - Metadata.isRequired()
is true or Metadata.isReadOnly()
is true mandatory - This method must be implemented. Metadata getAccountMetadata()
mandatory - This method must be implemented. void setAccount(Id accountId)
accountId - the new accountInvalidArgumentException - accountId is
invalidNoAccessException - Metadata.isReadOnly()
is true NullArgumentException - accountId is
null mandatory - This method must be implemented. void clearAccount()
NoAccessException - Metadata.isRequired()
is true or Metadata.isReadOnly()
is true mandatory - This method must be implemented. Metadata getProductMetadata()
mandatory - This method must be implemented. void setProduct(Id productId)
productId - the new productInvalidArgumentException - productId is
invalidNoAccessException - Metadata.isReadOnly()
is true NullArgumentException - productId is
null mandatory - This method must be implemented. void clearProduct()
NoAccessException - Metadata.isRequired()
is true or Metadata.isReadOnly()
is true mandatory - This method must be implemented. Metadata getAmountMetadata()
mandatory - This method must be implemented. void setAmount(Currency amount)
amount - the new amountInvalidArgumentException - amount is
invalidNoAccessException - Metadata.isReadOnly()
is true NullArgumentException - amount is
null mandatory - This method must be implemented. void clearAmount()
NoAccessException - Metadata.isRequired()
is true or Metadata.isReadOnly()
is true mandatory - This method must be implemented. Metadata getDebitMetadata()
mandatory - This method must be implemented. void setAmount(boolean debit)
debit - true for a debit, false
for a creditInvalidArgumentException - debit is
invalidNoAccessException - Metadata.isReadOnly()
is true mandatory - This method must be implemented. void clearDebit()
NoAccessException - Metadata.isRequired()
is true or Metadata.isReadOnly()
is true mandatory - This method must be implemented. Metadata getRecurringIntervalMetadata()
mandatory - This method must be implemented. void setRecurringInterval(Duration interval)
interval - the new intervalInvalidArgumentException - interval is
invalidNoAccessException - Metadata.isReadOnly()
is true NullArgumentException - interval is
null mandatory - This method must be implemented. void clearRecurringInterval()
NoAccessException - Metadata.isRequired()
is true or Metadata.isReadOnly()
is true mandatory - This method must be implemented. ItemFormRecord getItemFormRecord(Type itemRecordType) throws OperationFailedException
ItemFormRecord corresponding to the given item
record Type. itemRecordType - an item record typeNullArgumentException - itemRecordType
is null OperationFailedException - unable to complete requestUnsupportedException -
hasRecordType(itemRecordType) is false mandatory - This method must be implemented.