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 aroundB2BCustomerModel
- Spring Bean ID:
- b2bCustomerService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
addMember(PrincipalModel member, PrincipalGroupModel group)
java.util.List<B2BUserGroupModel>
getAllB2BUserGroups()
Gets all b2b user groupsjava.util.List<U>
getAllUsers()
Gets all usersU
getCurrentB2BCustomer()
Gets the current b2b customer.U
getUserForUID(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.UnknownIdentifierExceptionboolean
principalExists(java.lang.String uid)
Deprecated.Since 4.4.void
setParentB2BUnit(U member, C company)
Deprecated.Since 4.5.
-
-
-
Method Detail
-
addMember
void addMember(PrincipalModel member, PrincipalGroupModel group)
- Parameters:
member
- A user to be added to a group, likeB2BCustomerModel
for examplegroup
- A user group to which a member is going to be added, like aB2BUnitModel
for example
-
getUserForUID
U getUserForUID(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.UnknownIdentifierException- Parameters:
userId
- The unique identifier of the user- Returns:
- A hybris user typed T
-
setParentB2BUnit
@Deprecated(since="4.5") void setParentB2BUnit(U member, C company)
Deprecated.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(since="4.4") boolean principalExists(java.lang.String uid)
Deprecated.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
java.util.List<U> getAllUsers()
Gets all users- Returns:
- the
List
of users
-
getAllB2BUserGroups
java.util.List<B2BUserGroupModel> getAllB2BUserGroups()
Gets all b2b user groups- Returns:
- the
List
ofB2BUserGroupModel
-
-