Class MandatoryAttributesValidator
- java.lang.Object
-
- de.hybris.platform.servicelayer.interceptor.impl.LocalizedMessageAwareValidator
-
- de.hybris.platform.servicelayer.interceptor.impl.MandatoryAttributesValidator
-
- All Implemented Interfaces:
Interceptor,ValidateInterceptor
public class MandatoryAttributesValidator extends LocalizedMessageAwareValidator implements ValidateInterceptor
Validates for any model if all mandatory attributes are provided when creating a new item.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMandatoryAttributesValidator.MissingMandatoryAttributesException
-
Constructor Summary
Constructors Constructor Description MandatoryAttributesValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidonValidate(java.lang.Object model, InterceptorContext ctx)Called in themodelService.saveAll()method.voidsetModelService(ModelService modelService)voidsetTypeService(TypeService typeService)-
Methods inherited from class de.hybris.platform.servicelayer.interceptor.impl.LocalizedMessageAwareValidator
getLocalizedMessage, setL10nService
-
-
-
-
Method Detail
-
setTypeService
public void setTypeService(TypeService typeService)
-
setModelService
public void setModelService(ModelService modelService)
-
onValidate
public void onValidate(java.lang.Object model, InterceptorContext ctx) throws InterceptorExceptionDescription copied from interface:ValidateInterceptorCalled in themodelService.saveAll()method. Validates the values of the given model.- Specified by:
onValidatein interfaceValidateInterceptor- Parameters:
model- the model which values has to be validatedctx- theInterceptorContext- Throws:
InterceptorException- if any values of the model are not valid.
-
-