Class OutboundSyncTestUtil

java.lang.Object
de.hybris.platform.outboundsync.util.OutboundSyncTestUtil

public class OutboundSyncTestUtil extends Object
  • Constructor Details

    • OutboundSyncTestUtil

      public OutboundSyncTestUtil()
  • Method Details

    • outboundChannelConfigurationExists

      public static OutboundChannelConfigurationModel outboundChannelConfigurationExists(String channelCode, String integrationObjectCode) throws ImpExException
      Throws:
      ImpExException
    • cleanup

      public static void cleanup()
    • outboundSyncRetryExists

      public static void outboundSyncRetryExists(Long itemPk, String channelConfigurationCode) throws ImpExException
      Throws:
      ImpExException
    • getChannelConfigurationByAttributes

      public static OutboundChannelConfigurationModel getChannelConfigurationByAttributes(String code, IntegrationObjectModel integrationObject)
    • outboundCronJob

      public static CronJobModel outboundCronJob()
      Retrieves the outbound sync job configured in the persistence storage.
      Returns:
      the job model, if there is only one job configured in the storage; null, if there are no outbound sync jobs in the persistent storage.
      Throws:
      IllegalStateException - when there is more than one job exists in the persistent storage. This method is not suitable for such cases and the ambiguity needs to be resolved by the test.
    • createOutboundSyncJob

      public static OutboundSyncCronJobModel createOutboundSyncJob(String id) throws ImpExException
      Creates an outbound sync cron job model with the corresponding job model and the stream container model
      Parameters:
      id - ID for the jobs to create. The ID will be appended by "Job" for the job model creation, by "CronJob" for the cron job model and by "Streams" for the stream container model creation.
      Returns:
      the created cron job model, which has reference to the corresponding job model that was also created.
      Throws:
      ImpExException
    • createCronJob

      public static CronJobModel createCronJob(String id, String performableBean) throws ImpExException
      Creates a cron job model with the corresponding job model.
      Parameters:
      id - ID for the jobs to create. The ID will be appended by "Job" for the job model creation and by "CronJob" for the cron job model.
      performableBean - name or ID of the spring bean implementing the job logic
      Returns:
      the created cron job model, which has reference to the corresponding job model that was also created.
      Throws:
      ImpExException
    • updateCronJobResult

      public static void updateCronJobResult(CronJobModel model, CronJobResult result, CronJobStatus status) throws ImpExException
      Updates result of performing a job.
      Parameters:
      model - a model of the job to be updated.
      result - result to update the job with
      status - status to update the job with
      Throws:
      ImpExException