/** * Gets the noNotificationRouteStatusList attribute. * * @return Returns the noNotificationRouteStatusList. */ protected List<String> getNoNotificationRouteStatusList() { if (ObjectUtils.isNull(noNotificationRouteStatusList)) { noNotificationRouteStatusList = new ArrayList<String>(); noNotificationRouteStatusList.add(DocumentStatus.PROCESSED.getCode()); noNotificationRouteStatusList.add(DocumentStatus.INITIATED.getCode()); noNotificationRouteStatusList.add(DocumentStatus.SAVED.getCode()); } return noNotificationRouteStatusList; }
private NotificationPreference getEmailNotificationPreference( NotificationPreference preference, String newRouteStatus, boolean notifyOnFinal, boolean notifyOnStatusChange, String documentTypeCode) { if (notifyOnFinal && (DocumentStatus.FINAL.getCode().equals(newRouteStatus) || DocumentStatus.PROCESSED.getCode().equals(newRouteStatus))) { preference = TemConstants.TravelDocTypes.TRAVEL_AUTHORIZATION_DOCUMENT.equals(documentTypeCode) ? NotificationPreference.TA_ON_FINAL : NotificationPreference.TER_ON_FINAL; } else if (notifyOnStatusChange && !this.getNoNotificationRouteStatusList().contains(newRouteStatus)) { preference = TemConstants.TravelDocTypes.TRAVEL_AUTHORIZATION_DOCUMENT.equals(documentTypeCode) ? NotificationPreference.TA_ON_CHANGE : NotificationPreference.TER_ON_CHANGE; } return preference; }