Class CategoryRemovalValidator
- java.lang.Object
-
- de.hybris.platform.category.interceptors.CategoryRemovalValidator
-
- All Implemented Interfaces:
Interceptor,RemoveInterceptor
public class CategoryRemovalValidator extends java.lang.Object implements RemoveInterceptor
Validator for removal ofCategoryModel. It checks if the specific category can be removed, and denies removal request if it holds sub-categories. It can be disabled by setting theCategoryConstants.DISABLE_SUBCATEGORY_REMOVALCHECKin the session to true.- Spring Bean ID:
- categoryRemovalValidator
-
-
Constructor Summary
Constructors Constructor Description CategoryRemovalValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidonRemove(java.lang.Object model, InterceptorContext ctx)Called in themodelService.removeAll()method.voidsetCategoryService(CategoryService categoryService)
-
-
-
Method Detail
-
onRemove
public void onRemove(java.lang.Object model, InterceptorContext ctx) throws InterceptorExceptionDescription copied from interface:RemoveInterceptorCalled in themodelService.removeAll()method.- Specified by:
onRemovein interfaceRemoveInterceptor- Parameters:
model- the model which should be removedctx- theInterceptorContext- Throws:
InterceptorException- if the remove reports an error
-
setCategoryService
public void setCategoryService(CategoryService categoryService)
-
-