Class DefaultB2BCustomerService
java.lang.Object
de.hybris.platform.b2b.services.impl.DefaultB2BCustomerService
- All Implemented Interfaces:
B2BCustomerService<B2BCustomerModel,B2BUnitModel>
public class DefaultB2BCustomerService
extends Object
implements B2BCustomerService<B2BCustomerModel,B2BUnitModel>
Default implementation of the
B2BCustomerService- Spring Bean ID:
- b2bCustomerService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMember(PrincipalModel member, PrincipalGroupModel group) Gets all b2b user groupsGets all usersprotected BaseDaoGets the current b2b customer.protected SearchRestrictionServicegetUserForUID(String userId) Delegates toUserService.getUserForUID(String, Class)if the user was not found return null rather than throwing up de.hybris.platform.servicelayer.exceptions.UnknownIdentifierExceptionprotected UserServicebooleanprincipalExists(String uid) Deprecated, for removal: This API element is subject to removal in a future version.Since 4.4.voidsetBaseDao(BaseDao baseDao) voidsetParentB2BUnit(B2BCustomerModel member, B2BUnitModel parentB2BUnit) Sets the parent b2b unit.voidsetSearchRestrictionService(SearchRestrictionService searchRestrictionService) voidsetUserService(UserService userService)
-
Constructor Details
-
DefaultB2BCustomerService
public DefaultB2BCustomerService()
-
-
Method Details
-
addMember
- Specified by:
addMemberin interfaceB2BCustomerService<B2BCustomerModel,B2BUnitModel> - Parameters:
member- A user to be added to a group, likeB2BCustomerModelfor examplegroup- A user group to which a member is going to be added, like aB2BUnitModelfor example
-
setParentB2BUnit
Description copied from interface:B2BCustomerServiceSets the parent b2b unit. If the customer does not have a default b2b unit company will be set as the default. The client of this method will most likely want to callB2BUnitService.updateBranchInSession(de.hybris.platform.servicelayer.session.Session, de.hybris.platform.core.model.user.UserModel)after calling this method to make sure the session breach is refreshed.- Specified by:
setParentB2BUnitin interfaceB2BCustomerService<B2BCustomerModel,B2BUnitModel> - Parameters:
member- the customer who will be assigned to the parent unitparentB2BUnit- the parent b2b unit
-
getUserForUID
Description copied from interface:B2BCustomerServiceDelegates toUserService.getUserForUID(String, Class)if the user was not found return null rather than throwing up de.hybris.platform.servicelayer.exceptions.UnknownIdentifierException- Specified by:
getUserForUIDin interfaceB2BCustomerService<B2BCustomerModel,B2BUnitModel> - Parameters:
userId- The unique identifier of the user- Returns:
- A hybris user typed T
-
getCurrentB2BCustomer
Description copied from interface:B2BCustomerServiceGets the current b2b customer.- Specified by:
getCurrentB2BCustomerin interfaceB2BCustomerService<B2BCustomerModel,B2BUnitModel> - Returns:
- current session user, if B2BCustomer. If not B2BCustomer it returns null
-
getAllUsers
Description copied from interface:B2BCustomerServiceGets all users- Specified by:
getAllUsersin interfaceB2BCustomerService<B2BCustomerModel,B2BUnitModel> - Returns:
- the
Listof users
-
getAllB2BUserGroups
Description copied from interface:B2BCustomerServiceGets all b2b user groups- Specified by:
getAllB2BUserGroupsin interfaceB2BCustomerService<B2BCustomerModel,B2BUnitModel> - Returns:
- the
ListofB2BUserGroupModel
-
principalExists
Deprecated, for removal: This API element is subject to removal in a future version.Since 4.4.Description copied from interface:B2BCustomerServiceReturns true is principalExists with this uid, Visibility restrictions do no apply in query.- Specified by:
principalExistsin interfaceB2BCustomerService<B2BCustomerModel,B2BUnitModel> - Returns:
- true if principal exists with this uid.
-
setUserService
-
getUserService
-
getBaseDao
-
setBaseDao
-
getSearchRestrictionService
-
setSearchRestrictionService
-