diff options
author | Rishi.Chail <rishi.chail@est.tech> | 2021-01-21 19:14:24 +0000 |
---|---|---|
committer | Rishi Chail <rishi.chail@est.tech> | 2021-01-22 16:03:47 +0000 |
commit | a2f384de843c3c3f68d2d371d185c71a900e9810 (patch) | |
tree | 14039f68a57089a0be418bc6cb3a37c441ba6680 /cps-service/src/main/java/org/onap | |
parent | 5fa9a9ebb6459755a4267066e23f9671b9fac5b9 (diff) |
Retrieve an Anchor for a given dataspace by anchor name - Service layer
Part of story already done in CPS-135
Issue-ID: CPS-55
Signed-off-by: Rishi.Chail <rishi.chail@est.tech>
Change-Id: I0c4ae551f5c85866ce543fbb27b18ffff7d80462
Diffstat (limited to 'cps-service/src/main/java/org/onap')
-rwxr-xr-x[-rw-r--r--] | cps-service/src/main/java/org/onap/cps/api/CpsAdminService.java | 10 | ||||
-rwxr-xr-x[-rw-r--r--] | cps-service/src/main/java/org/onap/cps/api/impl/CpsAdminServiceImpl.java | 7 |
2 files changed, 16 insertions, 1 deletions
diff --git a/cps-service/src/main/java/org/onap/cps/api/CpsAdminService.java b/cps-service/src/main/java/org/onap/cps/api/CpsAdminService.java index 853bd958f8..ed89c43091 100644..100755 --- a/cps-service/src/main/java/org/onap/cps/api/CpsAdminService.java +++ b/cps-service/src/main/java/org/onap/cps/api/CpsAdminService.java @@ -57,4 +57,14 @@ public interface CpsAdminService { */ @NonNull Collection<Anchor> getAnchors(@NonNull String dataspaceName); + + /** + * Get an anchor in the given dataspace using the anchor name. + * + * @param dataspaceName dataspace name + * @param anchorName anchor name + * @return an anchor + */ + @NonNull + Anchor getAnchor(@NonNull String dataspaceName, @NonNull String anchorName); } diff --git a/cps-service/src/main/java/org/onap/cps/api/impl/CpsAdminServiceImpl.java b/cps-service/src/main/java/org/onap/cps/api/impl/CpsAdminServiceImpl.java index 0cb85fdf95..09550f1936 100644..100755 --- a/cps-service/src/main/java/org/onap/cps/api/impl/CpsAdminServiceImpl.java +++ b/cps-service/src/main/java/org/onap/cps/api/impl/CpsAdminServiceImpl.java @@ -47,4 +47,9 @@ public class CpsAdminServiceImpl implements CpsAdminService { public Collection<Anchor> getAnchors(final String dataspaceName) { return cpsAdminPersistenceService.getAnchors(dataspaceName); } -} + + @Override + public Anchor getAnchor(final String dataspaceName, final String anchorName) { + return cpsAdminPersistenceService.getAnchor(dataspaceName, anchorName); + } +}
\ No newline at end of file |