Package com.skava.service.impl
Class GetCustomPropertyServiceImpl
java.lang.Object
com.skava.service.impl.GetCustomPropertyServiceImpl
- All Implemented Interfaces:
com.skava.core.EcommService<UserPropertiesRequest,
,UsersResponse> GetCustomPropertyService
@Service
@Transactional
public class GetCustomPropertyServiceImpl
extends Object
implements GetCustomPropertyService
This service class implements GetCustomPropertyService and handles the get custom property service request, process
it and save the details in DB. It also implements business logic required to retrieve requested custom property.
- 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 custom property service.methodFallback
(UserPropertiesRequest 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
(@Valid UserPropertiesRequest request) This service is used to load the requested custom property 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
-
GetCustomPropertyServiceImpl
public GetCustomPropertyServiceImpl()Default Constructor
-
-
Method Details
-
getValidator
This method is used to get the respective validator class for this get custom property service.- Specified by:
getValidator
in interfacecom.skava.core.EcommService<UserPropertiesRequest,
UsersResponse> - Returns:
- The list of
ValidatorComponent
object.
-
process
@HystrixCommand(commandKey="user-key", fallbackMethod="methodFallback", ignoreExceptions=com.skava.core.validation.ValidateException.class) public UsersResponse process(@Valid @Valid UserPropertiesRequest request) This service is used to load the requested custom property for an user.- Specified by:
process
in interfacecom.skava.core.EcommService<UserPropertiesRequest,
UsersResponse> - Parameters:
request
- HoldsUserPropertiesRequest
object which is used for loading the user's custom property details from database.- Returns:
- The
UsersResponse
object which returns the success response code and message on successful fetching of user details and if any validations fails, throws an validate exception.
-
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
- HoldsUserPropertiesRequest
object.- Returns:
- The
UsersResponse
object.
-