Class VariantValueCategoryValidateInterceptor
- java.lang.Object
-
- de.hybris.platform.variants.interceptor.VariantValueCategoryValidateInterceptor
-
- All Implemented Interfaces:
Interceptor,ValidateInterceptor<VariantValueCategoryModel>
public class VariantValueCategoryValidateInterceptor extends java.lang.Object implements ValidateInterceptor<VariantValueCategoryModel>
This interceptor ensures the following rules are fulfilled for a givenVariantValueCategory- 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 Constructor Description VariantValueCategoryValidateInterceptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected L10NServicegetL10NService()protected SessionServicegetSessionService()voidonValidate(VariantValueCategoryModel variantValueCategory, InterceptorContext ctx)Called in themodelService.saveAll()method.voidsetL10NService(L10NService l10NService)voidsetSessionService(SessionService sessionService)protected voidvalidateSequenceWithinSiblings(java.util.List<CategoryModel> siblings, VariantValueCategoryModel currentCategory)protected voidvalidateVariantValueCategory(VariantValueCategoryModel variantValueCategory)
-
-
-
Method Detail
-
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(java.util.List<CategoryModel> siblings, VariantValueCategoryModel currentCategory) throws InterceptorException
- Throws:
InterceptorException
-
getL10NService
protected L10NService getL10NService()
-
setL10NService
public void setL10NService(L10NService l10NService)
-
getSessionService
protected SessionService getSessionService()
-
setSessionService
public void setSessionService(SessionService sessionService)
-
-