Interface Item
- All Superinterfaces:
Browsable, Extensible, Identifiable, OsidObject
An Item is a product or service.
Like all OsidObjects, Item is managed by its
OsidSessions and may not be accessed by concurrent processing threads.
-
Method Summary
Modifier and TypeMethodDescriptionGets the item account.Gets the accountId.Gets the amount of this item.Gets the item category.Gets the categoryId.getItemRecord(Type itemRecordType) Gets the item record corresponding to the givenItemrecordType.This method is used to retrieve an object implementing the requested record.Gets the product.Gets the productId.Gets the recurring interval.booleanTests if this item relates to s specific general ledger account.booleanTests if this item relates to s specific product.booleanisDebit()Tests if the amount is a debit or a credit.booleanTests if this item is a recurring charge.Methods inherited from interface Browsable
getProperties, getPropertiesByRecordTypeMethods inherited from interface Extensible
getRecordTypes, hasRecordTypeMethods inherited from interface Identifiable
getId, isCurrentMethods inherited from interface OsidObject
getDescription, getDisplayName, getGenusType, isOfGenusType
-
Method Details
-
getCategoryId
Id getCategoryId()Gets the categoryId.- Returns:
- the category
Id - Compliance:
mandatory- This method must be implemented.
-
getCategory
Gets the item category.- Returns:
- the category
- Throws:
OperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
hasAccount
boolean hasAccount()Tests if this item relates to s specific general ledger account.- Returns:
trueif this item has an account,falseotherwise- Compliance:
mandatory- This method must be implemented.
-
getAccountId
Id getAccountId()Gets the accountId.- Returns:
- the account
Id - Throws:
IllegalStateException-hasAccount()isfalse- Compliance:
mandatory- This method must be implemented.
-
getAccount
Gets the item account.- Returns:
- the account
- Throws:
IllegalStateException-hasAccount()isfalseOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
hasProduct
boolean hasProduct()Tests if this item relates to s specific product.- Returns:
trueif this item has a product,falseotherwise- Compliance:
mandatory- This method must be implemented.
-
getProductId
Id getProductId()Gets the productId.- Returns:
- the product
Id - Throws:
IllegalStateException-hasProduct()isfalse- Compliance:
mandatory- This method must be implemented.
-
getProduct
Gets the product.- Returns:
- the product
- Throws:
IllegalStateException-hasProduct()isfalseOperationFailedException- unable to complete request- Compliance:
mandatory- This method must be implemented.
-
getAmount
Currency getAmount()Gets the amount of this item.- Returns:
- the amount
- Compliance:
mandatory- This method must be implemented.
-
isDebit
boolean isDebit()Tests if the amount is a debit or a credit.- Returns:
trueif this item amount is a debit,falseif it is a credit- Compliance:
mandatory- This method must be implemented.
-
isRecurring
boolean isRecurring()Tests if this item is a recurring charge.- Returns:
trueif this item is recurring,falseif one-time- Compliance:
mandatory- This method must be implemented.
-
getRecurringInterval
Duration getRecurringInterval()Gets the recurring interval.- Returns:
- the interval
- Throws:
IllegalStateException-isRecurring()isfalse- Compliance:
mandatory- This method must be implemented.
-
getItemRecord
Gets the item record corresponding to the givenItemrecordType.This method is used to retrieve an object implementing the requested record. TheitemRecordTypemay be theTypereturned ingetRecordTypes()or any of its parents in aTypehierarchy wherehasRecordType(itemRecordType)istrue.- Parameters:
itemRecordType- the type of item record to retrieve- Returns:
- the item record
- Throws:
NullArgumentException-itemRecordTypeisnullOperationFailedException- unable to complete requestUnsupportedException-hasRecordType(itemRecordType)isfalse- Compliance:
mandatory- This method must be implemented.
-