summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/onap
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/onap')
-rw-r--r--src/main/java/org/onap/aai/sparky/synchronizer/ElasticSearchIndexCleaner.java8
-rw-r--r--src/main/java/org/onap/aai/sparky/synchronizer/SyncHelper.java10
-rw-r--r--src/main/java/org/onap/aai/sparky/synchronizer/entity/AggregationEntity.java30
-rw-r--r--src/main/java/org/onap/aai/sparky/synchronizer/entity/AggregationSuggestionEntity.java35
-rw-r--r--src/main/java/org/onap/aai/sparky/synchronizer/entity/IndexableCrossEntityReference.java44
-rw-r--r--src/main/java/org/onap/aai/sparky/synchronizer/entity/IndexableEntity.java38
-rw-r--r--src/main/java/org/onap/aai/sparky/synchronizer/entity/MergableEntity.java13
-rw-r--r--src/main/java/org/onap/aai/sparky/synchronizer/entity/ObjectIdCollection.java21
-rw-r--r--src/main/java/org/onap/aai/sparky/synchronizer/entity/SearchableEntity.java42
-rw-r--r--src/main/java/org/onap/aai/sparky/synchronizer/entity/SuggestionSearchEntity.java71
-rw-r--r--src/main/java/org/onap/aai/sparky/synchronizer/entity/TransactionStorageType.java17
11 files changed, 316 insertions, 13 deletions
diff --git a/src/main/java/org/onap/aai/sparky/synchronizer/ElasticSearchIndexCleaner.java b/src/main/java/org/onap/aai/sparky/synchronizer/ElasticSearchIndexCleaner.java
index 74cb1cb..842a416 100644
--- a/src/main/java/org/onap/aai/sparky/synchronizer/ElasticSearchIndexCleaner.java
+++ b/src/main/java/org/onap/aai/sparky/synchronizer/ElasticSearchIndexCleaner.java
@@ -145,8 +145,8 @@ public class ElasticSearchIndexCleaner implements IndexCleaner {
if (sizeAfter > 0) {
- Collection<String> presyncIds = before.getImportedObjectIds();
- presyncIds.removeAll(after.getImportedObjectIds());
+ Collection<String> presyncIds = before.getImportedObjectIdsAsValues();
+ presyncIds.removeAll(after.getImportedObjectIdsAsValues());
try {
LOG.info(AaiUiMsgs.ES_SYNC_SELECTIVE_DELETE, indexName, indexType,
@@ -165,7 +165,7 @@ public class ElasticSearchIndexCleaner implements IndexCleaner {
if (numItemsInBulkRequest >= this.numItemsToGetBulkRequest) {
LOG.info(AaiUiMsgs.ES_BULK_DELETE, indexName, String.valueOf(bulkIds.getSize()));
- OperationResult bulkDeleteResult = bulkDelete(bulkIds.getImportedObjectIds());
+ OperationResult bulkDeleteResult = bulkDelete(bulkIds.getImportedObjectIdsAsValues());
// pegCountersForElasticBulkDelete(bulkDeleteResult);
numItemsRemainingToBeDeleted -= numItemsInBulkRequest;
numItemsInBulkRequest = 0;
@@ -175,7 +175,7 @@ public class ElasticSearchIndexCleaner implements IndexCleaner {
if (numItemsRemainingToBeDeleted > 0) {
LOG.info(AaiUiMsgs.ES_BULK_DELETE, indexName, String.valueOf(bulkIds.getSize()));
- OperationResult bulkDeleteResult = bulkDelete(bulkIds.getImportedObjectIds());
+ OperationResult bulkDeleteResult = bulkDelete(bulkIds.getImportedObjectIdsAsValues());
// pegCountersForElasticBulkDelete(bulkDeleteResult);
}
diff --git a/src/main/java/org/onap/aai/sparky/synchronizer/SyncHelper.java b/src/main/java/org/onap/aai/sparky/synchronizer/SyncHelper.java
index 3738acf..617eb08 100644
--- a/src/main/java/org/onap/aai/sparky/synchronizer/SyncHelper.java
+++ b/src/main/java/org/onap/aai/sparky/synchronizer/SyncHelper.java
@@ -92,7 +92,15 @@ public class SyncHelper {
private boolean isInitialSync;
- /**
+ public boolean isInitialSync() {
+ return isInitialSync;
+ }
+
+ public void setInitialSync(boolean isInitialSync) {
+ this.isInitialSync = isInitialSync;
+ }
+
+ /**
* Instantiates a new sync task.
*
* @param initialSync the initial sync
diff --git a/src/main/java/org/onap/aai/sparky/synchronizer/entity/AggregationEntity.java b/src/main/java/org/onap/aai/sparky/synchronizer/entity/AggregationEntity.java
index ff22ba0..af8159a 100644
--- a/src/main/java/org/onap/aai/sparky/synchronizer/entity/AggregationEntity.java
+++ b/src/main/java/org/onap/aai/sparky/synchronizer/entity/AggregationEntity.java
@@ -93,7 +93,35 @@ public class AggregationEntity extends IndexableEntity implements IndexDocument
return rootNode.toString();
}
- @Override
+ /**
+ * @return the attributes
+ */
+ public Map<String, String> getAttributes() {
+ return attributes;
+ }
+
+ /**
+ * @param attributes the attributes to set
+ */
+ public void setAttributes(Map<String, String> attributes) {
+ this.attributes = attributes;
+ }
+
+ /**
+ * @return the mapper
+ */
+ public ObjectMapper getMapper() {
+ return mapper;
+ }
+
+ /**
+ * @param mapper the mapper to set
+ */
+ public void setMapper(ObjectMapper mapper) {
+ this.mapper = mapper;
+ }
+
+@Override
public ObjectNode getBulkImportEntity() {
// TODO Auto-generated method stub
return null;
diff --git a/src/main/java/org/onap/aai/sparky/synchronizer/entity/AggregationSuggestionEntity.java b/src/main/java/org/onap/aai/sparky/synchronizer/entity/AggregationSuggestionEntity.java
index d7755e2..145b23f 100644
--- a/src/main/java/org/onap/aai/sparky/synchronizer/entity/AggregationSuggestionEntity.java
+++ b/src/main/java/org/onap/aai/sparky/synchronizer/entity/AggregationSuggestionEntity.java
@@ -35,6 +35,41 @@ import org.onap.aai.sparky.util.NodeUtils;
public class AggregationSuggestionEntity extends IndexableEntity implements IndexDocument {
private List<String> inputs = new ArrayList<String>();
+ /**
+ * @return the inputs
+ */
+ public List<String> getInputs() {
+ return inputs;
+ }
+
+ /**
+ * @param inputs the inputs to set
+ */
+ public void setInputs(List<String> inputs) {
+ this.inputs = inputs;
+ }
+
+ /**
+ * @return the mapper
+ */
+ public ObjectMapper getMapper() {
+ return mapper;
+ }
+
+ /**
+ * @param mapper the mapper to set
+ */
+ public void setMapper(ObjectMapper mapper) {
+ this.mapper = mapper;
+ }
+
+ /**
+ * @return the outputString
+ */
+ public String getOutputString() {
+ return outputString;
+ }
+
private final String outputString = "VNFs";
protected ObjectMapper mapper = new ObjectMapper();
diff --git a/src/main/java/org/onap/aai/sparky/synchronizer/entity/IndexableCrossEntityReference.java b/src/main/java/org/onap/aai/sparky/synchronizer/entity/IndexableCrossEntityReference.java
index aa604fb..bb564f3 100644
--- a/src/main/java/org/onap/aai/sparky/synchronizer/entity/IndexableCrossEntityReference.java
+++ b/src/main/java/org/onap/aai/sparky/synchronizer/entity/IndexableCrossEntityReference.java
@@ -38,7 +38,49 @@ import com.fasterxml.jackson.databind.node.ObjectNode;
public class IndexableCrossEntityReference extends IndexableEntity implements IndexDocument {
protected String crossReferenceEntityValues;
- protected ArrayList<String> crossEntityReferenceCollection = new ArrayList<String>();
+ /**
+ * @return the crossReferenceEntityValues
+ */
+ public String getCrossReferenceEntityValues() {
+ return crossReferenceEntityValues;
+ }
+
+ /**
+ * @param crossReferenceEntityValues the crossReferenceEntityValues to set
+ */
+ public void setCrossReferenceEntityValues(String crossReferenceEntityValues) {
+ this.crossReferenceEntityValues = crossReferenceEntityValues;
+ }
+
+ /**
+ * @return the crossEntityReferenceCollection
+ */
+ public ArrayList<String> getCrossEntityReferenceCollection() {
+ return crossEntityReferenceCollection;
+ }
+
+ /**
+ * @param crossEntityReferenceCollection the crossEntityReferenceCollection to set
+ */
+ public void setCrossEntityReferenceCollection(ArrayList<String> crossEntityReferenceCollection) {
+ this.crossEntityReferenceCollection = crossEntityReferenceCollection;
+ }
+
+/**
+ * @return the mapper
+ */
+public ObjectMapper getMapper() {
+ return mapper;
+}
+
+/**
+ * @param mapper the mapper to set
+ */
+public void setMapper(ObjectMapper mapper) {
+ this.mapper = mapper;
+}
+
+protected ArrayList<String> crossEntityReferenceCollection = new ArrayList<String>();
protected ObjectMapper mapper = new ObjectMapper();
/**
diff --git a/src/main/java/org/onap/aai/sparky/synchronizer/entity/IndexableEntity.java b/src/main/java/org/onap/aai/sparky/synchronizer/entity/IndexableEntity.java
index 342f8df..4c9a5c6 100644
--- a/src/main/java/org/onap/aai/sparky/synchronizer/entity/IndexableEntity.java
+++ b/src/main/java/org/onap/aai/sparky/synchronizer/entity/IndexableEntity.java
@@ -35,7 +35,43 @@ public abstract class IndexableEntity {
protected String entityType;
protected String entityPrimaryKeyValue;
protected String lastmodTimestamp;
- protected String link;
+
+ /**
+ * @return the lastmodTimestamp
+ */
+ public String getLastmodTimestamp() {
+ return lastmodTimestamp;
+ }
+
+ /**
+ * @param lastmodTimestamp the lastmodTimestamp to set
+ */
+ public void setLastmodTimestamp(String lastmodTimestamp) {
+ this.lastmodTimestamp = lastmodTimestamp;
+ }
+
+ /**
+ * @return the loader
+ */
+ public OxmModelLoader getLoader() {
+ return loader;
+ }
+
+ /**
+ * @param loader the loader to set
+ */
+ public void setLoader(OxmModelLoader loader) {
+ this.loader = loader;
+ }
+
+ /**
+ * @return the timestampFormat
+ */
+ public static String getTimestampFormat() {
+ return TIMESTAMP_FORMAT;
+ }
+
+protected String link;
protected OxmModelLoader loader;
private static final String TIMESTAMP_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSSZ";
diff --git a/src/main/java/org/onap/aai/sparky/synchronizer/entity/MergableEntity.java b/src/main/java/org/onap/aai/sparky/synchronizer/entity/MergableEntity.java
index 1935ed9..f709ee0 100644
--- a/src/main/java/org/onap/aai/sparky/synchronizer/entity/MergableEntity.java
+++ b/src/main/java/org/onap/aai/sparky/synchronizer/entity/MergableEntity.java
@@ -35,6 +35,13 @@ public class MergableEntity {
private Map<String, String> other = new HashMap<String, String>();
/**
+ * @param other the other to set
+ */
+public void setOther(Map<String, String> other) {
+ this.other = other;
+}
+
+/**
* Any.
*
* @return the map
@@ -44,7 +51,11 @@ public class MergableEntity {
return other;
}
- /**
+ public Map<String, String> getOther() {
+ return other;
+}
+
+/**
* Sets the.
*
* @param name the name
diff --git a/src/main/java/org/onap/aai/sparky/synchronizer/entity/ObjectIdCollection.java b/src/main/java/org/onap/aai/sparky/synchronizer/entity/ObjectIdCollection.java
index e423934..e17c430 100644
--- a/src/main/java/org/onap/aai/sparky/synchronizer/entity/ObjectIdCollection.java
+++ b/src/main/java/org/onap/aai/sparky/synchronizer/entity/ObjectIdCollection.java
@@ -34,9 +34,24 @@ public class ObjectIdCollection {
protected ConcurrentHashMap<String, String> importedObjectIds =
new ConcurrentHashMap<String, String>();
- public Collection<String> getImportedObjectIds() {
- return importedObjectIds.values();
- }
+ /**
+ * @return the importedObjectIds
+ */
+ public ConcurrentHashMap<String, String> getImportedObjectIds() {
+ return importedObjectIds;
+ }
+
+ /**
+ * @param importedObjectIds
+ * the importedObjectIds to set
+ */
+ public void setImportedObjectIds(ConcurrentHashMap<String, String> importedObjectIds) {
+ this.importedObjectIds = importedObjectIds;
+ }
+
+ public Collection<String> getImportedObjectIdsAsValues() {
+ return importedObjectIds.values();
+ }
/**
* Adds the object id.
diff --git a/src/main/java/org/onap/aai/sparky/synchronizer/entity/SearchableEntity.java b/src/main/java/org/onap/aai/sparky/synchronizer/entity/SearchableEntity.java
index 46ef7f6..e7cfab1 100644
--- a/src/main/java/org/onap/aai/sparky/synchronizer/entity/SearchableEntity.java
+++ b/src/main/java/org/onap/aai/sparky/synchronizer/entity/SearchableEntity.java
@@ -36,6 +36,48 @@ import org.onap.aai.sparky.util.NodeUtils;
*/
public class SearchableEntity extends IndexableEntity implements IndexDocument {
protected List<String> searchTagCollection = new ArrayList<String>();
+ /**
+ * @return the mapper
+ */
+ public ObjectMapper getMapper() {
+ return mapper;
+ }
+
+ /**
+ * @param mapper the mapper to set
+ */
+ public void setMapper(ObjectMapper mapper) {
+ this.mapper = mapper;
+ }
+
+ /**
+ * @param searchTagCollection the searchTagCollection to set
+ */
+ public void setSearchTagCollection(List<String> searchTagCollection) {
+ this.searchTagCollection = searchTagCollection;
+ }
+
+ /**
+ * @param searchTagIdCollection the searchTagIdCollection to set
+ */
+ public void setSearchTagIdCollection(List<String> searchTagIdCollection) {
+ this.searchTagIdCollection = searchTagIdCollection;
+ }
+
+ /**
+ * @param searchTags the searchTags to set
+ */
+ public void setSearchTags(String searchTags) {
+ this.searchTags = searchTags;
+ }
+
+ /**
+ * @param searchTagIDs the searchTagIDs to set
+ */
+ public void setSearchTagIDs(String searchTagIDs) {
+ this.searchTagIDs = searchTagIDs;
+ }
+
protected List<String> searchTagIdCollection = new ArrayList<String>();
protected ObjectMapper mapper = new ObjectMapper();
diff --git a/src/main/java/org/onap/aai/sparky/synchronizer/entity/SuggestionSearchEntity.java b/src/main/java/org/onap/aai/sparky/synchronizer/entity/SuggestionSearchEntity.java
index 4f6188d..ffe92cf 100644
--- a/src/main/java/org/onap/aai/sparky/synchronizer/entity/SuggestionSearchEntity.java
+++ b/src/main/java/org/onap/aai/sparky/synchronizer/entity/SuggestionSearchEntity.java
@@ -42,6 +42,77 @@ public class SuggestionSearchEntity extends IndexableEntity implements IndexDocu
private String entityType;
private List<String> suggestionConnectorWords = new ArrayList<String>();
private List<String> suggestionAttributeTypes = new ArrayList<String>();
+ /**
+ * @return the suggestionAttributeTypes
+ */
+ public List<String> getSuggestionAttributeTypes() {
+ return suggestionAttributeTypes;
+ }
+
+ /**
+ * @param suggestionAttributeTypes the suggestionAttributeTypes to set
+ */
+ public void setSuggestionAttributeTypes(List<String> suggestionAttributeTypes) {
+ this.suggestionAttributeTypes = suggestionAttributeTypes;
+ }
+
+ /**
+ * @return the suggestionTypeAliases
+ */
+ public List<String> getSuggestionTypeAliases() {
+ return suggestionTypeAliases;
+ }
+
+ /**
+ * @param suggestionTypeAliases the suggestionTypeAliases to set
+ */
+ public void setSuggestionTypeAliases(List<String> suggestionTypeAliases) {
+ this.suggestionTypeAliases = suggestionTypeAliases;
+ }
+
+ /**
+ * @return the suggestableAttr
+ */
+ public List<String> getSuggestableAttr() {
+ return suggestableAttr;
+ }
+
+ /**
+ * @param suggestableAttr the suggestableAttr to set
+ */
+ public void setSuggestableAttr(List<String> suggestableAttr) {
+ this.suggestableAttr = suggestableAttr;
+ }
+
+ /**
+ * @return the outputString
+ */
+ public StringBuffer getOutputString() {
+ return outputString;
+ }
+
+ /**
+ * @param outputString the outputString to set
+ */
+ public void setOutputString(StringBuffer outputString) {
+ this.outputString = outputString;
+ }
+
+ /**
+ * @return the mapper
+ */
+ public ObjectMapper getMapper() {
+ return mapper;
+ }
+
+ /**
+ * @param mapper the mapper to set
+ */
+ public void setMapper(ObjectMapper mapper) {
+ this.mapper = mapper;
+ }
+
+
private List<String> suggestionAttributeValues = new ArrayList<String>();
private List<String> suggestionTypeAliases = new ArrayList<String>();
private List<String> suggestionInputPermutations = new ArrayList<String>();
diff --git a/src/main/java/org/onap/aai/sparky/synchronizer/entity/TransactionStorageType.java b/src/main/java/org/onap/aai/sparky/synchronizer/entity/TransactionStorageType.java
index 2f0ffa8..7bb131c 100644
--- a/src/main/java/org/onap/aai/sparky/synchronizer/entity/TransactionStorageType.java
+++ b/src/main/java/org/onap/aai/sparky/synchronizer/entity/TransactionStorageType.java
@@ -30,7 +30,22 @@ public enum TransactionStorageType {
"aaiOffline/active-inventory-query");
private Integer index;
- private String outputFolder;
+
+ /**
+ * @param index the index to set
+ */
+ public void setIndex(Integer index) {
+ this.index = index;
+ }
+
+ /**
+ * @param outputFolder the outputFolder to set
+ */
+ public void setOutputFolder(String outputFolder) {
+ this.outputFolder = outputFolder;
+ }
+
+private String outputFolder;
/**
* Instantiates a new transaction storage type.