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
Modifier and TypeMethodDescriptionvoidaddUserToCustomerGroup(String customerGroupid, String userId) Assign user to customer groupvoidcreateCustomerGroup(String uid, String localizedName) Create customer group (direct sub group of 'customergroup') with given uid and localized name in current localegetAllCustomerGroups(PageOption pageOption) Returns user group with uid 'customergroup' and all it's direct subgroupsgetCustomerGroup(String uid, Set<UserGroupOption> options) Returns customer group (a sub-group of 'cutomergroup') by uid.Returns all customers groups for the current user.getCustomerGroupsForUser(String userId) Gets a user's customer groups The givenuserIdis one of the unique identifiers that is used to recognize the user in matching strategies.voidremoveUserFromCustomerGroup(String customerGroupid, String userId) Remove user from customer group
-
Method Details
-
createCustomerGroup
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
Assign user to customer group- Parameters:
customerGroupid- customer group uiduserId- user uid
-
removeUserFromCustomerGroup
Remove user from customer group- Parameters:
customerGroupid- customer group uiduserId- user uid
-
getCustomerGroupsForCurrentUser
List<UserGroupData> getCustomerGroupsForCurrentUser()Returns all customers groups for the current user.- Returns:
- all customer groups of a current customer
-
getCustomerGroupsForUser
Gets a user's customer groups The givenuserIdis 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:
-
getAllCustomerGroups
Returns user group with uid 'customergroup' and all it's direct subgroups- Parameters:
pageOption- - result paging option.- Returns:
- All customer groups as
UserGroupDataList.
-
getCustomerGroup
Returns customer group (a sub-group of 'cutomergroup') by uid.- Parameters:
uid- the customer group uidoptions- aSetof requiredUserGroupOptions- Returns:
- the customer group
-