diff --git a/explorer/src/main/java/com/marklogic/hub/explorer/service/TestService.java b/explorer/src/main/java/com/marklogic/hub/explorer/service/TestService.java deleted file mode 100644 index 0759e88418..0000000000 --- a/explorer/src/main/java/com/marklogic/hub/explorer/service/TestService.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2012-2019 MarkLogic Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -package com.marklogic.hub.explorer.service; - -import com.marklogic.client.DatabaseClient; -import com.marklogic.client.document.DocumentDescriptor; -import com.marklogic.hub.explorer.util.DatabaseClientHolder; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -@Service -public class TestService { - - //TODO: Only for Example. Remove the service ASAP - - @Autowired - private DatabaseClientHolder databaseClientHolder; - - public DocumentDescriptor test() { - DatabaseClient databaseClient = databaseClientHolder.getDatabaseClient(); - System.out.println("DB client ===> " + databaseClient); - - return databaseClient.newDocumentManager().exists("/entities/Admissions.entity.json"); - } -} diff --git a/explorer/src/main/java/com/marklogic/hub/explorer/web/TestController.java b/explorer/src/main/java/com/marklogic/hub/explorer/web/TestController.java deleted file mode 100644 index 4ca68598b4..0000000000 --- a/explorer/src/main/java/com/marklogic/hub/explorer/web/TestController.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2012-2019 MarkLogic Corporation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ -package com.marklogic.hub.explorer.web; - -import com.marklogic.hub.explorer.service.TestService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.annotation.Scope; -import org.springframework.context.annotation.ScopedProxyMode; -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.ResponseBody; - -@Controller -@RequestMapping(value = "/v2/test") -@Scope(proxyMode = ScopedProxyMode.TARGET_CLASS, value = "session") -public class TestController { - - //TODO: Only for Example. Remove the controller ASAP - - @Autowired - private TestService testService; - - @RequestMapping(method = RequestMethod.GET) - @ResponseBody - public ResponseEntity getMappings() { - return new ResponseEntity<>(testService.test(), HttpStatus.OK); - } -}