Organise imports to ONAP Java standards
[aai/search-data-service.git] / src / main / java / org / onap / aai / sa / rest / SearchServiceApi.java
index 7e187ee..aacba78 100644 (file)
  */
 package org.onap.aai.sa.rest;
 
+import java.security.cert.X509Certificate;
+import javax.security.auth.x500.X500Principal;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
 import org.onap.aai.sa.auth.SearchDbServiceAuth;
 import org.onap.aai.sa.rest.ApiUtils.Action;
 import org.onap.aai.sa.searchdbabstraction.elasticsearch.dao.DocumentStoreInterface;
@@ -28,12 +32,12 @@ import org.springframework.http.HttpHeaders;
 import org.springframework.http.ResponseEntity;
 import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
 import org.springframework.stereotype.Component;
-import org.springframework.web.bind.annotation.*;
-
-import javax.security.auth.x500.X500Principal;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.security.cert.X509Certificate;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestHeader;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
 
 @Component
 @EnableWebSecurity
@@ -128,8 +132,7 @@ public class SearchServiceApi {
   }
 
   @RequestMapping(value = "/indexes/{index}/documents/{id}",
-          method = RequestMethod.GET,
-          consumes = {"application/json"})
+          method = RequestMethod.GET)
   public ResponseEntity<String> processGetDocument(HttpServletRequest request,
                                                    HttpServletResponse httpResponse,
                                                    @RequestHeader HttpHeaders headers,
@@ -158,8 +161,7 @@ public class SearchServiceApi {
   }
 
   @RequestMapping(value = "/indexes/{index}/query/{queryText}",
-                  method = RequestMethod.GET,
-                  consumes = {"application/json"})
+                  method = RequestMethod.GET)
   public ResponseEntity<String> processInlineQuery(HttpServletRequest request,
                                                    @RequestHeader HttpHeaders headers,
                                                    @PathVariable ("index") String index,
@@ -224,7 +226,8 @@ public class SearchServiceApi {
 
   @RequestMapping(value = "/bulk",
                   method = RequestMethod.POST,
-                  consumes = {"application/json"})
+                  consumes = {"application/json"},
+                  produces = { "application/json"})
   public ResponseEntity<String> processBulkRequest(@RequestBody String requestBody,
                                                    HttpServletRequest request,
                                                    @RequestHeader HttpHeaders headers) {