Merge "remove mariadb superuser sql statements"
[policy/engine.git] / ONAP-PAP-REST / src / main / java / org / onap / policy / pap / xacml / rest / handler / APIRequestHandler.java
index 36d7c29..a031ac6 100644 (file)
@@ -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.
@@ -20,6 +20,7 @@
 package org.onap.policy.pap.xacml.rest.handler;
 
 import java.io.IOException;
+import java.sql.SQLException;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
@@ -53,7 +54,7 @@ public class APIRequestHandler {
                        return;
                }
                if ("getMetrics".equalsIgnoreCase(apiflag)){
-                       MetricService.doGetPolicyMetrics(request, response);
+                       MetricService.doGetPolicyMetrics(response);
                        return;
                }
        }
@@ -74,10 +75,10 @@ public class APIRequestHandler {
                }
        }
 
-       public void doDelete(HttpServletRequest request, HttpServletResponse response, ONAPLoggingContext loggingContext, String apiflag) throws Exception {
+       public void doDelete(HttpServletRequest request, HttpServletResponse response, ONAPLoggingContext loggingContext, String apiflag) throws IOException, SQLException{
                DeleteHandler deleteHandler = DeleteHandler.getInstance();
                if ("deletePapApi".equalsIgnoreCase(apiflag)) {
-                       deleteHandler.doAPIDeleteFromPAP(request, response, loggingContext);
+                       deleteHandler.doAPIDeleteFromPAP(request, response);
                        return;
                } else if ("deletePdpApi".equalsIgnoreCase(apiflag)) {
                        deleteHandler.doAPIDeleteFromPDP(request, response, loggingContext);