Package com.skava.service.impl
Class GetUserIdentityServiceImpl
java.lang.Object
com.skava.service.impl.GetUserIdentityServiceImpl
- All Implemented Interfaces:
com.skava.core.EcommService<UserRequest,
,UsersResponse> GetUserIdentityService
@Service
@Transactional(propagation=REQUIRED,
readOnly=true,
noRollbackFor=java.lang.Exception.class)
public class GetUserIdentityServiceImpl
extends Object
implements GetUserIdentityService
This service class implements GetUserIdentityService and handles the get user identity service request, process
it and save the details in DB. It also implements business logic required to retrieve requested user identity.
in a collection.
- Author:
- Infosys Equinox
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList<com.skava.core.validation.ValidatorComponent>
This method is used to get the respective validator class for this get user identity service.methodFallback
(UserRequest request) Circuit breaker fall-back method monitors for failures and once failures reach certain threshold, the circuit breaker trips and returns error response accordingly - Method fallback.process
(UserRequest request) This service is used to load all identities for an user.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.skava.core.EcommService
getValidateException, getValidator
-
Constructor Details
-
GetUserIdentityServiceImpl
public GetUserIdentityServiceImpl()Default Constructor.
-
-
Method Details
-
process
@HystrixCommand(commandKey="user-key", fallbackMethod="methodFallback", ignoreExceptions=com.skava.core.validation.ValidateException.class) public UsersResponse process(UserRequest request) This service is used to load all identities for an user. It contains list of identities object. Identities will be created for email and phonenumber of an user. Identities also contains type and status of an user. The possible values of type are 1 and 2. Type 1 refers for registered user and type 2 for guest user. Status are active, inactive and not activated. Identities also gets updated while updating user email and phonenumber.- Specified by:
process
in interfacecom.skava.core.EcommService<UserRequest,
UsersResponse> - Parameters:
request
- HoldsUserRequest
object which is used for loading the user identites details from database.- Returns:
- The
UsersResponse
which returns the success response code and message on successful fetching of user identities details and if any validations fails, throws an validate exception.
-
getValidator
This method is used to get the respective validator class for this get user identity service.- Specified by:
getValidator
in interfacecom.skava.core.EcommService<UserRequest,
UsersResponse> - Returns:
- The list of
ValidatorComponent
object.
-
methodFallback
Circuit breaker fall-back method monitors for failures and once failures reach certain threshold, the circuit breaker trips and returns error response accordingly - Method fallback.- Parameters:
request
- Holds @link UserRequest} object.- Returns:
- The
UsersResponse
object.
-