From 6f578c479c73c2f5989e383355c28cf1c7a01c6b Mon Sep 17 00:00:00 2001 From: ayalaben Date: Tue, 20 Mar 2018 11:07:06 +0200 Subject: Archive Item - fix ItemManager Change-Id: I25b19994c3dc861c38c536fe1fa2b97e0c8eab93 Issue-ID: SDC-1086 Signed-off-by: ayalaben --- .../main/java/org/openecomp/sdc/versioning/ItemManager.java | 2 ++ .../org/openecomp/sdc/versioning/impl/ItemManagerImpl.java | 11 +++++++++++ 2 files changed, 13 insertions(+) (limited to 'openecomp-be/lib/openecomp-sdc-versioning-lib') diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/ItemManager.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/ItemManager.java index 0448ee782f..74a6eec887 100644 --- a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/ItemManager.java +++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/ItemManager.java @@ -38,5 +38,7 @@ public interface ItemManager { void delete(Item item); + void updateName(String itemId, String name); + void update(Item item); } diff --git a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/impl/ItemManagerImpl.java b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/impl/ItemManagerImpl.java index 3b7b018678..232b0038ef 100644 --- a/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/impl/ItemManagerImpl.java +++ b/openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/impl/ItemManagerImpl.java @@ -75,6 +75,17 @@ public class ItemManagerImpl implements ItemManager { itemDao.delete(item); } + @Override + public void updateName(String itemId, String name) { + Item item = get(itemId); + if (item == null) { + return; + } + + item.setName(name); + itemDao.update(item); + } + @Override public void archive(Item item) { -- cgit 1.2.3-korg