Class VariantValueCategoryValidateInterceptor
java.lang.Object
de.hybris.platform.variants.interceptor.VariantValueCategoryValidateInterceptor
- All Implemented Interfaces:
Interceptor,ValidateInterceptor<VariantValueCategoryModel>
public class VariantValueCategoryValidateInterceptor
extends Object
implements ValidateInterceptor<VariantValueCategoryModel>
This interceptor ensures the following rules are fulfilled for a given
VariantValueCategory - there can be only one super category of type
VariantCategory and this super category is not optional - it can't have any other Categories (normal ones) as super
categories.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected L10NServiceprotected SessionServicevoidonValidate(VariantValueCategoryModel variantValueCategory, InterceptorContext ctx) Called in themodelService.saveAll()method.voidsetL10NService(L10NService l10NService) voidsetSessionService(SessionService sessionService) protected voidvalidateSequenceWithinSiblings(List<CategoryModel> siblings, VariantValueCategoryModel currentCategory) protected voidvalidateVariantValueCategory(VariantValueCategoryModel variantValueCategory)
-
Constructor Details
-
VariantValueCategoryValidateInterceptor
public VariantValueCategoryValidateInterceptor()
-
-
Method Details
-
onValidate
public void onValidate(VariantValueCategoryModel variantValueCategory, InterceptorContext ctx) throws InterceptorException Description copied from interface:ValidateInterceptorCalled in themodelService.saveAll()method. Validates the values of the given model.- Specified by:
onValidatein interfaceValidateInterceptor<VariantValueCategoryModel>- Parameters:
variantValueCategory- the model which values has to be validatedctx- theInterceptorContext- Throws:
InterceptorException- if any values of the model are not valid.
-
validateVariantValueCategory
protected void validateVariantValueCategory(VariantValueCategoryModel variantValueCategory) throws InterceptorException - Throws:
InterceptorException
-
validateSequenceWithinSiblings
protected void validateSequenceWithinSiblings(List<CategoryModel> siblings, VariantValueCategoryModel currentCategory) throws InterceptorException - Throws:
InterceptorException
-
getL10NService
-
setL10NService
-
getSessionService
-
setSessionService
-