Interface CustomerGroupFacade
-
- All Known Implementing Classes:
DefaultCustomerGroupFacade
public interface CustomerGroupFacade
Facade for management of customer groups - that is user groups which are sub group of user group with id defined via#setBaseCustomerGroupId(String)
. Typically customer group id = 'customergroup'
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addUserToCustomerGroup(java.lang.String customerGroupid, java.lang.String userId)
Assign user to customer groupvoid
createCustomerGroup(java.lang.String uid, java.lang.String localizedName)
Create customer group (direct sub group of 'customergroup') with given uid and localized name in current localeUserGroupDataList
getAllCustomerGroups(PageOption pageOption)
Returns user group with uid 'customergroup' and all it's direct subgroupsUserGroupData
getCustomerGroup(java.lang.String uid, java.util.Set<UserGroupOption> options)
Returns customer group (a sub-group of 'cutomergroup') by uid.java.util.List<UserGroupData>
getCustomerGroupsForCurrentUser()
Returns all customers groups for the current user.java.util.List<UserGroupData>
getCustomerGroupsForUser(java.lang.String userId)
Gets a user's customer groups The givenuserId
is one of the unique identifiers that is used to recognize the user in matching strategies.void
removeUserFromCustomerGroup(java.lang.String customerGroupid, java.lang.String userId)
Remove user from customer group
-
-
-
Method Detail
-
createCustomerGroup
void createCustomerGroup(java.lang.String uid, java.lang.String localizedName)
Create customer group (direct sub group of 'customergroup') with given uid and localized name in current locale- Parameters:
uid
- the customer group uidlocalizedName
- the customer group localized name
-
addUserToCustomerGroup
void addUserToCustomerGroup(java.lang.String customerGroupid, java.lang.String userId)
Assign user to customer group- Parameters:
customerGroupid
- customer group uiduserId
- user uid
-
removeUserFromCustomerGroup
void removeUserFromCustomerGroup(java.lang.String customerGroupid, java.lang.String userId)
Remove user from customer group- Parameters:
customerGroupid
- customer group uiduserId
- user uid
-
getCustomerGroupsForCurrentUser
java.util.List<UserGroupData> getCustomerGroupsForCurrentUser()
Returns all customers groups for the current user.- Returns:
- all customer groups of a current customer
-
getCustomerGroupsForUser
java.util.List<UserGroupData> getCustomerGroupsForUser(java.lang.String userId)
Gets a user's customer groups The givenuserId
is one of the unique identifiers that is used to recognize the user in matching strategies.- Parameters:
userId
- the user's id used to identify the user.- Returns:
- all customer groups of a given customer
- Throws:
UnknownIdentifierException
- if user doesn't exist- See Also:
DefaultUserMatchingService
-
getAllCustomerGroups
UserGroupDataList getAllCustomerGroups(PageOption pageOption)
Returns user group with uid 'customergroup' and all it's direct subgroups- Parameters:
pageOption
- - result paging option.- Returns:
- All customer groups as
UserGroupDataList
.
-
getCustomerGroup
UserGroupData getCustomerGroup(java.lang.String uid, java.util.Set<UserGroupOption> options)
Returns customer group (a sub-group of 'cutomergroup') by uid.- Parameters:
uid
- the customer group uidoptions
- aSet
of requiredUserGroupOption
s- Returns:
- the customer group
-
-