diff options
Diffstat (limited to 'vid-app-common/src/main/java/org')
-rw-r--r-- | vid-app-common/src/main/java/org/onap/vid/services/AaiServiceImpl.java | 2 | ||||
-rw-r--r-- | vid-app-common/src/main/java/org/onap/vid/services/WorkflowServiceImpl.java | 13 |
2 files changed, 6 insertions, 9 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/services/AaiServiceImpl.java b/vid-app-common/src/main/java/org/onap/vid/services/AaiServiceImpl.java index 83757f2fb..142bf73ec 100644 --- a/vid-app-common/src/main/java/org/onap/vid/services/AaiServiceImpl.java +++ b/vid-app-common/src/main/java/org/onap/vid/services/AaiServiceImpl.java @@ -320,8 +320,6 @@ public class AaiServiceImpl implements AaiService { return aaiClient.getPNFData(globalCustomerId, serviceType, modelVersionId, modelInvariantId, cloudRegion, equipVendor, equipModel); } - - @Override public AaiResponse getServices(RoleValidator roleValidator) { AaiResponse<GetServicesAAIRespone> subscriberResponse = aaiClient.getServices(); diff --git a/vid-app-common/src/main/java/org/onap/vid/services/WorkflowServiceImpl.java b/vid-app-common/src/main/java/org/onap/vid/services/WorkflowServiceImpl.java index 097b05e58..cbc79e86f 100644 --- a/vid-app-common/src/main/java/org/onap/vid/services/WorkflowServiceImpl.java +++ b/vid-app-common/src/main/java/org/onap/vid/services/WorkflowServiceImpl.java @@ -20,6 +20,7 @@ package org.onap.vid.services; +import java.util.List; import org.onap.vid.model.Workflow; import org.springframework.stereotype.Service; @@ -31,29 +32,27 @@ import java.util.stream.Collectors; @Service public class WorkflowServiceImpl implements WorkflowService { //TODO: Add the list of workflows hard coded or from DB. - private ArrayList<Workflow> workflows = new ArrayList<>(Arrays.asList( + private List<Workflow> workflows = Arrays.asList( new Workflow(0, "Upgrade", new ArrayList<>(Arrays.asList("VNF1", "VNF2", "VNF3", "VNF4"))), new Workflow(1, "Clean", new ArrayList<>(Arrays.asList("VNF1", "VNF2", "VNF3"))), new Workflow(2, "Reinstall", new ArrayList<>(Arrays.asList("VNF1", "VNF2", "VNF4"))), new Workflow(3, "Dump", new ArrayList<>(Arrays.asList("VNF1", "VNF3", "VNF4"))), new Workflow(4, "Flush", new ArrayList<>(Arrays.asList("VNF2", "VNF3", "VNF4"))) - )); + ); @Override public Collection<String> getWorkflowsForVNFs(Collection<String> vnfNames) { - Collection<String> result = workflows.stream() + return workflows.stream() .filter(workflow -> workflow.getVnfNames().containsAll(vnfNames)) - .map(workflow -> workflow.getWorkflowName()) + .map(Workflow::getWorkflowName) .distinct() .collect(Collectors.toList()); - - return result; } @Override public Collection<String> getAllWorkflows() { return workflows.stream() - .map(workflow -> workflow.getWorkflowName()) + .map(Workflow::getWorkflowName) .distinct() .collect(Collectors.toList()); } |