*/
package org.onap.aai.sa.rest;
-import org.onap.aai.sa.searchdbabstraction.elasticsearch.dao.ElasticSearchHttpController;
-import org.onap.aai.sa.searchdbabstraction.logging.SearchDbMsgs;
+import java.util.concurrent.atomic.AtomicBoolean;
+import javax.servlet.http.HttpServletRequest;
import org.onap.aai.cl.api.LogFields;
import org.onap.aai.cl.api.LogLine;
import org.onap.aai.cl.api.Logger;
import org.onap.aai.cl.eelf.LoggerFactory;
-import org.onap.aai.sa.rest.AnalyzerSchema;
-
-import java.util.concurrent.atomic.AtomicBoolean;
-import javax.servlet.http.HttpServletRequest;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.core.Context;
-
-import org.springframework.beans.factory.annotation.Autowired;
+import org.onap.aai.sa.searchdbabstraction.elasticsearch.dao.ElasticSearchHttpController;
+import org.onap.aai.sa.searchdbabstraction.logging.SearchDbMsgs;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
-import org.springframework.http.HttpStatus;
+import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
+import org.springframework.stereotype.Component;
+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;
-//@Path("/analyzers")
+@Component
+@EnableWebSecurity
@RestController
-@RequestMapping("/services/search-db-service/v1/analyzers")
+@RequestMapping("/services/search-data-service/v1/analyzers/search")
public class AnalyzerApi {
private SearchServiceApi searchService = null;
this.searchService = searchService;
}
- @GET
- public ResponseEntity<String> processGet(@Context HttpServletRequest request,
- @Context HttpHeaders headers,
- ApiUtils apiUtils) {
+ @RequestMapping(method = RequestMethod.GET,
+ consumes = {"application/json"},
+ produces = {"application/json"})
+ public ResponseEntity<String> processGet(HttpServletRequest request,
+ @RequestHeader HttpHeaders headers,
+ ApiUtils apiUtils) {
HttpStatus responseCode = HttpStatus.INTERNAL_SERVER_ERROR;
String responseString = "Undefined error";