LOGGER.error("The Value is empty.");
return false;
} else {
- if (CharMatcher.ASCII.matchesAllOf((CharSequence) jsonString)) {
+ if (CharMatcher.ascii().matchesAllOf((CharSequence) jsonString)) {
LOGGER.info("The Value does not contain ASCII Characters");
isValidForm = true;
} else {
}
return isValidForm;
}
-
+
+ public static String formatResponse(StringBuilder responseString){
+
+ LOGGER.info("Formatting response message from Policy Validator");
+ String response = responseString.toString().replace("<br>", " | ");
+ response = response.replaceAll("(<b>|<\\/b>|<br>|<i>|<\\/i>|@#)", "");
+
+ return response;
+ }
+
public static boolean isNumeric(String str) {
for (char c : str.toCharArray()) {
if (!Character.isDigit(c))
|| "PUT".equals(json.getString("method").trim())
|| "POST".equals(json.getString("method").trim())){
- message = SUCCESS;
-
+ //Successful Validation
+
}else{
message = XACMLErrorConstants.ERROR_DATA_ISSUE + "Invalid Method value.";
return message;