summaryrefslogtreecommitdiffstats
path: root/cps-ri
diff options
context:
space:
mode:
authorniamhcore <niamh.core@est.tech>2021-10-28 13:39:24 +0100
committerniamhcore <niamh.core@est.tech>2021-11-02 15:05:39 +0000
commitb0d930752fd6be436061226c7395038f6828438e (patch)
tree206389f51db0ffe46dae7c7c0e5d21c2f880e548 /cps-ri
parent6fda688fa63ea7ccd450002fb94a18b07095bea9 (diff)
Add get cm handles by modules names - service layer
Issue-ID: CPS-644 Signed-off-by: niamhcore <niamh.core@est.tech> Change-Id: Ic2a57df02d533a0066382c12c35be8d524b6cdad
Diffstat (limited to 'cps-ri')
-rwxr-xr-xcps-ri/src/main/java/org/onap/cps/spi/impl/CpsAdminPersistenceServiceImpl.java2
-rw-r--r--cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsAdminPersistenceServiceSpec.groovy10
2 files changed, 6 insertions, 6 deletions
diff --git a/cps-ri/src/main/java/org/onap/cps/spi/impl/CpsAdminPersistenceServiceImpl.java b/cps-ri/src/main/java/org/onap/cps/spi/impl/CpsAdminPersistenceServiceImpl.java
index 2b63169d44..cd3c30b97b 100755
--- a/cps-ri/src/main/java/org/onap/cps/spi/impl/CpsAdminPersistenceServiceImpl.java
+++ b/cps-ri/src/main/java/org/onap/cps/spi/impl/CpsAdminPersistenceServiceImpl.java
@@ -94,7 +94,7 @@ public class CpsAdminPersistenceServiceImpl implements CpsAdminPersistenceServic
}
@Override
- public Collection<Anchor> getAnchors(final String dataspaceName, final Collection<String> inputModuleNames) {
+ public Collection<Anchor> queryAnchors(final String dataspaceName, final Collection<String> inputModuleNames) {
validateDataspaceAndModuleNames(dataspaceName, inputModuleNames);
final Collection<AnchorEntity> anchorEntities =
anchorRepository.getAnchorsByDataspaceNameAndModuleNames(dataspaceName, inputModuleNames);
diff --git a/cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsAdminPersistenceServiceSpec.groovy b/cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsAdminPersistenceServiceSpec.groovy
index c37651089f..af199be035 100644
--- a/cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsAdminPersistenceServiceSpec.groovy
+++ b/cps-ri/src/test/groovy/org/onap/cps/spi/impl/CpsAdminPersistenceServiceSpec.groovy
@@ -144,9 +144,9 @@ class CpsAdminPersistenceServiceSpec extends CpsPersistenceSpecBase {
}
@Sql([CLEAR_DATA, SAMPLE_DATA_FOR_ANCHORS_WITH_MODULES])
- def 'Get anchors that have #scenario.'() {
+ def 'Query anchors that have #scenario.'() {
when: 'all anchor are retrieved for the given dataspace name and module names'
- def anchors = objectUnderTest.getAnchors('DATASPACE-001', inputModuleNames)
+ def anchors = objectUnderTest.queryAnchors('DATASPACE-001', inputModuleNames)
then: 'the expected anchors are returned'
anchors.size() == expectedAnchors.size()
anchors.containsAll(expectedAnchors)
@@ -159,9 +159,9 @@ class CpsAdminPersistenceServiceSpec extends CpsPersistenceSpecBase {
}
@Sql([CLEAR_DATA, SAMPLE_DATA_FOR_ANCHORS_WITH_MODULES])
- def 'Get all anchors for an #scenario.'() {
- when: 'attempt to get anchors'
- objectUnderTest.getAnchors(dataspaceName, moduleNames)
+ def 'Query all anchors for an #scenario.'() {
+ when: 'attempt to query anchors'
+ objectUnderTest.queryAnchors(dataspaceName, moduleNames)
then: 'the correct exception is thrown with the relevant details'
def thrownException = thrown(expectedException)
thrownException.details.contains(expectedMessageDetails)