summaryrefslogtreecommitdiffstats
path: root/ONAP-PAP-REST/src
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2019-07-01 14:22:12 -0400
committerJim Hahn <jrh3@att.com>2019-07-01 15:13:18 -0400
commit8bfbc4b6241d21252cd98d653f0860a58e64dcc2 (patch)
tree78602805a211783e60579bb67c3671f669c08513 /ONAP-PAP-REST/src
parent6a046075ff25a199be7a6346e4e56bbd81c362b7 (diff)
Bump engine 1.5.1-SNAPSHOT
Released 1.5.0 Fixed compilation issue related with version upgrade of policy/common. Issue-ID: POLICY-1737 Change-Id: Ib2f56e8ffcb4b399dbe4a5453b70da10b0f87985 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com> Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'ONAP-PAP-REST/src')
-rw-r--r--ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/XACMLPapServlet.java83
1 files changed, 32 insertions, 51 deletions
diff --git a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/XACMLPapServlet.java b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/XACMLPapServlet.java
index b5951d823..85315ca54 100644
--- a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/XACMLPapServlet.java
+++ b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/XACMLPapServlet.java
@@ -557,7 +557,7 @@ public class XACMLPapServlet extends HttpServlet implements StdItemSetChangeList
PolicyLogger.metrics("XACMLPapServlet doPost im startTransaction");
} catch (AdministrativeStateException ae) {
String message = "POST interface called for PAP " + papResourceName
- + " but it has an Administrative" + " state of "
+ + " but it has an Administrative state of "
+ im.getStateManager().getAdminState() + "\n Exception Message: "
+ PolicyUtils.CATCH_EXCEPTION;
LOGGER.error(MessageCodes.ERROR_SYSTEM_ERROR + " " + message, ae);
@@ -567,12 +567,15 @@ public class XACMLPapServlet extends HttpServlet implements StdItemSetChangeList
PolicyLogger.audit("Transaction Failed - See Error.log");
setResponseError(response, HttpServletResponse.SC_INTERNAL_SERVER_ERROR, message);
return;
- } catch (StandbyStatusException se) {
+ } catch (IntegrityMonitorException ime) {
String message = "POST interface called for PAP " + papResourceName
- + " but it has a Standby Status" + " of "
- + im.getStateManager().getStandbyStatus() + "\n Exception Message: "
- + se.getMessage();
- LOGGER.error(MessageCodes.ERROR_SYSTEM_ERROR + " " + message, se);
+ + " but it has an Administrative state of "
+ + im.getStateManager().getAdminState()
+ + " and a Standby Status of "
+ + im.getStateManager().getStandbyStatus()
+ + "\n Exception Message: "
+ + ime.getMessage();
+ LOGGER.error(MessageCodes.ERROR_SYSTEM_ERROR + " " + message, ime);
loggingContext.metricEnded();
PolicyLogger.metrics("XACMLPapServlet doPost im startTransaction");
loggingContext.transactionEnded();
@@ -831,23 +834,15 @@ public class XACMLPapServlet extends HttpServlet implements StdItemSetChangeList
im.startTransaction();
loggingContext.metricEnded();
PolicyLogger.metrics("XACMLPapServlet doGet im startTransaction");
- } catch (AdministrativeStateException ae) {
+ } catch (IntegrityMonitorException ime) {
String message = "GET interface called for PAP " + papResourceName
- + " but it has an Administrative" + " state of "
- + im.getStateManager().getAdminState() + "\n Exception Message: "
- + ae.getMessage();
- LOGGER.info(message, ae);
- PolicyLogger.error(MessageCodes.ERROR_SYSTEM_ERROR + " " + message);
- loggingContext.transactionEnded();
- PolicyLogger.audit("Transaction Failed - See Error.log");
- setResponseError(response, HttpServletResponse.SC_INTERNAL_SERVER_ERROR, message);
- return;
- } catch (StandbyStatusException se) {
- String message = "GET interface called for PAP " + papResourceName
- + " but it has a Standby Status" + " of "
- + im.getStateManager().getStandbyStatus() + "\n Exception Message: "
- + se.getMessage();
- LOGGER.info(message, se);
+ + " but it has an Administrative state of "
+ + im.getStateManager().getAdminState()
+ + " and a Standby Status of "
+ + im.getStateManager().getStandbyStatus()
+ + "\n Exception Message: "
+ + ime.getMessage();
+ LOGGER.info(message, ime);
PolicyLogger.error(MessageCodes.ERROR_SYSTEM_ERROR + " " + message);
loggingContext.transactionEnded();
PolicyLogger.audit("Transaction Failed - See Error.log");
@@ -1031,19 +1026,13 @@ public class XACMLPapServlet extends HttpServlet implements StdItemSetChangeList
loggingContext.metricEnded();
PolicyLogger.metrics("XACMLPapServlet doPut im startTransaction");
} catch (IntegrityMonitorException e) {
- String message = "PUT interface called for PAP " + papResourceName;
- if (e instanceof AdministrativeStateException) {
- message += " but it has an Administrative state of "
- + im.getStateManager().getAdminState();
- } else if (e instanceof StandbyStatusException) {
- message += " but it has a Standby Status of "
- + im.getStateManager().getStandbyStatus();
- } else {
- message += " but an exception occurred";
-
- }
- message += "\n Exception Message: " + e.getMessage();
-
+ String message = "PUT interface called for PAP " + papResourceName
+ + " but it has an Administrative state of "
+ + im.getStateManager().getAdminState()
+ + " and a Standby Status of "
+ + im.getStateManager().getStandbyStatus()
+ + "\n Exception Message: "
+ + e.getMessage();
LOGGER.info(message, e);
PolicyLogger.error(MessageCodes.ERROR_SYSTEM_ERROR + " " + message);
loggingContext.transactionEnded();
@@ -1253,23 +1242,15 @@ public class XACMLPapServlet extends HttpServlet implements StdItemSetChangeList
im.startTransaction();
loggingContext.metricEnded();
PolicyLogger.metrics("XACMLPapServlet doDelete im startTransaction");
- } catch (AdministrativeStateException ae) {
+ } catch (IntegrityMonitorException ime) {
String message = "DELETE interface called for PAP " + papResourceName
- + " but it has an Administrative" + " state of "
- + im.getStateManager().getAdminState() + "\n Exception Message: "
- + ae.getMessage();
- LOGGER.info(message, ae);
- PolicyLogger.error(MessageCodes.ERROR_SYSTEM_ERROR + " " + message);
- loggingContext.transactionEnded();
- PolicyLogger.audit("Transaction Failed - See Error.log");
- setResponseError(response, HttpServletResponse.SC_INTERNAL_SERVER_ERROR, message);
- return;
- } catch (StandbyStatusException se) {
- String message = "PUT interface called for PAP " + papResourceName
- + " but it has a Standby Status" + " of "
- + im.getStateManager().getStandbyStatus() + "\n Exception Message: "
- + se.getMessage();
- LOGGER.info(message, se);
+ + " but it has an Administrative state of "
+ + im.getStateManager().getAdminState()
+ + " and a Standby Status of "
+ + im.getStateManager().getStandbyStatus()
+ + "\n Exception Message: "
+ + ime.getMessage();
+ LOGGER.info(message, ime);
PolicyLogger.error(MessageCodes.ERROR_SYSTEM_ERROR + " " + message);
loggingContext.transactionEnded();
PolicyLogger.audit("Transaction Failed - See Error.log");