* limitations under the License.
* ============LICENSE_END============================================
* ===================================================================
- * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ *
*/
package org.onap.clamp.clds.model.properties;
import com.att.eelf.configuration.EELFLogger;
import com.att.eelf.configuration.EELFManager;
-import com.fasterxml.jackson.databind.JsonNode;
+import com.google.gson.JsonArray;
/**
* Parse ONAP Tca Threshold json properties.
private String closedLoopEventStatus;
/**
- * Parse Tca Threshhold given json node
+ * Parse Tca Threshhold given json node.
*
- * @param node
+ * @param tcaTresholdConfiguration The tca threshold in JsonArray format
*/
- public TcaThreshold(JsonNode node) {
+ public TcaThreshold(JsonArray tcaTresholdConfiguration) {
- if (node.get(0) != null) {
- fieldPath = node.get(0).asText();
+ if (tcaTresholdConfiguration.get(0) != null) {
+ fieldPath = tcaTresholdConfiguration.get(0).getAsString();
}
- if (node.get(1) != null) {
- operator = node.get(1).asText();
+ if (tcaTresholdConfiguration.get(1) != null) {
+ operator = tcaTresholdConfiguration.get(1).getAsString();
}
- if (node.get(2) != null) {
- threshold = Integer.valueOf(node.get(2).asText());
+ if (tcaTresholdConfiguration.get(2) != null) {
+ threshold = Integer.valueOf(tcaTresholdConfiguration.get(2).getAsString());
}
- if (node.get(3) != null) {
- closedLoopEventStatus = node.get(3).asText();
+ if (tcaTresholdConfiguration.get(3) != null) {
+ closedLoopEventStatus = tcaTresholdConfiguration.get(3).getAsString();
}
}