|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface for business logic methods affecting products and other related objects.
Instances implementing ProductProcessor
are usually created in
the Struts layer in response to a request from a user for product
information. The ProductProcessor
object uses data access
objects to look up the information, and return it to the Struts layer.
When the application needs to create an instance that implements
ProductProcessor
,
BusinessObjectFactory
finds the name of the Java class to instantiate from the
"productProcessorImplementer" setting in the npcSetting
database table.
The default "productProcessorImplementer" is
BasicProductProcessor
.
Method Summary | |
void |
addProduct(java.util.Map parameters)
|
void |
deleteProduct(java.util.Map parameters)
|
void |
editDeleteProducts(java.util.Map parameters)
|
void |
editProduct(java.util.Map parameters)
|
java.util.HashMap |
generateSettingsMap(java.util.Collection settings)
|
java.util.Collection |
getAllAttributesAndOptions(int productID)
|
Category |
getCategoryFromCode(Category cateory)
Retrieves category information from the database. |
Product |
getProductFromCode(Product product)
Retrieves product information from the database. |
ProductList |
getProductList(ProductList productList)
Retrieves information for a list of products from the database. |
java.util.Collection |
loadActiveProducts()
|
java.util.Collection |
loadBuiltInCategories()
Retrieves a Collection containing built in categories for
the store. |
java.util.Collection |
loadCategoryTree()
Retrieves a Collection representing the store's category
tree. |
java.util.Map |
loadProductFromID(java.util.Map parameters)
|
java.util.Map |
loadProductsAndCount(java.util.Map parameters)
|
java.util.Collection |
loadSettings(java.util.Map properties)
|
java.util.Collection |
processSettings(java.util.Map properties)
|
Methods inherited from interface com.softslate.commerce.businessobjects.core.BusinessObject |
initialize |
Method Detail |
public Product getProductFromCode(Product product) throws java.lang.Exception
product
- A Product
object whose code
property has been populated.
Product
object with all its properties populated
from the database. If the product does not exist in the database,
Product.getProductID()
will return 0.
java.lang.Exception
public Category getCategoryFromCode(Category cateory) throws java.lang.Exception
cateory
- A Category
object whose code
property has been populated.
Category
object with all its properties
populated from the database. If the category does not exist in
the database,
Category.getCategoryID()
will return 0.
java.lang.Exception
public java.util.Collection loadCategoryTree() throws java.lang.Exception
Collection
representing the store's category
tree. This Collection
is composed of Map
s,
which in turn may contain other Collection
s of
Map
s representing a given category's subcategories.
Collection
representing the store's category
tree.
java.lang.Exception
public java.util.Collection loadBuiltInCategories() throws java.lang.Exception
Collection
containing built in categories for
the store. The systems built-in categories have the following unique
codes: _features
,_popular
,
_new
, and _favorites
. This
Collection
is composed of
Category
objects.
Collection
of Category
objects.
java.lang.Exception
public ProductList getProductList(ProductList productList) throws java.lang.Exception
productListType
for the
ProductList
, the products could be the entire list of
products in the system, the products under a given category, or the
products matching a given search request.
productList
- A ProductList
object whose
itemsPerPage
,firstCode
,
productListType
, and optionally
categoryID
or searchString
and
stopWords
properties have been set.
ProductList
object with all its properties
populated from the database.
java.lang.Exception
public java.util.Collection loadActiveProducts() throws java.lang.Exception
java.lang.Exception
public java.util.Map loadProductsAndCount(java.util.Map parameters) throws java.lang.Exception
java.lang.Exception
public void addProduct(java.util.Map parameters) throws java.lang.Exception
java.lang.Exception
public java.util.Map loadProductFromID(java.util.Map parameters) throws java.lang.Exception
java.lang.Exception
public void editProduct(java.util.Map parameters) throws java.lang.Exception
java.lang.Exception
public void editDeleteProducts(java.util.Map parameters) throws java.lang.Exception
java.lang.Exception
public void deleteProduct(java.util.Map parameters) throws java.lang.Exception
java.lang.Exception
public java.util.HashMap generateSettingsMap(java.util.Collection settings) throws java.lang.Exception
java.lang.Exception
public java.util.Collection getAllAttributesAndOptions(int productID) throws java.lang.Exception
java.lang.Exception
public java.util.Collection loadSettings(java.util.Map properties) throws java.lang.Exception
java.lang.Exception
public java.util.Collection processSettings(java.util.Map properties) throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |