Remove dead code catalog-dao 75/45275/3
authorTal Gitelman <tg851x@intl.att.com>
Mon, 30 Apr 2018 14:03:43 +0000 (17:03 +0300)
committerTal Gitelman <tg851x@intl.att.com>
Mon, 30 Apr 2018 15:58:50 +0000 (15:58 +0000)
Change-Id: Id4383326458c328d2316c8e3599c87cf265ec415
Issue-ID: SDC-1270
Signed-off-by: Tal Gitelman <tg851x@intl.att.com>
catalog-dao/src/main/java/org/openecomp/sdc/be/dao/cassandra/AuditCassandraDao.java
catalog-dao/src/main/java/org/openecomp/sdc/be/dao/impl/AuditingDao.java
catalog-dao/src/main/java/org/openecomp/sdc/be/dao/impl/ESCatalogDAO.java
catalog-dao/src/main/java/org/openecomp/sdc/be/dao/titan/TitanGenericDao.java
catalog-dao/src/main/java/org/openecomp/sdc/be/dao/titan/TitanGraphClient.java
catalog-dao/src/main/java/org/openecomp/sdc/be/dao/utils/MapUtil.java
catalog-dao/src/main/java/org/openecomp/sdc/be/resources/impl/ResourceUploader.java
catalog-dao/src/test/java/org/openecomp/sdc/be/resources/TitanGenericDaoTest.java

index 681d20c..1562f8a 100644 (file)
@@ -36,7 +36,6 @@ import org.openecomp.sdc.be.resources.data.auditing.DistributionDeployEvent;
 import org.openecomp.sdc.be.resources.data.auditing.DistributionNotificationEvent;
 import org.openecomp.sdc.be.resources.data.auditing.DistributionStatusEvent;
 import org.openecomp.sdc.be.resources.data.auditing.ResourceAdminEvent;
-import org.openecomp.sdc.common.config.EcompErrorName;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.stereotype.Component;
index dfa2b3a..65f4314 100644 (file)
@@ -38,7 +38,6 @@ import org.openecomp.sdc.be.resources.data.auditing.AuditingActionEnum;
 import org.openecomp.sdc.be.resources.data.auditing.AuditingGenericEvent;
 import org.openecomp.sdc.be.resources.data.auditing.AuditingTypesConstants;
 import org.openecomp.sdc.be.resources.data.auditing.ResourceAdminEvent;
-import org.openecomp.sdc.common.config.EcompErrorName;
 import org.openecomp.sdc.common.datastructure.AuditingFieldsKeysEnum;
 import org.openecomp.sdc.common.datastructure.ESTimeBasedEvent;
 import org.slf4j.Logger;
index 6a2600a..985875e 100644 (file)
@@ -39,7 +39,6 @@ import org.openecomp.sdc.be.dao.api.ResourceUploadStatus;
 import org.openecomp.sdc.be.resources.data.ESArtifactData;
 import org.openecomp.sdc.be.resources.exception.ResourceDAOException;
 import org.openecomp.sdc.common.api.HealthCheckInfo.HealthCheckStatus;
-import org.openecomp.sdc.common.config.EcompErrorName;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.stereotype.Component;
index 1db807f..9b9fa9c 100644 (file)
@@ -796,35 +796,6 @@ public class TitanGenericDao {
                }
        }
 
