Class UpdateCollectionPropertiesServiceImpl
java.lang.Object
com.skava.oms.service.EcommCoreServices
com.skava.oms.service.collection.CollectionHelperServices
com.skava.oms.service.collection.properties.impl.UpdateCollectionPropertiesServiceImpl
- All Implemented Interfaces:
com.skava.core.EcommService<UpdateCollectionPropertiesRequest,
,OmsServiceEntityResponse<Collection<CollectionPropertiesDTO>>> UpdateCollectionPropertiesService
,CustomEcommService<UpdateCollectionPropertiesRequest,
OmsServiceEntityResponse<Collection<CollectionPropertiesDTO>>>
@Service
public class UpdateCollectionPropertiesServiceImpl
extends CollectionHelperServices
implements UpdateCollectionPropertiesService
This class implements the UpdateCollectionPropertiesService interface
to handle create collection property operations
- Author:
- Infosys Equinox
-
Field Summary
Fields inherited from class com.skava.oms.service.collection.CollectionHelperServices
authHelper, bpmService, collectionAssembler, collectionAttributeAssembler, collectionAttributeRepository, collectionPropertiesAssembler, collectionRepository
Fields inherited from class com.skava.oms.service.EcommCoreServices
context, messageSource, orderService, redissonClient, validator
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList<com.skava.core.validation.ValidatorComponent>
void
init()
The method is initially called to set the validators The validators needed for the patch order will be presentCircuit breaker fall-back method monitors for failures and once failures reach certain threshold, the circuit breaker trips and returns error response accordingly.process
(UpdateCollectionPropertiesRequest request) This method is used to update CollectionProperty based on given CollectionProperty name.Methods inherited from class com.skava.oms.service.collection.CollectionHelperServices
checkForDuplicateName
Methods inherited from class com.skava.oms.service.EcommCoreServices
createOrderNotes, getItemIds, getItemIdsStr, updateOrderNotification
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.skava.oms.service.CustomEcommService
getValidateException
Methods inherited from interface com.skava.core.EcommService
getValidator
-
Constructor Details
-
UpdateCollectionPropertiesServiceImpl
public UpdateCollectionPropertiesServiceImpl()
-
-
Method Details
-
init
@EventListener(org.springframework.boot.context.event.ApplicationReadyEvent.class) public void init()The method is initially called to set the validators The validators needed for the patch order will be present -
getValidator
- Specified by:
getValidator
in interfacecom.skava.core.EcommService<UpdateCollectionPropertiesRequest,
OmsServiceEntityResponse<Collection<CollectionPropertiesDTO>>>
-
process
@Audit @SendEvent(eventType="omsservices/collectionproperties/update", identifier="request_collectionId") @HystrixCommand(commandKey="oms-key", fallbackMethod="methodFallback", ignoreExceptions=OmsServiceException.class) public OmsServiceEntityResponse<Collection<CollectionPropertiesDTO>> process(@AuditField(field="UpdateCollectionPropertyRequest") UpdateCollectionPropertiesRequest request) This method is used to update CollectionProperty based on given CollectionProperty name. It throws error if the given collection id is not valid It throws error if the given property name already exist It will return collection property which is updated for the given collection- Specified by:
process
in interfacecom.skava.core.EcommService<UpdateCollectionPropertiesRequest,
OmsServiceEntityResponse<Collection<CollectionPropertiesDTO>>> - Parameters:
request
- It contains the attributes required for the creation of CollectionProperty.- Returns:
- It returns the
CollectionPropertyResponse
. It will throw Ecommerce exception if it process get failed. Updating collection properties will be captured in Audit log. Debug logger has been added to this method.
-
methodFallback
public OmsServiceEntityResponse<Collection<CollectionPropertiesDTO>> methodFallback(UpdateCollectionPropertiesRequest 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 ofUpdateCollectionPropertiesRequest
- Returns:
- Instance of
OmsServiceEntityResponse
-