X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ONAP-PAP-REST%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fpolicy%2Fpap%2Fxacml%2Frest%2Fcontroller%2FClosedLoopDictionaryController.java;h=a55ed400474dd14d761e2bd5998654bafcb8dce7;hb=1ef83d84ac1f803280686cca6960d1dc20695ace;hp=d142a46f39a4333630de382de5203d29c472f73b;hpb=6fdf2fd8d754e59977bf107d60725b8394771f69;p=policy%2Fengine.git diff --git a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/controller/ClosedLoopDictionaryController.java b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/controller/ClosedLoopDictionaryController.java index d142a46f3..a55ed4004 100644 --- a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/controller/ClosedLoopDictionaryController.java +++ b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/controller/ClosedLoopDictionaryController.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP-PAP-REST * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,6 +35,7 @@ import org.json.JSONObject; import org.onap.policy.common.logging.flexlogger.FlexLogger; import org.onap.policy.common.logging.flexlogger.Logger; import org.onap.policy.pap.xacml.rest.adapters.GridData; +import org.onap.policy.pap.xacml.rest.daoimpl.CommonClassDaoImpl; import org.onap.policy.pap.xacml.rest.util.JsonMessage; import org.onap.policy.rest.dao.CommonClassDao; import org.onap.policy.rest.jpa.ClosedLoopD2Services; @@ -44,6 +45,7 @@ import org.onap.policy.rest.jpa.UserInfo; import org.onap.policy.rest.jpa.VNFType; import org.onap.policy.rest.jpa.VSCLAction; import org.onap.policy.rest.jpa.VarbindDictionary; +import org.onap.policy.utils.PolicyUtils; import org.onap.policy.xacml.api.XACMLErrorConstants; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.MediaType; @@ -86,6 +88,10 @@ public class ClosedLoopDictionaryController{ public ClosedLoopDictionaryController(CommonClassDao commonClassDao){ ClosedLoopDictionaryController.commonClassDao = commonClassDao; } + + public void setCommonClassDao(CommonClassDao commonClassDao){ + ClosedLoopDictionaryController.commonClassDao = commonClassDao; + } /* * This is an empty constructor */ @@ -391,7 +397,7 @@ public class ClosedLoopDictionaryController{ response.setCharacterEncoding(utf8); request.setCharacterEncoding(utf8); PrintWriter out = response.getWriter(); - out.write(e.getMessage()); + out.write(PolicyUtils.CATCH_EXCEPTION); } return null; } @@ -421,7 +427,7 @@ public class ClosedLoopDictionaryController{ response.setCharacterEncoding(utf8); request.setCharacterEncoding(utf8); PrintWriter out = response.getWriter(); - out.write(e.getMessage()); + out.write(PolicyUtils.CATCH_EXCEPTION); } return null; } @@ -512,7 +518,7 @@ public class ClosedLoopDictionaryController{ response.setCharacterEncoding(utf8); request.setCharacterEncoding(utf8); PrintWriter out = response.getWriter(); - out.write(e.getMessage()); + out.write(PolicyUtils.CATCH_EXCEPTION); } return null; } @@ -542,7 +548,7 @@ public class ClosedLoopDictionaryController{ response.setCharacterEncoding(utf8); request.setCharacterEncoding(utf8); PrintWriter out = response.getWriter(); - out.write(e.getMessage()); + out.write(PolicyUtils.CATCH_EXCEPTION); } return null; } @@ -652,7 +658,7 @@ public class ClosedLoopDictionaryController{ response.setCharacterEncoding(utf8); request.setCharacterEncoding(utf8); PrintWriter out = response.getWriter(); - out.write(e.getMessage()); + out.write(PolicyUtils.CATCH_EXCEPTION); } return null; } @@ -682,7 +688,7 @@ public class ClosedLoopDictionaryController{ response.setCharacterEncoding(utf8); request.setCharacterEncoding(utf8); PrintWriter out = response.getWriter(); - out.write(e.getMessage()); + out.write(PolicyUtils.CATCH_EXCEPTION); } return null; } @@ -770,7 +776,7 @@ public class ClosedLoopDictionaryController{ response.setCharacterEncoding(utf8); request.setCharacterEncoding(utf8); PrintWriter out = response.getWriter(); - out.write(e.getMessage()); + out.write(PolicyUtils.CATCH_EXCEPTION); } return null; } @@ -800,7 +806,7 @@ public class ClosedLoopDictionaryController{ response.setCharacterEncoding(utf8); request.setCharacterEncoding(utf8); PrintWriter out = response.getWriter(); - out.write(e.getMessage()); + out.write(PolicyUtils.CATCH_EXCEPTION); } return null; } @@ -889,7 +895,7 @@ public class ClosedLoopDictionaryController{ response.setCharacterEncoding(utf8); request.setCharacterEncoding(utf8); PrintWriter out = response.getWriter(); - out.write(e.getMessage()); + out.write(PolicyUtils.CATCH_EXCEPTION); } return null; } @@ -919,7 +925,7 @@ public class ClosedLoopDictionaryController{ response.setCharacterEncoding(utf8); request.setCharacterEncoding(utf8); PrintWriter out = response.getWriter(); - out.write(e.getMessage()); + out.write(PolicyUtils.CATCH_EXCEPTION); } return null; } @@ -1008,7 +1014,7 @@ public class ClosedLoopDictionaryController{ response.setCharacterEncoding(utf8); request.setCharacterEncoding(utf8); PrintWriter out = response.getWriter(); - out.write(e.getMessage()); + out.write(PolicyUtils.CATCH_EXCEPTION); } return null; } @@ -1038,10 +1044,14 @@ public class ClosedLoopDictionaryController{ response.setCharacterEncoding(utf8); request.setCharacterEncoding(utf8); PrintWriter out = response.getWriter(); - out.write(e.getMessage()); + out.write(PolicyUtils.CATCH_EXCEPTION); } return null; } + + public static void setCommonClassDao(CommonClassDaoImpl commonClassDaoImpl) { + commonClassDao = commonClassDaoImpl; + } }