Class DefaultUserMatchingService

  • All Implemented Interfaces:
    UserMatchingService

    public class DefaultUserMatchingService
    extends java.lang.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 Detail

      • DefaultUserMatchingService

        public DefaultUserMatchingService()
    • Method Detail

      • getUserByProperty

        public <T extends UserModel> T getUserByProperty​(java.lang.String propertyValue,
                                                         java.lang.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​(java.lang.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> java.util.Optional<T> getUserOptionalByProperty​(java.lang.String propertyValue,
                                                                                        java.lang.Class<T> clazz)
      • validateType

        protected <T> T validateType​(T value,
                                     java.lang.Class type)