Class DeleteCartServiceImpl

java.lang.Object
com.skava.cart.service.impl.CartServiceImpl
com.skava.cart.service.impl.DeleteCartServiceImpl
All Implemented Interfaces:
DeleteCartService, com.skava.core.EcommService<CartDataRequest,com.skava.core.ResponseModel>

@Service public class DeleteCartServiceImpl extends CartServiceImpl implements DeleteCartService
The Class DeleteCartServiceImpl.
  • Constructor Details

    • DeleteCartServiceImpl

      public DeleteCartServiceImpl()
  • Method Details

    • getValidator

      @ValidatorEvent(serviceName="cartcheckout", webhookName="cartservices/validator/cart", actionType="delete") public List<com.skava.core.validation.ValidatorComponent> getValidator(CartDataRequest cartDataRequest)
      This method returns the list of a validator component
      Specified by:
      getValidator in interface com.skava.core.EcommService<CartDataRequest,com.skava.core.ResponseModel>
      Overrides:
      getValidator in class CartServiceImpl
    • process

      @SendEvent(eventType="cartservices/cart/delete", identifier="request_cart.id") @HystrixCommand(commandKey="item-key", fallbackMethod="methodFallback", commandProperties=@HystrixProperty(name="execution.isolation.strategy",value="SEMAPHORE"), ignoreExceptions=com.skava.core.validation.ValidateException.class) public com.skava.core.ResponseModel process(CartDataRequest request)
      This method is used to delete Cart based on given Cart.
      Specified by:
      process in interface com.skava.core.EcommService<CartDataRequest,com.skava.core.ResponseModel>
      Parameters:
      request - It contains the attributes required for the delete of Cart.
      Returns:
      the instance of CartResponse object.
      Throws:
      com.skava.core.ECommerceException - It will throw E-commerce exception if it process get failed.
    • methodFallback

      public CartResponse methodFallback(CartDataRequest request)
      Fall back process if there is any exception in the execution of the process.
      Parameters:
      request - The request for the process
      Returns:
      The response from the fall back process.