Package org.bhn.promotion.core.service
Class PersonManagementService
java.lang.Object
org.bhn.promotion.core.service.PersonManagementService
Service class for getting Person details from the Person Management system.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetPersonByEmail(String email) Retrieves a singlePersonbased on the provided email address.voidsetPersonManagementProxy(PersonManagementProxy personManagementProxy)
-
Constructor Details
-
PersonManagementService
public PersonManagementService()
-
-
Method Details
-
setPersonManagementProxy
-
getPersonByEmail
Retrieves a singlePersonbased on the provided email address.Error handling is implemented for specific scenarios:
WebClientResponseException.NotFound: Logs a message when no person is found.WebClientResponseException: Logs the status code and error message for other HTTP errors.Exception: Logs unexpected errors that might occur during execution.
- Parameters:
email- the email address of the person to fetch.- Returns:
- the first
Personfound, ornullif none is found or an error occurs.
-