Class UpdateOrderServiceImpl

All Implemented Interfaces:
com.skava.core.EcommService<UpdateOrderRequest,OmsServiceEntityResponse<OrderDTO>>, CustomEcommService<UpdateOrderRequest,OmsServiceEntityResponse<OrderDTO>>, UpdateOrderService

@Service public class UpdateOrderServiceImpl extends OrderHelperServices implements UpdateOrderService
The class UpdateOrderServiceImpl used to handle Update Order operations.
Since:
30-Apr-2020 The class implements the class UpdateOrderService
Author:
Infosys Equinox
  • Constructor Details

    • UpdateOrderServiceImpl

      public UpdateOrderServiceImpl()
  • Method Details

    • init

      @EventListener(org.springframework.boot.context.event.ApplicationReadyEvent.class) public void init()
    • getValidator

      public List<com.skava.core.validation.ValidatorComponent> getValidator()
      validator component
      Specified by:
      getValidator in interface com.skava.core.EcommService<UpdateOrderRequest,OmsServiceEntityResponse<OrderDTO>>
    • process

      @HystrixCommand(commandKey="oms-key", fallbackMethod="methodFallback", ignoreExceptions={com.skava.core.validation.ValidateException.class,OmsServiceException.class}) @SendEvent(eventType="omsservices/orders/update", identifier="request_orderId") public OmsServiceEntityResponse<OrderDTO> process(@AuditField(field="CreateOrderRequest") UpdateOrderRequest orderrequest)
      (non-Javadoc) This method will create order for the User based on the given inputs.
      Specified by:
      process in interface com.skava.core.EcommService<UpdateOrderRequest,OmsServiceEntityResponse<OrderDTO>>
      See Also:
      • Checks the collection status and validation Debug logger has been added to this method.
    • getLockObj

      public org.redisson.api.RLock getLockObj(String orderId)
      (non-Javadoc) This method will lock order for the User based on the given inputs. Checks the collection status and validation Debug logger has been added to this method.
    • methodFallback

      public OmsServiceEntityResponse<OrderDTO> methodFallback(CreateOrderRequest request)
      Circuit breaker fall-back method monitors for failures and once failures reach certain threshold, the circuit breaker trips and returns error response accordingly.
      Parameters:
      request - Instance of CreateOrderRequest
      Returns:
      Instance of OmsServiceEntityResponse