summaryrefslogtreecommitdiffstats
path: root/cps-rest/src/main/java
diff options
context:
space:
mode:
authorClaudio David Gasparini <claudio.gasparini@pantheon.tech>2021-01-07 12:21:38 +0100
committerClaudio David Gasparini <claudio.gasparini@pantheon.tech>2021-01-11 10:01:27 +0100
commitfa56d71bb94d88f657a9d73fb91c3036220f32ab (patch)
tree163bd68ae4a77cdc4412a5354958090e7063f257 /cps-rest/src/main/java
parent45b0d293c2d625c6d352d71a743f832c5e287c4e (diff)
Rework CpsModulePersistenceService
- remove getModuleReferences - provide service returning YangTextSchemaSourceSet Issue-ID: CPS-21 Signed-off-by: Claudio David Gasparini <claudio.gasparini@pantheon.tech> Change-Id: I61cf6450c8ed8a5154990ea19467e016dc1155b4
Diffstat (limited to 'cps-rest/src/main/java')
-rw-r--r--cps-rest/src/main/java/org/onap/cps/rest/controller/AdminRestController.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/cps-rest/src/main/java/org/onap/cps/rest/controller/AdminRestController.java b/cps-rest/src/main/java/org/onap/cps/rest/controller/AdminRestController.java
index 9549580bac..407a767389 100644
--- a/cps-rest/src/main/java/org/onap/cps/rest/controller/AdminRestController.java
+++ b/cps-rest/src/main/java/org/onap/cps/rest/controller/AdminRestController.java
@@ -28,6 +28,7 @@ import org.onap.cps.api.CpsAdminService;
import org.onap.cps.api.CpsModuleService;
import org.onap.cps.rest.api.CpsAdminApi;
import org.onap.cps.spi.model.Anchor;
+import org.onap.cps.spi.model.SchemaSet;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
@@ -59,6 +60,12 @@ public class AdminRestController implements CpsAdminApi {
return new ResponseEntity<>(schemaSetName, HttpStatus.CREATED);
}
+ @Override
+ public ResponseEntity<Object> getSchemaSet(final String dataspaceName, final String schemaSetName) {
+ final SchemaSet schemaSet = cpsModuleService.getSchemaSet(dataspaceName, schemaSetName);
+ return new ResponseEntity<>(schemaSet, HttpStatus.OK);
+ }
+
/**
* Create a new anchor.
*