diff options
author | ayalaben <Ayala.Benzvi@Amdocs.Com> | 2018-02-11 11:11:00 +0200 |
---|---|---|
committer | ayalaben <ayala.benzvi@amdocs.com> | 2018-02-11 15:27:45 +0200 |
commit | da603323ec3cdf4257707ac1cb4d5d657783ae9f (patch) | |
tree | a8e65ce8629da0e56d5ac7fa7993b518d360a761 /openecomp-be/lib/openecomp-core-lib/openecomp-zusammen-lib | |
parent | 27fed258bd045e4af8cdc1181ebf3cef8d0822cc (diff) |
Delete Item Draft
Change-Id: I13767ab6a7be82ae89f80d50b5857aabe6e55906
Issue-ID: SDC-1014
Signed-off-by: ayalaben <ayala.benzvi@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-core-lib/openecomp-zusammen-lib')
5 files changed, 19 insertions, 1 deletions
diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-zusammen-lib/openecomp-zusammen-api/src/main/java/org/openecomp/core/zusammen/api/ZusammenAdaptor.java b/openecomp-be/lib/openecomp-core-lib/openecomp-zusammen-lib/openecomp-zusammen-api/src/main/java/org/openecomp/core/zusammen/api/ZusammenAdaptor.java index 694c35ebbe..23eddadbf7 100644 --- a/openecomp-be/lib/openecomp-core-lib/openecomp-zusammen-lib/openecomp-zusammen-api/src/main/java/org/openecomp/core/zusammen/api/ZusammenAdaptor.java +++ b/openecomp-be/lib/openecomp-core-lib/openecomp-zusammen-lib/openecomp-zusammen-api/src/main/java/org/openecomp/core/zusammen/api/ZusammenAdaptor.java @@ -27,6 +27,8 @@ public interface ZusammenAdaptor { Item getItem(SessionContext context, Id itemId); + void deleteItem(SessionContext context, Id itemId); + Id createItem(SessionContext context, Info info); void updateItem(SessionContext context, Id itemId, Info info); diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-zusammen-lib/openecomp-zusammen-core/pom.xml b/openecomp-be/lib/openecomp-core-lib/openecomp-zusammen-lib/openecomp-zusammen-core/pom.xml index d90c9a39a0..2c9fb4a574 100644 --- a/openecomp-be/lib/openecomp-core-lib/openecomp-zusammen-lib/openecomp-zusammen-core/pom.xml +++ b/openecomp-be/lib/openecomp-core-lib/openecomp-zusammen-lib/openecomp-zusammen-core/pom.xml @@ -37,7 +37,7 @@ <dependency> <groupId>com.amdocs.zusammen.plugin</groupId> <artifactId>zusammen-collaboration-cassandra-plugin</artifactId> - <version>${zusammen.version}</version> + <version>${zusammen-collaboration-store.version}</version> <scope>runtime</scope> <exclusions> <exclusion> diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-zusammen-lib/openecomp-zusammen-core/src/main/java/org/openecomp/core/zusammen/db/ZusammenConnector.java b/openecomp-be/lib/openecomp-core-lib/openecomp-zusammen-lib/openecomp-zusammen-core/src/main/java/org/openecomp/core/zusammen/db/ZusammenConnector.java index 9005bb84c3..1589c1a25b 100644 --- a/openecomp-be/lib/openecomp-core-lib/openecomp-zusammen-lib/openecomp-zusammen-core/src/main/java/org/openecomp/core/zusammen/db/ZusammenConnector.java +++ b/openecomp-be/lib/openecomp-core-lib/openecomp-zusammen-lib/openecomp-zusammen-core/src/main/java/org/openecomp/core/zusammen/db/ZusammenConnector.java @@ -32,6 +32,8 @@ public interface ZusammenConnector { Id createItem(SessionContext context, Info info); + void deleteItem(SessionContext context, Id itemId); + void updateItem(SessionContext context, Id itemId, Info info); 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 7525a6479a..83bbc5b49a 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 @@ -109,6 +109,15 @@ public class ZusammenConnectorImpl implements ZusammenConnector { } @Override + public void deleteItem(SessionContext context, Id itemId){ + Response<Void> response = itemAdaptorFactory.createInterface(context).delete(context, itemId); + if (!response.isSuccessful()) { + throw new SdcRuntimeException( + "Failed to delete Item. message:" + response.getReturnCode().toString()); + } + } + + @Override public void updateItem(SessionContext context, Id itemId, Info info) { Response<Void> response = itemAdaptorFactory.createInterface(context).update(context, itemId, info); diff --git a/openecomp-be/lib/openecomp-core-lib/openecomp-zusammen-lib/openecomp-zusammen-core/src/main/java/org/openecomp/core/zusammen/impl/ZusammenAdaptorImpl.java b/openecomp-be/lib/openecomp-core-lib/openecomp-zusammen-lib/openecomp-zusammen-core/src/main/java/org/openecomp/core/zusammen/impl/ZusammenAdaptorImpl.java index cd49ca3069..968ff28963 100644 --- a/openecomp-be/lib/openecomp-core-lib/openecomp-zusammen-lib/openecomp-zusammen-core/src/main/java/org/openecomp/core/zusammen/impl/ZusammenAdaptorImpl.java +++ b/openecomp-be/lib/openecomp-core-lib/openecomp-zusammen-lib/openecomp-zusammen-core/src/main/java/org/openecomp/core/zusammen/impl/ZusammenAdaptorImpl.java @@ -191,6 +191,11 @@ public class ZusammenAdaptorImpl implements ZusammenAdaptor { } @Override + public void deleteItem(SessionContext context, Id itemId){ + connector.deleteItem(context,itemId); + } + + @Override public void updateItem(SessionContext context, Id itemId, Info info) { connector.updateItem(context, itemId, info); } |