Class DefaultMerchSyncService

java.lang.Object
com.hybris.merchandising.service.impl.DefaultMerchSyncService
All Implemented Interfaces:
MerchSyncService

public class DefaultMerchSyncService extends Object implements MerchSyncService
Default implementation of MerchSyncService
  • Field Details

  • Constructor Details

    • DefaultMerchSyncService

      public DefaultMerchSyncService()
  • Method Details

    • createMerchSychronization

      public MerchSynchronizationModel createMerchSychronization(MerchProductDirectoryConfigModel config, String operationId, String type)
      Description copied from interface: MerchSyncService
      Creates merchandising synchronization model
      Specified by:
      createMerchSychronization in interface MerchSyncService
      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

      public MerchSynchronizationModel createMerchSychronization(MerchSnConfigModel config, String operationId, String type)
      Description copied from interface: MerchSyncService
      Creates merchandising synchronization model
      Specified by:
      createMerchSychronization in interface MerchSyncService
      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

      public Optional<MerchSynchronizationModel> getMerchSynchronization(String operationId)
      Description copied from interface: MerchSyncService
      Return merchandising synchronization with given operatio id
      Specified by:
      getMerchSynchronization in interface MerchSyncService
      Parameters:
      operationId - operation identifier
      Returns:
      optional of merchandisig synchronization
    • isMerchSyncFailed

      public boolean isMerchSyncFailed(String operationId)
      Description copied from interface: MerchSyncService
      Method check if merchandising synchronization already failed
      Specified by:
      isMerchSyncFailed in interface MerchSyncService
      Parameters:
      operationId - operatio identifier
      Returns:
      true if synchronization failed , false if synchronization not failed
    • completeMerchSyncProcess

      public void completeMerchSyncProcess(String operationId, Long numberOfProducts)
      Description copied from interface: MerchSyncService
      Method complete synchronization process (e.g set proper end date and status)
      Specified by:
      completeMerchSyncProcess in interface MerchSyncService
      Parameters:
      operationId - operation identifier
      numberOfProducts - Number of synchronized products
    • saveErrorInfo

      public void saveErrorInfo(String operationId, String errorMessage, Exception exception)
      Description copied from interface: MerchSyncService
      Save error information in synchronization process with given operation id
      Specified by:
      saveErrorInfo in interface MerchSyncService
      Parameters:
      operationId - operation identifier
      errorMessage - error message
      exception - exception
    • getErrorMessage

      protected String getErrorMessage(String errorMessage, Exception exception)
    • getStringValue

      protected String getStringValue(String value, int length)
    • getModelService

      protected ModelService getModelService()
    • setModelService

      public void setModelService(ModelService modelService)
    • getMerchSynchronizationDao

      protected MerchSynchronizationDao getMerchSynchronizationDao()
    • setMerchSynchronizationDao

      public void setMerchSynchronizationDao(MerchSynchronizationDao merchSynchronizationDao)
    • getTimeService

      protected TimeService getTimeService()
    • setTimeService

      public void setTimeService(TimeService timeService)