Class UpdateCollectionServiceImpl

All Implemented Interfaces:
com.skava.core.EcommService<UpdateCollectionRequest,OmsServiceEntityResponse<CollectionDTO>>, UpdateCollectionService, CustomEcommService<UpdateCollectionRequest,OmsServiceEntityResponse<CollectionDTO>>

@Service public class UpdateCollectionServiceImpl extends CollectionHelperServices implements UpdateCollectionService
The class implements the UpdateCollectionService UpdateCollectionServiceImpl
Since:
07-Jul-2018
Author:
Infosys Equinox
  • Constructor Details

    • UpdateCollectionServiceImpl

      public UpdateCollectionServiceImpl()
  • Method Details

    • init

      @EventListener(org.springframework.boot.context.event.ApplicationReadyEvent.class) public void init()
      Initialize validators Load validator classes from configuration using microservices property By default load built-in validator
    • getValidator

      public List<com.skava.core.validation.ValidatorComponent> getValidator()
      Specified by:
      getValidator in interface com.skava.core.EcommService<UpdateCollectionRequest,OmsServiceEntityResponse<CollectionDTO>>
    • process

      @Audit @SendEvent(eventType="omsservices/collections/update", identifier="request_collectionId") @HystrixCommand(commandKey="oms-key", fallbackMethod="methodFallback", ignoreExceptions={com.skava.core.validation.ValidateException.class,OmsServiceException.class}) public OmsServiceEntityResponse<CollectionDTO> process(@Valid @AuditField(field="UpdateCollectionRequest") @Valid UpdateCollectionRequest request)
      This method is used to update all field in Collection based on given Collection.
      Specified by:
      process in interface com.skava.core.EcommService<UpdateCollectionRequest,OmsServiceEntityResponse<CollectionDTO>>
      Parameters:
      request - It contains the attributes required for the update all field in Collection.
      Returns:
      It returns the CollectionResponse. It will throw Ecommerce exception if it process get failed. Updating collection will be captured in Audit log. Debug logger has been added to this method.
    • methodFallback

      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 UpdateCollectionRequest
      Returns:
      Instance of OmsServiceEntityResponse