summaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-core/src/main/java/org/openecomp/conflicts/ItemMergeHandlerFactoryImpl.java
diff options
context:
space:
mode:
authorvasraz <vasyl.razinkov@est.tech>2021-03-22 15:33:06 +0000
committerChristophe Closset <christophe.closset@intl.att.com>2021-03-24 06:59:47 +0000
commitd378c37fbd1ecec7b43394926f1ca32a695e07de (patch)
tree5c8a085f8732f980d871d966ac49361644efa698 /openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-core/src/main/java/org/openecomp/conflicts/ItemMergeHandlerFactoryImpl.java
parenta6ae7294ecd336d7e88f915710b08e2658eaee00 (diff)
Reformat openecomp-be
Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech> Issue-ID: SDC-3449 Change-Id: I13e02322f8e00820cc5a1d85752caaeda9bf10d1
Diffstat (limited to 'openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-core/src/main/java/org/openecomp/conflicts/ItemMergeHandlerFactoryImpl.java')
-rw-r--r--openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-core/src/main/java/org/openecomp/conflicts/ItemMergeHandlerFactoryImpl.java45
1 files changed, 21 insertions, 24 deletions
diff --git a/openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-core/src/main/java/org/openecomp/conflicts/ItemMergeHandlerFactoryImpl.java b/openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-core/src/main/java/org/openecomp/conflicts/ItemMergeHandlerFactoryImpl.java
index 3c879dee17..bff46a81fa 100644
--- a/openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-core/src/main/java/org/openecomp/conflicts/ItemMergeHandlerFactoryImpl.java
+++ b/openecomp-be/lib/openecomp-conflict-lib/openecomp-conflict-core/src/main/java/org/openecomp/conflicts/ItemMergeHandlerFactoryImpl.java
@@ -13,9 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
package org.openecomp.conflicts;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Optional;
import org.openecomp.conflicts.dao.ConflictsDaoFactory;
import org.openecomp.conflicts.impl.VspMergeHandler;
import org.openecomp.sdc.common.errors.CoreException;
@@ -25,32 +27,27 @@ import org.openecomp.sdc.versioning.AsdcItemManagerFactory;
import org.openecomp.sdc.versioning.errors.EntityNotExistErrorBuilder;
import org.openecomp.sdc.versioning.types.Item;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Optional;
-
public class ItemMergeHandlerFactoryImpl extends ItemMergeHandlerFactory {
- // TODO: 11/1/2017 read this map from configuration, move Vsp merge handler to vsp lib, rearrange lib deps
- private static final Map<ItemType, ItemMergeHandler> MERGE_HANDLER_BY_ITEM_TYPE =
- new HashMap<>();
- static {
- MERGE_HANDLER_BY_ITEM_TYPE.put(ItemType.vsp,
- new VspMergeHandler(ConflictsDaoFactory.getInstance().createInterface(),
- VspMergeDaoFactory.getInstance().createInterface()));
- }
+ // TODO: 11/1/2017 read this map from configuration, move Vsp merge handler to vsp lib, rearrange lib deps
+ private static final Map<ItemType, ItemMergeHandler> MERGE_HANDLER_BY_ITEM_TYPE = new HashMap<>();
- @Override
- public Optional<ItemMergeHandler> createInterface(String itemId) {
- Item item = AsdcItemManagerFactory.getInstance().createInterface().get(itemId);
- if (item == null) {
- throw new CoreException(new EntityNotExistErrorBuilder("", itemId).build());
+ static {
+ MERGE_HANDLER_BY_ITEM_TYPE.put(ItemType.vsp,
+ new VspMergeHandler(ConflictsDaoFactory.getInstance().createInterface(), VspMergeDaoFactory.getInstance().createInterface()));
}
- return Optional.ofNullable(MERGE_HANDLER_BY_ITEM_TYPE.get(ItemType.valueOf(item.getType())));
- }
- @Override
- public ItemMergeHandler createInterface() {
- return null; // call the one with the item id arg
- }
+ @Override
+ public Optional<ItemMergeHandler> createInterface(String itemId) {
+ Item item = AsdcItemManagerFactory.getInstance().createInterface().get(itemId);
+ if (item == null) {
+ throw new CoreException(new EntityNotExistErrorBuilder("", itemId).build());
+ }
+ return Optional.ofNullable(MERGE_HANDLER_BY_ITEM_TYPE.get(ItemType.valueOf(item.getType())));
+ }
+
+ @Override
+ public ItemMergeHandler createInterface() {
+ return null; // call the one with the item id arg
+ }
}