Class CustomerServiceImpl

    • Constructor Detail

      • CustomerServiceImpl

        public CustomerServiceImpl()
    • Method Detail

      • getPaginationCustomers

        @Deprecated
        public java.util.Deque<java.util.Map<java.lang.String,​java.lang.Object>> getPaginationCustomers​(java.lang.String requestJson)
        Deprecated.
        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
      • sendVerificationEmail

        public void sendVerificationEmail​(java.util.LinkedHashMap<java.lang.String,​java.lang.Object> userAsMap)
        Description copied from interface: CustomerService
        Sends a verification email to the user.
        Specified by:
        sendVerificationEmail in interface CustomerService
        Parameters:
        userAsMap - the user information as a LinkedHashMap<String, Object>. It contains the user's email and other relevant details.
      • searchCustomers

        public co.mastermindcms.modules.beans.SearchResponse searchCustomers​(java.util.LinkedHashMap<java.lang.String,​java.lang.Object> requestAsMap)
        Description copied from interface: CustomerService
        This method does search requests and returns data as list.
        Specified by:
        searchCustomers in interface CustomerService
        Parameters:
        requestAsMap - search request
        Returns:
        data transport entities as list
      • searchCustomersLightweight

        public co.mastermindcms.modules.beans.SearchResponse searchCustomersLightweight​(java.util.LinkedHashMap<java.lang.String,​java.lang.Object> requestAsMap)
        Description copied from interface: CustomerService
        Retrieves lightweight customers based on the given request JSON.
        Specified by:
        searchCustomersLightweight in interface CustomerService
        Parameters:
        requestAsMap - a LinkedHashMap containing the request parameters
        Returns:
        a SearchResponse object containing the lightweight customers
      • getCustomersPaged

        @Deprecated
        public org.springframework.data.domain.Page<Seller> getCustomersPaged​(java.lang.String requestJson)
        Deprecated.
        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
      • updateCustomer

        public Seller updateCustomer​(java.util.LinkedHashMap<java.lang.String,​java.lang.Object> sellerAsMap)
        Description copied from interface: CustomerService
        Updates the customer object of the seller with the provided data in the form of a LinkedHashMap.
        Specified by:
        updateCustomer in interface CustomerService
        Parameters:
        sellerAsMap - a LinkedHashMap containing the updated customer data
        Returns:
        the updated Seller object after updating the customer
      • 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​(java.util.LinkedHashMap<java.lang.String,​java.lang.Object> customerAsMap)
        Description copied from interface: CustomerService
        This method does map product entity to dto object
        Specified by:
        mapSellerToDto in interface CustomerService
        Parameters:
        customerAsMap - a LinkedHashMap containing the updated customer data
        Returns:
        data transport object
      • 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