Package de.hybris.platform.b2b.services
Interface B2BCustomerService<U,C>
- Type Parameters:
U- the customerC- the b2b unit
- All Known Implementing Classes:
DefaultB2BCustomerService
public interface B2BCustomerService<U,C>
A service around
B2BCustomerModel- Spring Bean ID:
- b2bCustomerService
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddMember(PrincipalModel member, PrincipalGroupModel group) Gets all b2b user groupsGets all usersGets the current b2b customer.getUserForUID(String userId) Delegates toUserService.getUserForUID(String, Class)if the user was not found return null rather than throwing up de.hybris.platform.servicelayer.exceptions.UnknownIdentifierExceptionbooleanprincipalExists(String uid) Deprecated, for removal: This API element is subject to removal in a future version.Since 4.4.voidsetParentB2BUnit(U member, C company) Deprecated, for removal: This API element is subject to removal in a future version.Since 4.5.
-
Method Details
-
addMember
- 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
-
getUserForUID
Delegates toUserService.getUserForUID(String, Class)if the user was not found return null rather than throwing up de.hybris.platform.servicelayer.exceptions.UnknownIdentifierException- Parameters:
userId- The unique identifier of the user- Returns:
- A hybris user typed T
-
setParentB2BUnit
Deprecated, for removal: This API element is subject to removal in a future version.Sets 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.- Parameters:
member- the customer who will be assigned to the parent unitcompany- the parent b2b unit
-
getCurrentB2BCustomer
U getCurrentB2BCustomer()Gets the current b2b customer.- Returns:
- current session user, if B2BCustomer. If not B2BCustomer it returns null
-
principalExists
Deprecated, for removal: This API element is subject to removal in a future version.Since 4.4. UseUserService.isUserExisting(String)Returns true is principalExists with this uid, Visibility restrictions do no apply in query.- Parameters:
uid-- Returns:
- true if principal exists with this uid.
-
getAllUsers
Gets all users- Returns:
- the
Listof users
-
getAllB2BUserGroups
List<B2BUserGroupModel> getAllB2BUserGroups()Gets all b2b user groups- Returns:
- the
ListofB2BUserGroupModel
-