Class CMSItemNameExistsPredicate
java.lang.Object
de.hybris.platform.cmsfacades.cmsitems.predicates.CMSItemNameExistsPredicate
- All Implemented Interfaces:
Predicate<CMSItemModel>
Predicate to test if a given cms item name maps to an existing cms item.
Returns TRUE if the cms item exists; FALSE otherwise.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringfindAbstractParentTypeCode(CMSItemModel cmsItemModel) Find the abstract parent typecode for a given item modelprotected List<CMSItemModel>findCMSItemByTypeCodeAndName(String name, String typeCode) Find allCMSItemModelhaving the same name as the provided value.protected CMSAdminItemServiceprotected CMSAdminSiteServiceprotected List<Predicate<CMSItemModel>>protected TypeServicevoidsetCloneContextSameAsActiveCatalogVersionPredicate(Predicate<Object> cloneContextSameAsActiveCatalogVersionPredicate) voidsetCmsAdminItemService(CMSAdminItemService cmsAdminItemService) voidsetCmsAdminSiteService(CMSAdminSiteService cmsAdminSiteService) voidsetFilters(List<Predicate<CMSItemModel>> filters) voidsetTypeService(TypeService typeService) booleantest(CMSItemModel cmsItemModel)
-
Constructor Details
-
CMSItemNameExistsPredicate
public CMSItemNameExistsPredicate()
-
-
Method Details
-
test
- Specified by:
testin interfacePredicate<CMSItemModel>
-
findCMSItemByTypeCodeAndName
Find allCMSItemModelhaving the same name as the provided value. The result list is filter by applying all the predicates specified by#getFilters().- Parameters:
name- - the name of the itemtypeCode- - the typecode of the item where the lookup takes place- Returns:
- a list of items containing the same name
-
findAbstractParentTypeCode
Find the abstract parent typecode for a given item model- Parameters:
cmsItemModel- - the item model for which to find the abstract parent typecode- Returns:
- the abstract parent typecode
-
getCmsAdminItemService
-
setCmsAdminItemService
-
getCmsAdminSiteService
-
setCmsAdminSiteService
-
getCloneContextSameAsActiveCatalogVersionPredicate
-
setCloneContextSameAsActiveCatalogVersionPredicate
-
getTypeService
-
setTypeService
-
getFilters
-
setFilters
-