Commit 89a91020ff66d55b8ccf395065a217b5e0c076e3

Authored by Andrii Shvaika
2 parents 5113f90a 317ead6a

Merge branch 'YevhenBondarenko-feature/rest-client'

... ... @@ -1317,8 +1317,8 @@ public class RestClient implements ClientHttpRequestInterceptor, Closeable {
1317 1317 return restTemplate.postForEntity(baseURL + "/api/entityView", entityView, EntityView.class).getBody();
1318 1318 }
1319 1319
1320   - public void deleteEntityView(String entityViewId) {
1321   - restTemplate.delete(baseURL + "/api/entityView/{entityViewId}", entityViewId);
  1320 + public void deleteEntityView(EntityViewId entityViewId) {
  1321 + restTemplate.delete(baseURL + "/api/entityView/{entityViewId}", entityViewId.getId());
1322 1322 }
1323 1323
1324 1324 public Optional<EntityView> getTenantEntityView(String entityViewName) {
... ... @@ -1445,14 +1445,14 @@ public class RestClient implements ClientHttpRequestInterceptor, Closeable {
1445 1445 restTemplate.postForLocation(baseURL + "/api/plugins/rpc/oneway/{deviceId}", requestBody, deviceId.getId());
1446 1446 }
1447 1447
1448   - public JsonNode handleTwoWayDeviceRPCRequest(String deviceId, JsonNode requestBody) {
  1448 + public JsonNode handleTwoWayDeviceRPCRequest(DeviceId deviceId, JsonNode requestBody) {
1449 1449 return restTemplate.exchange(
1450 1450 baseURL + "/api/plugins/rpc/twoway/{deviceId}",
1451 1451 HttpMethod.POST,
1452 1452 new HttpEntity<>(requestBody),
1453 1453 new ParameterizedTypeReference<JsonNode>() {
1454 1454 },
1455   - deviceId).getBody();
  1455 + deviceId.getId()).getBody();
1456 1456 }
1457 1457
1458 1458 public Optional<RuleChain> getRuleChainById(RuleChainId ruleChainId) {
... ... @@ -1917,7 +1917,7 @@ public class RestClient implements ClientHttpRequestInterceptor, Closeable {
1917 1917 }).getBody();
1918 1918 }
1919 1919
1920   - public Optional<WidgetType> getWidgetTypeById(WidgetsBundleId widgetTypeId) {
  1920 + public Optional<WidgetType> getWidgetTypeById(WidgetTypeId widgetTypeId) {
1921 1921 try {
1922 1922 ResponseEntity<WidgetType> widgetType =
1923 1923 restTemplate.getForEntity(baseURL + "/api/widgetType/{widgetTypeId}", WidgetType.class, widgetTypeId.getId());
... ...