|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ProductService
Provides product-related business services. This service currently handles products, product types, and attributes for products although this may be moved later.
Method Summary | |
---|---|
Product |
add(Product product)
Adds the given product. |
java.util.List |
findAllUids()
Returns all product uids as a list. |
java.util.List |
findAvailableUids()
Returns all available product uids as a list. |
java.util.List |
findAvailableUidsByModifiedDate(java.util.Date date)
Retrieves list of Product uids where the last modified date is later than the specified date. |
java.util.List |
findByBrandUid(long brandUid)
Returns a list of Product based on the given brand Uid. |
java.util.List |
findByBrandUid(long brandUid,
ProductLoadTuner loadTuner)
Returns a list of Product based on the given brand Uid. |
java.util.List |
findByCategoryUid(long categoryUid)
Returns a list of Product based on the given category Uid. |
java.util.List |
findByCategoryUid(long categoryUid,
ProductLoadTuner loadTuner)
Returns a list of Product based on the given category Uid. |
java.util.List |
findByCategoryUidPaginated(long categoryUid,
int startIndex,
int numProducts,
ProductLoadTuner loadTuner)
Returns a list of Product s based on the given category Uid. |
Product |
findByGuid(java.lang.String guid)
Find the product with the given guid, for product, i.e. |
java.util.List |
findByModifiedDate(java.util.Date date)
Retrieves list of Product where the last modified date is later than the specified date. |
java.util.List |
findByUids(java.util.Collection productUids,
ProductLoadTuner loadTuner)
Returns a list of Product based on the given uids. |
java.util.List |
findProductByCriteria(ProductSearchCriteria productSearchCriteria)
Retrieve the list of products, whose specified property contain the given criteria value. |
java.util.List |
findProductTopSeller(int topCount,
ProductLoadTuner productLoadTuner)
Retrieve a list of top sellers of the whole store. |
java.util.List |
findProductTopSellerForCategory(long categoryUid)
Retrieve the list of top selling products that belongs to the category or its subcategories. |
long |
findUidById(java.lang.String productId)
Get the product UID of the given product identifier. |
java.util.List |
findUidsByCategoryUids(java.util.Collection categoryUids)
Retrieves list of product uids belongs to either category uids given. |
java.util.List |
findUidsByDeletedDate(java.util.Date date)
Retrieves list of product uids where the deleted date is later than the specified date. |
java.util.List |
findUidsByModifiedDate(java.util.Date date)
Retrieves list of Product uids where the last modified date is later than the specified date. |
Product |
get(long productUid)
Get the product with the given UID. |
ProductCategory |
getProductCategoryByProCatUid(long productUid,
long categoryUid)
Get a ProductCategory by the product uidPk and category uidPk. |
int |
getProductSkuCount(long productUid)
Get a count of ProductSku s belong to this product. |
Product |
getTuned(long productUid,
ProductLoadTuner loadTuner,
ShoppingCart shoppingCart)
Get the product with the given UID. |
Product |
getWithCategories(long productUid)
Load the product with the given UID. |
boolean |
guidExists(java.lang.String guid)
Checks whether the given product guid exists or not, for product, i.e. |
java.util.List |
list()
List all products stored in the database. |
Product |
load(long productUid)
Load the product with the given UID. |
void |
removeProductList(java.util.List productUidList)
Deletes the list of products. |
void |
removeProductTree(long productUid)
Deletes the product and all it associations. |
void |
resetProductCategoryFeatured(long productUid,
long categoryUid)
Disable a ProductCategory as a featured product, if the featuredProductOrder is set to 0,
means this productCategory is not featured. |
void |
saveOrUpdate(Product product)
Save or update the given product. |
int |
setProductCategoryFeatured(long productUid,
long categoryUid)
Set a ProductCategory as a featured product, if the featuredProductOrder is set to be greater than 0,
means this productCategory is featured. |
void |
updateFeaturedProductOrder(long productUid,
long categoryUid,
long productUid2)
Swap two ProductCategory featured product orders. |
void |
updateLastModifiedTime(Product product)
Update the product's last modified timestamp. |
Methods inherited from interface com.elasticpath.service.EpPersistenceService |
---|
getObject, getPersistenceEngine, setPersistenceEngine |
Methods inherited from interface com.elasticpath.service.EpService |
---|
getElasticPath, setElasticPath |
Method Detail |
---|
Product add(Product product) throws EpServiceException
product
- the product to add
EpServiceException
- - in case of any errorsjava.util.List findAllUids()
java.util.List findAvailableUids()
java.util.List findAvailableUidsByModifiedDate(java.util.Date date)
Product
uids where the last modified date is later than the specified date. Products refered by the returned
uids are all available.
date
- date to compare with the last modified date
Product
whose last modified date is later than the specified datejava.util.List findByBrandUid(long brandUid)
Product
based on the given brand Uid.
brandUid
- the brand Uid
Product
java.util.List findByBrandUid(long brandUid, ProductLoadTuner loadTuner)
Product
based on the given brand Uid. The returned products will be populated based on the given load tuner.
brandUid
- the brand UidloadTuner
- the load tuner, give null
to populate all related data
Product
java.util.List findByCategoryUid(long categoryUid)
Product
based on the given category Uid.
categoryUid
- the category Uid
Product
java.util.List findByCategoryUid(long categoryUid, ProductLoadTuner loadTuner)
Product
based on the given category Uid. The returned products will be populated based on the given load
tuner.
categoryUid
- the category UidloadTuner
- the load tuner, give null
to populate all related data
Product
java.util.List findByCategoryUidPaginated(long categoryUid, int startIndex, int numProducts, ProductLoadTuner loadTuner)
Product
s based on the given category Uid. The returned products will be populated based on the given load
tuner. This method allows a subset of the products to be returned at a time by giving the starting index of the first product and the number
of products to be returned.
categoryUid
- the category UidstartIndex
- the starting index of the first product to be returnednumProducts
- the number of products to be returned, starting from the start indexloadTuner
- the load tuner, give null
to populate all related data
Product
Product findByGuid(java.lang.String guid) throws EpServiceException
guid
- the product code.
EpServiceException
- - in case of any errorsjava.util.List findByModifiedDate(java.util.Date date)
Product
where the last modified date is later than the specified date.
date
- date to compare with the last modified date
Product
whose last modified date is later than the specified datejava.util.List findByUids(java.util.Collection productUids, ProductLoadTuner loadTuner)
Product
based on the given uids. The returned products will be populated based on the given load tuner. If a
given product Uid is not found, it won't be included in the return list.
productUids
- a collection of product uidsloadTuner
- the load tuner
Product
sjava.util.List findProductByCriteria(ProductSearchCriteria productSearchCriteria)
productSearchCriteria
- criteria for product search.
java.util.List findProductTopSeller(int topCount, ProductLoadTuner productLoadTuner) throws EpServiceException
topCount
- the number of top seller products to retrieveproductLoadTuner
- the product load tunner to control data get loaded
EpServiceException
- in case of any errorjava.util.List findProductTopSellerForCategory(long categoryUid) throws EpServiceException
categoryUid
- the category id
EpServiceException
- in case of any errorlong findUidById(java.lang.String productId) throws EpServiceException
long
value, itself will be dealt as UID.
productId
- the Product Guid or UID.
EpServiceException
- - in case of any errorsjava.util.List findUidsByCategoryUids(java.util.Collection categoryUids)
categoryUids
- category uids
java.util.List findUidsByDeletedDate(java.util.Date date)
date
- date to compare with the deleted date
java.util.List findUidsByModifiedDate(java.util.Date date)
Product
uids where the last modified date is later than the specified date.
date
- date to compare with the last modified date
Product
whose last modified date is later than the specified dateProduct get(long productUid) throws EpServiceException
productUid
- the Product UID.
EpServiceException
- - in case of any errorsProductCategory getProductCategoryByProCatUid(long productUid, long categoryUid)
ProductCategory
by the product uidPk and category uidPk.
productUid
- the unique identifier for the productcategoryUid
- the unique identifier for the category
int getProductSkuCount(long productUid)
ProductSku
s belong to this product.
productUid
- the uid of the product.
ProductSku
s belong to this product.Product getTuned(long productUid, ProductLoadTuner loadTuner, ShoppingCart shoppingCart) throws EpServiceException
By giving a shopping cart, promotion rules will be applied to the returned product.
productUid
- the Product UID.loadTuner
- the product load tunershoppingCart
- the shopping cart, give null
if you don't have it.
EpServiceException
- - in case of any errorsProduct getWithCategories(long productUid) throws EpServiceException
productUid
- the product UID
EpServiceException
- - in case of any errorsboolean guidExists(java.lang.String guid) throws EpServiceException
guid
- the product code.
EpServiceException
- - in case of any errorsjava.util.List list() throws EpServiceException
EpServiceException
- - in case of any errorsProduct load(long productUid) throws EpServiceException
productUid
- the product UID
EpServiceException
- - in case of any errorsvoid removeProductList(java.util.List productUidList) throws EpServiceException
productUidList
- the product Uid List to be removed
EpServiceException
- - in case of any errorsvoid removeProductTree(long productUid) throws EpServiceException
productUid
- the uid of product to remove
EpServiceException
- in case of any errorsvoid resetProductCategoryFeatured(long productUid, long categoryUid)
ProductCategory
as a featured product, if the featuredProductOrder is set to 0,
means this productCategory is not featured.
productUid
- the unique identifier for the productcategoryUid
- the unique identifier for the categoryvoid saveOrUpdate(Product product) throws EpServiceException
product
- the product to save or update
EpServiceException
- - in case of any errorsint setProductCategoryFeatured(long productUid, long categoryUid)
ProductCategory
as a featured product, if the featuredProductOrder is set to be greater than 0,
means this productCategory is featured.
productUid
- the unique identifier for the productcategoryUid
- the unique identifier for the category
ProductCategory
void updateFeaturedProductOrder(long productUid, long categoryUid, long productUid2)
ProductCategory
featured product orders.
productUid
- the unique identifier for the productcategoryUid
- the unique identifier for the categoryproductUid2
- the unique identifier for the product to be swapedvoid updateLastModifiedTime(Product product)
product
- the product whose timestamp is to be updated.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |