Class VariantCategoryValidateInterceptor
java.lang.Object
de.hybris.platform.variants.interceptor.VariantCategoryValidateInterceptor
- All Implemented Interfaces:
Interceptor,ValidateInterceptor<VariantCategoryModel>
public class VariantCategoryValidateInterceptor
extends Object
implements ValidateInterceptor<VariantCategoryModel>
This interceptor validates that the
VariantCategory that you try to save has
at most one supercategory and this supercategory is of type VariantCategory.
Also it validates that all subcategories are either of type VariantCategory
or VariantValueCategory. If the subcategories include
VariantCategory it may not be in there only once.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected L10NServiceprotected SessionServicevoidonValidate(VariantCategoryModel variantCategory, InterceptorContext ctx) Called in themodelService.saveAll()method.voidsetL10NService(L10NService l10NService) voidsetSessionService(SessionService sessionService)
-
Constructor Details
-
VariantCategoryValidateInterceptor
public VariantCategoryValidateInterceptor()
-
-
Method Details
-
onValidate
public void onValidate(VariantCategoryModel variantCategory, InterceptorContext ctx) throws InterceptorException Description copied from interface:ValidateInterceptorCalled in themodelService.saveAll()method. Validates the values of the given model.- Specified by:
onValidatein interfaceValidateInterceptor<VariantCategoryModel>- Parameters:
variantCategory- the model which values has to be validatedctx- theInterceptorContext- Throws:
InterceptorException- if any values of the model are not valid.
-
getL10NService
-
setL10NService
-
getSessionService
-
setSessionService
-