summaryrefslogtreecommitdiffstats
path: root/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/Policy.java
diff options
context:
space:
mode:
Diffstat (limited to 'ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/Policy.java')
-rw-r--r--ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/Policy.java33
1 files changed, 0 insertions, 33 deletions
diff --git a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/Policy.java b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/Policy.java
index 169e6e14e..20c76f3be 100644
--- a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/Policy.java
+++ b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/Policy.java
@@ -20,23 +20,17 @@
package org.onap.policy.pap.xacml.rest.components;
-import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URI;
import java.net.URISyntaxException;
-import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.HashMap;
import java.util.Map;
-import javax.json.Json;
-import javax.json.JsonReader;
-
import org.apache.commons.io.FilenameUtils;
-import org.json.JSONObject;
import org.onap.policy.common.logging.eelf.MessageCodes;
import org.onap.policy.common.logging.eelf.PolicyLogger;
import org.onap.policy.common.logging.flexlogger.FlexLogger;
@@ -202,33 +196,6 @@ public abstract class Policy {
return dynamicMatch;
}
- //validation for numeric
- protected boolean isNumeric(String str){
- for (char c : str.toCharArray()){
- if (!Character.isDigit(c)) return false;
- }
- return true;
- }
-
- // Validation for json.
- protected static boolean isJSONValid(String data) {
- JsonReader jsonReader = null;
- try {
- new JSONObject(data);
- InputStream stream = new ByteArrayInputStream(data.getBytes(StandardCharsets.UTF_8));
- jsonReader = Json.createReader(stream);
- LOGGER.info("Json Value is: " + jsonReader.read().toString() );
- } catch (Exception e) {
- LOGGER.error("Exception Occured while reading json"+e);
- return false;
- }finally{
- if(jsonReader != null){
- jsonReader.close();
- }
- }
- return true;
- }
-
// the Policy Name as Unique One throws error
@SuppressWarnings("static-access")
protected Path getNextFilename(Path parent, String policyType, String polcyFileName, Integer version) {