aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/org/onap/dcae/common/ConfigProcessors.java
diff options
context:
space:
mode:
authorVijay Venkatesh Kumar <vv770d@att.com>2023-02-03 18:42:28 -0500
committerVijay Venkatesh Kumar <vv770d@att.com>2023-02-03 18:52:24 -0500
commit147999fca04f4c857209ff9594a69ccb2e2754d1 (patch)
tree7dd61925f756806000e6f1a20f4925fa5c57184f /src/main/java/org/onap/dcae/common/ConfigProcessors.java
parent952fa4a24a47b648b68f6d86b73e2cc05e044d46 (diff)
VESCollector test additions
Add additional tests for ConfigProcessor and ApiAuthInterceptor Change-Id: Ic8a3debe9bb11997b8aef3dc752017d2b2804b14 Signed-off-by: Vijay Venkatesh Kumar <vv770d@att.com> Issue-ID: DCAEGEN2-3345 Signed-off-by: Vijay Venkatesh Kumar <vv770d@att.com>
Diffstat (limited to 'src/main/java/org/onap/dcae/common/ConfigProcessors.java')
-rw-r--r--src/main/java/org/onap/dcae/common/ConfigProcessors.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/main/java/org/onap/dcae/common/ConfigProcessors.java b/src/main/java/org/onap/dcae/common/ConfigProcessors.java
index d1c5e5a0..040a3e6e 100644
--- a/src/main/java/org/onap/dcae/common/ConfigProcessors.java
+++ b/src/main/java/org/onap/dcae/common/ConfigProcessors.java
@@ -2,8 +2,7 @@
* ============LICENSE_START=======================================================
* PROJECT
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights
- * reserved.
+ * Copyright (C) 2017,2023 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -72,7 +71,7 @@ public class ConfigProcessors {
}
- private String evaluate(String str) {
+ String evaluate(String str) {
String value = str;
if (str.startsWith("$")) {
value = (String) getEventObjectVal(str.substring(1));
@@ -134,7 +133,7 @@ public class ConfigProcessors {
}
- private void renameArrayInArray(JSONObject jsonObject) // map
+ void renameArrayInArray(JSONObject jsonObject) // map
{
log.info("renameArrayInArray");
final String field = jsonObject.getString(FIELD);
@@ -437,7 +436,7 @@ public class ConfigProcessors {
}
- private boolean checkFilter(JSONObject jo, String key, String logicKey) {
+ boolean checkFilter(JSONObject jo, String key, String logicKey) {
String filterValue = jo.getString(key);
if (filterValue.contains(":")) {
String[] splitVal = filterValue.split(":");
@@ -455,7 +454,7 @@ public class ConfigProcessors {
}
}
- if ("contains".equals(splitVal[0])) {
+ if ("contains".equals(splitVal[0])) {
if ("not".equals(logicKey)) {
if (getEventObjectVal(key).toString().contains(splitVal[1])) {
log.info(filterValue + "==" + key + "==" + getEventObjectVal(key) + COMP_FALSE);