diff options
Diffstat (limited to 'mso-catalog-db/src/main')
-rw-r--r-- | mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java | 8 | ||||
-rw-r--r-- | mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/WorkflowRepository.java | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java index 19200468ae..ab5fdb939c 100644 --- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/client/CatalogDbClient.java @@ -145,6 +145,7 @@ public class CatalogDbClient { private static final String CLOUD_VERSION = "cloudVersion"; private static final String HOMING_INSTANCE = "/homingInstance"; private static final String ARTIFACT_UUID = "artifactUUID"; + private static final String SOURCE = "source"; private static final String TARGET_ENTITY = "SO:CatalogDB"; private static final String ASTERISK = "*"; @@ -191,6 +192,7 @@ public class CatalogDbClient { private String findPnfResourceCustomizationByModelUuid = "/findPnfResourceCustomizationByModelUuid"; private String findWorkflowByArtifactUUID = "/findByArtifactUUID"; private String findWorkflowByModelUUID = "/findWorkflowByModelUUID"; + private String findWorkflowBySource = "/findBySource"; private String findVnfResourceCustomizationByModelUuid = "/findVnfResourceCustomizationByModelUuid"; private String serviceURI; @@ -333,6 +335,7 @@ public class CatalogDbClient { findWorkflowByArtifactUUID = endpoint + WORKFLOW + SEARCH + findWorkflowByArtifactUUID; findWorkflowByModelUUID = endpoint + WORKFLOW + SEARCH + findWorkflowByModelUUID; + findWorkflowBySource = endpoint + WORKFLOW + SEARCH + findWorkflowBySource; findVnfResourceCustomizationByModelUuid = endpoint + VNF_RESOURCE_CUSTOMIZATION + SEARCH + findVnfResourceCustomizationByModelUuid; @@ -889,4 +892,9 @@ public class CatalogDbClient { return this.getMultipleResources(workflowClient, getUri(UriBuilder.fromUri(findWorkflowByModelUUID) .queryParam(VNF_RESOURCE_MODEL_UUID, vnfResourceModelUUID).build().toString())); } + + public List<Workflow> findWorkflowBySource(String source) { + return this.getMultipleResources(workflowClient, + getUri(UriBuilder.fromUri(findWorkflowBySource).queryParam(SOURCE, source).build().toString())); + } } diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/WorkflowRepository.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/WorkflowRepository.java index 89df52182c..8bcc60c8be 100644 --- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/WorkflowRepository.java +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/data/repository/WorkflowRepository.java @@ -31,6 +31,8 @@ public interface WorkflowRepository extends JpaRepository<Workflow, Integer> { Workflow findByArtifactUUID(String artifactUUID); + List<Workflow> findBySource(String source); + /** * Used to fetch the @{link Workflow} by the Model UUID. * |