Class DefaultCustomerGroupFacade
java.lang.Object
de.hybris.platform.commercefacades.customergroups.impl.DefaultCustomerGroupFacade
- All Implemented Interfaces:
CustomerGroupFacade
Default implementation of
CustomerGroupFacade-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class -
Constructor Summary
Constructors -
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 subgroupsprotected UserGroupModelgetCustomerGroup(String customerGroupId, Set<UserGroupOption> options) Returns customer group (a sub-group of 'cutomergroup') by uid.protected UserGroupModelgetCustomerGroupById(String customerGroupId) 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.protected I18NServiceprotected ModelServiceprotected UserModelgetUserById(String userId) protected Converter<UserGroupModel,UserGroupData> protected UserMatchingServiceprotected UserServiceprotected booleanisCustomerGroup(UserGroupModel group) voidremoveUserFromCustomerGroup(String customerGroupId, String userId) Remove user from customer groupvoidsetBaseCustomerGroupId(String value) voidsetCustomerGroupMembersPopulator(ConfigurablePopulator<UserGroupModel, UserGroupData, UserGroupOption> customerGroupMembersPopulator) voidsetI18NService(I18NService i18NService) voidsetModelService(ModelService modelService) voidsetUserGroupConverter(Converter<UserGroupModel, UserGroupData> userGroupConverter) voidsetUserMatchingService(UserMatchingService userMatchingService) voidsetUserService(UserService userService) protected UserGroupDataListsortAndGetSubListDependsOnPageOption(List<UserGroupData> input, PageOption pageOption)
-
Constructor Details
-
DefaultCustomerGroupFacade
public DefaultCustomerGroupFacade()
-
-
Method Details
-
createCustomerGroup
Description copied from interface:CustomerGroupFacadeCreate customer group (direct sub group of 'customergroup') with given uid and localized name in current locale- Specified by:
createCustomerGroupin interfaceCustomerGroupFacade- Parameters:
uid- the customer group uidlocalizedName- the customer group localized name
-
addUserToCustomerGroup
Description copied from interface:CustomerGroupFacadeAssign user to customer group- Specified by:
addUserToCustomerGroupin interfaceCustomerGroupFacade- Parameters:
customerGroupId- customer group uiduserId- user uid
-
removeUserFromCustomerGroup
Description copied from interface:CustomerGroupFacadeRemove user from customer group- Specified by:
removeUserFromCustomerGroupin interfaceCustomerGroupFacade- Parameters:
customerGroupId- customer group uiduserId- user uid
-
getCustomerGroupsForCurrentUser
Description copied from interface:CustomerGroupFacadeReturns all customers groups for the current user.- Specified by:
getCustomerGroupsForCurrentUserin interfaceCustomerGroupFacade- Returns:
- all customer groups of a current customer
-
getCustomerGroup
Description copied from interface:CustomerGroupFacadeReturns customer group (a sub-group of 'cutomergroup') by uid.- Specified by:
getCustomerGroupin interfaceCustomerGroupFacade- Parameters:
customerGroupId- the customer group uidoptions- aSetof requiredUserGroupOptions- Returns:
- the customer group
-
getBaseCustomerGroup
-
getCustomerGroupById
-
isCustomerGroup
- Parameters:
group-- Returns:
- true if the
groupis a direct sub-group of configured baseCustomerGroup
-
getUserById
-
getCustomerGroupsForUser
Description copied from interface:CustomerGroupFacadeGets a user's customer groups The givenuserIdis one of the unique identifiers that is used to recognize the user in matching strategies.- Specified by:
getCustomerGroupsForUserin interfaceCustomerGroupFacade- Parameters:
userId- the user's id used to identify the user.- Returns:
- all customer groups of a given customer
- See Also:
-
getAllCustomerGroups
Description copied from interface:CustomerGroupFacadeReturns user group with uid 'customergroup' and all it's direct subgroups- Specified by:
getAllCustomerGroupsin interfaceCustomerGroupFacade- Parameters:
pageOption- - result paging option.- Returns:
- All customer groups as
UserGroupDataList.
-
sortAndGetSubListDependsOnPageOption
protected UserGroupDataList sortAndGetSubListDependsOnPageOption(List<UserGroupData> input, PageOption pageOption) -
getModelService
-
setModelService
-
getUserService
-
setUserService
-
getUserMatchingService
-
setUserMatchingService
-
getI18NService
-
setI18NService
-
getUserGroupConverter
-
setUserGroupConverter
-
getCustomerGroupMembersPopulator
protected ConfigurablePopulator<UserGroupModel,UserGroupData, getCustomerGroupMembersPopulator()UserGroupOption> -
setCustomerGroupMembersPopulator
public void setCustomerGroupMembersPopulator(ConfigurablePopulator<UserGroupModel, UserGroupData, UserGroupOption> customerGroupMembersPopulator) -
getBaseCustomerGroupId
-
setBaseCustomerGroupId
-