Class DeleteCustomPropertyServiceImpl

java.lang.Object
com.skava.service.impl.DeleteCustomPropertyServiceImpl
All Implemented Interfaces:
com.skava.core.EcommService<UserPropertiesRequest,UsersResponse>, DeleteCustomPropertyService

@Service @Transactional(noRollbackFor=java.lang.Exception.class) public class DeleteCustomPropertyServiceImpl extends Object implements DeleteCustomPropertyService
This service class implements DeleteCustomPropertyService and handles the delete custom property service request, process it and save the details in DB. It also implements business logic required to delete custom property of a user.
Author:
Infosys Equinox
  • Constructor Details

    • DeleteCustomPropertyServiceImpl

      public DeleteCustomPropertyServiceImpl()
      Default Constructor.
  • Method Details

    • getValidator

      public List<com.skava.core.validation.ValidatorComponent> getValidator()
      This method is used to get the respective validator class for this delete custom property service.
      Specified by:
      getValidator in interface com.skava.core.EcommService<UserPropertiesRequest,UsersResponse>
      Returns:
      The list of ValidatorComponent object.
    • process

      @SendEvent(eventType="userservice/customproperty/delete", identifier="response_users.id") @HystrixCommand(commandKey="user-key", fallbackMethod="methodFallback", ignoreExceptions=com.skava.core.validation.ValidateException.class) public UsersResponse process(@Valid @Valid UserPropertiesRequest request)
      This method is used to delete custom property for a user by the name given in request.
      Specified by:
      process in interface com.skava.core.EcommService<UserPropertiesRequest,UsersResponse>
      Parameters:
      request - Holds UserPropertiesRequest object which contains custom property request that needs to be deleted by the name that is given in request.
      Returns:
      The UsersResponse object which returns the success response code and message and if any validations fails, throws an validate exception.
    • methodFallback

      public UsersResponse methodFallback(UserPropertiesRequest input)
      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:
      input - Holds UserPropertiesRequest object.
      Returns:
      The UsersResponse object.