Class CategoryPrepareInterceptor
java.lang.Object
de.hybris.platform.category.interceptors.CategoryPrepareInterceptor
- All Implemented Interfaces:
Interceptor,PrepareInterceptor<CategoryModel>
PrepareInterceptor for the CategoryModel.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddPrincipalsToSuperCategories(CategoryModel category, List<PrincipalModel> newPrincipals, InterceptorContext ctx) protected voidhandleAllowedPrincipals(CategoryModel categoryModel, InterceptorContext ctx, boolean skipRootSearch) protected booleanisCategoryForPrincipalsResolved(CategoryModel category, InterceptorContext ctx) protected voidmarkCategoryToPrincipalsResolved(CategoryModel category, InterceptorContext ctx) voidonPrepare(CategoryModel categoryModel, InterceptorContext ctx) Called in themodelService.saveAll()method.protected voidreplacePrincipalsForSubCategories(CategoryModel category, List<PrincipalModel> newPrincipals, InterceptorContext ctx) voidsetCategoryService(CategoryService categoryService)
-
Constructor Details
-
CategoryPrepareInterceptor
public CategoryPrepareInterceptor()
-
-
Method Details
-
onPrepare
public void onPrepare(CategoryModel categoryModel, InterceptorContext ctx) throws InterceptorException Description copied from interface:PrepareInterceptorCalled in themodelService.saveAll()method. Prepares the values of the given model.- Specified by:
onPreparein interfacePrepareInterceptor<CategoryModel>- Parameters:
categoryModel- the model which values has to be preparedctx- theInterceptorContext- Throws:
InterceptorException- if an error occured during the preparation
-
handleAllowedPrincipals
protected void handleAllowedPrincipals(CategoryModel categoryModel, InterceptorContext ctx, boolean skipRootSearch) -
replacePrincipalsForSubCategories
protected void replacePrincipalsForSubCategories(CategoryModel category, List<PrincipalModel> newPrincipals, InterceptorContext ctx) -
addPrincipalsToSuperCategories
protected void addPrincipalsToSuperCategories(CategoryModel category, List<PrincipalModel> newPrincipals, InterceptorContext ctx) -
markCategoryToPrincipalsResolved
-
isCategoryForPrincipalsResolved
-
setCategoryService
-