Class DeleteNotesServiceImpl

java.lang.Object
com.skava.service.impl.DeleteNotesServiceImpl
All Implemented Interfaces:
com.skava.core.EcommService<NotesRequest,com.skava.core.ResponseModel>, DeleteNotesService

@Service @Transactional public class DeleteNotesServiceImpl extends Object implements DeleteNotesService
This service class implements DeleteNotesService and handles deleting a notes service request, process it and delete the details from DB within a collection id and user id.
Author:
Infosys Equinox
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    List<com.skava.core.validation.ValidatorComponent>
    This method is used to get the respective validator class for this deleting user notes service.
    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.
    com.skava.core.ResponseModel
    This method is used to delete a notes for a particular 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

    • DeleteNotesServiceImpl

      public DeleteNotesServiceImpl()
      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 deleting user notes service.
      Specified by:
      getValidator in interface com.skava.core.EcommService<NotesRequest,com.skava.core.ResponseModel>
      Returns:
      The list of ValidatorComponent object.
    • methodFallback

      public NotesResponse methodFallback(NotesRequest 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 NotesRequest object.
      Returns:
      The NotesResponse object.
    • process

      @SendEvent(eventType="userservice/notes/delete", identifier="request_id") @HystrixCommand(commandKey="user-key", fallbackMethod="methodFallback", ignoreExceptions=com.skava.core.validation.ValidateException.class) public com.skava.core.ResponseModel process(NotesRequest request)
      This method is used to delete a notes for a particular user. The validation occurs for collection id and user id. If any validation fails, it throws ValidateException and on successful validation, the notes will be removed from database.
      Specified by:
      process in interface com.skava.core.EcommService<NotesRequest,com.skava.core.ResponseModel>
      Parameters:
      request - Holds NotesRequest object which holds the notes request for deleting a notes.
      Returns:
      The NotesResponse object which returns the success response code and response message on successful creation and if any validations fails, throws an validate exception.