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 class
MandatoryAttributesValidator.MissingMandatoryAttributesException
-
Constructor Summary
Constructors Constructor Description MandatoryAttributesValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onValidate(java.lang.Object model, InterceptorContext ctx)
Called in themodelService.saveAll()
method.void
setModelService(ModelService modelService)
void
setTypeService(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 InterceptorException
Description copied from interface:ValidateInterceptor
Called in themodelService.saveAll()
method. Validates the values of the given model.- Specified by:
onValidate
in interfaceValidateInterceptor
- Parameters:
model
- the model which values has to be validatedctx
- theInterceptorContext
- Throws:
InterceptorException
- if any values of the model are not valid.
-
-