Class DefaultUserMatchingService

java.lang.Object
de.hybris.platform.commerceservices.user.impl.DefaultUserMatchingService
All Implemented Interfaces:
UserMatchingService

public class DefaultUserMatchingService extends Object implements UserMatchingService
Provides methods for retrieving the user or customer and verifying its existence. The user is searched by matching one of his unique identifiers. This is accomplished using the list of matching strategies. By default, the user is searched by matching the UID.
  • Constructor Details

    • DefaultUserMatchingService

      public DefaultUserMatchingService()
  • Method Details

    • getUserByProperty

      public <T extends UserModel> T getUserByProperty(String propertyValue, Class<T> clazz)
      Description copied from interface: UserMatchingService
      Gets the user by the property and cast to UserModel subtype
      Specified by:
      getUserByProperty in interface UserMatchingService
      Type Parameters:
      T - UserModel subtype
      Parameters:
      propertyValue - the unique value of property used to identify the user.
      clazz - - the class of UserModel subtype
      Returns:
      the found user
    • isUserExisting

      public boolean isUserExisting(String propertyValue)
      Description copied from interface: UserMatchingService
      Verifies whether the user exist
      Specified by:
      isUserExisting in interface UserMatchingService
      Parameters:
      propertyValue - the property value used to identify the user
      Returns:
      true if user exists
    • getUserOptionalByProperty

      protected <T extends UserModel> Optional<T> getUserOptionalByProperty(String propertyValue, Class<T> clazz)
    • validateType

      protected <T> T validateType(T value, Class type)
    • getMatchingStrategies

      protected List<UserPropertyMatchingStrategy> getMatchingStrategies()
    • setMatchingStrategies

      public void setMatchingStrategies(List<UserPropertyMatchingStrategy> matchingStrategies)