private BatchWindow getBatchWindowForDate(Date date, ProcessEngineConfigurationImpl configuration) { //get configuration for given day of week BatchWindowConfiguration batchWindowConfiguration = configuration.getHistoryCleanupBatchWindows().get(dayOfWeek(date)); if (batchWindowConfiguration == null && configuration.getHistoryCleanupBatchWindowStartTime() != null) { batchWindowConfiguration = new BatchWindowConfiguration(configuration.getHistoryCleanupBatchWindowStartTime(), configuration.getHistoryCleanupBatchWindowEndTime()); } if (batchWindowConfiguration == null) { return null; } Date startTime = updateTime(date, batchWindowConfiguration.getStartTimeAsDate()); Date endTime = updateTime(date, batchWindowConfiguration.getEndTimeAsDate()); if (!endTime.after(startTime)) { endTime = addDays(endTime, 1); } return new BatchWindow(startTime, endTime); }
private BatchWindow getBatchWindowForDate(Date date, ProcessEngineConfigurationImpl configuration) { //get configuration for given day of week BatchWindowConfiguration batchWindowConfiguration = configuration.getHistoryCleanupBatchWindows().get(dayOfWeek(date)); if (batchWindowConfiguration == null && configuration.getHistoryCleanupBatchWindowStartTime() != null) { batchWindowConfiguration = new BatchWindowConfiguration(configuration.getHistoryCleanupBatchWindowStartTime(), configuration.getHistoryCleanupBatchWindowEndTime()); } if (batchWindowConfiguration == null) { return null; } Date startTime = updateTime(date, batchWindowConfiguration.getStartTimeAsDate()); Date endTime = updateTime(date, batchWindowConfiguration.getEndTimeAsDate()); if (!endTime.after(startTime)) { endTime = addDays(endTime, 1); } return new BatchWindow(startTime, endTime); }
private BatchWindow getBatchWindowForDate(Date date, ProcessEngineConfigurationImpl configuration) { //get configuration for given day of week BatchWindowConfiguration batchWindowConfiguration = configuration.getHistoryCleanupBatchWindows().get(dayOfWeek(date)); if (batchWindowConfiguration == null && configuration.getHistoryCleanupBatchWindowStartTime() != null) { batchWindowConfiguration = new BatchWindowConfiguration(configuration.getHistoryCleanupBatchWindowStartTime(), configuration.getHistoryCleanupBatchWindowEndTime()); } if (batchWindowConfiguration == null) { return null; } Date startTime = updateTime(date, batchWindowConfiguration.getStartTimeAsDate()); Date endTime = updateTime(date, batchWindowConfiguration.getEndTimeAsDate()); if (!endTime.after(startTime)) { endTime = addDays(endTime, 1); } return new BatchWindow(startTime, endTime); }