aboutsummaryrefslogtreecommitdiffstats
path: root/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/XACMLPapServlet.java
diff options
context:
space:
mode:
authorRavindra Bakkamanthala <rb7147@att.com>2017-05-31 15:54:24 -0400
committerRavindra Bakkamanthala <rb7147@att.com>2017-05-31 15:57:02 -0400
commitd9007d680d19734d5dc106479784c420236cca4b (patch)
treeb3356847c3d6e1543098b447c1df7d49e7118652 /ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/XACMLPapServlet.java
parent6a5e800771311208c66ad79ce1bdf76affd144b2 (diff)
[Policy-17] Removed the sql scripts from sdk app
Change-Id: I5b017aad569014c7f12eab35e1dbd1c215f90ebe Signed-off-by: Ravindra Bakkamanthala <rb7147@att.com>
Diffstat (limited to 'ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/XACMLPapServlet.java')
-rw-r--r--ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/XACMLPapServlet.java65
1 files changed, 59 insertions, 6 deletions
diff --git a/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/XACMLPapServlet.java b/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/XACMLPapServlet.java
index 5e7e2436f..685582e29 100644
--- a/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/XACMLPapServlet.java
+++ b/ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/XACMLPapServlet.java
@@ -152,10 +152,10 @@ public class XACMLPapServlet extends HttpServlet implements StdItemSetChangeList
* These are the parameters needed for DB access from the PAP
*/
private static int papIntegrityAuditPeriodSeconds = -1;
- public static String papDbDriver = null;
- public static String papDbUrl = null;
- public static String papDbUser = null;
- public static String papDbPassword = null;
+ private static String papDbDriver = null;
+ private static String papDbUrl = null;
+ private static String papDbUser = null;
+ private static String papDbPassword = null;
private static Integer papTransWait = null;
private static Integer papTransTimeout = null;
private static Integer papAuditTimeout = null;
@@ -179,8 +179,8 @@ public class XACMLPapServlet extends HttpServlet implements StdItemSetChangeList
private IntegrityAudit ia;
//MicroService Model Properties
- public static String msEcompName;
- public static String msPolicyName;
+ private static String msEcompName;
+ private static String msPolicyName;
/*
* This thread may be invoked upon startup to initiate sending PDP policy/pip configuration when
* this servlet starts. Its configurable by the admin.
@@ -224,21 +224,25 @@ public class XACMLPapServlet extends HttpServlet implements StdItemSetChangeList
PolicyLogger.error(MessageCodes.ERROR_DATA_ISSUE,"XACMLPapServlet", " ERROR: Bad papDbDriver property entry");
throw new PAPException("papDbDriver is null");
}
+ setPapDbDriver(papDbDriver);
papDbUrl = XACMLProperties.getProperty(XACMLRestProperties.PROP_PAP_DB_URL);
if(papDbUrl == null){
PolicyLogger.error(MessageCodes.ERROR_DATA_ISSUE,"XACMLPapServlet", " ERROR: Bad papDbUrl property entry");
throw new PAPException("papDbUrl is null");
}
+ setPapDbUrl(papDbUrl);
papDbUser = XACMLProperties.getProperty(XACMLRestProperties.PROP_PAP_DB_USER);
if(papDbUser == null){
PolicyLogger.error(MessageCodes.ERROR_DATA_ISSUE,"XACMLPapServlet", " ERROR: Bad papDbUser property entry");
throw new PAPException("papDbUser is null");
}
+ setPapDbUser(papDbUser);
papDbPassword = XACMLProperties.getProperty(XACMLRestProperties.PROP_PAP_DB_PASSWORD);
if(papDbPassword == null){
PolicyLogger.error(MessageCodes.ERROR_DATA_ISSUE,"XACMLPapServlet", " ERROR: Bad papDbPassword property entry");
throw new PAPException("papDbPassword is null");
}
+ setPapDbPassword(papDbPassword);
papResourceName = XACMLProperties.getProperty(XACMLRestProperties.PAP_RESOURCE_NAME);
if(papResourceName == null){
PolicyLogger.error(MessageCodes.ERROR_DATA_ISSUE,"XACMLPapServlet", " ERROR: Bad papResourceName property entry");
@@ -350,7 +354,9 @@ public class XACMLPapServlet extends HttpServlet implements StdItemSetChangeList
}
//Micro Service Properties
msEcompName=properties.getProperty("xacml.policy.msEcompName");
+ setMsEcompName(msEcompName);
msPolicyName=properties.getProperty("xacml.policy.msPolicyName");
+ setMsPolicyName(msPolicyName);
// PDPId File location
XACMLPapServlet.pdpFile = XACMLProperties.getProperty(XACMLRestProperties.PROP_PDP_IDFILE);
if (XACMLPapServlet.pdpFile == null) {
@@ -2594,4 +2600,51 @@ public class XACMLPapServlet extends HttpServlet implements StdItemSetChangeList
public static PolicyDBDaoTransaction getDbDaoTransaction(){
return policyDBDao.getNewTransaction();
}
+ public static String getPapDbDriver() {
+ return papDbDriver;
+ }
+
+ public static void setPapDbDriver(String papDbDriver) {
+ XACMLPapServlet.papDbDriver = papDbDriver;
+ }
+
+ public static String getPapDbUrl() {
+ return papDbUrl;
+ }
+
+ public static void setPapDbUrl(String papDbUrl) {
+ XACMLPapServlet.papDbUrl = papDbUrl;
+ }
+
+ public static String getPapDbUser() {
+ return papDbUser;
+ }
+
+ public static void setPapDbUser(String papDbUser) {
+ XACMLPapServlet.papDbUser = papDbUser;
+ }
+
+ public static String getPapDbPassword() {
+ return papDbPassword;
+ }
+
+ public static void setPapDbPassword(String papDbPassword) {
+ XACMLPapServlet.papDbPassword = papDbPassword;
+ }
+
+ public static String getMsEcompName() {
+ return msEcompName;
+ }
+
+ public static void setMsEcompName(String msEcompName) {
+ XACMLPapServlet.msEcompName = msEcompName;
+ }
+
+ public static String getMsPolicyName() {
+ return msPolicyName;
+ }
+
+ public static void setMsPolicyName(String msPolicyName) {
+ XACMLPapServlet.msPolicyName = msPolicyName;
+ }
}