Class OrgUnitModelValidateInterceptor
- java.lang.Object
-
- de.hybris.platform.commerceservices.organization.interceptor.OrgUnitModelValidateInterceptor
-
- All Implemented Interfaces:
Interceptor,ValidateInterceptor
public class OrgUnitModelValidateInterceptor extends java.lang.Object implements ValidateInterceptor
This interceptor validates:- 1. Restrain orgUnit from being in more than one orgUnit group (eg 1 parent).
- 2. Do not allow to activate units whose parents have be disabled.
-
-
Constructor Summary
Constructors Constructor Description OrgUnitModelValidateInterceptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected L10NServicegetL10NService()protected ModelServicegetModelService()protected OrgUnitServicegetOrgUnitService()protected UserServicegetUserService()voidonValidate(java.lang.Object model, InterceptorContext ctx)Called in themodelService.saveAll()method.voidsetL10NService(L10NService l10NService)voidsetModelService(ModelService modelService)voidsetOrgUnitService(OrgUnitService orgUnitService)voidsetUserService(UserService userService)
-
-
-
Method Detail
-
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.
-
getOrgUnitService
protected OrgUnitService getOrgUnitService()
-
setOrgUnitService
public void setOrgUnitService(OrgUnitService orgUnitService)
-
getModelService
protected ModelService getModelService()
-
setModelService
public void setModelService(ModelService modelService)
-
setUserService
public void setUserService(UserService userService)
-
getUserService
protected UserService getUserService()
-
setL10NService
public void setL10NService(L10NService l10NService)
-
getL10NService
protected L10NService getL10NService()
-
-