diff options
author | rb7147 <rb7147@att.com> | 2017-06-15 09:42:41 -0400 |
---|---|---|
committer | rb7147 <rb7147@att.com> | 2017-06-15 13:27:54 -0400 |
commit | a084c4de015521f842a3fef0d7f1f7c340237bc3 (patch) | |
tree | 0a3ca8266ee4f91cf246268d6b8b22722899c0ec /ECOMP-PAP-REST/src/main/java/org/openecomp/policy/pap/xacml/rest/XACMLPapServlet.java | |
parent | 685ed1545ed28b777a3ba6e7d315b78f355154cb (diff) |
[Policy-8 ,Policy-23] Updated Matchid for policies
Commit includes Resolved Sonar blokcers
Included the 1707 database scripts.
Change-Id: I2ffdfce57e6dee0892b272b23283bf246204599a
Signed-off-by: rb7147 <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.java | 8 |
1 files changed, 3 insertions, 5 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 4ceae062b..c681c9325 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 @@ -1495,6 +1495,7 @@ public class XACMLPapServlet extends HttpServlet implements StdItemSetChangeList try{ doACPostTransaction.movePdp(pdp, group, "XACMLPapServlet.doACPost"); }catch(Exception e){ + doACPostTransaction.rollbackTransaction(); PolicyLogger.error(MessageCodes.ERROR_PROCESS_FLOW, e, "XACMLPapServlet", " Error while moving pdp in the database: " +"pdp="+pdp.getId()+",to group="+group.getId()); @@ -1520,9 +1521,6 @@ public class XACMLPapServlet extends HttpServlet implements StdItemSetChangeList return; } } catch (PAPException e) { - if(doACPostTransaction != null){ - doACPostTransaction.rollbackTransaction(); - } PolicyLogger.error(MessageCodes.ERROR_PROCESS_FLOW, e, "XACMLPapServlet", " AC POST exception"); loggingContext.transactionEnded(); PolicyLogger.audit("Transaction Failed - See Error.log"); @@ -1748,11 +1746,11 @@ public class XACMLPapServlet extends HttpServlet implements StdItemSetChangeList if (papEngine.getPDP(pdpId) == null) { // this is a request to create a new PDP object try{ - acPutTransaction.addPdpToGroup(pdp == null ? "PDP is null" : pdp.getId(), group.getId(), pdp.getName(), + acPutTransaction.addPdpToGroup(pdp.getId(), group.getId(), pdp.getName(), pdp.getDescription(), pdp.getJmxPort(),"XACMLPapServlet.doACPut"); } catch(Exception e){ PolicyLogger.error(MessageCodes.ERROR_PROCESS_FLOW, e, "XACMLPapServlet", " Error while adding pdp to group in the database: " - +"pdp="+ (pdp == null ? "PDP is null" : pdp.getId()) +",to group="+group.getId()); + +"pdp="+ (pdp.getId()) +",to group="+group.getId()); throw new PAPException(e.getMessage()); } papEngine.newPDP(pdp.getId(), group, pdp.getName(), pdp.getDescription(), pdp.getJmxPort()); |