Class B2BCustomerPrepareInterceptor
- java.lang.Object
-
- de.hybris.platform.b2b.interceptor.B2BCustomerPrepareInterceptor
-
- All Implemented Interfaces:
Interceptor,PrepareInterceptor
public class B2BCustomerPrepareInterceptor extends java.lang.Object implements PrepareInterceptor
Ensures that the customer belongs to appropriate groups.
-
-
Constructor Summary
Constructors Constructor Description B2BCustomerPrepareInterceptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected B2BUnitService<B2BUnitModel,B2BCustomerModel>getB2bUnitService()protected 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.voidonPrepare(java.lang.Object model, InterceptorContext ctx)Called in themodelService.saveAll()method.voidsetB2bUnitService(B2BUnitService<B2BUnitModel,B2BCustomerModel> b2bUnitService)voidsetUserService(UserService userService)
-
-
-
Method Detail
-
onPrepare
public void onPrepare(java.lang.Object model, InterceptorContext ctx)Description copied from interface:PrepareInterceptorCalled in themodelService.saveAll()method. Prepares the values of the given model.- Specified by:
onPreparein interfacePrepareInterceptor- Parameters:
model- the model which values has to be preparedctx- theInterceptorContext
-
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
protected B2BUnitService<B2BUnitModel,B2BCustomerModel> getB2bUnitService()
-
setB2bUnitService
public void setB2bUnitService(B2BUnitService<B2BUnitModel,B2BCustomerModel> b2bUnitService)
-
getUserService
protected UserService getUserService()
-
setUserService
public void setUserService(UserService userService)
-
-