diff options
author | 2018-07-08 14:43:18 +0300 | |
---|---|---|
committer | 2018-07-08 14:43:18 +0300 | |
commit | fbb1e44c2e189569bffdc23504b643257808397d (patch) | |
tree | 6dcd81ada2a9c3798d66fdf7794cc16ca22402a9 /openecomp-be/lib/openecomp-core-lib/openecomp-zusammen-lib/openecomp-zusammen-core/src/main/java/org/openecomp/core/zusammen/db/impl/ZusammenConnectorImpl.java | |
parent | c108dee7bd25a976dc4fa88eef3ec859facdf5d2 (diff) |
Add commands to clean zusammen data
Expose REST to clean item version data of specific user.
Add 2 commands to zusammen tool:
1. clean item data of specific user
2. delete public version
Change-Id: I8630142bf34846359153eacc1556b10acecefa05
Issue-ID: SDC-1444
Signed-off-by: talig <talig@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-core-lib/openecomp-zusammen-lib/openecomp-zusammen-core/src/main/java/org/openecomp/core/zusammen/db/impl/ZusammenConnectorImpl.java')
-rw-r--r-- | openecomp-be/lib/openecomp-core-lib/openecomp-zusammen-lib/openecomp-zusammen-core/src/main/java/org/openecomp/core/zusammen/db/impl/ZusammenConnectorImpl.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-zusammen-lib/openecomp-zusammen-core/src/main/java/org/openecomp/core/zusammen/db/impl/ZusammenConnectorImpl.java b/openecomp-be/lib/openecomp-core-lib/openecomp-zusammen-lib/openecomp-zusammen-core/src/main/java/org/openecomp/core/zusammen/db/impl/ZusammenConnectorImpl.java index 83bbc5b49a..f8b048ce92 100644 --- a/openecomp-be/lib/openecomp-core-lib/openecomp-zusammen-lib/openecomp-zusammen-core/src/main/java/org/openecomp/core/zusammen/db/impl/ZusammenConnectorImpl.java +++ b/openecomp-be/lib/openecomp-core-lib/openecomp-zusammen-lib/openecomp-zusammen-core/src/main/java/org/openecomp/core/zusammen/db/impl/ZusammenConnectorImpl.java @@ -290,6 +290,17 @@ public class ZusammenConnectorImpl implements ZusammenConnector { } @Override + public void cleanVersion(SessionContext context, Id itemId, Id versionId) { + Response<Void> response = + versionAdaptorFactory.createInterface(context).delete(context, itemId, versionId); + if (!response.isSuccessful()) { + throw new SdcRuntimeException(String.format( + "failed to clean item Version. ItemId: %s, versionId: %s, message: %s", + itemId.getValue(), versionId.getValue(), response.getReturnCode().toString())); + } + } + + @Override public ItemVersionConflict getVersionConflict(SessionContext context, Id itemId, Id versionId) { Response<ItemVersionConflict> response = versionAdaptorFactory.createInterface(context).getConflict(context, itemId, versionId); |