-       private boolean vertexLeftNotContainsAllRightProps(Map<String, Object> leftProps, Map<String, Object> rightProps) {
-
-               if (rightProps != null) {
-
-                       for (Entry<String, Object> entry : rightProps.entrySet()) {
-                               String key = entry.getKey();
-                               Object leftValue = leftProps.get(key);
-                               Object rightValue = entry.getValue();
-
-                               if (leftValue == null) {
-                                       if (rightValue == null) {
-                                               return false;
-                                       } else {
-                                               continue;
-                                       }
-                               }
-
-                               if (true == leftValue.equals(rightValue)) {
-                                       logger.trace("The value of key {}  is differnet between properties. {} vs {}", key, leftValue, rightValue);
-                                       return false;
-                               }
-                       }
-
-               }
-
-               return true;
-
-       }
-
        public <T extends GraphNode> Either<List<T>, TitanOperationStatus> getByCriteria(NodeTypeEnum type, Map<String, Object> props, Class<T> clazz) {
                Either<TitanGraph, TitanOperationStatus> graph = titanClient.getGraph();
                if (graph.isLeft()) {
@@ -878,34 +849,6 @@ public class TitanGenericDao {
                }
        }
 
-       private boolean vertexLeftContainsRightProps(Map<String, Object> leftProps, Map<String, Object> rightProps) {
-
-               if (rightProps != null) {
-
-                       for (Entry<String, Object> entry : rightProps.entrySet()) {
-                               String key = entry.getKey();
-                               Object leftValue = leftProps.get(key);
-                               Object rightValue = entry.getValue();
-                               if (leftValue == null) {
-                                       if (rightValue == null) {
-                                               continue;
-                                       } else {
-                                               logger.debug("The key {} cannot be found in the properties {}", key, leftProps);
-                                               return false;
-                                       }
-                               }
-
-                               if (false == leftValue.equals(rightValue)) {
-                                       logger.trace("The value of key {} is differnet between properties. {} vs {} ", key, leftValue, rightValue);
-                                       return false;
-                               }
-                       }
-
-               }
-
-               return true;
-       }
-
        public <T extends GraphNode> Either<List<T>, TitanOperationStatus> getByCriteriaWithPredicate(NodeTypeEnum type, Map<String, Entry<TitanPredicate, Object>> props, Class<T> clazz) {
                Either<TitanGraph, TitanOperationStatus> graph = titanClient.getGraph();
                if (graph.isLeft()) {
index 7d151f1..6575e1f 100644 (file)
@@ -40,7 +40,6 @@ import org.openecomp.sdc.be.config.ConfigurationManager;
 import org.openecomp.sdc.be.dao.DAOTitanStrategy;
 import org.openecomp.sdc.be.dao.TitanClientStrategy;
 import org.openecomp.sdc.be.dao.neo4j.GraphPropertiesDictionary;
-import org.openecomp.sdc.common.config.EcompErrorName;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.stereotype.Component;
index 991fb0b..cd4cf38 100644 (file)
@@ -22,11 +22,8 @@ package org.openecomp.sdc.be.dao.utils;
 
 import java.util.*;
 import java.util.function.Function;
-import java.util.stream.Collector;
 import java.util.stream.Collectors;
 
-import static java.util.stream.Collectors.groupingBy;
-
 /**
  * Utility class to ease map manipulation.
  */
index 2c659ff..e4642c8 100644 (file)
@@ -30,7 +30,6 @@ import org.openecomp.sdc.be.dao.api.ResourceUploadStatus;
 import org.openecomp.sdc.be.resources.api.IResourceUploader;
 import org.openecomp.sdc.be.resources.data.ESArtifactData;
 import org.openecomp.sdc.be.resources.exception.ResourceDAOException;
-import org.openecomp.sdc.common.config.EcompErrorName;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.stereotype.Component;
index 97ccb43..6dede29 100644 (file)
@@ -23,7 +23,6 @@ package org.openecomp.sdc.be.resources;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
-import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
@@ -73,8 +72,6 @@ import com.thinkaurelius.titan.core.TitanFactory;
 import com.thinkaurelius.titan.core.TitanGraph;
 import com.thinkaurelius.titan.core.TitanVertex;
 import com.thinkaurelius.titan.core.attribute.Text;
-import com.thinkaurelius.titan.core.schema.ConsistencyModifier;
-import com.thinkaurelius.titan.core.schema.TitanGraphIndex;
 import com.thinkaurelius.titan.core.schema.TitanManagement;
 
 import fj.data.Either;