|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface CategoryService
Provide category-related business service.
Method Summary | |
---|---|
Category |
add(Category category)
Adds the given category. |
java.util.List |
findAllUids()
Returns all category uids as a list. |
java.util.Set |
findAncestorCategoryUidsByCategoryUid(long categoryUid)
Returns the set of category uids, which are ancestors of the given category uid. |
java.util.Set |
findAncestorCategoryUidsByProductUid(long productUid)
Returns the set of category uids, which are ancestors of the given product uid. |
java.util.List |
findAvailableUids()
Returns all available category uids as a list. |
Category |
findByGuid(java.lang.String guid)
Retrieve the category with the given guid. |
java.util.List |
findByUids(java.util.Collection categoryUids,
CategoryLoadTuner loadTuner)
Returns a list of Category based on the given uids. |
java.util.List |
findCategoryByCriteria(CategorySearchCriteria categorySearchCriteria)
Retrieve the list of categories, whose specified property contain the given criteria value. |
java.util.List |
findCategoryLike(java.lang.String propertyName,
java.lang.String criteriaValue)
Retrieve the list of categories, whose specified property contain the given criteria value. |
java.util.List |
findDecendantCategoryUids(java.util.List categoryUids)
Retrieve all decendant category uids of the given category uids. |
java.util.List |
findDecendantCategoryUids(long categoryUid)
Retrieve all decendant category uids of the given category uid. |
java.util.List |
findFeaturedProductUidList(long categoryUid)
Get a list of featured product uid by the category uid. |
long |
findUidById(java.lang.String categoryId)
Get the category UID of the given category identifier. |
java.util.List |
findUidsByDeletedDate(java.util.Date date)
Retrieves list of category uids where the deleted date is later than the specified date. |
java.util.List |
findUidsByModifiedDate(java.util.Date date)
Retrieves list of Category uids where the last modified date is later than the specified date. |
Category |
get(long categoryUid)
Get the category with the given UID. |
Category |
getCategoryWithAttribute(long categoryUid)
Get the category with the given UID. |
Category |
getCategoryWithSubCategories(long categoryUid)
Get the category with the given UID. |
java.util.List |
getFeaturedProductsList(long categoryUid)
Get a list of featured product by the category uid. |
java.util.List |
getSubCategories(long categoryUid)
Retrieve the list of sub-categories of the current category. |
boolean |
guidExists(java.lang.String guid)
Checks whether the given category guid exists or not, for category, i.e. |
boolean |
hasProduct(long categoryUid)
Check if the category has product. |
boolean |
isProductInCategory(long productUid,
long categoryUid)
Return true if the product with the given productuid is in the category with the given categoryuid. |
java.util.List |
listRootCategories(boolean availableOnly)
Retrieve a list of root categories. |
java.util.List |
listRootCategoriesWithTree(boolean availableOnly)
Retrieve root categories with the entire tree of children loaded. |
Category |
load(long categoryUid)
Load the category with the given UID. |
void |
removeCategoryTree(long categoryUid)
Deletes the category and all sub categories and products with the default category set. |
void |
saveOrUpdate(Category category)
Save or update the given category. |
void |
update(Category category)
Updates the given category. |
void |
updateOrder(long uidOne,
long uidTwo)
Re orders (swaps the ordering field) of the two parameter categories. |
void |
updatePosition(long uidPk,
long oldParentUid,
long newParentUid,
java.lang.Long newPreviousCategoryUid)
Updates the position (parent category) and ordering of category after a drag and drop. |
Methods inherited from interface com.elasticpath.service.EpPersistenceService |
---|
getObject, getPersistenceEngine, setPersistenceEngine |
Methods inherited from interface com.elasticpath.service.EpService |
---|
getElasticPath, setElasticPath |
Method Detail |
---|
Category add(Category category) throws EpServiceException
category
- the category to add
EpServiceException
- - in case of any errorsjava.util.List findAllUids()
java.util.Set findAncestorCategoryUidsByCategoryUid(long categoryUid)
categoryUid
- the category uid
java.util.Set findAncestorCategoryUidsByProductUid(long productUid)
productUid
- the product uid
java.util.List findAvailableUids()
Category findByGuid(java.lang.String guid) throws EpServiceException
guid
- the guid of the category
EpServiceException
- in case of any errorjava.util.List findByUids(java.util.Collection categoryUids, CategoryLoadTuner loadTuner)
Category
based on the given uids. The returned category will be populated based on the given load tuner.
categoryUids
- a collection of category uidsloadTuner
- the load tuner
Category
sjava.util.List findCategoryByCriteria(CategorySearchCriteria categorySearchCriteria)
categorySearchCriteria
- criteria for category search.
java.util.List findCategoryLike(java.lang.String propertyName, java.lang.String criteriaValue) throws EpServiceException
propertyName
- category property to search on.criteriaValue
- criteria value to be used for searching.
EpServiceException
- in case of any errorjava.util.List findDecendantCategoryUids(java.util.List categoryUids)
categoryUids
- the category uids.
java.util.List findDecendantCategoryUids(long categoryUid)
categoryUid
- the category uid.
java.util.List findFeaturedProductUidList(long categoryUid)
categoryUid
- the category uid.
long findUidById(java.lang.String categoryId) throws EpServiceException
long
value, itself will be dealt as UID.
categoryId
- the category Guid or UID.
EpServiceException
- - in case of any errorsjava.util.List findUidsByDeletedDate(java.util.Date date)
date
- date to compare with the deleted date
java.util.List findUidsByModifiedDate(java.util.Date date)
Category
uids where the last modified date is later than the specified date.
date
- date to compare with the last modified date
Category
whose last modified date is later than the specified dateCategory get(long categoryUid) throws EpServiceException
categoryUid
- the category UID
EpServiceException
- - in case of any errorsCategory getCategoryWithAttribute(long categoryUid) throws EpServiceException
categoryUid
- the category UID
EpServiceException
- - in case of any errorsCategory getCategoryWithSubCategories(long categoryUid) throws EpServiceException
categoryUid
- the category UID
EpServiceException
- - in case of any errorsjava.util.List getFeaturedProductsList(long categoryUid)
categoryUid
- the category uidPk.
Product
java.util.List getSubCategories(long categoryUid)
categoryUid
- the current category
boolean guidExists(java.lang.String guid) throws EpServiceException
guid
- the category code.
EpServiceException
- - in case of any errorsboolean hasProduct(long categoryUid) throws EpServiceException
categoryUid
- the Uid of the category to be checked.
EpServiceException
- in case of any errorboolean isProductInCategory(long productUid, long categoryUid)
true
if the product with the given productuid is in the category with the given categoryuid. Otherwise,
false
productUid
- the product uidcategoryUid
- the category uid
true
if the product with the given productuid is in the category with the given categoryuid. Otherwise,
false
java.util.List listRootCategories(boolean availableOnly)
availableOnly
- set it to true
to only list available root categories
java.util.List listRootCategoriesWithTree(boolean availableOnly)
availableOnly
- set it to true
to only list available categories
Category load(long categoryUid) throws EpServiceException
categoryUid
- the category UID
EpServiceException
- - in case of any errorsvoid removeCategoryTree(long categoryUid) throws EpServiceException
categoryUid
- the uid of the category to remove
EpServiceException
- - in case of any errorsvoid saveOrUpdate(Category category) throws EpServiceException
category
- the category to save or update
EpServiceException
- - in case of any errorsvoid update(Category category) throws EpServiceException
category
- the category to update
EpServiceException
- - in case of any errorsvoid updateOrder(long uidOne, long uidTwo)
uidOne
- uid of a category to reorderuidTwo
- uid of a category to reordervoid updatePosition(long uidPk, long oldParentUid, long newParentUid, java.lang.Long newPreviousCategoryUid)
uidPk
- uid of categoryoldParentUid
- uid of old parentnewParentUid
- uid of new parentnewPreviousCategoryUid
- uid of category directly in front of category (ordering-wise).
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |