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 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 uid
        localizedName - 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 uid
        userId - user uid
      • removeUserFromCustomerGroup

        void removeUserFromCustomerGroup​(java.lang.String customerGroupid,
                                         java.lang.String userId)
        Remove user from customer group
        Parameters:
        customerGroupid - customer group uid
        userId - 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 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:
        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 uid
        options - a Set of required UserGroupOptions
        Returns:
        the customer group