Interface B2BCommerceUserService

All Known Subinterfaces:
B2BCommerceUserService
All Known Implementing Classes:
DefaultB2BCommerceUserService, DefaultB2BCommerceUserService

public interface B2BCommerceUserService
A service for user management within b2b commerce
  • Method Details

    • getPagedCustomers

      SearchPageData<B2BCustomerModel> getPagedCustomers(PageableData pageableData)
      Gets list of SearchPageData for pagination given the required pagination parameters with PageableData
      Parameters:
      pageableData - Pagination information
      Returns:
      List of paginated B2BCustomerModel objects
    • getPagedCustomersByGroupMembership

      SearchPageData<B2BCustomerModel> getPagedCustomersByGroupMembership(PageableData pageableData, String... userGroupUids)
      Gets list of SearchPageData for pagination given the required pagination parameters with PageableData
      Parameters:
      pageableData - Pagination information
      userGroupUids - Unique identifiers for B2BUserGroupModel
      Returns:
      List of paginated B2BCustomerModel objects
    • getPagedCustomersBySearchTermAndGroupMembership

      SearchPageData<B2BCustomerModel> getPagedCustomersBySearchTermAndGroupMembership(PageableData pageableData, String searchTerm, 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(String user, 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(String user, 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
    • addB2BUserGroupToCustomer

      B2BUserGroupModel addB2BUserGroupToCustomer(String user, String usergroup)
      Add Usergroups B2BCustomerModel object for a given unique id of 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 added for the given unique identifier for B2BUserGroupModel
    • deselectB2BUserGroupFromCustomer

      B2BUserGroupModel deselectB2BUserGroupFromCustomer(String user, 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(String user, 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(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(String uid)
      Disable a customer given its unique id
      Parameters:
      uid - A unique id for @link B2BCustomerModel} representing a user
    • enableCustomer

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