From 7a2be44d7e4c16c8cdbd16203887dd3196a5be3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivica=20=C4=8Cardi=C4=87?= Date: Sat, 10 Aug 2024 20:11:18 +0200 Subject: [PATCH] 520 - SF --- .../facade/RemoteIntegrationFacadeClient.java | 10 +++---- .../facade/IntegrationFacade.java | 4 +-- .../facade/IntegrationFacadeImpl.java | 26 +++++++++---------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/server/ee/libs/embedded/embedded-configuration/embedded-configuration-remote-client/src/main/java/com/bytechef/ee/embedded/configuration/remote/client/facade/RemoteIntegrationFacadeClient.java b/server/ee/libs/embedded/embedded-configuration/embedded-configuration-remote-client/src/main/java/com/bytechef/ee/embedded/configuration/remote/client/facade/RemoteIntegrationFacadeClient.java index 985c5556f5..52c222f5ff 100644 --- a/server/ee/libs/embedded/embedded-configuration/embedded-configuration-remote-client/src/main/java/com/bytechef/ee/embedded/configuration/remote/client/facade/RemoteIntegrationFacadeClient.java +++ b/server/ee/libs/embedded/embedded-configuration/embedded-configuration-remote-client/src/main/java/com/bytechef/ee/embedded/configuration/remote/client/facade/RemoteIntegrationFacadeClient.java @@ -46,6 +46,11 @@ public void deleteWorkflow(@NonNull String workflowId) { throw new UnsupportedOperationException(); } + @Override + public List getEnabledIntegrationInstanceConfigurationIntegrations(Environment environment) { + throw new UnsupportedOperationException(); + } + @Override public IntegrationDTO getIntegration(long id) { throw new UnsupportedOperationException(); @@ -86,11 +91,6 @@ public List getIntegrationWorkflows(long id) { return List.of(); } - @Override - public List getIntegrations(Environment environment) { - throw new UnsupportedOperationException(); - } - @Override public List getIntegrations( Long categoryId, boolean integrationInstanceConfigurations, Long tagId, Status status) { diff --git a/server/libs/embedded/embedded-configuration/embedded-configuration-api/src/main/java/com/bytechef/embedded/configuration/facade/IntegrationFacade.java b/server/libs/embedded/embedded-configuration/embedded-configuration-api/src/main/java/com/bytechef/embedded/configuration/facade/IntegrationFacade.java index 0dcf5d46bd..2129a374e9 100644 --- a/server/libs/embedded/embedded-configuration/embedded-configuration-api/src/main/java/com/bytechef/embedded/configuration/facade/IntegrationFacade.java +++ b/server/libs/embedded/embedded-configuration/embedded-configuration-api/src/main/java/com/bytechef/embedded/configuration/facade/IntegrationFacade.java @@ -46,6 +46,8 @@ public interface IntegrationFacade { List getIntegrationTags(); + List getIntegrationVersionWorkflows(long id, int integrationVersion); + WorkflowDTO getIntegrationWorkflow(String workflowId); WorkflowDTO getIntegrationWorkflow(long integrationWorkflowId); @@ -54,8 +56,6 @@ public interface IntegrationFacade { List getIntegrationWorkflows(long id); - List getIntegrationVersionWorkflows(long id, int integrationVersion); - List getIntegrations( Long categoryId, boolean integrationInstanceConfigurations, Long tagId, Status status); diff --git a/server/libs/embedded/embedded-configuration/embedded-configuration-service/src/main/java/com/bytechef/embedded/configuration/facade/IntegrationFacadeImpl.java b/server/libs/embedded/embedded-configuration/embedded-configuration-service/src/main/java/com/bytechef/embedded/configuration/facade/IntegrationFacadeImpl.java index cd29331f8c..e557293cff 100644 --- a/server/libs/embedded/embedded-configuration/embedded-configuration-service/src/main/java/com/bytechef/embedded/configuration/facade/IntegrationFacadeImpl.java +++ b/server/libs/embedded/embedded-configuration/embedded-configuration-service/src/main/java/com/bytechef/embedded/configuration/facade/IntegrationFacadeImpl.java @@ -288,6 +288,17 @@ public List getIntegrationTags() { return tagService.getTags(tagIds); } + @Override + public List getIntegrationVersionWorkflows(long id, int integrationVersion) { + List integrationWorkflows = integrationWorkflowService.getIntegrationWorkflows( + id, integrationVersion); + + return CollectionUtils.map( + integrationWorkflows, + integrationWorkflow -> new WorkflowDTO( + workflowFacade.getWorkflow(integrationWorkflow.getWorkflowId()), integrationWorkflow)); + } + @Override public WorkflowDTO getIntegrationWorkflow(String workflowId) { IntegrationWorkflow integrationWorkflow = integrationWorkflowService.getWorkflowIntegrationWorkflow(workflowId); @@ -334,17 +345,6 @@ public List getIntegrationWorkflows(long id) { return workflowDTOs; } - @Override - public List getIntegrationVersionWorkflows(long id, int integrationVersion) { - List integrationWorkflows = integrationWorkflowService.getIntegrationWorkflows( - id, integrationVersion); - - return CollectionUtils.map( - integrationWorkflows, - integrationWorkflow -> new WorkflowDTO( - workflowFacade.getWorkflow(integrationWorkflow.getWorkflowId()), integrationWorkflow)); - } - @Override @Transactional(readOnly = true) public List getIntegrations( @@ -455,8 +455,8 @@ private Category getCategory(Integration integration) { } private List getIntegrationWorkflowIds(Integration integration) { - return integrationWorkflowService.getIntegrationWorkflowIds(integration.getId(), - integration.getLastIntegrationVersion()); + return integrationWorkflowService.getIntegrationWorkflowIds( + integration.getId(), integration.getLastIntegrationVersion()); } private IntegrationDTO toIntegrationDTO(Integration integration) {