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 Details

    • createCustomerGroup

      void createCustomerGroup(String uid, String localizedName)
      Create customer group (direct sub group of 'customergroup') with given uid and localized name in current locale
      Parameters:
      uid - the customer group uid
      localizedName - the customer group localized name
    • addUserToCustomerGroup

      void addUserToCustomerGroup(String customerGroupid, String userId)
      Assign user to customer group
      Parameters:
      customerGroupid - customer group uid
      userId - user uid
    • removeUserFromCustomerGroup

      void removeUserFromCustomerGroup(String customerGroupid, String userId)
      Remove user from customer group
      Parameters:
      customerGroupid - customer group uid
      userId - user uid
    • getCustomerGroupsForCurrentUser

      List<UserGroupData> getCustomerGroupsForCurrentUser()
      Returns all customers groups for the current user.
      Returns:
      all customer groups of a current customer
    • getCustomerGroupsForUser

      List<UserGroupData> getCustomerGroupsForUser(String userId)
      Gets a user's customer groups The given userId 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:
    • 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(String uid, Set<UserGroupOption> options)
      Returns customer group (a sub-group of 'cutomergroup') by uid.
      Parameters:
      uid - the customer group uid
      options - a Set of required UserGroupOptions
      Returns:
      the customer group