Interface B2BCommerceUserService

    • Method Detail

      • getPagedCustomersBySearchTermAndGroupMembership

        SearchPageData<B2BCustomerModel> getPagedCustomersBySearchTermAndGroupMembership​(PageableData pageableData,
                                                                                         java.lang.String searchTerm,
                                                                                         java.lang.String... userGroupUids)
        Gets a pageable list of b2b customers that belong to the supplied groups. The results are filtered by a search term.
        Parameters:
        pageableData - Pagination information
        searchTerm - Search string that is used to filter the results using the customer name or his unit name. A match can occur in either the customer name or his unit name for the customer to be returned in the results.
        userGroupUids - Unique identifiers for B2BUserGroupModel
        Returns:
        List of paginated B2BCustomerModel objects
      • removeUserRole

        B2BCustomerModel removeUserRole​(java.lang.String user,
                                        java.lang.String role)
        Remove user role for a given user and return the updated B2BCustomerModel object
        Parameters:
        user - A unique identifier for B2BCustomerModel representing a user
        role - A unique identifier for UserGroupModel representing a user groups to which the user belongs
        Returns:
        Updated B2BCustomerModel object with user groups removed matching the role
      • addUserRole

        B2BCustomerModel addUserRole​(java.lang.String user,
                                     java.lang.String role)
        Add user role for a given user and return the updated B2BCustomerModel object
        Parameters:
        user - A unique identifier for B2BCustomerModel representing a user
        role - A unique identifier for UserGroupModel representing a user groups to which the user belongs
        Returns:
        Updated B2BCustomerModel object with user groups added matching the role
      • deselectB2BUserGroupFromCustomer

        B2BUserGroupModel deselectB2BUserGroupFromCustomer​(java.lang.String user,
                                                           java.lang.String usergroup)
        Deselects (removes) usergroup from a customer.
        Parameters:
        user - A unique identifier for B2BCustomerModel representing a customer
        usergroup - A unique identifier for B2BUserGroupModel representing a user group
        Returns:
        Updated B2BUserGroupModel object with user group.
      • removeB2BUserGroupFromCustomerGroups

        void removeB2BUserGroupFromCustomerGroups​(java.lang.String user,
                                                  java.lang.String usergroup)
        Removes usergroup from a customer.
        Parameters:
        user - A unique identifier for B2BCustomerModel representing a customer
        usergroup - A unique identifier for B2BUserGroupModel representing a user group
      • getParentUnitForCustomer

        <T extends B2BUnitModel> T getParentUnitForCustomer​(java.lang.String uid)
        Get parent unit B2BUnitModel for a given unique id of a customer
        Parameters:
        uid - A unique id for @link B2BCustomerModel} object of a customer
        Returns:
        Parent unit B2BUnitModel object for a given unique id of customer
      • disableCustomer

        void disableCustomer​(java.lang.String uid)
        Disable a customer given its unique id
        Parameters:
        uid - A unique id for @link B2BCustomerModel} representing a user
      • enableCustomer

        void enableCustomer​(java.lang.String uid)
        Enable customer given its unique id
        Parameters:
        uid - A unique id for @link B2BCustomerModel} representing a user