Class B2BCustomerPrepareInterceptor
java.lang.Object
de.hybris.platform.b2b.interceptor.B2BCustomerPrepareInterceptor
- All Implemented Interfaces:
Interceptor,PrepareInterceptor
Ensures that the customer belongs to appropriate groups.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected B2BUnitService<B2BUnitModel,B2BCustomerModel> protected UserServiceprotected booleanisB2BUnitInGroupList(Set<PrincipalGroupModel> groups, B2BUnitModel parentUnit) protected voidmakeSureThatB2BUnitIsInGroups(B2BCustomerModel customer, B2BUnitModel parentUnit) Method check if B2BUnit is in groups for customer.voidonPrepare(Object model, InterceptorContext ctx) Called in themodelService.saveAll()method.voidsetB2bUnitService(B2BUnitService<B2BUnitModel, B2BCustomerModel> b2bUnitService) voidsetUserService(UserService userService)
-
Constructor Details
-
B2BCustomerPrepareInterceptor
public B2BCustomerPrepareInterceptor()
-
-
Method Details
-
onPrepare
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
Method check if B2BUnit is in groups for customer. If not it is added to groups -
isB2BUnitInGroupList
-
getB2bUnitService
-
setB2bUnitService
-
getUserService
-
setUserService
-