summaryrefslogtreecommitdiffstats
path: root/integrity-audit/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'integrity-audit/src/main/java')
-rw-r--r--integrity-audit/src/main/java/org/onap/policy/common/ia/AuditThread.java2
-rw-r--r--integrity-audit/src/main/java/org/onap/policy/common/ia/DbDao.java2
-rw-r--r--integrity-audit/src/main/java/org/onap/policy/common/ia/IntegrityAudit.java9
-rw-r--r--integrity-audit/src/main/java/org/onap/policy/common/ia/IntegrityAuditProperties.java2
4 files changed, 8 insertions, 7 deletions
diff --git a/integrity-audit/src/main/java/org/onap/policy/common/ia/AuditThread.java b/integrity-audit/src/main/java/org/onap/policy/common/ia/AuditThread.java
index 25bafdc4..25335540 100644
--- a/integrity-audit/src/main/java/org/onap/policy/common/ia/AuditThread.java
+++ b/integrity-audit/src/main/java/org/onap/policy/common/ia/AuditThread.java
@@ -131,7 +131,7 @@ public class AuditThread extends Thread {
* other nodes of similar type.
*/
dbDao = new DbDao(this.resourceName, this.persistenceUnit, this.properties);
- this.nodeType = properties.getProperty(IntegrityAuditProperties.NODE_TYPE);
+ this.nodeType = properties.getProperty(IntegrityAuditProperties.NODE_TYPE).toLowerCase();
}
diff --git a/integrity-audit/src/main/java/org/onap/policy/common/ia/DbDao.java b/integrity-audit/src/main/java/org/onap/policy/common/ia/DbDao.java
index 0235715d..80177b30 100644
--- a/integrity-audit/src/main/java/org/onap/policy/common/ia/DbDao.java
+++ b/integrity-audit/src/main/java/org/onap/policy/common/ia/DbDao.java
@@ -143,7 +143,7 @@ public class DbDao {
this.dbUrl = properties.getProperty(IntegrityAuditProperties.DB_URL).trim();
this.dbUser = properties.getProperty(IntegrityAuditProperties.DB_USER).trim();
this.siteName = properties.getProperty(IntegrityAuditProperties.SITE_NAME).trim();
- this.nodeType = properties.getProperty(IntegrityAuditProperties.NODE_TYPE).trim();
+ this.nodeType = properties.getProperty(IntegrityAuditProperties.NODE_TYPE).trim().toLowerCase();
this.properties = properties;
logger.debug("DbDao.assignProperties: exit:" + "\nresourceName: " + this.resourceName + "\npersistenceUnit: "
+ this.persistenceUnit + "\nproperties: " + this.properties);
diff --git a/integrity-audit/src/main/java/org/onap/policy/common/ia/IntegrityAudit.java b/integrity-audit/src/main/java/org/onap/policy/common/ia/IntegrityAudit.java
index 61bf947e..41aea118 100644
--- a/integrity-audit/src/main/java/org/onap/policy/common/ia/IntegrityAudit.java
+++ b/integrity-audit/src/main/java/org/onap/policy/common/ia/IntegrityAudit.java
@@ -105,7 +105,7 @@ public class IntegrityAudit {
*/
public static boolean isNodeTypeEnum(String nt) {
for (NodeTypeEnum n : NodeTypeEnum.values()) {
- if (n.toString().equals(nt)) {
+ if (n.toString().equalsIgnoreCase(nt)) {
return true;
}
}
@@ -171,11 +171,12 @@ public class IntegrityAudit {
} else {
nodeType = nodeType.trim();
if (!isNodeTypeEnum(nodeType)) {
- String nodetypes = "nodeType must be one of[";
+ badparams.append("nodeType must be one of[");
for (NodeTypeEnum n : NodeTypeEnum.values()) {
- nodetypes = nodetypes.concat(n.toString() + " ");
+ badparams.append(n.toString());
+ badparams.append(' ');
}
- badparams.append(nodetypes + "] ");
+ badparams.append("] ");
return true;
}
}
diff --git a/integrity-audit/src/main/java/org/onap/policy/common/ia/IntegrityAuditProperties.java b/integrity-audit/src/main/java/org/onap/policy/common/ia/IntegrityAuditProperties.java
index 2ca5dd58..40b2af5a 100644
--- a/integrity-audit/src/main/java/org/onap/policy/common/ia/IntegrityAuditProperties.java
+++ b/integrity-audit/src/main/java/org/onap/policy/common/ia/IntegrityAuditProperties.java
@@ -35,7 +35,7 @@ public class IntegrityAuditProperties {
public static final String NODE_TYPE = "node_type";
public enum NodeTypeEnum {
- pdp_xacml, pdp_drools, pap, pap_admin, logparser, brms_gateway, astra_gateway, elk_server, pypdp
+ PDP_XACML, PDP_DROOLS, PAP, PAP_ADMIN, LOGPARSER, BRMS_GATEWAY, ASTRA_GATEWAY, ELK_SERVER, PYPDP
}