* ============LICENSE_START=======================================================
* org.onap.aai
* ================================================================================
- * Copyright © 2017 AT&T Intellectual Property. All rights reserved.
- * Copyright © 2017 Amdocs
+ * Copyright © 2017-2018 AT&T Intellectual Property. All rights reserved.
+ * Copyright © 2017-2018 Amdocs
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============LICENSE_END=========================================================
- *
- * ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
package org.onap.aai.datarouter.entity;
import org.json.JSONArray;
import org.json.JSONObject;
-import org.openecomp.datarouter.search.filters.config.UiFilterConfig;
-import org.openecomp.datarouter.search.filters.config.UiFiltersConfig;
-import org.openecomp.datarouter.search.filters.config.UiFiltersSchemaUtility;
-import org.openecomp.datarouter.util.NodeUtils;
-import org.openecomp.datarouter.util.SearchSuggestionPermutation;
+import org.onap.aai.datarouter.search.filters.config.UiFilterConfig;
+import org.onap.aai.datarouter.search.filters.config.UiFiltersConfig;
+import org.onap.aai.datarouter.search.filters.config.UiFiltersSchemaUtility;
+import org.onap.aai.datarouter.util.NodeUtils;
+import org.onap.aai.datarouter.util.SearchSuggestionPermutation;
import com.fasterxml.jackson.databind.JsonNode;
-public class SuggestionSearchEntity implements DocumentStoreDataEntity, Serializable {
- private static final long serialVersionUID = -3636393943669310760L;
+public class SuggestionSearchEntity implements DocumentStoreDataEntity {
private static final String FILTER_ID = "filterId";
private static final String FILTER_VALUE = "filterValue";
private Map<String, String> inputOutputData = new HashMap<>();
private Map<String, UiFilterConfig> filters = new HashMap<>();
private JSONObject filterPayload = new JSONObject();
- private StringBuffer searchSuggestionDisplayString = new StringBuffer();
+ private StringBuilder searchSuggestionDisplayString = new StringBuilder();
private JSONArray payloadFilters = new JSONArray();
private UiFiltersSchemaUtility filtersSchemaUtility = new UiFiltersSchemaUtility();
}
}
- ArrayList<String> listOfSearchSuggestionPermutations = new ArrayList<String>();
+ ArrayList<String> listOfSearchSuggestionPermutations = new ArrayList<>();
ArrayList<String> listToPermutate =
new ArrayList<>(this.getInputOutputData().values());
JSONObject rootNode = new JSONObject();
JSONArray inputArray = new JSONArray();
JSONObject payloadNode = new JSONObject();
- StringBuffer outputString = new StringBuffer();
+ StringBuilder outputString = new StringBuilder();
int payloadEntryCounter = 1;
inputOutputData.put(attribute, entityFromUebEvent.get(attribute).asText());
if(filterConfig != null) {
- JSONObject filterPayload = new JSONObject();
- filterPayload.put(FILTER_ID, filterConfig.getFilterId());
- filterPayload.put(FILTER_VALUE, entityFromUebEvent.get(attribute).asText());
- this.payloadFilters.put(filterPayload);
+ JSONObject jsonFilterPayload = new JSONObject();
+ jsonFilterPayload.put(FILTER_ID, filterConfig.getFilterId());
+ jsonFilterPayload.put(FILTER_VALUE, entityFromUebEvent.get(attribute).asText());
+ this.payloadFilters.put(jsonFilterPayload);
} else {
this.filterPayload.put(attribute, entityFromUebEvent.get(attribute).asText());
}
return id;
}
- public StringBuffer getSearchSuggestionDisplayString() {
+ public StringBuilder getSearchSuggestionDisplayString() {
return searchSuggestionDisplayString;
}
return inputOutputData;
}
- public void setSearchSuggestionDisplayString(StringBuffer searchSuggestionDisplayString) {
+ public void setSearchSuggestionDisplayString(StringBuilder searchSuggestionDisplayString) {
this.searchSuggestionDisplayString = searchSuggestionDisplayString;
}