Class VariantCategoryValidateInterceptor
- java.lang.Object
-
- de.hybris.platform.variants.interceptor.VariantCategoryValidateInterceptor
-
- All Implemented Interfaces:
Interceptor,ValidateInterceptor<VariantCategoryModel>
public class VariantCategoryValidateInterceptor extends java.lang.Object implements ValidateInterceptor<VariantCategoryModel>
This interceptor validates that theVariantCategorythat you try to save has at most one supercategory and this supercategory is of typeVariantCategory. Also it validates that all subcategories are either of typeVariantCategoryorVariantValueCategory. If the subcategories includeVariantCategoryit may not be in there only once.
-
-
Constructor Summary
Constructors Constructor Description VariantCategoryValidateInterceptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected L10NServicegetL10NService()protected SessionServicegetSessionService()voidonValidate(VariantCategoryModel variantCategory, InterceptorContext ctx)Called in themodelService.saveAll()method.voidsetL10NService(L10NService l10NService)voidsetSessionService(SessionService sessionService)
-
-
-
Method Detail
-
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
protected L10NService getL10NService()
-
setL10NService
public void setL10NService(L10NService l10NService)
-
getSessionService
protected SessionService getSessionService()
-
setSessionService
public void setSessionService(SessionService sessionService)
-
-