|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Product
Define the interfaces that the Core class must offer to support Product functionality
| Method Summary | |
|---|---|
java.util.Collection<ProductDetails> |
listProducts()
Fetch a collection of the products know to the system. |
Type |
newProductType(java.lang.String productName)
Instantiate the default type associated with a product. |
Type |
newProductType(java.lang.String productName,
java.lang.String typeName)
Instantiate a type associated with a product. |
void |
registerProduct(ProductDetails details)
Register a new product with the catalog. |
void |
removeProduct(ProductDetails productDetails)
Remove a product from the registry. |
void |
resetAllProducts()
Reset all the products know to the product manager. |
void |
resetProduct(java.lang.String productName)
Reset a specific product. |
void |
updateProduct(java.lang.String productName,
ProductDetails details)
Update the product registries details wrt the details passed in. |
| Method Detail |
|---|
void registerProduct(ProductDetails details)
throws DuplicateProductException
details - Details of the product to register
DuplicateProduct - if a product by the name specified (details.name) is already defined.
DuplicateProductException
void updateProduct(java.lang.String productName,
ProductDetails details)
throws UnknownProductException
name - The name of the product to be updated.details - Details to store
UnknownProduct - if the product (name) isn't defined.
UnknownProductException
void removeProduct(ProductDetails productDetails)
throws UnknownProductException
name - Name of the product to remove.
UnknownProduct - if the named product is not defined.
UnknownProductExceptionvoid resetAllProducts()
void resetProduct(java.lang.String productName)
productName - The name of the product to reset
Type newProductType(java.lang.String productName,
java.lang.String typeName)
newProductType(String)), but may define any number of additional types for
use during its lifecycle; this method is used to instantantiate specific types by name.For example, a complex insurance product may define several different types to describe the assets the product covers. A commercial combined product might define a stock asset, a vehicle asset, a safe asset, etc. Each of these is described within the product as a seperate named type. A client would use this method to instantiate these different types as and when they needed to be added to an instance of a commercial combined policy.
productName - The product "owning" the type.typeName - The name of type to be instantiated.
Type newProductType(java.lang.String productName)
productName - The name of the product to instantiate for.
java.util.Collection<ProductDetails> listProducts()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||