Interface Item
- All Superinterfaces:
Browsable, Extensible, Identifiable, OsidObject
An Item is a product or service.
-
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, getPropertiesByRecordTypeModifier and TypeMethodDescriptionGets a list of properties.getPropertiesByRecordType(Type recordType) Gets a list of properties corresponding to the specified record type.Methods inherited from interface Extensible
getRecordTypes, hasRecordTypeModifier and TypeMethodDescriptionGets the record types available in this object.booleanhasRecordType(Type recordType) Tests if this object supports the given recordType.Methods inherited from interface Identifiable
getId, isCurrentMethods inherited from interface OsidObject
getDescription, getDisplayName, getGenusType, isOfGenusTypeModifier and TypeMethodDescriptionGets the description associated with this instance of this OSID object.Gets the preferred display name associated with this instance of this OSID object appropriate for display to the user.Gets the genus type of this object.booleanisOfGenusType(Type genusType) Tests if this object is of the given genusType.
-
Method Details
-
getCategoryId
Id getCategoryId()Gets the categoryId.- Returns:
- the category
Id - Compliance:
mandatory- This method is 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 is 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 is 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.
-