Interface MerchSyncService

All Known Implementing Classes:
DefaultMerchSyncService

public interface MerchSyncService
Service that provides functionality for managing merchandising synchronization.
  • Method Details

    • createMerchSychronization

      MerchSynchronizationModel createMerchSychronization(MerchProductDirectoryConfigModel config, String operationId, String type)
      Creates merchandising synchronization model
      Parameters:
      config - merchandising configuration for which synchronization is running
      operationId - operation identifier
      type - type of synchronization (e.g FULL, UPDATE)
      Returns:
      created synchronization model
    • createMerchSychronization

      default MerchSynchronizationModel createMerchSychronization(MerchSnConfigModel config, String operationId, String type)
      Creates merchandising synchronization model
      Parameters:
      config - merchandising configuration for which synchronization is running
      operationId - operation identifier
      type - type of synchronization (e.g FULL, UPDATE)
      Returns:
      created synchronization model
    • getMerchSynchronization

      Optional<MerchSynchronizationModel> getMerchSynchronization(String operationId)
      Return merchandising synchronization with given operatio id
      Parameters:
      operationId - operation identifier
      Returns:
      optional of merchandisig synchronization
    • isMerchSyncFailed

      boolean isMerchSyncFailed(String operationId)
      Method check if merchandising synchronization already failed
      Parameters:
      operationId - operatio identifier
      Returns:
      true if synchronization failed , false if synchronization not failed
    • completeMerchSyncProcess

      void completeMerchSyncProcess(String operationId, Long numberOfProducts)
      Method complete synchronization process (e.g set proper end date and status)
      Parameters:
      operationId - operation identifier
      numberOfProducts - Number of synchronized products
    • saveErrorInfo

      void saveErrorInfo(String operationId, String errorMessage, Exception exception)
      Save error information in synchronization process with given operation id
      Parameters:
      operationId - operation identifier
      errorMessage - error message
      exception - exception