From 6f17dd1503ba2c221e5eab424f55c4897a6ae8c0 Mon Sep 17 00:00:00 2001 From: dashevchenko Date: Mon, 8 Dec 2025 11:10:41 +0200 Subject: [PATCH] RestClient: renamed methods --- .../server/msa/connectivity/JavaRestClientTest.java | 6 +++--- .../main/java/org/thingsboard/rest/client/RestClient.java | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/msa/black-box-tests/src/test/java/org/thingsboard/server/msa/connectivity/JavaRestClientTest.java b/msa/black-box-tests/src/test/java/org/thingsboard/server/msa/connectivity/JavaRestClientTest.java index d439bdcf48..fb41cdf77f 100644 --- a/msa/black-box-tests/src/test/java/org/thingsboard/server/msa/connectivity/JavaRestClientTest.java +++ b/msa/black-box-tests/src/test/java/org/thingsboard/server/msa/connectivity/JavaRestClientTest.java @@ -358,7 +358,7 @@ public class JavaRestClientTest extends AbstractContainerTest { PlatformUsersNotificationTargetConfig targetConfig = new PlatformUsersNotificationTargetConfig(); targetConfig.setUsersFilter(filter); notificationTarget.setConfiguration(targetConfig); - return restClient.createNotificationTarget(notificationTarget); + return restClient.saveNotificationTarget(notificationTarget); } private NotificationTemplate createNotificationTemplate(NotificationType notificationType, String subject, @@ -397,7 +397,7 @@ public class JavaRestClientTest extends AbstractContainerTest { config.getDeliveryMethodsTemplates().put(deliveryMethod, deliveryMethodNotificationTemplate); } notificationTemplate.setConfiguration(config); - return restClient.createNotificationTemplate(notificationTemplate); + return restClient.saveNotificationTemplate(notificationTemplate); } private NotificationRequest submitNotificationRequest(NotificationTargetId targetId, NotificationTemplateId notificationTemplateId) { @@ -408,6 +408,6 @@ public class JavaRestClientTest extends AbstractContainerTest { .templateId(notificationTemplateId) .additionalConfig(config) .build(); - return restClient.createNotificationRequest(notificationRequest); + return restClient.saveNotificationRequest(notificationRequest); } } diff --git a/rest-client/src/main/java/org/thingsboard/rest/client/RestClient.java b/rest-client/src/main/java/org/thingsboard/rest/client/RestClient.java index 64fd891f2c..c82a80e7cc 100644 --- a/rest-client/src/main/java/org/thingsboard/rest/client/RestClient.java +++ b/rest-client/src/main/java/org/thingsboard/rest/client/RestClient.java @@ -4360,7 +4360,7 @@ public class RestClient implements Closeable { restTemplate.delete(baseURL + "/api/notification/{id}", notificationId.getId()); } - public NotificationRequest createNotificationRequest(NotificationRequest notificationRequest) { + public NotificationRequest saveNotificationRequest(NotificationRequest notificationRequest) { return restTemplate.postForEntity(baseURL + "/api/notification/request", notificationRequest, NotificationRequest.class).getBody(); } @@ -4439,11 +4439,11 @@ public class RestClient implements Closeable { } } - public NotificationTarget createNotificationTarget(NotificationTarget notificationTarget) { + public NotificationTarget saveNotificationTarget(NotificationTarget notificationTarget) { return restTemplate.postForEntity(baseURL + "/api/notification/target", notificationTarget, NotificationTarget.class).getBody(); } - public NotificationTemplate createNotificationTemplate(NotificationTemplate notificationTemplate) { + public NotificationTemplate saveNotificationTemplate(NotificationTemplate notificationTemplate) { return restTemplate.postForEntity(baseURL + "/api/notification/template", notificationTemplate, NotificationTemplate.class).getBody(); }