Browse Source

RestClient: renamed methods

pull/14470/head
dashevchenko 10 months ago
parent
commit
6f17dd1503
  1. 6
      msa/black-box-tests/src/test/java/org/thingsboard/server/msa/connectivity/JavaRestClientTest.java
  2. 6
      rest-client/src/main/java/org/thingsboard/rest/client/RestClient.java

6
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(); PlatformUsersNotificationTargetConfig targetConfig = new PlatformUsersNotificationTargetConfig();
targetConfig.setUsersFilter(filter); targetConfig.setUsersFilter(filter);
notificationTarget.setConfiguration(targetConfig); notificationTarget.setConfiguration(targetConfig);
return restClient.createNotificationTarget(notificationTarget); return restClient.saveNotificationTarget(notificationTarget);
} }
private NotificationTemplate createNotificationTemplate(NotificationType notificationType, String subject, private NotificationTemplate createNotificationTemplate(NotificationType notificationType, String subject,
@ -397,7 +397,7 @@ public class JavaRestClientTest extends AbstractContainerTest {
config.getDeliveryMethodsTemplates().put(deliveryMethod, deliveryMethodNotificationTemplate); config.getDeliveryMethodsTemplates().put(deliveryMethod, deliveryMethodNotificationTemplate);
} }
notificationTemplate.setConfiguration(config); notificationTemplate.setConfiguration(config);
return restClient.createNotificationTemplate(notificationTemplate); return restClient.saveNotificationTemplate(notificationTemplate);
} }
private NotificationRequest submitNotificationRequest(NotificationTargetId targetId, NotificationTemplateId notificationTemplateId) { private NotificationRequest submitNotificationRequest(NotificationTargetId targetId, NotificationTemplateId notificationTemplateId) {
@ -408,6 +408,6 @@ public class JavaRestClientTest extends AbstractContainerTest {
.templateId(notificationTemplateId) .templateId(notificationTemplateId)
.additionalConfig(config) .additionalConfig(config)
.build(); .build();
return restClient.createNotificationRequest(notificationRequest); return restClient.saveNotificationRequest(notificationRequest);
} }
} }

6
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()); 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(); 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(); 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(); return restTemplate.postForEntity(baseURL + "/api/notification/template", notificationTemplate, NotificationTemplate.class).getBody();
} }

Loading…
Cancel
Save