Class OutboundSyncTestUtil
java.lang.Object
de.hybris.platform.outboundsync.util.OutboundSyncTestUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcleanup()static CronJobModelcreateCronJob(String id, String performableBean) Creates a cron job model with the corresponding job model.static OutboundSyncCronJobModelCreates an outbound sync cron job model with the corresponding job model and the stream container modelgetChannelConfigurationByAttributes(String code, IntegrationObjectModel integrationObject) outboundChannelConfigurationExists(String channelCode, String integrationObjectCode) static CronJobModelRetrieves the outbound sync job configured in the persistence storage.static voidoutboundSyncRetryExists(Long itemPk, String channelConfigurationCode) static voidupdateCronJobResult(CronJobModel model, CronJobResult result, CronJobStatus status) Updates result of performing a job.
-
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
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
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
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 withstatus- status to update the job with- Throws:
ImpExException
-