@Override public String getIdentifyingInformation(NotificationEventParamsDto notificationEventParams, BusinessObjectDataHelper businessObjectDataHelper) { if (notificationEventParams instanceof StorageUnitNotificationEventParamsDto) { StorageUnitNotificationEventParamsDto storageUnitNotificationEventParams = (StorageUnitNotificationEventParamsDto) notificationEventParams; return String.format("namespace: \"%s\", actionId: \"%s\" with " + businessObjectDataHelper.businessObjectDataKeyToString( businessObjectDataHelper.getBusinessObjectDataKey(storageUnitNotificationEventParams.getBusinessObjectData())) + ", storageName: \"%s\"", storageUnitNotificationEventParams.getStorageUnitNotificationRegistration().getNamespace().getCode(), storageUnitNotificationEventParams.getNotificationJobAction().getId(), storageUnitNotificationEventParams.getStorageName()); } else { throw new IllegalStateException( "Notification event parameters DTO passed to the method must be an instance of StorageUnitNotificationEventParamsDto."); } }
@Override public String getIdentifyingInformation(NotificationEventParamsDto notificationEventParams, BusinessObjectDataHelper businessObjectDataHelper) { if (notificationEventParams instanceof BusinessObjectDataNotificationEventParamsDto) { BusinessObjectDataNotificationEventParamsDto businessObjectDataNotificationEventParams = (BusinessObjectDataNotificationEventParamsDto) notificationEventParams; return String.format("namespace: \"%s\", actionId: \"%s\" with " + businessObjectDataHelper.businessObjectDataKeyToString( businessObjectDataHelper.getBusinessObjectDataKey(businessObjectDataNotificationEventParams.getBusinessObjectData())) + ", storageName: \"%s\"", businessObjectDataNotificationEventParams.getBusinessObjectDataNotificationRegistration().getNamespace().getCode(), businessObjectDataNotificationEventParams.getNotificationJobAction().getId(), businessObjectDataNotificationEventParams.getStorageName()); } else { throw new IllegalStateException( "Notification event parameters DTO passed to the method must be an instance of BusinessObjectDataNotificationEventParamsDto."); } }
@Override public String getIdentifyingInformation(NotificationEventParamsDto notificationEventParams, BusinessObjectDataHelper businessObjectDataHelper) { if (notificationEventParams instanceof StorageUnitNotificationEventParamsDto) { StorageUnitNotificationEventParamsDto storageUnitNotificationEventParams = (StorageUnitNotificationEventParamsDto) notificationEventParams; return String.format("namespace: \"%s\", actionId: \"%s\" with " + businessObjectDataHelper.businessObjectDataKeyToString( businessObjectDataHelper.getBusinessObjectDataKey(storageUnitNotificationEventParams.getBusinessObjectData())) + ", storageName: \"%s\"", storageUnitNotificationEventParams.getStorageUnitNotificationRegistration().getNamespace().getCode(), storageUnitNotificationEventParams.getNotificationJobAction().getId(), storageUnitNotificationEventParams.getStorageName()); } else { throw new IllegalStateException( "Notification event parameters DTO passed to the method must be an instance of StorageUnitNotificationEventParamsDto."); } }
@Override public String getIdentifyingInformation(NotificationEventParamsDto notificationEventParams, BusinessObjectDataHelper businessObjectDataHelper) { if (notificationEventParams instanceof BusinessObjectDataNotificationEventParamsDto) { BusinessObjectDataNotificationEventParamsDto businessObjectDataNotificationEventParams = (BusinessObjectDataNotificationEventParamsDto) notificationEventParams; return String.format("namespace: \"%s\", actionId: \"%s\" with " + businessObjectDataHelper.businessObjectDataKeyToString( businessObjectDataHelper.getBusinessObjectDataKey(businessObjectDataNotificationEventParams.getBusinessObjectData())) + ", storageName: \"%s\"", businessObjectDataNotificationEventParams.getBusinessObjectDataNotificationRegistration().getNamespace().getCode(), businessObjectDataNotificationEventParams.getNotificationJobAction().getId(), businessObjectDataNotificationEventParams.getStorageName()); } else { throw new IllegalStateException( "Notification event parameters DTO passed to the method must be an instance of BusinessObjectDataNotificationEventParamsDto."); } }
String.format("namespace: \"%s\", actionId: \"%s\" with " + businessObjectDataHelper.businessObjectDataKeyToString(businessObjectDataKey) + ", storageName: \"%s\"", businessObjectDataNotificationRegistrationEntity.getNamespace().getCode(), ((NotificationJobActionEntity) businessObjectDataNotificationRegistrationEntity.getNotificationActions().toArray()[0]).getId(), STORAGE_NAME); assertEquals(expectedValue, notificationActionService.getIdentifyingInformation(businessObjectDataNotificationEventParams, businessObjectDataHelper));
String.format("namespace: \"%s\", actionId: \"%s\" with " + businessObjectDataHelper.businessObjectDataKeyToString(businessObjectDataKey) + ", storageName: \"%s\"", storageUnitNotificationRegistrationEntity.getNamespace().getCode(), ((NotificationJobActionEntity) storageUnitNotificationRegistrationEntity.getNotificationActions().toArray()[0]).getId(), STORAGE_NAME); assertEquals(expectedValue, notificationActionService.getIdentifyingInformation(storageUnitNotificationEventParamsDto, businessObjectDataHelper));