public class DefaultCustomerGroupFacade extends java.lang.Object implements CustomerGroupFacade
CustomerGroupFacade| Modifier and Type | Class and Description |
|---|---|
protected static class |
DefaultCustomerGroupFacade.UserGroupDataComparator |
| Constructor and Description |
|---|
DefaultCustomerGroupFacade() |
| Modifier and Type | Method and Description |
|---|---|
void |
addUserToCustomerGroup(java.lang.String customerGroupId,
java.lang.String userId)
Assign user to customer group
|
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
|
UserGroupDataList |
getAllCustomerGroups(PageOption pageOption)
Returns user group with uid 'customergroup' and all it's direct subgroups
|
protected UserGroupModel |
getBaseCustomerGroup() |
java.lang.String |
getBaseCustomerGroupId() |
UserGroupData |
getCustomerGroup(java.lang.String customerGroupId,
java.util.Set<UserGroupOption> options)
Returns customer group (a sub-group of 'cutomergroup') by uid.
|
protected UserGroupModel |
getCustomerGroupById(java.lang.String customerGroupId) |
protected ConfigurablePopulator<UserGroupModel,UserGroupData,UserGroupOption> |
getCustomerGroupMembersPopulator() |
java.util.List<UserGroupData> |
getCustomerGroupsForCurrentUser()
Returns all customers groups for the current user.
|
java.util.List<UserGroupData> |
getCustomerGroupsForUser(java.lang.String uid)
Gets a user's customer groups
|
protected I18NService |
getI18NService() |
protected ModelService |
getModelService() |
protected UserModel |
getUserById(java.lang.String userId) |
protected Converter<UserGroupModel,UserGroupData> |
getUserGroupConverter() |
protected UserService |
getUserService() |
protected boolean |
isCustomerGroup(UserGroupModel group) |
void |
removeUserFromCustomerGroup(java.lang.String customerGroupId,
java.lang.String userId)
Remove user from customer group
|
void |
setBaseCustomerGroupId(java.lang.String value) |
void |
setCustomerGroupMembersPopulator(ConfigurablePopulator<UserGroupModel,UserGroupData,UserGroupOption> customerGroupMembersPopulator) |
void |
setI18NService(I18NService i18NService) |
void |
setModelService(ModelService modelService) |
void |
setUserGroupConverter(Converter<UserGroupModel,UserGroupData> userGroupConverter) |
void |
setUserService(UserService userService) |
protected UserGroupDataList |
sortAndGetSubListDependsOnPageOption(java.util.List<UserGroupData> input,
PageOption pageOption) |
public void createCustomerGroup(java.lang.String uid,
java.lang.String localizedName)
CustomerGroupFacadecreateCustomerGroup in interface CustomerGroupFacadeuid - the customer group uidlocalizedName - the customer group localized namepublic void addUserToCustomerGroup(java.lang.String customerGroupId,
java.lang.String userId)
CustomerGroupFacadeaddUserToCustomerGroup in interface CustomerGroupFacadecustomerGroupId - customer group uiduserId - user uidpublic void removeUserFromCustomerGroup(java.lang.String customerGroupId,
java.lang.String userId)
CustomerGroupFacaderemoveUserFromCustomerGroup in interface CustomerGroupFacadecustomerGroupId - customer group uiduserId - user uidpublic java.util.List<UserGroupData> getCustomerGroupsForCurrentUser()
CustomerGroupFacadegetCustomerGroupsForCurrentUser in interface CustomerGroupFacadepublic UserGroupData getCustomerGroup(java.lang.String customerGroupId, java.util.Set<UserGroupOption> options)
CustomerGroupFacadegetCustomerGroup in interface CustomerGroupFacadecustomerGroupId - the customer group uidoptions - a Set of required UserGroupOptionsprotected UserGroupModel getBaseCustomerGroup()
protected UserGroupModel getCustomerGroupById(java.lang.String customerGroupId)
protected boolean isCustomerGroup(UserGroupModel group)
group - group is a direct sub-group of configured baseCustomerGroupprotected UserModel getUserById(java.lang.String userId)
public java.util.List<UserGroupData> getCustomerGroupsForUser(java.lang.String uid)
CustomerGroupFacadegetCustomerGroupsForUser in interface CustomerGroupFacadeuid - the user's uidpublic UserGroupDataList getAllCustomerGroups(PageOption pageOption)
CustomerGroupFacadegetAllCustomerGroups in interface CustomerGroupFacadepageOption - - result paging option.UserGroupDataList.protected UserGroupDataList sortAndGetSubListDependsOnPageOption(java.util.List<UserGroupData> input, PageOption pageOption)
public void setModelService(ModelService modelService)
protected ModelService getModelService()
public void setUserService(UserService userService)
protected UserService getUserService()
public void setI18NService(I18NService i18NService)
protected I18NService getI18NService()
public void setUserGroupConverter(Converter<UserGroupModel,UserGroupData> userGroupConverter)
protected Converter<UserGroupModel,UserGroupData> getUserGroupConverter()
public void setCustomerGroupMembersPopulator(ConfigurablePopulator<UserGroupModel,UserGroupData,UserGroupOption> customerGroupMembersPopulator)
protected ConfigurablePopulator<UserGroupModel,UserGroupData,UserGroupOption> getCustomerGroupMembersPopulator()
public void setBaseCustomerGroupId(java.lang.String value)
public java.lang.String getBaseCustomerGroupId()
Copyright © 2018 SAP SE. All Rights Reserved.