Class DefaultB2BCustomerService
- java.lang.Object
-
- de.hybris.platform.b2b.services.impl.DefaultB2BCustomerService
-
- All Implemented Interfaces:
B2BCustomerService<B2BCustomerModel,B2BUnitModel>
public class DefaultB2BCustomerService extends java.lang.Object implements B2BCustomerService<B2BCustomerModel,B2BUnitModel>
Default implementation of theB2BCustomerService- Spring Bean ID:
- b2bCustomerService
-
-
Constructor Summary
Constructors Constructor Description DefaultB2BCustomerService()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddMember(PrincipalModel member, PrincipalGroupModel group)java.util.List<B2BUserGroupModel>getAllB2BUserGroups()Gets all b2b user groupsjava.util.List<B2BCustomerModel>getAllUsers()Gets all usersprotected BaseDaogetBaseDao()B2BCustomerModelgetCurrentB2BCustomer()Gets the current b2b customer.protected SearchRestrictionServicegetSearchRestrictionService()B2BCustomerModelgetUserForUID(java.lang.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 UserServicegetUserService()booleanprincipalExists(java.lang.String uid)Deprecated.Since 4.4.voidsetBaseDao(BaseDao baseDao)voidsetParentB2BUnit(B2BCustomerModel member, B2BUnitModel parentB2BUnit)Sets the parent b2b unit.voidsetSearchRestrictionService(SearchRestrictionService searchRestrictionService)voidsetUserService(UserService userService)
-
-
-
Method Detail
-
addMember
public void addMember(PrincipalModel member, PrincipalGroupModel group)
- 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
public void setParentB2BUnit(B2BCustomerModel member, B2BUnitModel parentB2BUnit)
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
public B2BCustomerModel getUserForUID(java.lang.String userId)
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
public B2BCustomerModel 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
public java.util.List<B2BCustomerModel> getAllUsers()
Description copied from interface:B2BCustomerServiceGets all users- Specified by:
getAllUsersin interfaceB2BCustomerService<B2BCustomerModel,B2BUnitModel>- Returns:
- the
Listof users
-
getAllB2BUserGroups
public java.util.List<B2BUserGroupModel> getAllB2BUserGroups()
Description copied from interface:B2BCustomerServiceGets all b2b user groups- Specified by:
getAllB2BUserGroupsin interfaceB2BCustomerService<B2BCustomerModel,B2BUnitModel>- Returns:
- the
ListofB2BUserGroupModel
-
principalExists
@Deprecated(since="4.4") public boolean principalExists(java.lang.String uid)
Deprecated.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
public void setUserService(UserService userService)
-
getUserService
protected UserService getUserService()
-
getBaseDao
protected BaseDao getBaseDao()
-
setBaseDao
public void setBaseDao(BaseDao baseDao)
-
getSearchRestrictionService
protected SearchRestrictionService getSearchRestrictionService()
-
setSearchRestrictionService
public void setSearchRestrictionService(SearchRestrictionService searchRestrictionService)
-
-