Skip to content

Commit

Permalink
520 - SF
Browse files Browse the repository at this point in the history
  • Loading branch information
ivicac committed Aug 20, 2024
1 parent 4f7eff3 commit 7a2be44
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ public void deleteWorkflow(@NonNull String workflowId) {
throw new UnsupportedOperationException();
}

@Override
public List<IntegrationDTO> getEnabledIntegrationInstanceConfigurationIntegrations(Environment environment) {
throw new UnsupportedOperationException();
}

@Override
public IntegrationDTO getIntegration(long id) {
throw new UnsupportedOperationException();
Expand Down Expand Up @@ -86,11 +91,6 @@ public List<WorkflowDTO> getIntegrationWorkflows(long id) {
return List.of();
}

@Override
public List<IntegrationDTO> getIntegrations(Environment environment) {
throw new UnsupportedOperationException();
}

@Override
public List<IntegrationDTO> getIntegrations(
Long categoryId, boolean integrationInstanceConfigurations, Long tagId, Status status) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ public interface IntegrationFacade {

List<Tag> getIntegrationTags();

List<WorkflowDTO> getIntegrationVersionWorkflows(long id, int integrationVersion);

WorkflowDTO getIntegrationWorkflow(String workflowId);

WorkflowDTO getIntegrationWorkflow(long integrationWorkflowId);
Expand All @@ -54,8 +56,6 @@ public interface IntegrationFacade {

List<WorkflowDTO> getIntegrationWorkflows(long id);

List<WorkflowDTO> getIntegrationVersionWorkflows(long id, int integrationVersion);

List<IntegrationDTO> getIntegrations(
Long categoryId, boolean integrationInstanceConfigurations, Long tagId, Status status);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,17 @@ public List<Tag> getIntegrationTags() {
return tagService.getTags(tagIds);
}

@Override
public List<WorkflowDTO> getIntegrationVersionWorkflows(long id, int integrationVersion) {
List<IntegrationWorkflow> 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);
Expand Down Expand Up @@ -334,17 +345,6 @@ public List<WorkflowDTO> getIntegrationWorkflows(long id) {
return workflowDTOs;
}

@Override
public List<WorkflowDTO> getIntegrationVersionWorkflows(long id, int integrationVersion) {
List<IntegrationWorkflow> integrationWorkflows = integrationWorkflowService.getIntegrationWorkflows(
id, integrationVersion);

return CollectionUtils.map(
integrationWorkflows,
integrationWorkflow -> new WorkflowDTO(
workflowFacade.getWorkflow(integrationWorkflow.getWorkflowId()), integrationWorkflow));
}

@Override
@Transactional(readOnly = true)
public List<IntegrationDTO> getIntegrations(
Expand Down Expand Up @@ -455,8 +455,8 @@ private Category getCategory(Integration integration) {
}

private List<Long> getIntegrationWorkflowIds(Integration integration) {
return integrationWorkflowService.getIntegrationWorkflowIds(integration.getId(),
integration.getLastIntegrationVersion());
return integrationWorkflowService.getIntegrationWorkflowIds(
integration.getId(), integration.getLastIntegrationVersion());
}

private IntegrationDTO toIntegrationDTO(Integration integration) {
Expand Down

0 comments on commit 7a2be44

Please sign in to comment.