summaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-api/src
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-api/src')
-rw-r--r--openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-api/src/main/java/org/openecomp/conflicts/ItemMergeHandler.java24
-rw-r--r--openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-api/src/main/java/org/openecomp/conflicts/ItemMergeHandlerFactory.java19
-rw-r--r--openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-api/src/main/java/org/openecomp/conflicts/dao/ConflictsDao.java14
-rw-r--r--openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-api/src/main/java/org/openecomp/conflicts/dao/ConflictsDaoFactory.java10
-rw-r--r--openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-api/src/main/java/org/openecomp/conflicts/types/Conflict.java45
-rw-r--r--openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-api/src/main/java/org/openecomp/conflicts/types/ConflictInfo.java64
-rw-r--r--openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-api/src/main/java/org/openecomp/conflicts/types/ConflictResolution.java46
-rw-r--r--openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-api/src/main/java/org/openecomp/conflicts/types/ItemVersionConflict.java43
-rw-r--r--openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-api/src/main/java/org/openecomp/conflicts/types/Resolution.java7
9 files changed, 129 insertions, 143 deletions
diff --git a/openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-api/src/main/java/org/openecomp/conflicts/ItemMergeHandler.java b/openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-api/src/main/java/org/openecomp/conflicts/ItemMergeHandler.java
index c0947d0b69..16ad7b274a 100644
--- a/openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-api/src/main/java/org/openecomp/conflicts/ItemMergeHandler.java
+++ b/openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-api/src/main/java/org/openecomp/conflicts/ItemMergeHandler.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -17,31 +17,27 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-
package org.openecomp.conflicts;
+import java.util.Optional;
import org.openecomp.conflicts.types.Conflict;
import org.openecomp.conflicts.types.ConflictResolution;
import org.openecomp.conflicts.types.ItemVersionConflict;
import org.openecomp.sdc.versioning.dao.types.Version;
-import java.util.Optional;
-
public interface ItemMergeHandler {
- boolean isConflicted(String itemId, Version version);
+ boolean isConflicted(String itemId, Version version);
- void finalizeMerge(String itemId, Version version);
+ void finalizeMerge(String itemId, Version version);
- void postListConflicts(String itemId, Version version, ItemVersionConflict conflicts);
+ void postListConflicts(String itemId, Version version, ItemVersionConflict conflicts);
- Optional<Conflict> getConflict(String itemId, Version version, String conflictId);
+ Optional<Conflict> getConflict(String itemId, Version version, String conflictId);
- void postGetConflict(String itemId, Version version, Conflict conflict);
+ void postGetConflict(String itemId, Version version, Conflict conflict);
- void preResolveConflict(String itemId, Version version, String conflictId,
- ConflictResolution resolution);
+ void preResolveConflict(String itemId, Version version, String conflictId, ConflictResolution resolution);
- boolean resolveConflict(String itemId, Version version, String conflictId,
- ConflictResolution resolution);
+ boolean resolveConflict(String itemId, Version version, String conflictId, ConflictResolution resolution);
}
diff --git a/openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-api/src/main/java/org/openecomp/conflicts/ItemMergeHandlerFactory.java b/openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-api/src/main/java/org/openecomp/conflicts/ItemMergeHandlerFactory.java
index d309e6f8fa..209ce16e44 100644
--- a/openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-api/src/main/java/org/openecomp/conflicts/ItemMergeHandlerFactory.java
+++ b/openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-api/src/main/java/org/openecomp/conflicts/ItemMergeHandlerFactory.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -17,20 +17,17 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-
package org.openecomp.conflicts;
+import java.util.Optional;
import org.openecomp.core.factory.api.AbstractComponentFactory;
import org.openecomp.core.factory.api.AbstractFactory;
-import java.util.Optional;
-
-public abstract class ItemMergeHandlerFactory
- extends AbstractComponentFactory<ItemMergeHandler> {
+public abstract class ItemMergeHandlerFactory extends AbstractComponentFactory<ItemMergeHandler> {
- public static ItemMergeHandlerFactory getInstance() {
- return AbstractFactory.getInstance(ItemMergeHandlerFactory.class);
- }
+ public static ItemMergeHandlerFactory getInstance() {
+ return AbstractFactory.getInstance(ItemMergeHandlerFactory.class);
+ }
- public abstract Optional<ItemMergeHandler> createInterface(String itemId);
+ public abstract Optional<ItemMergeHandler> createInterface(String itemId);
}
diff --git a/openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-api/src/main/java/org/openecomp/conflicts/dao/ConflictsDao.java b/openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-api/src/main/java/org/openecomp/conflicts/dao/ConflictsDao.java
index 20865efc08..a3264e100f 100644
--- a/openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-api/src/main/java/org/openecomp/conflicts/dao/ConflictsDao.java
+++ b/openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-api/src/main/java/org/openecomp/conflicts/dao/ConflictsDao.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -17,7 +17,6 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-
package org.openecomp.conflicts.dao;
import org.openecomp.conflicts.types.Conflict;
@@ -27,12 +26,11 @@ import org.openecomp.sdc.versioning.dao.types.Version;
public interface ConflictsDao {
- boolean isConflicted(String itemId, Version version);
+ boolean isConflicted(String itemId, Version version);
- ItemVersionConflict getConflict(String itemId, Version version);
+ ItemVersionConflict getConflict(String itemId, Version version);
- Conflict getConflict(String itemId, Version version, String conflictId);
+ Conflict getConflict(String itemId, Version version, String conflictId);
- void resolveConflict(String itemId, Version version, String conflictId,
- ConflictResolution conflictResolution);
+ void resolveConflict(String itemId, Version version, String conflictId, ConflictResolution conflictResolution);
}
diff --git a/openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-api/src/main/java/org/openecomp/conflicts/dao/ConflictsDaoFactory.java b/openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-api/src/main/java/org/openecomp/conflicts/dao/ConflictsDaoFactory.java
index e4c88d6279..3c4525e1aa 100644
--- a/openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-api/src/main/java/org/openecomp/conflicts/dao/ConflictsDaoFactory.java
+++ b/openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-api/src/main/java/org/openecomp/conflicts/dao/ConflictsDaoFactory.java
@@ -17,16 +17,14 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-
package org.openecomp.conflicts.dao;
import org.openecomp.core.factory.api.AbstractComponentFactory;
import org.openecomp.core.factory.api.AbstractFactory;
-public abstract class ConflictsDaoFactory
- extends AbstractComponentFactory<ConflictsDao> {
+public abstract class ConflictsDaoFactory extends AbstractComponentFactory<ConflictsDao> {
- public static ConflictsDaoFactory getInstance() {
- return AbstractFactory.getInstance(ConflictsDaoFactory.class);
- }
+ public static ConflictsDaoFactory getInstance() {
+ return AbstractFactory.getInstance(ConflictsDaoFactory.class);
+ }
}
diff --git a/openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-api/src/main/java/org/openecomp/conflicts/types/Conflict.java b/openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-api/src/main/java/org/openecomp/conflicts/types/Conflict.java
index 80186f876b..33b2026628 100644
--- a/openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-api/src/main/java/org/openecomp/conflicts/types/Conflict.java
+++ b/openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-api/src/main/java/org/openecomp/conflicts/types/Conflict.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -17,38 +17,37 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-
package org.openecomp.conflicts.types;
import com.google.common.annotations.VisibleForTesting;
import org.openecomp.sdc.datatypes.model.ElementType;
public class Conflict<T> extends ConflictInfo {
- private T yours;
- private T theirs;
-
- @VisibleForTesting
- Conflict() {}
- public Conflict(String id, ElementType type, String name) {
- super(id, type, name);
- }
+ private T yours;
+ private T theirs;
- public T getYours() {
- return yours;
- }
+ @VisibleForTesting
+ Conflict() {
+ }
- public void setYours(T yours) {
- this.yours = yours;
- }
+ public Conflict(String id, ElementType type, String name) {
+ super(id, type, name);
+ }
- public T getTheirs() {
- return theirs;
- }
+ public T getYours() {
+ return yours;
+ }
- public void setTheirs(T theirs) {
- this.theirs = theirs;
- }
+ public void setYours(T yours) {
+ this.yours = yours;
+ }
+ public T getTheirs() {
+ return theirs;
+ }
+ public void setTheirs(T theirs) {
+ this.theirs = theirs;
+ }
}
diff --git a/openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-api/src/main/java/org/openecomp/conflicts/types/ConflictInfo.java b/openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-api/src/main/java/org/openecomp/conflicts/types/ConflictInfo.java
index af4111c1dd..b56b576eb7 100644
--- a/openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-api/src/main/java/org/openecomp/conflicts/types/ConflictInfo.java
+++ b/openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-api/src/main/java/org/openecomp/conflicts/types/ConflictInfo.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -17,48 +17,48 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-
package org.openecomp.conflicts.types;
import com.google.common.annotations.VisibleForTesting;
import org.openecomp.sdc.datatypes.model.ElementType;
public class ConflictInfo {
- private String id;
- private ElementType type;
- private String name;
- @VisibleForTesting
- ConflictInfo() {
- }
+ private String id;
+ private ElementType type;
+ private String name;
+
+ @VisibleForTesting
+ ConflictInfo() {
+ }
- public ConflictInfo(String id, ElementType type, String name) {
- this.id = id;
- this.type = type;
- this.name = name;
- }
+ public ConflictInfo(String id, ElementType type, String name) {
+ this.id = id;
+ this.type = type;
+ this.name = name;
+ }
- public String getId() {
- return id;
- }
+ public String getId() {
+ return id;
+ }
- public void setId(String id) {
- this.id = id;
- }
+ public void setId(String id) {
+ this.id = id;
+ }
- public ElementType getType() {
- return type;
- }
+ public ElementType getType() {
+ return type;
+ }
- public void setType(ElementType type) {
- this.type = type;
- }
+ public void setType(ElementType type) {
+ this.type = type;
+ }
- public String getName() {
- return name;
- }
+ public String getName() {
+ return name;
+ }
- public void setName(String name) {
- this.name = name;
- }
+ public void setName(String name) {
+ this.name = name;
+ }
}
diff --git a/openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-api/src/main/java/org/openecomp/conflicts/types/ConflictResolution.java b/openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-api/src/main/java/org/openecomp/conflicts/types/ConflictResolution.java
index 04a790ca91..05387c6baf 100644
--- a/openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-api/src/main/java/org/openecomp/conflicts/types/ConflictResolution.java
+++ b/openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-api/src/main/java/org/openecomp/conflicts/types/ConflictResolution.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -17,36 +17,36 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-
package org.openecomp.conflicts.types;
import java.util.Map;
public class ConflictResolution {
- private Resolution resolution;
- // sits in lower level...
- private Map<String, Object> otherResolution;
- public ConflictResolution() {
- }
+ private Resolution resolution;
+ // sits in lower level...
+ private Map<String, Object> otherResolution;
+
+ public ConflictResolution() {
+ }
- public ConflictResolution(Resolution resolution) {
- this.resolution = resolution;
- }
+ public ConflictResolution(Resolution resolution) {
+ this.resolution = resolution;
+ }
- public Resolution getResolution() {
- return resolution;
- }
+ public Resolution getResolution() {
+ return resolution;
+ }
- public void setResolution(Resolution resolution) {
- this.resolution = resolution;
- }
+ public void setResolution(Resolution resolution) {
+ this.resolution = resolution;
+ }
- public Map<String, Object> getOtherResolution() {
- return otherResolution;
- }
+ public Map<String, Object> getOtherResolution() {
+ return otherResolution;
+ }
- public void setOtherResolution(Map<String, Object> otherResolution) {
- this.otherResolution = otherResolution;
- }
+ public void setOtherResolution(Map<String, Object> otherResolution) {
+ this.otherResolution = otherResolution;
+ }
}
diff --git a/openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-api/src/main/java/org/openecomp/conflicts/types/ItemVersionConflict.java b/openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-api/src/main/java/org/openecomp/conflicts/types/ItemVersionConflict.java
index 4ae2b2c086..4bd3eabc7e 100644
--- a/openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-api/src/main/java/org/openecomp/conflicts/types/ItemVersionConflict.java
+++ b/openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-api/src/main/java/org/openecomp/conflicts/types/ItemVersionConflict.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -17,35 +17,34 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-
package org.openecomp.conflicts.types;
-import org.openecomp.sdc.versioning.dao.types.Version;
-
import java.util.ArrayList;
import java.util.Collection;
+import org.openecomp.sdc.versioning.dao.types.Version;
public class ItemVersionConflict {
- private Conflict<Version> versionConflict;
- private Collection<ConflictInfo> elementConflicts = new ArrayList<>();
- public Conflict<Version> getVersionConflict() {
- return versionConflict;
- }
+ private Conflict<Version> versionConflict;
+ private Collection<ConflictInfo> elementConflicts = new ArrayList<>();
+
+ public Conflict<Version> getVersionConflict() {
+ return versionConflict;
+ }
- public void setVersionConflict(Conflict<Version> versionConflict) {
- this.versionConflict = versionConflict;
- }
+ public void setVersionConflict(Conflict<Version> versionConflict) {
+ this.versionConflict = versionConflict;
+ }
- public Collection<ConflictInfo> getElementConflicts() {
- return elementConflicts;
- }
+ public Collection<ConflictInfo> getElementConflicts() {
+ return elementConflicts;
+ }
- public void setElementConflicts(Collection<ConflictInfo> elementConflicts) {
- this.elementConflicts = elementConflicts;
- }
+ public void setElementConflicts(Collection<ConflictInfo> elementConflicts) {
+ this.elementConflicts = elementConflicts;
+ }
- public void addElementConflictInfo(ConflictInfo conflictInfo) {
- elementConflicts.add(conflictInfo);
- }
+ public void addElementConflictInfo(ConflictInfo conflictInfo) {
+ elementConflicts.add(conflictInfo);
+ }
}
diff --git a/openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-api/src/main/java/org/openecomp/conflicts/types/Resolution.java b/openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-api/src/main/java/org/openecomp/conflicts/types/Resolution.java
index 5f7db39486..2f03dbe9d8 100644
--- a/openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-api/src/main/java/org/openecomp/conflicts/types/Resolution.java
+++ b/openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-api/src/main/java/org/openecomp/conflicts/types/Resolution.java
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -17,9 +17,8 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
-
package org.openecomp.conflicts.types;
public enum Resolution {
- THEIRS,YOURS,OTHER
+ THEIRS, YOURS, OTHER
}