Class CustomerServiceImpl

    • Constructor Detail

      • CustomerServiceImpl

        public CustomerServiceImpl()
    • Method Detail

      • getPaginationCustomers

        public java.util.Deque<java.util.Map<java.lang.String,​java.lang.Object>> getPaginationCustomers​(java.lang.String requestJson)
        Description copied from interface: CustomerService
        This method does calculation for a pages based on the request.
        Specified by:
        getPaginationCustomers in interface CustomerService
        Parameters:
        requestJson - JSON-object of request contains an instructions for search queries
        Returns:
        map-representation of data
      • validateVerificationToken

        public boolean validateVerificationToken​(java.lang.String verificationToken)
        Description copied from interface: CustomerService
        This method returns a boolean value.
        Specified by:
        validateVerificationToken in interface CustomerService
        Parameters:
        verificationToken - database entity id
        Returns:
        boolean value to externally interaction
      • validatePasswordResetToken

        public boolean validatePasswordResetToken​(java.lang.String passwordResetToken)
        Description copied from interface: CustomerService
        This method returns a boolean value.
        Specified by:
        validatePasswordResetToken in interface CustomerService
        Parameters:
        passwordResetToken - database entity id
        Returns:
        boolean value to externally interaction
      • getCustomers

        public java.util.LinkedHashSet<SellerDTO> getCustomers​(java.lang.String requestJson)
        Description copied from interface: CustomerService
        This method does search requests and returns data as list.
        Specified by:
        getCustomers in interface CustomerService
        Parameters:
        requestJson - search request
        Returns:
        data transport entities as list
      • getCustomersPaged

        public org.springframework.data.domain.Page<Seller> getCustomersPaged​(java.lang.String requestJson)
        Description copied from interface: CustomerService
        This method does search requests and returns data as pages.
        Specified by:
        getCustomersPaged in interface CustomerService
        Parameters:
        requestJson - JSON-object of request contains an instructions for search queries
        Returns:
        database entities separated to pages
      • registerCustomerFull

        public Seller registerCustomerFull​(java.util.LinkedHashMap<java.lang.String,​java.lang.Object> customerAsMap)
        Description copied from interface: CustomerService
        This method does a registration for customer
        Specified by:
        registerCustomerFull in interface CustomerService
        Parameters:
        customerAsMap - map-representation of database entity
        Returns:
        registered customer as database object
      • searchEmployees

        public java.util.LinkedHashSet<Profile> searchEmployees​(java.lang.String requestJson)
        Description copied from interface: CustomerService
        This method does search requests and returns data as list.
        Specified by:
        searchEmployees in interface CustomerService
        Parameters:
        requestJson - search request
        Returns:
        data transport entities as list
      • searchEmployeesPaged

        public org.springframework.data.domain.Page<Profile> searchEmployeesPaged​(java.lang.String requestJson)
        Description copied from interface: CustomerService
        This method does search requests and returns data as pages.
        Specified by:
        searchEmployeesPaged in interface CustomerService
        Parameters:
        requestJson - JSON-object of request contains an instructions for search queries
        Returns:
        database entities separated to pages
      • registerCustomerSimplified

        public Profile registerCustomerSimplified​(java.util.LinkedHashMap<java.lang.String,​java.lang.Object> userProfileAsMap)
        Description copied from interface: CustomerService
        This method does a registration for user
        Specified by:
        registerCustomerSimplified in interface CustomerService
        Parameters:
        userProfileAsMap - map-representation of database entity
        Returns:
        registered user profile as database object
      • updateCustomerProfile

        public Profile updateCustomerProfile​(java.util.LinkedHashMap<java.lang.String,​java.lang.Object> userProfileAsMap)
        Description copied from interface: CustomerService
        Updates the customer profile with the provided user profile information.
        Specified by:
        updateCustomerProfile in interface CustomerService
        Parameters:
        userProfileAsMap - A LinkedHashMap containing the user profile information as key-value pairs. The keys represent the profile attributes (e.g., "firstName", "emailAddress", "phone"), and the values represent the updated values for each attribute.
        Returns:
        A Profile object containing the updated customer profile information.
      • mapSellerToDto

        public SellerDTO mapSellerToDto​(Seller seller,
                                        boolean optimal)
        Description copied from interface: CustomerService
        This method does map product entity to dto object
        Specified by:
        mapSellerToDto in interface CustomerService
        Parameters:
        seller - database entity which be used to map to dto
        optimal - this pointer optimises the data transfer object
        Returns:
        data transport object