Interface ProfileSearchService
-
- All Known Implementing Classes:
ProfileSearchServiceImpl
public interface ProfileSearchService
This interface abstracts out the Business Logic services available for this micro-service.- Author:
- swaroop_nath
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description User
fetchUserByID(String userID)
This service lets the currently logged-in user search for a user by the user id.boolean
makeCircleAndPersist(Map<String,Object> payload)
This service is used to add the users in each others' circles.
-
-
-
Method Detail
-
fetchUserByID
User fetchUserByID(String userID) throws SearchFailedException, UserDoesNotExistException
This service lets the currently logged-in user search for a user by the user id.- Parameters:
userID
- The user id for which the user has to be searched.- Returns:
- Returns the user if found.
- Throws:
SearchFailedException
- Thrown in case the search couldn't be done.UserDoesNotExistException
- Thrown in case the user was not found.
-
makeCircleAndPersist
boolean makeCircleAndPersist(Map<String,Object> payload) throws InternalServerException, UserNotAddedToCircleException
This service is used to add the users in each others' circles.- Parameters:
payload
- The payload with the request. It must include the user ids of both the users.- Returns:
- Returns true in case the addition was successful.
- Throws:
InternalServerException
- Thrown in case there is any internal server error.UserNotAddedToCircleException
- Thrown in case the user couldn't be added to the circle.
-
-