summaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-conflict-lib
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be/lib/openecomp-conflict-lib')
-rw-r--r--openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-core/src/main/java/org/openecomp/conflicts/impl/VspMergeHandler.java21
1 files changed, 7 insertions, 14 deletions
diff --git a/openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-core/src/main/java/org/openecomp/conflicts/impl/VspMergeHandler.java b/openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-core/src/main/java/org/openecomp/conflicts/impl/VspMergeHandler.java
index f7d0bca392..8a5a53f98b 100644
--- a/openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-core/src/main/java/org/openecomp/conflicts/impl/VspMergeHandler.java
+++ b/openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-core/src/main/java/org/openecomp/conflicts/impl/VspMergeHandler.java
@@ -14,14 +14,7 @@ import org.openecomp.sdc.datatypes.model.ElementType;
import org.openecomp.sdc.vendorsoftwareproduct.dao.VspMergeDao;
import org.openecomp.sdc.versioning.dao.types.Version;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Optional;
-import java.util.Set;
+import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;
@@ -42,7 +35,7 @@ public class VspMergeHandler implements ItemMergeHandler {
.of(OrchestrationTemplateCandidateContent, OrchestrationTemplateValidationData)
.collect(Collectors.toSet());
private static final Map<ElementType, Set<ElementType>> ELEMENT_TYPE_TO_CONFLICT_DEPENDANT_TYPES =
- new HashMap<>();
+ new EnumMap<>(ElementType.class);
static {
ELEMENT_TYPE_TO_CONFLICT_DEPENDANT_TYPES.put(OrchestrationTemplateCandidate,
@@ -61,13 +54,13 @@ public class VspMergeHandler implements ItemMergeHandler {
@Override
public boolean isConflicted(String itemId, Version version) {
- return vspMergeDao.isVspModelConflicted(itemId, version);
+ return vspMergeDao.isConflicted(itemId, version);
}
@Override
public void finalizeMerge(String itemId, Version version) {
if (!conflictsDao.isConflicted(itemId, version)) {
- vspMergeDao.applyVspModelConflictResolution(itemId, version);
+ vspMergeDao.applyConflictResolution(itemId, version);
}
}
@@ -88,7 +81,7 @@ public class VspMergeHandler implements ItemMergeHandler {
}
}
- if (!vspModelConflicted && vspMergeDao.isVspModelConflicted(itemId, version)) {
+ if (!vspModelConflicted && vspMergeDao.isConflicted(itemId, version)) {
elementConflicts
.add(new ConflictInfo(VSP_MODEL_CONFLICT_ID, NetworkPackage, NetworkPackage.name()));
}
@@ -127,7 +120,7 @@ public class VspMergeHandler implements ItemMergeHandler {
public boolean resolveConflict(String itemId, Version version, String conflictId,
ConflictResolution resolution) {
if (VSP_MODEL_CONFLICT_ID.equals(conflictId)) {
- vspMergeDao.updateVspModelConflictResolution(itemId, version,
+ vspMergeDao.updateConflictResolution(itemId, version,
com.amdocs.zusammen.datatypes.item.Resolution.valueOf(resolution.getResolution().name()));
return true;
}
@@ -136,7 +129,7 @@ public class VspMergeHandler implements ItemMergeHandler {
throw getConflictNotExistException(itemId, version, conflictId);
}
if (conflict.getType() == VspModel) {
- vspMergeDao.updateVspModelConflictResolution(itemId, version,
+ vspMergeDao.updateConflictResolution(itemId, version,
com.amdocs.zusammen.datatypes.item.Resolution.valueOf(resolution.getResolution().name()));
conflictsDao.resolveConflict(itemId, version, conflictId, new ConflictResolution(