import com.att.research.xacml.api.pap.PAPException;
import com.att.research.xacml.api.pap.PDPPolicy;
import com.att.research.xacml.util.XACMLProperties;
+
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
+
import javax.persistence.PersistenceException;
import javax.persistence.RollbackException;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathFactory;
+
import oasis.names.tc.xacml._3_0.core.schema.wd_17.PolicySetType;
import oasis.names.tc.xacml._3_0.core.schema.wd_17.PolicyType;
+
import org.apache.commons.io.FilenameUtils;
import org.apache.commons.io.IOUtils;
import org.hibernate.Query;
import org.onap.policy.common.logging.eelf.PolicyLogger;
import org.onap.policy.common.logging.flexlogger.FlexLogger;
import org.onap.policy.common.logging.flexlogger.Logger;
-import org.onap.policy.rest.XACMLRestProperties;
+import org.onap.policy.rest.XacmlRestProperties;
import org.onap.policy.rest.adapter.PolicyRestAdapter;
import org.onap.policy.rest.dao.PolicyDBException;
import org.onap.policy.rest.jpa.ActionBodyEntity;
import org.w3c.dom.Document;
import org.xml.sax.InputSource;
-
@Component
public class PolicyDbDaoTransactionInstance implements PolicyDBDaoTransaction {
private static final String PDP_NOTIFICATION = "pdp";
private static final String GROUP_NOTIFICATION = "group";
-
private static final String DECISIONMS_MODEL = "MicroService_Model";
private static boolean isJunit = false;
Session session;
*/
public PolicyDbDaoTransactionInstance(String test) {
// call the constructor with arguments
- this(Integer.parseInt(XACMLProperties.getProperty(XACMLRestProperties.PROP_PAP_TRANS_TIMEOUT)),
- Integer.parseInt(XACMLProperties.getProperty(XACMLRestProperties.PROP_PAP_TRANS_WAIT)));
+ this(Integer.parseInt(XACMLProperties.getProperty(XacmlRestProperties.PROP_PAP_TRANS_TIMEOUT)),
+ Integer.parseInt(XACMLProperties.getProperty(XacmlRestProperties.PROP_PAP_TRANS_WAIT)));
}
public PolicyDbDaoTransactionInstance() {
private static SessionFactory sessionfactory;
-
/**
* Instantiates a new policy DB dao transaction instance.
*
}
}
-
public PolicyEntity getPolicy(int policyId) {
return getPolicy(policyId, null, null);
}
private String processConfigPath(String inputConfigPath) {
String configPath = inputConfigPath;
- String webappsPath = XACMLProperties.getProperty(XACMLRestProperties.PROP_PAP_WEBAPPS);
+ String webappsPath = XACMLProperties.getProperty(XacmlRestProperties.PROP_PAP_WEBAPPS);
if (webappsPath == null) {
logger.error("Webapps property does not exist");
throw new IllegalArgumentException("Webapps property does not exist");
return configDataString;
}
-
@Override
public void close() {
synchronized (emLock) {