Class CustomerServiceImpl
- java.lang.Object
-
- co.mastermindcms.modules.services.CustomerServiceImpl
-
- All Implemented Interfaces:
CustomerService
@Service public class CustomerServiceImpl extends java.lang.Object implements CustomerService
-
-
Field Summary
Fields Modifier and Type Field Description private EmailSenderService
emailSenderService
private GeoLocationService
geoLocationService
private static com.fasterxml.jackson.databind.ObjectMapper
mapper
private ProfileManagementService
profileManagementService
private SellerRepository
sellerRepository
private SequenceGeneratorService
sequenceGenerator
private MongoStorageService
storageService
private TokenService
tokenService
private TranslationService
translationService
private UserManagementService
userManagementService
-
Constructor Summary
Constructors Constructor Description CustomerServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.LinkedHashSet<SellerDTO>
getCustomers(java.lang.String requestJson)
This method does search requests and returns data as list.org.springframework.data.domain.Page<Seller>
getCustomersPaged(java.lang.String requestJson)
This method does search requests and returns data as pages.java.util.Deque<java.util.Map<java.lang.String,java.lang.Object>>
getPaginationCustomers(java.lang.String requestJson)
This method does calculation for a pages based on the request.SellerRepository
getRepository()
SellerDTO
mapSellerToDto(Seller seller, boolean optimal)
This method does map product entity to dto objectSeller
registerCustomerFull(java.util.LinkedHashMap<java.lang.String,java.lang.Object> customerAsMap)
This method does a registration for customerProfile
registerCustomerSimplified(java.util.LinkedHashMap<java.lang.String,java.lang.Object> userProfileAsMap)
This method does a registration for userjava.util.LinkedHashSet<Profile>
searchEmployees(java.lang.String requestJson)
This method does search requests and returns data as list.org.springframework.data.domain.Page<Profile>
searchEmployeesPaged(java.lang.String requestJson)
This method does search requests and returns data as pages.Profile
updateCustomerProfile(java.util.LinkedHashMap<java.lang.String,java.lang.Object> userProfileAsMap)
Updates the customer profile with the provided user profile information.boolean
validatePasswordResetToken(java.lang.String passwordResetToken)
This method returns a boolean value.boolean
validateVerificationToken(java.lang.String verificationToken)
This method returns a boolean value.
-
-
-
Field Detail
-
sellerRepository
@Autowired private SellerRepository sellerRepository
-
geoLocationService
@Autowired private GeoLocationService geoLocationService
-
storageService
@Autowired private MongoStorageService storageService
-
translationService
@Autowired private TranslationService translationService
-
userManagementService
@Autowired private UserManagementService userManagementService
-
profileManagementService
@Autowired private ProfileManagementService profileManagementService
-
sequenceGenerator
@Autowired private SequenceGeneratorService sequenceGenerator
-
emailSenderService
@Autowired private EmailSenderService emailSenderService
-
tokenService
@Autowired private TokenService tokenService
-
mapper
private static final com.fasterxml.jackson.databind.ObjectMapper mapper
-
-
Method Detail
-
getRepository
public SellerRepository getRepository()
- Specified by:
getRepository
in interfaceCustomerService
-
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 interfaceCustomerService
- 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 interfaceCustomerService
- 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 interfaceCustomerService
- 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 interfaceCustomerService
- 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 interfaceCustomerService
- 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 interfaceCustomerService
- 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 interfaceCustomerService
- 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 interfaceCustomerService
- 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 interfaceCustomerService
- 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 interfaceCustomerService
- 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 interfaceCustomerService
- Parameters:
seller
- database entity which be used to map to dtooptimal
- this pointer optimises the data transfer object- Returns:
- data transport object
-
-