Class B2BCustomerModelValidateInterceptor
- java.lang.Object
-
- de.hybris.platform.b2b.interceptor.B2BCustomerModelValidateInterceptor
-
- All Implemented Interfaces:
Interceptor,ValidateInterceptor
public class B2BCustomerModelValidateInterceptor extends java.lang.Object implements ValidateInterceptor
This interceptor ensures that all new B2B Customers are associated with a B2BUnitB2BCustomerModel,B2BUnitModel
-
-
Constructor Summary
Constructors Constructor Description B2BCustomerModelValidateInterceptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description B2BUnitService<B2BUnitModel,B2BCustomerModel>getB2bUnitService()L10NServicegetL10NService()UserServicegetUserService()protected booleanisB2BUnitInGroupList(java.util.Set<PrincipalGroupModel> groups, B2BUnitModel parentUnit)protected voidmakeSureThatB2BUnitIsInGroups(B2BCustomerModel customer, B2BUnitModel parentUnit)Method check if B2BUnit is in groups for customer.voidonValidate(java.lang.Object model, InterceptorContext ctx)Called in themodelService.saveAll()method.voidsetB2bUnitService(B2BUnitService<B2BUnitModel,B2BCustomerModel> b2bUnitService)voidsetL10NService(L10NService l10NService)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.
-
makeSureThatB2BUnitIsInGroups
protected void makeSureThatB2BUnitIsInGroups(B2BCustomerModel customer, B2BUnitModel parentUnit)
Method check if B2BUnit is in groups for customer. If not it is added to groups
-
isB2BUnitInGroupList
protected boolean isB2BUnitInGroupList(java.util.Set<PrincipalGroupModel> groups, B2BUnitModel parentUnit)
-
getB2bUnitService
public B2BUnitService<B2BUnitModel,B2BCustomerModel> getB2bUnitService()
-
setB2bUnitService
public void setB2bUnitService(B2BUnitService<B2BUnitModel,B2BCustomerModel> b2bUnitService)
-
getUserService
public UserService getUserService()
-
setUserService
public void setUserService(UserService userService)
-
getL10NService
public L10NService getL10NService()
-
setL10NService
public void setL10NService(L10NService l10NService)
-
-