X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fonap%2Faai%2Fsa%2Frest%2FSearchServiceApi.java;h=776e72b54d271491e6ab40364c10b8979b0a3321;hb=f637a36c9df966c341727910e30241b63cc49c06;hp=d80799644193575b1f7b222ac729f08dc5abd8cc;hpb=15af66b115f3e8046b2d0f2634fb77b3d835f730;p=aai%2Fsearch-data-service.git diff --git a/src/main/java/org/onap/aai/sa/rest/SearchServiceApi.java b/src/main/java/org/onap/aai/sa/rest/SearchServiceApi.java index d807996..776e72b 100644 --- a/src/main/java/org/onap/aai/sa/rest/SearchServiceApi.java +++ b/src/main/java/org/onap/aai/sa/rest/SearchServiceApi.java @@ -1,4 +1,4 @@ -/** +/** * ============LICENSE_START======================================================= * org.onap.aai * ================================================================================ @@ -65,11 +65,8 @@ public class SearchServiceApi { * Performs all one-time initialization required for the end point. */ public void init() { - // Instantiate our Document Store DAO. documentStore = ElasticSearchHttpController.getInstance(); - - apiUtils = new ApiUtils(); } @RequestMapping(value = "/indexes/{index}", method = RequestMethod.PUT, produces = {"application/json"}) @@ -183,13 +180,11 @@ public class SearchServiceApi { // Forward the request to our document API to delete the document. BulkApi bulkApi = new BulkApi(this); - ResponseEntity dbugResp = bulkApi.processPost(requestBody, request, headers, documentStore, apiUtils); - return dbugResp; + return bulkApi.processPost(requestBody, request, headers, documentStore); } protected boolean validateRequest(HttpHeaders headers, HttpServletRequest req, Action action, - String authPolicyFunctionName) throws Exception { - + String authPolicyFunctionName) { SearchDbServiceAuth serviceAuth = new SearchDbServiceAuth(); String cipherSuite = (String) req.getAttribute("javax.servlet.request.cipher_suite"); @@ -210,10 +205,6 @@ public class SearchServiceApi { String status = serviceAuth.authUser(headers, authUser.toLowerCase(), action.toString() + ":" + authPolicyFunctionName); - if (!status.equals("OK")) { - return false; - } - - return true; + return status.equals("OK"); } }