summaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-sdc-versioning-lib
diff options
context:
space:
mode:
authorayalaben <ayala.benzvi@amdocs.com>2018-03-20 11:07:06 +0200
committerAvi Gaffa <avi.gaffa@amdocs.com>2018-03-20 16:43:06 +0000
commit6f578c479c73c2f5989e383355c28cf1c7a01c6b (patch)
tree00ddf448ebe117ac57123fd335b2864c4ee65a9a /openecomp-be/lib/openecomp-sdc-versioning-lib
parent7fdf733a64670fceefc3ded35cfa581e1c458179 (diff)
Archive Item - fix ItemManager
Change-Id: I25b19994c3dc861c38c536fe1fa2b97e0c8eab93 Issue-ID: SDC-1086 Signed-off-by: ayalaben <ayala.benzvi@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-versioning-lib')
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-api/src/main/java/org/openecomp/sdc/versioning/ItemManager.java2
-rw-r--r--openecomp-be/lib/openecomp-sdc-versioning-lib/openecomp-sdc-versioning-core/src/main/java/org/openecomp/sdc/versioning/impl/ItemManagerImpl.java11
2 files changed, 13 insertions, 0 deletions
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
@@ -76,6 +76,17 @@ public class ItemManagerImpl implements ItemManager {
}
@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) {
if (item.getStatus() == ItemStatus.ARCHIVED) {