aboutsummaryrefslogtreecommitdiffstats
path: root/ONAP-PAP-REST/src/main/java
diff options
context:
space:
mode:
authorMichael Mokry <mm117s@att.com>2017-11-14 15:01:13 -0600
committerMichael Mokry <mm117s@att.com>2017-12-04 15:19:21 +0000
commitb3828de54af94f66e3a6e22bcaeb3372d14eab34 (patch)
tree8f89a097cb8979f1e1cbb3dcc4df61a695a0db27 /ONAP-PAP-REST/src/main/java
parentdb597fe2163c073e37ad2ddc0d7fe386517e21e0 (diff)
Refactor to provide Common Policy Validation
Provides a common class to perform policy validation during create/udpate of policies by the GUI and API for consistency. Change-Id: Ied459e73d48517bb50064cd10d6a1c871b8311e5 Issue-ID: POLICY-449 Signed-off-by: Michael Mokry <mm117s@att.com>
Diffstat (limited to 'ONAP-PAP-REST/src/main/java')
-rw-r--r--ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/daoimpl/CommonClassDaoImpl.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/daoimpl/CommonClassDaoImpl.java b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/daoimpl/CommonClassDaoImpl.java
index 1766cb302..c7148213d 100644
--- a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/daoimpl/CommonClassDaoImpl.java
+++ b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/daoimpl/CommonClassDaoImpl.java
@@ -44,9 +44,12 @@ import org.onap.policy.rest.jpa.GroupPolicyScopeList;
import org.onap.policy.rest.jpa.PolicyRoles;
import org.onap.policy.xacml.api.XACMLErrorConstants;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Primary;
+import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
@Service("CommonClassDao")
+@Primary
public class CommonClassDaoImpl implements CommonClassDao{
private static final Log LOGGER = LogFactory.getLog(CommonClassDaoImpl.class);
@@ -54,6 +57,7 @@ public class CommonClassDaoImpl implements CommonClassDao{
private static SessionFactory sessionFactory;
+
@Autowired
private CommonClassDaoImpl(SessionFactory sessionFactory){
CommonClassDaoImpl.sessionFactory = sessionFactory;