diff --git a/Makefile b/Makefile index ec1921ff29552a4a0bd432d26a0c4708a4f15c36..bbbca8c6680c4875dec1b2b3616a0e8729d809da 100644 --- a/Makefile +++ b/Makefile @@ -10,48 +10,48 @@ clean: build-backend: build-backend-metadata-db build-backend-database build-backend-query build-backend-table build-backend-identifier build-backend-authentication build-backend-container build-backend-discovery build-backend-gateway build-backend-metadata build-analyse-service build-backend-metadata-db: - mvn -f ./fda-metadata-db/pom.xml clean install + mvn -f ./dbrepo-metadata-db/pom.xml clean install build-backend-authentication: build-backend-metadata-db - mvn -f ./fda-authentication-service/pom.xml clean package -DskipTests + mvn -f ./dbrepo-authentication-service/pom.xml clean package -DskipTests build-backend-identifier: build-backend-metadata-db - mvn -f ./fda-identifier-service/pom.xml clean package -DskipTests + mvn -f ./dbrepo-identifier-service/pom.xml clean package -DskipTests build-backend-table: build-backend-metadata-db - mvn -f ./fda-table-service/pom.xml clean package -DskipTests + mvn -f ./dbrepo-table-service/pom.xml clean package -DskipTests build-backend-container: build-backend-metadata-db - mvn -f ./fda-container-service/pom.xml clean package -DskipTests + mvn -f ./dbrepo-container-service/pom.xml clean package -DskipTests build-backend-database: build-backend-metadata-db - mvn -f ./fda-database-service/pom.xml clean package -DskipTests + mvn -f ./dbrepo-database-service/pom.xml clean package -DskipTests build-backend-discovery: build-backend-metadata-db - mvn -f ./fda-discovery-service/pom.xml clean package -DskipTests + mvn -f ./dbrepo-discovery-service/pom.xml clean package -DskipTests build-backend-gateway: build-backend-metadata-db - mvn -f ./fda-gateway-service/pom.xml clean package -DskipTests + mvn -f ./dbrepo-gateway-service/pom.xml clean package -DskipTests build-backend-query: build-backend-metadata-db - mvn -f ./fda-query-service/pom.xml clean package -DskipTests + mvn -f ./dbrepo-query-service/pom.xml clean package -DskipTests build-backend-metadata: build-backend-metadata-db - mvn -f ./fda-metadata-service/pom.xml clean package -DskipTests + mvn -f ./dbrepo-metadata-service/pom.xml clean package -DskipTests build-semantics-service: - bash ./fda-semantics-service/build.sh + bash ./dbrepo-semantics-service/build.sh build-analyse-service: - bash ./fda-analyse-service/build.sh + bash ./dbrepo-analyse-service/build.sh build-docker: - docker compose build fda-metadata-db + docker compose build dbrepo-metadata-db docker compose build --parallel build-frontend: - yarn --cwd ./fda-ui install --legacy-peer-deps - yarn --cwd ./fda-ui run build + yarn --cwd ./dbrepo-ui install --legacy-peer-deps + yarn --cwd ./dbrepo-ui run build build-clients: bash ./.gitlab/swagger/generate.sh @@ -59,49 +59,49 @@ build-clients: tag: tag-identifier tag-search tag-container tag-database tag-discovery tag-gateway tag-query tag-table tag-analyse tag-authentication tag-metadata-db tag-ui tag-units tag-broker tag-metadata tag-analyse: - docker tag fda-analyse-service:latest "dbrepo/analyse-service:${TAG}" + docker tag dbrepo-analyse-service:latest "dbrepo/analyse-service:${TAG}" tag-authentication: - docker tag fda-authentication-service:latest "dbrepo/authentication-service:${TAG}" + docker tag dbrepo-authentication-service:latest "dbrepo/authentication-service:${TAG}" tag-metadata-db: - docker tag fda-metadata-db:latest "dbrepo/metadata-db:${TAG}" + docker tag dbrepo-metadata-db:latest "dbrepo/metadata-db:${TAG}" tag-ui: - docker tag fda-ui:latest "dbrepo/ui:${TAG}" + docker tag dbrepo-ui:latest "dbrepo/ui:${TAG}" tag-identifier: - docker tag fda-identifier-service:latest "dbrepo/identifier-service:${TAG}" + docker tag dbrepo-identifier-service:latest "dbrepo/identifier-service:${TAG}" tag-metadata: - docker tag fda-metadata-service:latest "dbrepo/metadata-service:${TAG}" + docker tag dbrepo-metadata-service:latest "dbrepo/metadata-service:${TAG}" tag-container: - docker tag fda-container-service:latest "dbrepo/container-service:${TAG}" + docker tag dbrepo-container-service:latest "dbrepo/container-service:${TAG}" tag-database: - docker tag fda-database-service:latest "dbrepo/database-service:${TAG}" + docker tag dbrepo-database-service:latest "dbrepo/database-service:${TAG}" tag-discovery: - docker tag fda-discovery-service:latest "dbrepo/discovery-service:${TAG}" + docker tag dbrepo-discovery-service:latest "dbrepo/discovery-service:${TAG}" tag-gateway: - docker tag fda-gateway-service:latest "dbrepo/gateway-service:${TAG}" + docker tag dbrepo-gateway-service:latest "dbrepo/gateway-service:${TAG}" tag-query: - docker tag fda-query-service:latest "dbrepo/query-service:${TAG}" + docker tag dbrepo-query-service:latest "dbrepo/query-service:${TAG}" tag-table: - docker tag fda-table-service:latest "dbrepo/table-service:${TAG}" + docker tag dbrepo-table-service:latest "dbrepo/table-service:${TAG}" tag-units: - docker tag fda-semantics-service:latest "dbrepo/semantics-service:${TAG}" + docker tag dbrepo-semantics-service:latest "dbrepo/semantics-service:${TAG}" tag-broker: - docker tag fda-broker-service:latest "dbrepo/broker-service:${TAG}" + docker tag dbrepo-broker-service:latest "dbrepo/broker-service:${TAG}" tag-search: - docker tag fda-search-service:latest "dbrepo/search-service:${TAG}" + docker tag dbrepo-search-service:latest "dbrepo/search-service:${TAG}" release: build-docker tag release-identifier release-search release-container release-database release-discovery release-gateway release-query release-table release-analyse release-authentication release-metadata-db release-ui release-units release-broker release-metadata @@ -202,56 +202,56 @@ test-backend: test-authentication-service test-container-service test-database-s test-authentication-service: build-backend-metadata-db build-backend-authentication docker system prune -f --volumes docker pull rabbitmq:3-management-alpine - mvn -f ./fda-authentication-service/pom.xml clean test verify + mvn -f ./dbrepo-authentication-service/pom.xml clean test verify test-identifier-service: build-backend-metadata-db build-backend-identifier docker system prune -f --volumes - mvn -f ./fda-identifier-service/pom.xml clean test verify + mvn -f ./dbrepo-identifier-service/pom.xml clean test verify test-container-service: build-backend-metadata-db build-backend-container docker system prune -f --volumes docker pull mysql:8.0 - mvn -f ./fda-container-service/pom.xml clean test verify + mvn -f ./dbrepo-container-service/pom.xml clean test verify test-database-service: build-backend-metadata-db build-backend-database docker system prune -f --volumes docker pull rabbitmq:3-management-alpine docker pull nginx:alpine - mvn -f ./fda-database-service/pom.xml clean test verify + mvn -f ./dbrepo-database-service/pom.xml clean test verify test-discovery-service: build-backend-metadata-db build-backend-discovery docker system prune -f --volumes - mvn -f ./fda-discovery-service/pom.xml clean test verify + mvn -f ./dbrepo-discovery-service/pom.xml clean test verify test-gateway-service: build-backend-metadata-db build-backend-gateway docker system prune -f --volumes - mvn -f ./fda-gateway-service/pom.xml clean test verify + mvn -f ./dbrepo-gateway-service/pom.xml clean test verify test-query-service: build-backend-metadata-db build-backend-query docker system prune -f --volumes - mvn -f ./fda-query-service/pom.xml clean test verify + mvn -f ./dbrepo-query-service/pom.xml clean test verify test-table-service: build-backend-metadata-db build-backend-table docker system prune -f --volumes - mvn -f ./fda-table-service/pom.xml clean test verify + mvn -f ./dbrepo-table-service/pom.xml clean test verify test-metadata-service: build-backend-metadata-db build-backend-metadata docker system prune -f --volumes - mvn -f ./fda-metadata-service/pom.xml clean test verify + mvn -f ./dbrepo-metadata-service/pom.xml clean test verify test-semantics-service: build-semantics-service - bash ./fda-semantics-service/test.sh + bash ./dbrepo-semantics-service/test.sh test-analyse-service: build-analyse-service - bash ./fda-analyse-service/test.sh + bash ./dbrepo-analyse-service/test.sh coverage-frontend: clean build-frontend - yarn --cwd ./fda-ui run coverage || true + yarn --cwd ./dbrepo-ui run coverage || true test-frontend: clean build-frontend - yarn --cwd ./fda-ui install + yarn --cwd ./dbrepo-ui install docker compose up -d - yarn --cwd ./fda-ui run test + yarn --cwd ./dbrepo-ui run test test-clients: bash ./.gitlab/test.sh diff --git a/dbrepo-analyse-service/build.sh b/dbrepo-analyse-service/build.sh index b0ef12fc4fc5f2b36746e97b6b962eeafa6a72ea..aff876324b57a375cef22e552a45af7e9cf2bead 100755 --- a/dbrepo-analyse-service/build.sh +++ b/dbrepo-analyse-service/build.sh @@ -1,4 +1,4 @@ #!/bin/bash -python3 -m venv ./fda-analyse-service/venv -source ./fda-analyse-service/venv/bin/activate -pip install -r ./fda-analyse-service/requirements.txt \ No newline at end of file +python3 -m venv ./dbrepo-analyse-service/venv +source ./dbrepo-analyse-service/venv/bin/activate +pip install -r ./dbrepo-analyse-service/requirements.txt \ No newline at end of file diff --git a/dbrepo-analyse-service/test.sh b/dbrepo-analyse-service/test.sh index cb93f3fcd11996b6342ecf93912b67d54183eed1..9627e69fb82578ea73d7368bb090faa423b67716 100755 --- a/dbrepo-analyse-service/test.sh +++ b/dbrepo-analyse-service/test.sh @@ -1,3 +1,3 @@ #!/bin/bash -source ./fda-analyse-service/venv/bin/activate -cd ./fda-analyse-service/ && coverage run -m pytest test/test_determine_dt.py test/test_determine_pk.py --junitxml=report.xml && coverage html && coverage report > ./coverage.txt \ No newline at end of file +source ./dbrepo-analyse-service/venv/bin/activate +cd ./dbrepo-analyse-service/ && coverage run -m pytest test/test_determine_dt.py test/test_determine_pk.py --junitxml=report.xml && coverage html && coverage report > ./coverage.txt \ No newline at end of file diff --git a/dbrepo-container-service/rest-service/src/test/java/at/tuwien/endpoint/ImageEndpointUnitTest.java b/dbrepo-container-service/rest-service/src/test/java/at/tuwien/endpoint/ImageEndpointUnitTest.java index f84ae04db59091c81e86ff91854ff0106cb6bd5e..02c8ea7d71c850d42bcfd1d1a67af86c97616d6b 100644 --- a/dbrepo-container-service/rest-service/src/test/java/at/tuwien/endpoint/ImageEndpointUnitTest.java +++ b/dbrepo-container-service/rest-service/src/test/java/at/tuwien/endpoint/ImageEndpointUnitTest.java @@ -1,21 +1,17 @@ package at.tuwien.endpoint; import at.tuwien.BaseUnitTest; -import at.tuwien.api.container.*; import at.tuwien.api.container.image.ImageBriefDto; import at.tuwien.api.container.image.ImageChangeDto; import at.tuwien.api.container.image.ImageCreateDto; import at.tuwien.api.container.image.ImageDto; import at.tuwien.config.DockerUtil; import at.tuwien.config.ReadyConfig; -import at.tuwien.endpoints.ContainerEndpoint; import at.tuwien.endpoints.ImageEndpoint; -import at.tuwien.entities.container.Container; import at.tuwien.entities.container.image.ContainerImage; import at.tuwien.exception.*; import at.tuwien.repository.jpa.ImageRepository; import at.tuwien.repository.jpa.UserRepository; -import at.tuwien.service.impl.ContainerServiceImpl; import lombok.extern.log4j.Log4j2; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -31,7 +27,6 @@ import org.springframework.security.test.context.support.WithAnonymousUser; import org.springframework.security.test.context.support.WithMockUser; import org.springframework.test.context.junit.jupiter.SpringExtension; -import javax.ws.rs.NotAllowedException; import java.security.Principal; import java.util.List; import java.util.Optional; @@ -236,7 +231,7 @@ public class ImageEndpointUnitTest extends BaseUnitTest { public void findById_anonymous_succeeds() throws ImageNotFoundException { /* test */ - findById_generic(IMAGE_1_ID, IMAGE_1, null); + findById_generic(IMAGE_1_ID, IMAGE_1); } @Test @@ -248,7 +243,7 @@ public class ImageEndpointUnitTest extends BaseUnitTest { /* test */ assertThrows(ImageNotFoundException.class, () -> { - imageEndpoint.findById(CONTAINER_1_ID, null); + imageEndpoint.findById(CONTAINER_1_ID); }); } @@ -261,7 +256,7 @@ public class ImageEndpointUnitTest extends BaseUnitTest { .thenReturn(Optional.of(USER_1)); /* test */ - findById_generic(IMAGE_1_ID, IMAGE_1, USER_1_PRINCIPAL); + findById_generic(IMAGE_1_ID, IMAGE_1); } @Test @@ -273,7 +268,7 @@ public class ImageEndpointUnitTest extends BaseUnitTest { .thenReturn(Optional.of(USER_2)); /* test */ - findById_generic(IMAGE_1_ID, IMAGE_1, USER_2_PRINCIPAL); + findById_generic(IMAGE_1_ID, IMAGE_1); } @Test @@ -285,7 +280,7 @@ public class ImageEndpointUnitTest extends BaseUnitTest { .thenReturn(Optional.of(USER_3)); /* test */ - findById_generic(IMAGE_1_ID, IMAGE_1, USER_3_PRINCIPAL); + findById_generic(IMAGE_1_ID, IMAGE_1); } @Test @@ -489,14 +484,14 @@ public class ImageEndpointUnitTest extends BaseUnitTest { assertNotNull(response.getBody()); } - public void findById_generic(Long imageId, ContainerImage image, Principal principal) throws ImageNotFoundException { + public void findById_generic(Long imageId, ContainerImage image) throws ImageNotFoundException { /* mock */ when(imageRepository.findById(imageId)) .thenReturn(Optional.of(image)); /* test */ - final ResponseEntity<ImageDto> response = imageEndpoint.findById(imageId, principal); + final ResponseEntity<ImageDto> response = imageEndpoint.findById(imageId); assertEquals(HttpStatus.OK, response.getStatusCode()); assertNotNull(response.getBody()); } diff --git a/dbrepo-query-service/rest-service/src/main/java/at/tuwien/endpoint/TableDataEndpoint.java b/dbrepo-query-service/rest-service/src/main/java/at/tuwien/endpoint/TableDataEndpoint.java index f31a88c9874ff5367c201c0cb18d6f84413db068..b9a208bc9c3e4ac5ed69928cdd3fcb8a5432be18 100644 --- a/dbrepo-query-service/rest-service/src/main/java/at/tuwien/endpoint/TableDataEndpoint.java +++ b/dbrepo-query-service/rest-service/src/main/java/at/tuwien/endpoint/TableDataEndpoint.java @@ -2,7 +2,6 @@ package at.tuwien.endpoint; import at.tuwien.SortType; import at.tuwien.api.database.query.ImportDto; -import at.tuwien.api.database.query.QueryDto; import at.tuwien.api.database.query.QueryResultDto; import at.tuwien.api.database.table.TableCsvDeleteDto; import at.tuwien.api.database.table.TableCsvDto; diff --git a/dbrepo-query-service/rest-service/src/test/java/at/tuwien/endpoint/ExportEndpointUnitTest.java b/dbrepo-query-service/rest-service/src/test/java/at/tuwien/endpoint/ExportEndpointUnitTest.java index 6e5062cff9ea8ef90689cb4bbb5873ce789ef58e..71ee0a6d0fe03b53f4480de7454e58059a7c204f 100644 --- a/dbrepo-query-service/rest-service/src/test/java/at/tuwien/endpoint/ExportEndpointUnitTest.java +++ b/dbrepo-query-service/rest-service/src/test/java/at/tuwien/endpoint/ExportEndpointUnitTest.java @@ -71,72 +71,82 @@ public class ExportEndpointUnitTest extends BaseUnitTest { public void export_publicAnonymous_succeeds() throws TableNotFoundException, DatabaseConnectionException, TableMalformedException, DatabaseNotFoundException, ImageNotSupportedException, FileStorageException, PaginationException, ContainerNotFoundException, NotAllowedException, QueryMalformedException, - UserNotFoundException, IOException { + UserNotFoundException, IOException, HeaderInvalidException { /* test */ - export_generic(CONTAINER_1_ID, DATABASE_1_ID, TABLE_1_ID, DATABASE_1, null, null, null, null); + export_generic(CONTAINER_1_ID, DATABASE_1_ID, TABLE_1_ID, DATABASE_1, null, null, null, null, "text/csv"); } @Test public void export_publicRead_succeeds() throws TableNotFoundException, DatabaseConnectionException, TableMalformedException, DatabaseNotFoundException, ImageNotSupportedException, FileStorageException, PaginationException, ContainerNotFoundException, NotAllowedException, QueryMalformedException, - UserNotFoundException, IOException { + UserNotFoundException, IOException, HeaderInvalidException { /* test */ - export_generic(CONTAINER_1_ID, DATABASE_1_ID, TABLE_1_ID, DATABASE_1, null, USER_2_PRINCIPAL, USER_2_USERNAME, DATABASE_1_READ_ACCESS); + export_generic(CONTAINER_1_ID, DATABASE_1_ID, TABLE_1_ID, DATABASE_1, null, USER_2_PRINCIPAL, USER_2_USERNAME, DATABASE_1_READ_ACCESS, "text/csv"); } @Test public void export_publicWriteOwn_succeeds() throws TableNotFoundException, DatabaseConnectionException, TableMalformedException, DatabaseNotFoundException, ImageNotSupportedException, FileStorageException, PaginationException, ContainerNotFoundException, NotAllowedException, QueryMalformedException, - UserNotFoundException, IOException { + UserNotFoundException, IOException, HeaderInvalidException { /* test */ - export_generic(CONTAINER_1_ID, DATABASE_1_ID, TABLE_1_ID, DATABASE_1, null, USER_2_PRINCIPAL, USER_2_USERNAME, DATABASE_1_WRITE_OWN_ACCESS); + export_generic(CONTAINER_1_ID, DATABASE_1_ID, TABLE_1_ID, DATABASE_1, null, USER_2_PRINCIPAL, USER_2_USERNAME, DATABASE_1_WRITE_OWN_ACCESS, "text/csv"); } @Test public void export_publicWriteAll_succeeds() throws TableNotFoundException, DatabaseConnectionException, TableMalformedException, DatabaseNotFoundException, ImageNotSupportedException, FileStorageException, PaginationException, ContainerNotFoundException, NotAllowedException, QueryMalformedException, - UserNotFoundException, IOException { + UserNotFoundException, IOException, HeaderInvalidException { /* test */ - export_generic(CONTAINER_1_ID, DATABASE_1_ID, TABLE_1_ID, DATABASE_1, null, USER_2_PRINCIPAL, USER_2_USERNAME, DATABASE_1_WRITE_ALL_ACCESS); + export_generic(CONTAINER_1_ID, DATABASE_1_ID, TABLE_1_ID, DATABASE_1, null, USER_2_PRINCIPAL, USER_2_USERNAME, DATABASE_1_WRITE_ALL_ACCESS, "text/csv"); } @Test public void export_publicOwner_succeeds() throws TableNotFoundException, DatabaseConnectionException, TableMalformedException, DatabaseNotFoundException, ImageNotSupportedException, FileStorageException, PaginationException, ContainerNotFoundException, NotAllowedException, QueryMalformedException, - UserNotFoundException, IOException { + UserNotFoundException, IOException, HeaderInvalidException { /* test */ - export_generic(CONTAINER_1_ID, DATABASE_1_ID, TABLE_1_ID, DATABASE_1, null, USER_1_PRINCIPAL, USER_1_USERNAME, DATABASE_1_WRITE_ALL_ACCESS); + export_generic(CONTAINER_1_ID, DATABASE_1_ID, TABLE_1_ID, DATABASE_1, null, USER_1_PRINCIPAL, USER_1_USERNAME, DATABASE_1_WRITE_ALL_ACCESS, "text/csv"); } @Test public void export_publicReadWithTimestamp_succeeds() throws TableNotFoundException, DatabaseConnectionException, TableMalformedException, DatabaseNotFoundException, ImageNotSupportedException, FileStorageException, PaginationException, ContainerNotFoundException, NotAllowedException, QueryMalformedException, - UserNotFoundException, IOException { + UserNotFoundException, IOException, HeaderInvalidException { final Instant timestamp = Instant.now(); /* test */ - export_generic(CONTAINER_1_ID, DATABASE_1_ID, TABLE_1_ID, DATABASE_1, timestamp, USER_2_PRINCIPAL, USER_2_USERNAME, DATABASE_1_READ_ACCESS); + export_generic(CONTAINER_1_ID, DATABASE_1_ID, TABLE_1_ID, DATABASE_1, timestamp, USER_2_PRINCIPAL, USER_2_USERNAME, DATABASE_1_READ_ACCESS, "text/csv"); } @Test public void export_publicReadWithTimestampInFuture_succeeds() throws TableNotFoundException, DatabaseConnectionException, TableMalformedException, DatabaseNotFoundException, ImageNotSupportedException, FileStorageException, PaginationException, ContainerNotFoundException, NotAllowedException, QueryMalformedException, - UserNotFoundException, IOException { + UserNotFoundException, IOException, HeaderInvalidException { final Instant timestamp = Instant.now().plus(10, ChronoUnit.DAYS); /* test */ - export_generic(CONTAINER_1_ID, DATABASE_1_ID, TABLE_1_ID, DATABASE_1, timestamp, USER_2_PRINCIPAL, USER_2_USERNAME, DATABASE_1_READ_ACCESS); + export_generic(CONTAINER_1_ID, DATABASE_1_ID, TABLE_1_ID, DATABASE_1, timestamp, USER_2_PRINCIPAL, USER_2_USERNAME, DATABASE_1_READ_ACCESS, "text/csv"); + } + + @Test + public void export_publicReadWithTimestampInFutureInvalidHeader_fails() { + final Instant timestamp = Instant.now().plus(10, ChronoUnit.DAYS); + + /* test */ + assertThrows(HeaderInvalidException.class, () -> { + export_generic(CONTAINER_1_ID, DATABASE_1_ID, TABLE_1_ID, DATABASE_1, timestamp, USER_2_PRINCIPAL, USER_2_USERNAME, DATABASE_1_READ_ACCESS, "text/xml"); + }); } /* ################################################################################################### */ @@ -148,7 +158,7 @@ public class ExportEndpointUnitTest extends BaseUnitTest { /* test */ assertThrows(NotAllowedException.class, () -> { - export_generic(CONTAINER_2_ID, DATABASE_2_ID, TABLE_1_ID, DATABASE_2, null, null, null, null); + export_generic(CONTAINER_2_ID, DATABASE_2_ID, TABLE_1_ID, DATABASE_2, null, null, null, null, "text/csv"); }); } @@ -156,73 +166,73 @@ public class ExportEndpointUnitTest extends BaseUnitTest { public void export_privateRead_succeeds() throws TableNotFoundException, DatabaseConnectionException, TableMalformedException, DatabaseNotFoundException, ImageNotSupportedException, FileStorageException, PaginationException, ContainerNotFoundException, NotAllowedException, QueryMalformedException, - UserNotFoundException, IOException { + UserNotFoundException, IOException, HeaderInvalidException { /* test */ - export_generic(CONTAINER_2_ID, DATABASE_2_ID, TABLE_1_ID, DATABASE_2, null, USER_2_PRINCIPAL, USER_2_USERNAME, DATABASE_2_READ_ACCESS); + export_generic(CONTAINER_2_ID, DATABASE_2_ID, TABLE_1_ID, DATABASE_2, null, USER_2_PRINCIPAL, USER_2_USERNAME, DATABASE_2_READ_ACCESS, "text/csv"); } @Test public void export_privateWriteOwn_succeeds() throws TableNotFoundException, DatabaseConnectionException, TableMalformedException, DatabaseNotFoundException, ImageNotSupportedException, FileStorageException, PaginationException, ContainerNotFoundException, NotAllowedException, QueryMalformedException, - UserNotFoundException, IOException { + UserNotFoundException, IOException, HeaderInvalidException { /* test */ - export_generic(CONTAINER_2_ID, DATABASE_2_ID, TABLE_1_ID, DATABASE_2, null, USER_2_PRINCIPAL, USER_2_USERNAME, DATABASE_2_WRITE_OWN_ACCESS); + export_generic(CONTAINER_2_ID, DATABASE_2_ID, TABLE_1_ID, DATABASE_2, null, USER_2_PRINCIPAL, USER_2_USERNAME, DATABASE_2_WRITE_OWN_ACCESS, "text/csv"); } @Test public void export_privateWriteAll_succeeds() throws TableNotFoundException, DatabaseConnectionException, TableMalformedException, DatabaseNotFoundException, ImageNotSupportedException, FileStorageException, PaginationException, ContainerNotFoundException, NotAllowedException, QueryMalformedException, - UserNotFoundException, IOException { + UserNotFoundException, IOException, HeaderInvalidException { /* test */ - export_generic(CONTAINER_2_ID, DATABASE_2_ID, TABLE_1_ID, DATABASE_2, null, USER_2_PRINCIPAL, USER_2_USERNAME, DATABASE_2_WRITE_ALL_ACCESS); + export_generic(CONTAINER_2_ID, DATABASE_2_ID, TABLE_1_ID, DATABASE_2, null, USER_2_PRINCIPAL, USER_2_USERNAME, DATABASE_2_WRITE_ALL_ACCESS, "text/csv"); } @Test public void export_privateOwner_succeeds() throws TableNotFoundException, DatabaseConnectionException, TableMalformedException, DatabaseNotFoundException, ImageNotSupportedException, FileStorageException, PaginationException, ContainerNotFoundException, NotAllowedException, QueryMalformedException, - UserNotFoundException, IOException { + UserNotFoundException, IOException, HeaderInvalidException { /* test */ - export_generic(CONTAINER_2_ID, DATABASE_2_ID, TABLE_1_ID, DATABASE_2, null, USER_1_PRINCIPAL, USER_1_USERNAME, DATABASE_2_WRITE_ALL_ACCESS); + export_generic(CONTAINER_2_ID, DATABASE_2_ID, TABLE_1_ID, DATABASE_2, null, USER_1_PRINCIPAL, USER_1_USERNAME, DATABASE_2_WRITE_ALL_ACCESS, "text/csv"); } @Test public void export_privateReadWithTimestamp_succeeds() throws TableNotFoundException, DatabaseConnectionException, TableMalformedException, DatabaseNotFoundException, ImageNotSupportedException, FileStorageException, PaginationException, ContainerNotFoundException, NotAllowedException, QueryMalformedException, - UserNotFoundException, IOException { + UserNotFoundException, IOException, HeaderInvalidException { final Instant timestamp = Instant.now(); /* test */ - export_generic(CONTAINER_2_ID, DATABASE_2_ID, TABLE_1_ID, DATABASE_2, timestamp, USER_2_PRINCIPAL, USER_2_USERNAME, DATABASE_2_READ_ACCESS); + export_generic(CONTAINER_2_ID, DATABASE_2_ID, TABLE_1_ID, DATABASE_2, timestamp, USER_2_PRINCIPAL, USER_2_USERNAME, DATABASE_2_READ_ACCESS, "text/csv"); } @Test public void export_privateReadWithTimestampInFuture_succeeds() throws TableNotFoundException, DatabaseConnectionException, TableMalformedException, DatabaseNotFoundException, ImageNotSupportedException, FileStorageException, PaginationException, ContainerNotFoundException, NotAllowedException, QueryMalformedException, - UserNotFoundException, IOException { + UserNotFoundException, IOException, HeaderInvalidException { final Instant timestamp = Instant.now().plus(10, ChronoUnit.DAYS); /* test */ - export_generic(CONTAINER_2_ID, DATABASE_2_ID, TABLE_1_ID, DATABASE_2, timestamp, USER_2_PRINCIPAL, USER_2_USERNAME, DATABASE_2_READ_ACCESS); + export_generic(CONTAINER_2_ID, DATABASE_2_ID, TABLE_1_ID, DATABASE_2, timestamp, USER_2_PRINCIPAL, USER_2_USERNAME, DATABASE_2_READ_ACCESS, "text/csv"); } - + /* ################################################################################################### */ /* ## GENERIC TEST CASES ## */ /* ################################################################################################### */ protected void export_generic(Long containerId, Long databaseId, Long tableId, Database database, Instant timestamp, - Principal principal, String username, DatabaseAccess access) throws IOException, + Principal principal, String username, DatabaseAccess access, String accept) throws IOException, DatabaseNotFoundException, UserNotFoundException, TableNotFoundException, DatabaseConnectionException, TableMalformedException, QueryMalformedException, ImageNotSupportedException, FileStorageException, - PaginationException, ContainerNotFoundException, NotAllowedException { + PaginationException, ContainerNotFoundException, NotAllowedException, HeaderInvalidException { final ExportResource resource = ExportResource.builder() .filename("location.csv") .resource(new InputStreamResource(FileUtils.openInputStream(new File("src/test/resources/weather/location.csv")))) @@ -245,7 +255,7 @@ public class ExportEndpointUnitTest extends BaseUnitTest { /* test */ final ResponseEntity<InputStreamResource> response = exportEndpoint.export(containerId, databaseId, tableId, - timestamp, principal); + timestamp, principal, accept); assertNotNull(response); assertEquals(HttpStatus.OK, response.getStatusCode()); } diff --git a/dbrepo-query-service/rest-service/src/test/java/at/tuwien/endpoint/TableDataEndpointUnitTest.java b/dbrepo-query-service/rest-service/src/test/java/at/tuwien/endpoint/TableDataEndpointUnitTest.java index 7766c2d041d25fcd9fa6c20be8c2c0f374e74a78..346e3a55fb06183b2de9aa70d8f77b98dd2e6909 100644 --- a/dbrepo-query-service/rest-service/src/test/java/at/tuwien/endpoint/TableDataEndpointUnitTest.java +++ b/dbrepo-query-service/rest-service/src/test/java/at/tuwien/endpoint/TableDataEndpointUnitTest.java @@ -560,8 +560,8 @@ public class TableDataEndpointUnitTest extends BaseUnitTest { String username, DatabaseAccess access, Principal principal, Instant timestamp, Long page, Long size, SortType sortDirection, String sortColumn) throws UserNotFoundException, TableMalformedException, NotAllowedException, PaginationException, - TableNotFoundException, QueryStoreException, SortException, DatabaseConnectionException, - QueryMalformedException, DatabaseNotFoundException, ImageNotSupportedException, ContainerNotFoundException { + TableNotFoundException, DatabaseConnectionException, QueryMalformedException, DatabaseNotFoundException, + ImageNotSupportedException, ContainerNotFoundException, QueryStoreException, SortException { /* mock */ when(databaseService.find(containerId, databaseId)) @@ -574,7 +574,7 @@ public class TableDataEndpointUnitTest extends BaseUnitTest { .thenReturn(QUERY_1_RESULT_DTO); /* test */ - final ResponseEntity<QueryResultDto> response = dataEndpoint.getAll(containerId, databaseId, tableId, principal, timestamp, page, size, sortDirection, sortColumn); + final ResponseEntity<QueryResultDto> response = dataEndpoint.data(containerId, databaseId, tableId, principal, timestamp, page, size, sortDirection, sortColumn); assertEquals(HttpStatus.OK, response.getStatusCode()); assertNotNull(response.getBody()); assertEquals(QUERY_1_RESULT_ID, response.getBody().getId()); diff --git a/dbrepo-semantics-service/build.sh b/dbrepo-semantics-service/build.sh index 4871d1b4a99fdcd2fb1802a24cb7c9c6446d1d56..bffc0ef845bd6760b76cdcf4e11d0f8c0b0d94ee 100755 --- a/dbrepo-semantics-service/build.sh +++ b/dbrepo-semantics-service/build.sh @@ -1,4 +1,4 @@ #!/bin/bash -python3 -m venv ./fda-semantics-service/venv -source ./fda-semantics-service/venv/bin/activate -pip install -r ./fda-semantics-service/requirements.txt \ No newline at end of file +python3 -m venv ./dbrepo-semantics-service/venv +source ./dbrepo-semantics-service/venv/bin/activate +pip install -r ./dbrepo-semantics-service/requirements.txt \ No newline at end of file diff --git a/dbrepo-semantics-service/test.sh b/dbrepo-semantics-service/test.sh index f4d10635c3c500eb5063f9579cde7e091f217295..c12f137c54a8ff2f25f108efcb888d96cf611ec8 100755 --- a/dbrepo-semantics-service/test.sh +++ b/dbrepo-semantics-service/test.sh @@ -1,3 +1,3 @@ #!/bin/bash -source ./fda-semantics-service/venv/bin/activate -cd ./fda-semantics-service/ && coverage run -m pytest test/test_validate.py test/test_list.py test/test_app.py --junitxml=report.xml && coverage html && coverage report > ./coverage.txt \ No newline at end of file +source ./dbrepo-semantics-service/venv/bin/activate +cd ./dbrepo-semantics-service/ && coverage run -m pytest test/test_validate.py test/test_list.py test/test_app.py --junitxml=report.xml && coverage html && coverage report > ./coverage.txt \ No newline at end of file diff --git a/fda-table-service/.gitignore b/dbrepo-table-service/.gitignore similarity index 100% rename from fda-table-service/.gitignore rename to dbrepo-table-service/.gitignore diff --git a/fda-table-service/.mvn/wrapper/MavenWrapperDownloader.java b/dbrepo-table-service/.mvn/wrapper/MavenWrapperDownloader.java similarity index 100% rename from fda-table-service/.mvn/wrapper/MavenWrapperDownloader.java rename to dbrepo-table-service/.mvn/wrapper/MavenWrapperDownloader.java diff --git a/fda-table-service/.mvn/wrapper/maven-wrapper.jar b/dbrepo-table-service/.mvn/wrapper/maven-wrapper.jar similarity index 100% rename from fda-table-service/.mvn/wrapper/maven-wrapper.jar rename to dbrepo-table-service/.mvn/wrapper/maven-wrapper.jar diff --git a/fda-table-service/.mvn/wrapper/maven-wrapper.properties b/dbrepo-table-service/.mvn/wrapper/maven-wrapper.properties similarity index 100% rename from fda-table-service/.mvn/wrapper/maven-wrapper.properties rename to dbrepo-table-service/.mvn/wrapper/maven-wrapper.properties diff --git a/fda-table-service/Dockerfile b/dbrepo-table-service/Dockerfile similarity index 95% rename from fda-table-service/Dockerfile rename to dbrepo-table-service/Dockerfile index 4752a4a140b1dd52e256350862067102131a78cd..0792bb11b0c7ea8569bdea4577cbbb1d29c41863 100644 --- a/fda-table-service/Dockerfile +++ b/dbrepo-table-service/Dockerfile @@ -1,5 +1,5 @@ ###### FIRST STAGE ###### -FROM fda-metadata-db:latest as dependency +FROM dbrepo-metadata-db:latest as dependency MAINTAINER Martin Weise <martin.weise@tuwien.ac.at> ###### SECOND STAGE ###### diff --git a/fda-table-service/README.md b/dbrepo-table-service/README.md similarity index 100% rename from fda-table-service/README.md rename to dbrepo-table-service/README.md diff --git a/fda-table-service/mvnw b/dbrepo-table-service/mvnw similarity index 100% rename from fda-table-service/mvnw rename to dbrepo-table-service/mvnw diff --git a/fda-table-service/mvnw.cmd b/dbrepo-table-service/mvnw.cmd similarity index 100% rename from fda-table-service/mvnw.cmd rename to dbrepo-table-service/mvnw.cmd diff --git a/fda-table-service/pom.xml b/dbrepo-table-service/pom.xml similarity index 95% rename from fda-table-service/pom.xml rename to dbrepo-table-service/pom.xml index e9faf0cbb3ab3fde41b0829c7f6b808d0deac51e..bb3984e44bf236a9ccabb87a93482e24b325dc09 100644 --- a/fda-table-service/pom.xml +++ b/dbrepo-table-service/pom.xml @@ -9,9 +9,9 @@ </parent> <groupId>at.tuwien</groupId> - <artifactId>fda-table-service</artifactId> - <version>1.1.0-alpha</version> - <name>fda-table-service</name> + <artifactId>dbrepo-table-service</artifactId> + <version>1.2.0</version> + <name>dbrepo-table-service</name> <description>Demo project for Spring Boot</description> <packaging>pom</packaging> @@ -76,17 +76,17 @@ <!-- Entities and API --> <dependency> <groupId>at.tuwien</groupId> - <artifactId>fda-metadata-db-entites</artifactId> + <artifactId>dbrepo-metadata-db-entites</artifactId> <version>${project.version}</version> </dependency> <dependency> <groupId>at.tuwien</groupId> - <artifactId>fda-metadata-db-api</artifactId> + <artifactId>dbrepo-metadata-db-api</artifactId> <version>${project.version}</version> </dependency> <dependency> <groupId>at.tuwien</groupId> - <artifactId>fda-metadata-db-querystore</artifactId> + <artifactId>dbrepo-metadata-db-querystore</artifactId> <version>${project.version}</version> <scope>compile</scope> </dependency> @@ -221,7 +221,7 @@ <exclude>at/tuwien/mapper/**/*</exclude> <exclude>at/tuwien/exception/**/*</exclude> <exclude>at/tuwien/config/**/*</exclude> - <exclude>**/FdaContainerManagingApplication.class</exclude> + <exclude>**/DbrepoContainerManagingApplication.class</exclude> </excludes> </configuration> <executions> diff --git a/fda-table-service/report/pom.xml b/dbrepo-table-service/report/pom.xml similarity index 90% rename from fda-table-service/report/pom.xml rename to dbrepo-table-service/report/pom.xml index 1992c97aa94c5b023929ec61ba5a5764c0bf985b..8c2d1db5eae41755b2937509b54218e2d0afdf8c 100644 --- a/fda-table-service/report/pom.xml +++ b/dbrepo-table-service/report/pom.xml @@ -5,13 +5,13 @@ <modelVersion>4.0.0</modelVersion> <parent> <groupId>at.tuwien</groupId> - <artifactId>fda-table-service</artifactId> - <version>1.1.0-alpha</version> + <artifactId>dbrepo-table-service</artifactId> + <version>1.2.0</version> </parent> <artifactId>report</artifactId> - <version>1.1.0-alpha</version> - <name>fda-table-service-report</name> + <version>1.2.0</version> + <name>dbrepo-table-service-report</name> <description> This module is only intended for the pipeline coverage report. See the detailed report in the respective modules diff --git a/fda-table-service/rest-service/pom.xml b/dbrepo-table-service/rest-service/pom.xml similarity index 87% rename from fda-table-service/rest-service/pom.xml rename to dbrepo-table-service/rest-service/pom.xml index 0fd761d629356adda3683ebb5d2cd2d545761234..a1de368fd29b00d2c46a24a8782e3230fb7ca138 100644 --- a/fda-table-service/rest-service/pom.xml +++ b/dbrepo-table-service/rest-service/pom.xml @@ -5,13 +5,13 @@ <modelVersion>4.0.0</modelVersion> <parent> <groupId>at.tuwien</groupId> - <artifactId>fda-table-service</artifactId> - <version>1.1.0-alpha</version> + <artifactId>dbrepo-table-service</artifactId> + <version>1.2.0</version> </parent> <artifactId>rest-service</artifactId> - <version>1.1.0-alpha</version> - <name>fda-table-service-rest-service</name> + <version>1.2.0</version> + <name>dbrepo-table-service-rest-service</name> <properties> <jacoco.version>0.8.7</jacoco.version> diff --git a/fda-table-service/rest-service/src/main/java/at/tuwien/FdaTableServiceApplication.java b/dbrepo-table-service/rest-service/src/main/java/at/tuwien/DbrepoTableServiceApplication.java similarity index 87% rename from fda-table-service/rest-service/src/main/java/at/tuwien/FdaTableServiceApplication.java rename to dbrepo-table-service/rest-service/src/main/java/at/tuwien/DbrepoTableServiceApplication.java index ebc2e892715d0fba87700fc41870bb2e95fc7126..a96e2effc7640acd1ec961656ee54d3a52fcd991 100644 --- a/fda-table-service/rest-service/src/main/java/at/tuwien/FdaTableServiceApplication.java +++ b/dbrepo-table-service/rest-service/src/main/java/at/tuwien/DbrepoTableServiceApplication.java @@ -15,10 +15,10 @@ import org.springframework.transaction.annotation.EnableTransactionManagement; @EntityScan(basePackages = {"at.tuwien.entities"}) @EnableElasticsearchRepositories(basePackages = {"at.tuwien.repository.elastic"}) @EnableJpaRepositories(basePackages = {"at.tuwien.repository.jpa"}) -public class FdaTableServiceApplication { +public class DbrepoTableServiceApplication { public static void main(String[] args) { - SpringApplication.run(FdaTableServiceApplication.class, args); + SpringApplication.run(DbrepoTableServiceApplication.class, args); } } diff --git a/fda-table-service/rest-service/src/main/java/at/tuwien/config/SwaggerConfig.java b/dbrepo-table-service/rest-service/src/main/java/at/tuwien/config/SwaggerConfig.java similarity index 75% rename from fda-table-service/rest-service/src/main/java/at/tuwien/config/SwaggerConfig.java rename to dbrepo-table-service/rest-service/src/main/java/at/tuwien/config/SwaggerConfig.java index c841ecbd15a14a4cb85268944a1c7946cda21bf9..341d4650373eb88d8fdf813499fbdfc5655dc5f6 100644 --- a/fda-table-service/rest-service/src/main/java/at/tuwien/config/SwaggerConfig.java +++ b/dbrepo-table-service/rest-service/src/main/java/at/tuwien/config/SwaggerConfig.java @@ -5,11 +5,14 @@ import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.info.Contact; import io.swagger.v3.oas.models.info.Info; import io.swagger.v3.oas.models.info.License; +import io.swagger.v3.oas.models.servers.Server; import org.springdoc.core.GroupedOpenApi; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import java.util.List; + @Configuration public class SwaggerConfig { @@ -30,8 +33,14 @@ public class SwaggerConfig { .name("Apache 2.0") .url("https://www.apache.org/licenses/LICENSE-2.0"))) .externalDocs(new ExternalDocumentation() - .description("Wiki Documentation") - .url("https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/wikis")); + .description("Sourcecode Documentation") + .url("https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services")) + .servers(List.of(new Server() + .description("Generated server url") + .url("http://localhost:9094"), + new Server() + .description("Sandbox") + .url("https://dbrepo2.tuwien.ac.at"))); } @Bean diff --git a/fda-table-service/rest-service/src/main/java/at/tuwien/endpoints/AbstractEndpoint.java b/dbrepo-table-service/rest-service/src/main/java/at/tuwien/endpoints/AbstractEndpoint.java similarity index 100% rename from fda-table-service/rest-service/src/main/java/at/tuwien/endpoints/AbstractEndpoint.java rename to dbrepo-table-service/rest-service/src/main/java/at/tuwien/endpoints/AbstractEndpoint.java diff --git a/fda-table-service/rest-service/src/main/java/at/tuwien/endpoints/AccessEndpoint.java b/dbrepo-table-service/rest-service/src/main/java/at/tuwien/endpoints/AccessEndpoint.java similarity index 70% rename from fda-table-service/rest-service/src/main/java/at/tuwien/endpoints/AccessEndpoint.java rename to dbrepo-table-service/rest-service/src/main/java/at/tuwien/endpoints/AccessEndpoint.java index f48226219187863f667117080faf333f60b08614..f17ec1eca2a728ab248416a18668cd654091e434 100644 --- a/fda-table-service/rest-service/src/main/java/at/tuwien/endpoints/AccessEndpoint.java +++ b/dbrepo-table-service/rest-service/src/main/java/at/tuwien/endpoints/AccessEndpoint.java @@ -1,6 +1,7 @@ package at.tuwien.endpoints; import at.tuwien.api.database.DatabaseAccessDto; +import at.tuwien.api.error.ApiErrorDto; import at.tuwien.entities.database.DatabaseAccess; import at.tuwien.exception.AccessDeniedException; import at.tuwien.exception.NotAllowedException; @@ -9,6 +10,11 @@ import at.tuwien.service.AccessService; import at.tuwien.service.DatabaseService; import io.micrometer.core.annotation.Timed; import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.headers.Header; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.responses.ApiResponses; import io.swagger.v3.oas.annotations.security.SecurityRequirement; import lombok.extern.log4j.Log4j2; import org.springframework.beans.factory.annotation.Autowired; @@ -42,6 +48,23 @@ public class AccessEndpoint extends AbstractEndpoint { @Timed(value = "access.check", description = "Time needed to check access to a table") @PreAuthorize("hasRole('ROLE_RESEARCHER')") @Operation(summary = "Check access to some table", security = @SecurityRequirement(name = "bearerAuth")) + @ApiResponses(value = { + @ApiResponse(responseCode = "200", + description = "Check access successfully", + content = {@Content( + mediaType = "application/json", + schema = @Schema(implementation = DatabaseAccessDto.class))}), + @ApiResponse(responseCode = "403", + description = "Access to the database is forbidden", + content = {@Content( + mediaType = "application/json", + schema = @Schema(implementation = ApiErrorDto.class))}), + @ApiResponse(responseCode = "405", + description = "Check access not permitted", + content = {@Content( + mediaType = "application/json", + schema = @Schema(implementation = ApiErrorDto.class))}), + }) public ResponseEntity<DatabaseAccessDto> checkAccess(@NotBlank @PathVariable("id") Long containerId, @NotBlank @PathVariable("databaseId") Long databaseId, @NotBlank @PathVariable("tableId") Long tableId, diff --git a/fda-table-service/rest-service/src/main/java/at/tuwien/endpoints/TableColumnEndpoint.java b/dbrepo-table-service/rest-service/src/main/java/at/tuwien/endpoints/TableColumnEndpoint.java similarity index 63% rename from fda-table-service/rest-service/src/main/java/at/tuwien/endpoints/TableColumnEndpoint.java rename to dbrepo-table-service/rest-service/src/main/java/at/tuwien/endpoints/TableColumnEndpoint.java index 73b170ae4ae4151c11bbbf62ffb9abf08d62fba4..2e32a72a66786cabbac187c710288cc55497bff2 100644 --- a/fda-table-service/rest-service/src/main/java/at/tuwien/endpoints/TableColumnEndpoint.java +++ b/dbrepo-table-service/rest-service/src/main/java/at/tuwien/endpoints/TableColumnEndpoint.java @@ -1,7 +1,9 @@ package at.tuwien.endpoints; +import at.tuwien.api.database.DatabaseAccessDto; import at.tuwien.api.database.table.columns.ColumnDto; import at.tuwien.api.database.table.columns.concepts.ColumnSemanticsUpdateDto; +import at.tuwien.api.error.ApiErrorDto; import at.tuwien.entities.database.table.columns.TableColumn; import at.tuwien.exception.*; import at.tuwien.mapper.TableMapper; @@ -10,6 +12,10 @@ import at.tuwien.service.DatabaseService; import at.tuwien.service.TableService; import io.micrometer.core.annotation.Timed; import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.responses.ApiResponses; import io.swagger.v3.oas.annotations.security.SecurityRequirement; import lombok.extern.log4j.Log4j2; import org.springframework.beans.factory.annotation.Autowired; @@ -42,6 +48,33 @@ public class TableColumnEndpoint extends AbstractEndpoint { @Transactional @Timed(value = "semantics.column_update", description = "Time needed to update a table column semantic mapping") @Operation(summary = "Update a table column semantic mapping", security = @SecurityRequirement(name = "bearerAuth")) + @ApiResponses(value = { + @ApiResponse(responseCode = "202", + description = "Updated column semantics successfully", + content = {@Content( + mediaType = "application/json", + schema = @Schema(implementation = ColumnDto.class))}), + @ApiResponse(responseCode = "400", + description = "Update semantic concept query is malformed or update unit of measurement query is malformed", + content = {@Content( + mediaType = "application/json", + schema = @Schema(implementation = ApiErrorDto.class))}), + @ApiResponse(responseCode = "403", + description = "Access to the database is forbidden", + content = {@Content( + mediaType = "application/json", + schema = @Schema(implementation = ApiErrorDto.class))}), + @ApiResponse(responseCode = "404", + description = "Table, database, semantic concept, unit of measurement or container could not be found", + content = {@Content( + mediaType = "application/json", + schema = @Schema(implementation = ApiErrorDto.class))}), + @ApiResponse(responseCode = "405", + description = "Update column semantics not permitted", + content = {@Content( + mediaType = "application/json", + schema = @Schema(implementation = ColumnDto.class))}), + }) public ResponseEntity<ColumnDto> update(@NotNull @PathVariable("id") Long containerId, @NotNull @PathVariable("databaseId") Long databaseId, @NotNull @PathVariable("tableId") Long tableId, diff --git a/fda-table-service/rest-service/src/main/java/at/tuwien/endpoints/TableEndpoint.java b/dbrepo-table-service/rest-service/src/main/java/at/tuwien/endpoints/TableEndpoint.java similarity index 50% rename from fda-table-service/rest-service/src/main/java/at/tuwien/endpoints/TableEndpoint.java rename to dbrepo-table-service/rest-service/src/main/java/at/tuwien/endpoints/TableEndpoint.java index d1a6784f83ce35c698f84b78de6cd1d981106945..06a175d8d466b30ce1f42649a3bea15b108705e7 100644 --- a/fda-table-service/rest-service/src/main/java/at/tuwien/endpoints/TableEndpoint.java +++ b/dbrepo-table-service/rest-service/src/main/java/at/tuwien/endpoints/TableEndpoint.java @@ -1,6 +1,8 @@ package at.tuwien.endpoints; +import at.tuwien.api.database.DatabaseAccessDto; import at.tuwien.api.database.table.*; +import at.tuwien.api.error.ApiErrorDto; import at.tuwien.entities.database.table.Table; import at.tuwien.exception.*; import at.tuwien.mapper.TableMapper; @@ -10,6 +12,10 @@ import at.tuwien.service.MessageQueueService; import at.tuwien.service.TableService; import io.micrometer.core.annotation.Timed; import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.responses.ApiResponses; import io.swagger.v3.oas.annotations.security.SecurityRequirement; import lombok.extern.log4j.Log4j2; import org.springframework.beans.factory.annotation.Autowired; @@ -47,6 +53,23 @@ public class TableEndpoint extends AbstractEndpoint { @Transactional(readOnly = true) @Timed(value = "table.list", description = "Time needed to list the tables") @Operation(summary = "List all tables", security = @SecurityRequirement(name = "bearerAuth")) + @ApiResponses(value = { + @ApiResponse(responseCode = "200", + description = "List tables", + content = {@Content( + mediaType = "application/json", + schema = @Schema(implementation = TableBriefDto[].class))}), + @ApiResponse(responseCode = "404", + description = "Database could not be found", + content = {@Content( + mediaType = "application/json", + schema = @Schema(implementation = ApiErrorDto.class))}), + @ApiResponse(responseCode = "405", + description = "List tables not permitted", + content = {@Content( + mediaType = "application/json", + schema = @Schema(implementation = ApiErrorDto.class))}), + }) public ResponseEntity<List<TableBriefDto>> list(@NotNull @PathVariable("id") Long containerId, @NotNull @PathVariable("databaseId") Long databaseId, Principal principal) @@ -69,6 +92,43 @@ public class TableEndpoint extends AbstractEndpoint { @Transactional @Timed(value = "table.create", description = "Time needed to create a table") @Operation(summary = "Create a table", security = @SecurityRequirement(name = "bearerAuth")) + @ApiResponses(value = { + @ApiResponse(responseCode = "201", + description = "Created a new table", + content = {@Content( + mediaType = "application/json", + schema = @Schema(implementation = TableBriefDto.class))}), + @ApiResponse(responseCode = "400", + description = "Create table query is malformed", + content = {@Content( + mediaType = "application/json", + schema = @Schema(implementation = ApiErrorDto.class))}), + @ApiResponse(responseCode = "404", + description = "Database, container or user could not be found", + content = {@Content( + mediaType = "application/json", + schema = @Schema(implementation = ApiErrorDto.class))}), + @ApiResponse(responseCode = "405", + description = "Create table not permitted", + content = {@Content( + mediaType = "application/json", + schema = @Schema(implementation = ApiErrorDto.class))}), + @ApiResponse(responseCode = "409", + description = "Create table conflicts with existing table name", + content = {@Content( + mediaType = "application/json", + schema = @Schema(implementation = ApiErrorDto.class))}), + @ApiResponse(responseCode = "501", + description = "Image is not supported", + content = {@Content( + mediaType = "application/json", + schema = @Schema(implementation = ApiErrorDto.class))}), + @ApiResponse(responseCode = "504", + description = "Broker service failed to create queue", + content = {@Content( + mediaType = "application/json", + schema = @Schema(implementation = ApiErrorDto.class))}), + }) public ResponseEntity<TableBriefDto> create(@NotNull @PathVariable("id") Long containerId, @NotNull @PathVariable("databaseId") Long databaseId, @NotNull @Valid @RequestBody TableCreateDto createDto, @@ -95,6 +155,28 @@ public class TableEndpoint extends AbstractEndpoint { @Transactional(readOnly = true) @Timed(value = "table.find", description = "Time needed to find a table") @Operation(summary = "Get information about table", security = @SecurityRequirement(name = "bearerAuth")) + @ApiResponses(value = { + @ApiResponse(responseCode = "200", + description = "Find table successfully", + content = {@Content( + mediaType = "application/json", + schema = @Schema(implementation = TableDto.class))}), + @ApiResponse(responseCode = "403", + description = "Access to the database is forbidden", + content = {@Content( + mediaType = "application/json", + schema = @Schema(implementation = ApiErrorDto.class))}), + @ApiResponse(responseCode = "404", + description = "Table, database or container could not be found", + content = {@Content( + mediaType = "application/json", + schema = @Schema(implementation = ApiErrorDto.class))}), + @ApiResponse(responseCode = "405", + description = "Find table not permitted", + content = {@Content( + mediaType = "application/json", + schema = @Schema(implementation = ApiErrorDto.class))}), + }) public ResponseEntity<TableDto> findById(@NotNull @PathVariable("id") Long containerId, @NotNull @PathVariable("databaseId") Long databaseId, @NotNull @PathVariable("tableId") Long tableId, @@ -117,8 +199,44 @@ public class TableEndpoint extends AbstractEndpoint { @Transactional @Timed(value = "table.delete", description = "Time needed to delete a table") @Operation(summary = "Delete a table", security = @SecurityRequirement(name = "bearerAuth")) - @ResponseStatus(HttpStatus.OK) - public void delete(@NotNull @PathVariable("id") Long containerId, + @ApiResponses(value = { + @ApiResponse(responseCode = "202", + description = "Delete table successfully", + content = {@Content( + mediaType = "application/json", + schema = @Schema(implementation = TableDto.class))}), + @ApiResponse(responseCode = "400", + description = "Delete table query resulted in an invalid query statement", + content = {@Content( + mediaType = "application/json", + schema = @Schema(implementation = ApiErrorDto.class))}), + @ApiResponse(responseCode = "403", + description = "Access to the database is forbidden", + content = {@Content( + mediaType = "application/json", + schema = @Schema(implementation = ApiErrorDto.class))}), + @ApiResponse(responseCode = "404", + description = "Table, database or container could not be found", + content = {@Content( + mediaType = "application/json", + schema = @Schema(implementation = ApiErrorDto.class))}), + @ApiResponse(responseCode = "405", + description = "Delete table not permitted", + content = {@Content( + mediaType = "application/json", + schema = @Schema(implementation = ApiErrorDto.class))}), + @ApiResponse(responseCode = "423", + description = "Delete table resulted in an invalid state", + content = {@Content( + mediaType = "application/json", + schema = @Schema(implementation = ApiErrorDto.class))}), + @ApiResponse(responseCode = "501", + description = "Image is not supported", + content = {@Content( + mediaType = "application/json", + schema = @Schema(implementation = ApiErrorDto.class))}), + }) + public ResponseEntity<Void> delete(@NotNull @PathVariable("id") Long containerId, @NotNull @PathVariable("databaseId") Long databaseId, @NotNull @PathVariable("tableId") Long tableId, @NotNull Principal principal) @@ -132,6 +250,8 @@ public class TableEndpoint extends AbstractEndpoint { throw new NotAllowedException("Missing table delete permission"); } tableService.deleteTable(containerId, databaseId, tableId); + return ResponseEntity.accepted() + .build(); } } diff --git a/fda-table-service/rest-service/src/main/java/at/tuwien/handlers/ApiExceptionHandler.java b/dbrepo-table-service/rest-service/src/main/java/at/tuwien/handlers/ApiExceptionHandler.java similarity index 95% rename from fda-table-service/rest-service/src/main/java/at/tuwien/handlers/ApiExceptionHandler.java rename to dbrepo-table-service/rest-service/src/main/java/at/tuwien/handlers/ApiExceptionHandler.java index 4d4f7f1e18805eff74c48ef6e2f49fda62970ad5..bca4721e560758e40bcd23c8eb910f27b5607928 100644 --- a/fda-table-service/rest-service/src/main/java/at/tuwien/handlers/ApiExceptionHandler.java +++ b/dbrepo-table-service/rest-service/src/main/java/at/tuwien/handlers/ApiExceptionHandler.java @@ -2,6 +2,7 @@ package at.tuwien.handlers; import at.tuwien.api.error.ApiErrorDto; import at.tuwien.exception.*; +import io.swagger.v3.oas.annotations.Hidden; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; @@ -14,17 +15,19 @@ import org.springframework.web.servlet.mvc.method.annotation.ResponseEntityExcep @ControllerAdvice public class ApiExceptionHandler extends ResponseEntityExceptionHandler { - @ResponseStatus(HttpStatus.NOT_ACCEPTABLE) + @Hidden + @ResponseStatus(HttpStatus.GATEWAY_TIMEOUT) @ExceptionHandler({AmqpException.class}) public ResponseEntity<ApiErrorDto> handle(AmqpException e, WebRequest request) { final ApiErrorDto response = ApiErrorDto.builder() - .status(HttpStatus.NOT_ACCEPTABLE) + .status(HttpStatus.GATEWAY_TIMEOUT) .message(e.getLocalizedMessage()) .code("error.table.amqp") .build(); return new ResponseEntity<>(response, new HttpHeaders(), response.getStatus()); } + @Hidden @ResponseStatus(HttpStatus.NOT_FOUND) @ExceptionHandler({ArbitraryPrimaryKeysException.class}) public ResponseEntity<ApiErrorDto> handle(ArbitraryPrimaryKeysException e, WebRequest request) { @@ -36,6 +39,7 @@ public class ApiExceptionHandler extends ResponseEntityExceptionHandler { return new ResponseEntity<>(response, new HttpHeaders(), response.getStatus()); } + @Hidden @ResponseStatus(HttpStatus.NOT_FOUND) @ExceptionHandler({ContainerNotFoundException.class}) public ResponseEntity<ApiErrorDto> handle(ContainerNotFoundException e, WebRequest request) { @@ -47,6 +51,7 @@ public class ApiExceptionHandler extends ResponseEntityExceptionHandler { return new ResponseEntity<>(response, new HttpHeaders(), response.getStatus()); } + @Hidden @ResponseStatus(HttpStatus.METHOD_NOT_ALLOWED) @ExceptionHandler({DatabaseConnectionException.class}) public ResponseEntity<ApiErrorDto> handle(DatabaseConnectionException e, WebRequest request) { @@ -58,6 +63,7 @@ public class ApiExceptionHandler extends ResponseEntityExceptionHandler { return new ResponseEntity<>(response, new HttpHeaders(), response.getStatus()); } + @Hidden @ResponseStatus(HttpStatus.NOT_FOUND) @ExceptionHandler({DatabaseNotFoundException.class}) public ResponseEntity<ApiErrorDto> handle(DatabaseNotFoundException e, WebRequest request) { @@ -69,17 +75,19 @@ public class ApiExceptionHandler extends ResponseEntityExceptionHandler { return new ResponseEntity<>(response, new HttpHeaders(), response.getStatus()); } - @ResponseStatus(HttpStatus.BAD_REQUEST) + @Hidden + @ResponseStatus(HttpStatus.LOCKED) @ExceptionHandler({DataProcessingException.class}) public ResponseEntity<ApiErrorDto> handle(DataProcessingException e, WebRequest request) { final ApiErrorDto response = ApiErrorDto.builder() - .status(HttpStatus.BAD_REQUEST) + .status(HttpStatus.LOCKED) .message(e.getLocalizedMessage()) .code("error.table.processing") .build(); return new ResponseEntity<>(response, new HttpHeaders(), response.getStatus()); } + @Hidden @ResponseStatus(HttpStatus.BAD_REQUEST) @ExceptionHandler({FileStorageException.class}) public ResponseEntity<ApiErrorDto> handle(FileStorageException e, WebRequest request) { @@ -91,6 +99,7 @@ public class ApiExceptionHandler extends ResponseEntityExceptionHandler { return new ResponseEntity<>(response, new HttpHeaders(), response.getStatus()); } + @Hidden @ResponseStatus(HttpStatus.BAD_REQUEST) @ExceptionHandler({ImageNotSupportedException.class}) public ResponseEntity<ApiErrorDto> handle(ImageNotSupportedException e, WebRequest request) { @@ -102,6 +111,7 @@ public class ApiExceptionHandler extends ResponseEntityExceptionHandler { return new ResponseEntity<>(response, new HttpHeaders(), response.getStatus()); } + @Hidden @ResponseStatus(HttpStatus.BAD_REQUEST) @ExceptionHandler({PaginationException.class}) public ResponseEntity<ApiErrorDto> handle(PaginationException e, WebRequest request) { @@ -113,6 +123,7 @@ public class ApiExceptionHandler extends ResponseEntityExceptionHandler { return new ResponseEntity<>(response, new HttpHeaders(), response.getStatus()); } + @Hidden @ResponseStatus(HttpStatus.BAD_REQUEST) @ExceptionHandler({QueryMalformedException.class}) public ResponseEntity<ApiErrorDto> handle(QueryMalformedException e, WebRequest request) { @@ -124,6 +135,7 @@ public class ApiExceptionHandler extends ResponseEntityExceptionHandler { return new ResponseEntity<>(response, new HttpHeaders(), response.getStatus()); } + @Hidden @ResponseStatus(HttpStatus.BAD_REQUEST) @ExceptionHandler({TableMalformedException.class}) public ResponseEntity<ApiErrorDto> handle(TableMalformedException e, WebRequest request) { @@ -135,6 +147,7 @@ public class ApiExceptionHandler extends ResponseEntityExceptionHandler { return new ResponseEntity<>(response, new HttpHeaders(), response.getStatus()); } + @Hidden @ResponseStatus(HttpStatus.CONFLICT) @ExceptionHandler({TableNameExistsException.class}) public ResponseEntity<ApiErrorDto> handle(TableNameExistsException e, WebRequest request) { @@ -146,6 +159,7 @@ public class ApiExceptionHandler extends ResponseEntityExceptionHandler { return new ResponseEntity<>(response, new HttpHeaders(), response.getStatus()); } + @Hidden @ResponseStatus(HttpStatus.NOT_FOUND) @ExceptionHandler({TableNotFoundException.class}) public ResponseEntity<ApiErrorDto> handle(TableNotFoundException e, WebRequest request) { @@ -157,6 +171,7 @@ public class ApiExceptionHandler extends ResponseEntityExceptionHandler { return new ResponseEntity<>(response, new HttpHeaders(), response.getStatus()); } + @Hidden @ResponseStatus(HttpStatus.NOT_FOUND) @ExceptionHandler({UserNotFoundException.class}) public ResponseEntity<ApiErrorDto> handle(UserNotFoundException e, WebRequest request) { diff --git a/fda-table-service/rest-service/src/main/resources/application-docker.yml b/dbrepo-table-service/rest-service/src/main/resources/application-docker.yml similarity index 100% rename from fda-table-service/rest-service/src/main/resources/application-docker.yml rename to dbrepo-table-service/rest-service/src/main/resources/application-docker.yml diff --git a/fda-table-service/rest-service/src/main/resources/application-local.yml b/dbrepo-table-service/rest-service/src/main/resources/application-local.yml similarity index 93% rename from fda-table-service/rest-service/src/main/resources/application-local.yml rename to dbrepo-table-service/rest-service/src/main/resources/application-local.yml index 1852e935c8b90af294290146bd094110f8915c3d..e637ccd595a3bee591ea56fac7f9b6eb7e0a547b 100644 --- a/fda-table-service/rest-service/src/main/resources/application-local.yml +++ b/dbrepo-table-service/rest-service/src/main/resources/application-local.yml @@ -2,7 +2,7 @@ app.version: '@project.version@' spring: main.banner-mode: off datasource: - url: jdbc:mariadb://metadata-db:3306/fda + url: jdbc:mariadb://localhost:3306/fda driver-class-name: org.mariadb.jdbc.Driver username: root password: dbrepo @@ -41,6 +41,6 @@ fda: ready.path: ./ready gateway.endpoint: http://localhost:9095 elastic: - endpoint: search-service:9200 + endpoint: localhost:9200 username: elastic password: elastic \ No newline at end of file diff --git a/fda-table-service/rest-service/src/main/resources/application.yml b/dbrepo-table-service/rest-service/src/main/resources/application.yml similarity index 100% rename from fda-table-service/rest-service/src/main/resources/application.yml rename to dbrepo-table-service/rest-service/src/main/resources/application.yml diff --git a/fda-table-service/rest-service/src/main/resources/config.properties b/dbrepo-table-service/rest-service/src/main/resources/config.properties similarity index 100% rename from fda-table-service/rest-service/src/main/resources/config.properties rename to dbrepo-table-service/rest-service/src/main/resources/config.properties diff --git a/fda-table-service/rest-service/src/main/resources/mariadb/reserved.csv b/dbrepo-table-service/rest-service/src/main/resources/mariadb/reserved.csv similarity index 100% rename from fda-table-service/rest-service/src/main/resources/mariadb/reserved.csv rename to dbrepo-table-service/rest-service/src/main/resources/mariadb/reserved.csv diff --git a/fda-table-service/rest-service/src/main/resources/mariadb_hibernate.cfg.xml b/dbrepo-table-service/rest-service/src/main/resources/mariadb_hibernate.cfg.xml similarity index 100% rename from fda-table-service/rest-service/src/main/resources/mariadb_hibernate.cfg.xml rename to dbrepo-table-service/rest-service/src/main/resources/mariadb_hibernate.cfg.xml diff --git a/fda-table-service/rest-service/src/test/java/at/tuwien/BaseUnitTest.java b/dbrepo-table-service/rest-service/src/test/java/at/tuwien/BaseUnitTest.java similarity index 100% rename from fda-table-service/rest-service/src/test/java/at/tuwien/BaseUnitTest.java rename to dbrepo-table-service/rest-service/src/test/java/at/tuwien/BaseUnitTest.java diff --git a/fda-table-service/rest-service/src/test/java/at/tuwien/config/DockerConfig.java b/dbrepo-table-service/rest-service/src/test/java/at/tuwien/config/DockerConfig.java similarity index 100% rename from fda-table-service/rest-service/src/test/java/at/tuwien/config/DockerConfig.java rename to dbrepo-table-service/rest-service/src/test/java/at/tuwien/config/DockerConfig.java diff --git a/fda-table-service/rest-service/src/test/java/at/tuwien/config/GatewayConfig.java b/dbrepo-table-service/rest-service/src/test/java/at/tuwien/config/GatewayConfig.java similarity index 100% rename from fda-table-service/rest-service/src/test/java/at/tuwien/config/GatewayConfig.java rename to dbrepo-table-service/rest-service/src/test/java/at/tuwien/config/GatewayConfig.java diff --git a/fda-table-service/rest-service/src/test/java/at/tuwien/config/MariaDbConfig.java b/dbrepo-table-service/rest-service/src/test/java/at/tuwien/config/MariaDbConfig.java similarity index 100% rename from fda-table-service/rest-service/src/test/java/at/tuwien/config/MariaDbConfig.java rename to dbrepo-table-service/rest-service/src/test/java/at/tuwien/config/MariaDbConfig.java diff --git a/fda-table-service/rest-service/src/test/java/at/tuwien/endpoint/TableEndpointUnitTest.java b/dbrepo-table-service/rest-service/src/test/java/at/tuwien/endpoint/TableEndpointUnitTest.java similarity index 100% rename from fda-table-service/rest-service/src/test/java/at/tuwien/endpoint/TableEndpointUnitTest.java rename to dbrepo-table-service/rest-service/src/test/java/at/tuwien/endpoint/TableEndpointUnitTest.java diff --git a/fda-table-service/rest-service/src/test/java/at/tuwien/hibernate/DbrepoSchemaFilter.java b/dbrepo-table-service/rest-service/src/test/java/at/tuwien/hibernate/DbrepoSchemaFilter.java similarity index 100% rename from fda-table-service/rest-service/src/test/java/at/tuwien/hibernate/DbrepoSchemaFilter.java rename to dbrepo-table-service/rest-service/src/test/java/at/tuwien/hibernate/DbrepoSchemaFilter.java diff --git a/fda-table-service/rest-service/src/test/java/at/tuwien/hibernate/DbrepoSchemaProvider.java b/dbrepo-table-service/rest-service/src/test/java/at/tuwien/hibernate/DbrepoSchemaProvider.java similarity index 100% rename from fda-table-service/rest-service/src/test/java/at/tuwien/hibernate/DbrepoSchemaProvider.java rename to dbrepo-table-service/rest-service/src/test/java/at/tuwien/hibernate/DbrepoSchemaProvider.java diff --git a/fda-table-service/rest-service/src/test/java/at/tuwien/service/ElasticSearchIndexIntegrationTest.java b/dbrepo-table-service/rest-service/src/test/java/at/tuwien/service/ElasticSearchIndexIntegrationTest.java similarity index 100% rename from fda-table-service/rest-service/src/test/java/at/tuwien/service/ElasticSearchIndexIntegrationTest.java rename to dbrepo-table-service/rest-service/src/test/java/at/tuwien/service/ElasticSearchIndexIntegrationTest.java diff --git a/fda-table-service/rest-service/src/test/java/at/tuwien/service/MessageQueueServiceIntegrationTest.java b/dbrepo-table-service/rest-service/src/test/java/at/tuwien/service/MessageQueueServiceIntegrationTest.java similarity index 100% rename from fda-table-service/rest-service/src/test/java/at/tuwien/service/MessageQueueServiceIntegrationTest.java rename to dbrepo-table-service/rest-service/src/test/java/at/tuwien/service/MessageQueueServiceIntegrationTest.java diff --git a/fda-table-service/rest-service/src/test/java/at/tuwien/service/TableServiceIntegrationTest.java b/dbrepo-table-service/rest-service/src/test/java/at/tuwien/service/TableServiceIntegrationTest.java similarity index 100% rename from fda-table-service/rest-service/src/test/java/at/tuwien/service/TableServiceIntegrationTest.java rename to dbrepo-table-service/rest-service/src/test/java/at/tuwien/service/TableServiceIntegrationTest.java diff --git a/fda-table-service/rest-service/src/test/java/at/tuwien/utils/AmqpUtils.java b/dbrepo-table-service/rest-service/src/test/java/at/tuwien/utils/AmqpUtils.java similarity index 100% rename from fda-table-service/rest-service/src/test/java/at/tuwien/utils/AmqpUtils.java rename to dbrepo-table-service/rest-service/src/test/java/at/tuwien/utils/AmqpUtils.java diff --git a/fda-table-service/rest-service/src/test/resources/application.properties b/dbrepo-table-service/rest-service/src/test/resources/application.properties similarity index 100% rename from fda-table-service/rest-service/src/test/resources/application.properties rename to dbrepo-table-service/rest-service/src/test/resources/application.properties diff --git a/fda-table-service/rest-service/src/test/resources/schema.sql b/dbrepo-table-service/rest-service/src/test/resources/schema.sql similarity index 100% rename from fda-table-service/rest-service/src/test/resources/schema.sql rename to dbrepo-table-service/rest-service/src/test/resources/schema.sql diff --git a/fda-table-service/rest-service/src/test/resources/species/Species.sql b/dbrepo-table-service/rest-service/src/test/resources/species/Species.sql similarity index 100% rename from fda-table-service/rest-service/src/test/resources/species/Species.sql rename to dbrepo-table-service/rest-service/src/test/resources/species/Species.sql diff --git a/fda-table-service/rest-service/src/test/resources/traffic/TrafficCh.sql b/dbrepo-table-service/rest-service/src/test/resources/traffic/TrafficCh.sql similarity index 100% rename from fda-table-service/rest-service/src/test/resources/traffic/TrafficCh.sql rename to dbrepo-table-service/rest-service/src/test/resources/traffic/TrafficCh.sql diff --git a/fda-table-service/rest-service/src/test/resources/weather/WeatherAus.sql b/dbrepo-table-service/rest-service/src/test/resources/weather/WeatherAus.sql similarity index 100% rename from fda-table-service/rest-service/src/test/resources/weather/WeatherAus.sql rename to dbrepo-table-service/rest-service/src/test/resources/weather/WeatherAus.sql diff --git a/fda-table-service/service_ready b/dbrepo-table-service/service_ready similarity index 100% rename from fda-table-service/service_ready rename to dbrepo-table-service/service_ready diff --git a/fda-table-service/services/pom.xml b/dbrepo-table-service/services/pom.xml similarity index 90% rename from fda-table-service/services/pom.xml rename to dbrepo-table-service/services/pom.xml index 8deff1d33ebe581651b23a0fe5ca05c6c9453f79..0b937f235d8771979dafb9abd4c8090f52d61ac2 100644 --- a/fda-table-service/services/pom.xml +++ b/dbrepo-table-service/services/pom.xml @@ -4,14 +4,14 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> - <artifactId>fda-table-service</artifactId> + <artifactId>dbrepo-table-service</artifactId> <groupId>at.tuwien</groupId> - <version>1.1.0-alpha</version> + <version>1.2.0</version> </parent> <artifactId>services</artifactId> - <version>1.1.0-alpha</version> - <name>fda-table-service-services</name> + <version>1.2.0</version> + <name>dbrepo-table-service-services</name> <build> <plugins> diff --git a/fda-table-service/services/src/main/java/at/tuwien/auth/AuthTokenFilter.java b/dbrepo-table-service/services/src/main/java/at/tuwien/auth/AuthTokenFilter.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/auth/AuthTokenFilter.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/auth/AuthTokenFilter.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/config/AmqpConfig.java b/dbrepo-table-service/services/src/main/java/at/tuwien/config/AmqpConfig.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/config/AmqpConfig.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/config/AmqpConfig.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/config/DockerConfig.java b/dbrepo-table-service/services/src/main/java/at/tuwien/config/DockerConfig.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/config/DockerConfig.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/config/DockerConfig.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/config/ElasticsearchConfig.java b/dbrepo-table-service/services/src/main/java/at/tuwien/config/ElasticsearchConfig.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/config/ElasticsearchConfig.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/config/ElasticsearchConfig.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/config/GatewayConfig.java b/dbrepo-table-service/services/src/main/java/at/tuwien/config/GatewayConfig.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/config/GatewayConfig.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/config/GatewayConfig.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/config/IndexConfig.java b/dbrepo-table-service/services/src/main/java/at/tuwien/config/IndexConfig.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/config/IndexConfig.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/config/IndexConfig.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/config/JacksonConfig.java b/dbrepo-table-service/services/src/main/java/at/tuwien/config/JacksonConfig.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/config/JacksonConfig.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/config/JacksonConfig.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/config/ReadyConfig.java b/dbrepo-table-service/services/src/main/java/at/tuwien/config/ReadyConfig.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/config/ReadyConfig.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/config/ReadyConfig.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/config/WebSecurityConfig.java b/dbrepo-table-service/services/src/main/java/at/tuwien/config/WebSecurityConfig.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/config/WebSecurityConfig.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/config/WebSecurityConfig.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/exception/AccessDeniedException.java b/dbrepo-table-service/services/src/main/java/at/tuwien/exception/AccessDeniedException.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/exception/AccessDeniedException.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/exception/AccessDeniedException.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/exception/AmqpException.java b/dbrepo-table-service/services/src/main/java/at/tuwien/exception/AmqpException.java similarity index 88% rename from fda-table-service/services/src/main/java/at/tuwien/exception/AmqpException.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/exception/AmqpException.java index 6af0750d6f5089a8442a7159eac2076462df2825..da70a16dd326cb81616e6f25a27b59151d57f33c 100644 --- a/fda-table-service/services/src/main/java/at/tuwien/exception/AmqpException.java +++ b/dbrepo-table-service/services/src/main/java/at/tuwien/exception/AmqpException.java @@ -3,7 +3,7 @@ package at.tuwien.exception; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.ResponseStatus; -@ResponseStatus(code = HttpStatus.NOT_ACCEPTABLE) +@ResponseStatus(code = HttpStatus.GATEWAY_TIMEOUT) public class AmqpException extends Exception { public AmqpException(String msg) { diff --git a/fda-table-service/services/src/main/java/at/tuwien/exception/ArbitraryPrimaryKeysException.java b/dbrepo-table-service/services/src/main/java/at/tuwien/exception/ArbitraryPrimaryKeysException.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/exception/ArbitraryPrimaryKeysException.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/exception/ArbitraryPrimaryKeysException.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/exception/ConceptNotFoundException.java b/dbrepo-table-service/services/src/main/java/at/tuwien/exception/ConceptNotFoundException.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/exception/ConceptNotFoundException.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/exception/ConceptNotFoundException.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/exception/ContainerNotFoundException.java b/dbrepo-table-service/services/src/main/java/at/tuwien/exception/ContainerNotFoundException.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/exception/ContainerNotFoundException.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/exception/ContainerNotFoundException.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/exception/DataProcessingException.java b/dbrepo-table-service/services/src/main/java/at/tuwien/exception/DataProcessingException.java similarity index 91% rename from fda-table-service/services/src/main/java/at/tuwien/exception/DataProcessingException.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/exception/DataProcessingException.java index 32c96c4614be5aa4b2ba7d8dc7ff34071dc0f029..fc0555c8e3e175c5cd7aca8e4c16766d2c87a49c 100644 --- a/fda-table-service/services/src/main/java/at/tuwien/exception/DataProcessingException.java +++ b/dbrepo-table-service/services/src/main/java/at/tuwien/exception/DataProcessingException.java @@ -5,7 +5,7 @@ import org.springframework.web.bind.annotation.ResponseStatus; import java.io.IOException; -@ResponseStatus(code = HttpStatus.BAD_REQUEST) +@ResponseStatus(code = HttpStatus.LOCKED) public class DataProcessingException extends Exception { public DataProcessingException(String msg) { diff --git a/fda-table-service/services/src/main/java/at/tuwien/exception/DatabaseConnectionException.java b/dbrepo-table-service/services/src/main/java/at/tuwien/exception/DatabaseConnectionException.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/exception/DatabaseConnectionException.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/exception/DatabaseConnectionException.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/exception/DatabaseNotFoundException.java b/dbrepo-table-service/services/src/main/java/at/tuwien/exception/DatabaseNotFoundException.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/exception/DatabaseNotFoundException.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/exception/DatabaseNotFoundException.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/exception/FileStorageException.java b/dbrepo-table-service/services/src/main/java/at/tuwien/exception/FileStorageException.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/exception/FileStorageException.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/exception/FileStorageException.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/exception/ImageNotSupportedException.java b/dbrepo-table-service/services/src/main/java/at/tuwien/exception/ImageNotSupportedException.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/exception/ImageNotSupportedException.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/exception/ImageNotSupportedException.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/exception/NotAllowedException.java b/dbrepo-table-service/services/src/main/java/at/tuwien/exception/NotAllowedException.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/exception/NotAllowedException.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/exception/NotAllowedException.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/exception/PaginationException.java b/dbrepo-table-service/services/src/main/java/at/tuwien/exception/PaginationException.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/exception/PaginationException.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/exception/PaginationException.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/exception/QueryMalformedException.java b/dbrepo-table-service/services/src/main/java/at/tuwien/exception/QueryMalformedException.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/exception/QueryMalformedException.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/exception/QueryMalformedException.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/exception/TableMalformedException.java b/dbrepo-table-service/services/src/main/java/at/tuwien/exception/TableMalformedException.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/exception/TableMalformedException.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/exception/TableMalformedException.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/exception/TableNameExistsException.java b/dbrepo-table-service/services/src/main/java/at/tuwien/exception/TableNameExistsException.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/exception/TableNameExistsException.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/exception/TableNameExistsException.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/exception/TableNotFoundException.java b/dbrepo-table-service/services/src/main/java/at/tuwien/exception/TableNotFoundException.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/exception/TableNotFoundException.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/exception/TableNotFoundException.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/exception/UnitNotFoundException.java b/dbrepo-table-service/services/src/main/java/at/tuwien/exception/UnitNotFoundException.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/exception/UnitNotFoundException.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/exception/UnitNotFoundException.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/exception/UserNotFoundException.java b/dbrepo-table-service/services/src/main/java/at/tuwien/exception/UserNotFoundException.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/exception/UserNotFoundException.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/exception/UserNotFoundException.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/gateway/AuthenticationServiceGateway.java b/dbrepo-table-service/services/src/main/java/at/tuwien/gateway/AuthenticationServiceGateway.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/gateway/AuthenticationServiceGateway.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/gateway/AuthenticationServiceGateway.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/gateway/QueryServiceGateway.java b/dbrepo-table-service/services/src/main/java/at/tuwien/gateway/QueryServiceGateway.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/gateway/QueryServiceGateway.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/gateway/QueryServiceGateway.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/gateway/impl/AuthenticationServiceGatewayImpl.java b/dbrepo-table-service/services/src/main/java/at/tuwien/gateway/impl/AuthenticationServiceGatewayImpl.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/gateway/impl/AuthenticationServiceGatewayImpl.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/gateway/impl/AuthenticationServiceGatewayImpl.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/gateway/impl/QueryServiceGatewayImpl.java b/dbrepo-table-service/services/src/main/java/at/tuwien/gateway/impl/QueryServiceGatewayImpl.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/gateway/impl/QueryServiceGatewayImpl.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/gateway/impl/QueryServiceGatewayImpl.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/mapper/DatabaseMapper.java b/dbrepo-table-service/services/src/main/java/at/tuwien/mapper/DatabaseMapper.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/mapper/DatabaseMapper.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/mapper/DatabaseMapper.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/mapper/TableMapper.java b/dbrepo-table-service/services/src/main/java/at/tuwien/mapper/TableMapper.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/mapper/TableMapper.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/mapper/TableMapper.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/mapper/UserMapper.java b/dbrepo-table-service/services/src/main/java/at/tuwien/mapper/UserMapper.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/mapper/UserMapper.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/mapper/UserMapper.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/repository/elastic/TableColumnIdxRepository.java b/dbrepo-table-service/services/src/main/java/at/tuwien/repository/elastic/TableColumnIdxRepository.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/repository/elastic/TableColumnIdxRepository.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/repository/elastic/TableColumnIdxRepository.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/repository/elastic/TableIdxRepository.java b/dbrepo-table-service/services/src/main/java/at/tuwien/repository/elastic/TableIdxRepository.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/repository/elastic/TableIdxRepository.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/repository/elastic/TableIdxRepository.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/repository/jpa/ConceptRepository.java b/dbrepo-table-service/services/src/main/java/at/tuwien/repository/jpa/ConceptRepository.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/repository/jpa/ConceptRepository.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/repository/jpa/ConceptRepository.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/repository/jpa/ContainerRepository.java b/dbrepo-table-service/services/src/main/java/at/tuwien/repository/jpa/ContainerRepository.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/repository/jpa/ContainerRepository.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/repository/jpa/ContainerRepository.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/repository/jpa/DatabaseAccessRepository.java b/dbrepo-table-service/services/src/main/java/at/tuwien/repository/jpa/DatabaseAccessRepository.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/repository/jpa/DatabaseAccessRepository.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/repository/jpa/DatabaseAccessRepository.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/repository/jpa/DatabaseRepository.java b/dbrepo-table-service/services/src/main/java/at/tuwien/repository/jpa/DatabaseRepository.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/repository/jpa/DatabaseRepository.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/repository/jpa/DatabaseRepository.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/repository/jpa/ImageEnvironmentRepository.java b/dbrepo-table-service/services/src/main/java/at/tuwien/repository/jpa/ImageEnvironmentRepository.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/repository/jpa/ImageEnvironmentRepository.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/repository/jpa/ImageEnvironmentRepository.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/repository/jpa/ImageRepository.java b/dbrepo-table-service/services/src/main/java/at/tuwien/repository/jpa/ImageRepository.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/repository/jpa/ImageRepository.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/repository/jpa/ImageRepository.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/repository/jpa/TableColumnRepository.java b/dbrepo-table-service/services/src/main/java/at/tuwien/repository/jpa/TableColumnRepository.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/repository/jpa/TableColumnRepository.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/repository/jpa/TableColumnRepository.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/repository/jpa/TableRepository.java b/dbrepo-table-service/services/src/main/java/at/tuwien/repository/jpa/TableRepository.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/repository/jpa/TableRepository.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/repository/jpa/TableRepository.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/repository/jpa/UnitRepository.java b/dbrepo-table-service/services/src/main/java/at/tuwien/repository/jpa/UnitRepository.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/repository/jpa/UnitRepository.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/repository/jpa/UnitRepository.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/repository/jpa/UserRepository.java b/dbrepo-table-service/services/src/main/java/at/tuwien/repository/jpa/UserRepository.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/repository/jpa/UserRepository.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/repository/jpa/UserRepository.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/service/AccessService.java b/dbrepo-table-service/services/src/main/java/at/tuwien/service/AccessService.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/service/AccessService.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/service/AccessService.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/service/ContainerService.java b/dbrepo-table-service/services/src/main/java/at/tuwien/service/ContainerService.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/service/ContainerService.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/service/ContainerService.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/service/DatabaseService.java b/dbrepo-table-service/services/src/main/java/at/tuwien/service/DatabaseService.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/service/DatabaseService.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/service/DatabaseService.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/service/MessageQueueService.java b/dbrepo-table-service/services/src/main/java/at/tuwien/service/MessageQueueService.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/service/MessageQueueService.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/service/MessageQueueService.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/service/TableService.java b/dbrepo-table-service/services/src/main/java/at/tuwien/service/TableService.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/service/TableService.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/service/TableService.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/service/UserService.java b/dbrepo-table-service/services/src/main/java/at/tuwien/service/UserService.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/service/UserService.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/service/UserService.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/service/impl/AccessServiceImpl.java b/dbrepo-table-service/services/src/main/java/at/tuwien/service/impl/AccessServiceImpl.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/service/impl/AccessServiceImpl.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/service/impl/AccessServiceImpl.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/service/impl/ContainerServiceImpl.java b/dbrepo-table-service/services/src/main/java/at/tuwien/service/impl/ContainerServiceImpl.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/service/impl/ContainerServiceImpl.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/service/impl/ContainerServiceImpl.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/service/impl/DatabaseServiceImpl.java b/dbrepo-table-service/services/src/main/java/at/tuwien/service/impl/DatabaseServiceImpl.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/service/impl/DatabaseServiceImpl.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/service/impl/DatabaseServiceImpl.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/service/impl/HibernateConnector.java b/dbrepo-table-service/services/src/main/java/at/tuwien/service/impl/HibernateConnector.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/service/impl/HibernateConnector.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/service/impl/HibernateConnector.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/service/impl/RabbitMqService.java b/dbrepo-table-service/services/src/main/java/at/tuwien/service/impl/RabbitMqService.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/service/impl/RabbitMqService.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/service/impl/RabbitMqService.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/service/impl/TableServiceImpl.java b/dbrepo-table-service/services/src/main/java/at/tuwien/service/impl/TableServiceImpl.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/service/impl/TableServiceImpl.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/service/impl/TableServiceImpl.java diff --git a/fda-table-service/services/src/main/java/at/tuwien/service/impl/UserServiceImpl.java b/dbrepo-table-service/services/src/main/java/at/tuwien/service/impl/UserServiceImpl.java similarity index 100% rename from fda-table-service/services/src/main/java/at/tuwien/service/impl/UserServiceImpl.java rename to dbrepo-table-service/services/src/main/java/at/tuwien/service/impl/UserServiceImpl.java diff --git a/fda-ui/.editorconfig b/dbrepo-ui/.editorconfig similarity index 100% rename from fda-ui/.editorconfig rename to dbrepo-ui/.editorconfig diff --git a/fda-ui/.env.example b/dbrepo-ui/.env.example similarity index 100% rename from fda-ui/.env.example rename to dbrepo-ui/.env.example diff --git a/fda-ui/.eslintrc.js b/dbrepo-ui/.eslintrc.js similarity index 100% rename from fda-ui/.eslintrc.js rename to dbrepo-ui/.eslintrc.js diff --git a/fda-ui/.gitignore b/dbrepo-ui/.gitignore similarity index 100% rename from fda-ui/.gitignore rename to dbrepo-ui/.gitignore diff --git a/fda-ui/.nycrc b/dbrepo-ui/.nycrc similarity index 100% rename from fda-ui/.nycrc rename to dbrepo-ui/.nycrc diff --git a/fda-ui/.prod/default.conf b/dbrepo-ui/.prod/default.conf similarity index 100% rename from fda-ui/.prod/default.conf rename to dbrepo-ui/.prod/default.conf diff --git a/fda-ui/.prod/secure.conf b/dbrepo-ui/.prod/secure.conf similarity index 100% rename from fda-ui/.prod/secure.conf rename to dbrepo-ui/.prod/secure.conf diff --git a/fda-ui/Dockerfile b/dbrepo-ui/Dockerfile similarity index 100% rename from fda-ui/Dockerfile rename to dbrepo-ui/Dockerfile diff --git a/fda-ui/README.md b/dbrepo-ui/README.md similarity index 100% rename from fda-ui/README.md rename to dbrepo-ui/README.md diff --git a/fda-ui/assets/globals.scss b/dbrepo-ui/assets/globals.scss similarity index 100% rename from fda-ui/assets/globals.scss rename to dbrepo-ui/assets/globals.scss diff --git a/fda-ui/assets/variables.scss b/dbrepo-ui/assets/variables.scss similarity index 100% rename from fda-ui/assets/variables.scss rename to dbrepo-ui/assets/variables.scss diff --git a/fda-ui/ava.config.cjs b/dbrepo-ui/ava.config.cjs similarity index 100% rename from fda-ui/ava.config.cjs rename to dbrepo-ui/ava.config.cjs diff --git a/fda-ui/babel.config.js b/dbrepo-ui/babel.config.js similarity index 100% rename from fda-ui/babel.config.js rename to dbrepo-ui/babel.config.js diff --git a/fda-ui/components/.gitkeep b/dbrepo-ui/components/.gitkeep similarity index 100% rename from fda-ui/components/.gitkeep rename to dbrepo-ui/components/.gitkeep diff --git a/fda-ui/components/DBToolbar.vue b/dbrepo-ui/components/DBToolbar.vue similarity index 100% rename from fda-ui/components/DBToolbar.vue rename to dbrepo-ui/components/DBToolbar.vue diff --git a/fda-ui/components/EMPTY.vue b/dbrepo-ui/components/EMPTY.vue similarity index 100% rename from fda-ui/components/EMPTY.vue rename to dbrepo-ui/components/EMPTY.vue diff --git a/fda-ui/components/QueryList.vue b/dbrepo-ui/components/QueryList.vue similarity index 100% rename from fda-ui/components/QueryList.vue rename to dbrepo-ui/components/QueryList.vue diff --git a/fda-ui/components/TableList.vue b/dbrepo-ui/components/TableList.vue similarity index 100% rename from fda-ui/components/TableList.vue rename to dbrepo-ui/components/TableList.vue diff --git a/fda-ui/components/TableSchema.vue b/dbrepo-ui/components/TableSchema.vue similarity index 100% rename from fda-ui/components/TableSchema.vue rename to dbrepo-ui/components/TableSchema.vue diff --git a/fda-ui/components/TableToolbar.vue b/dbrepo-ui/components/TableToolbar.vue similarity index 100% rename from fda-ui/components/TableToolbar.vue rename to dbrepo-ui/components/TableToolbar.vue diff --git a/fda-ui/components/UserToolbar.vue b/dbrepo-ui/components/UserToolbar.vue similarity index 100% rename from fda-ui/components/UserToolbar.vue rename to dbrepo-ui/components/UserToolbar.vue diff --git a/fda-ui/components/ViewList.vue b/dbrepo-ui/components/ViewList.vue similarity index 100% rename from fda-ui/components/ViewList.vue rename to dbrepo-ui/components/ViewList.vue diff --git a/fda-ui/components/dialogs/CreateDB.vue b/dbrepo-ui/components/dialogs/CreateDB.vue similarity index 100% rename from fda-ui/components/dialogs/CreateDB.vue rename to dbrepo-ui/components/dialogs/CreateDB.vue diff --git a/fda-ui/components/dialogs/EditAccess.vue b/dbrepo-ui/components/dialogs/EditAccess.vue similarity index 100% rename from fda-ui/components/dialogs/EditAccess.vue rename to dbrepo-ui/components/dialogs/EditAccess.vue diff --git a/fda-ui/components/dialogs/EditRoles.vue b/dbrepo-ui/components/dialogs/EditRoles.vue similarity index 100% rename from fda-ui/components/dialogs/EditRoles.vue rename to dbrepo-ui/components/dialogs/EditRoles.vue diff --git a/fda-ui/components/dialogs/EditTuple.vue b/dbrepo-ui/components/dialogs/EditTuple.vue similarity index 100% rename from fda-ui/components/dialogs/EditTuple.vue rename to dbrepo-ui/components/dialogs/EditTuple.vue diff --git a/fda-ui/components/dialogs/Persist.vue b/dbrepo-ui/components/dialogs/Persist.vue similarity index 100% rename from fda-ui/components/dialogs/Persist.vue rename to dbrepo-ui/components/dialogs/Persist.vue diff --git a/fda-ui/components/dialogs/Semantics.vue b/dbrepo-ui/components/dialogs/Semantics.vue similarity index 100% rename from fda-ui/components/dialogs/Semantics.vue rename to dbrepo-ui/components/dialogs/Semantics.vue diff --git a/fda-ui/components/dialogs/TimeTravel.vue b/dbrepo-ui/components/dialogs/TimeTravel.vue similarity index 100% rename from fda-ui/components/dialogs/TimeTravel.vue rename to dbrepo-ui/components/dialogs/TimeTravel.vue diff --git a/fda-ui/components/icons/OrcidIcon.vue b/dbrepo-ui/components/icons/OrcidIcon.vue similarity index 100% rename from fda-ui/components/icons/OrcidIcon.vue rename to dbrepo-ui/components/icons/OrcidIcon.vue diff --git a/fda-ui/components/identifier/Citation.vue b/dbrepo-ui/components/identifier/Citation.vue similarity index 100% rename from fda-ui/components/identifier/Citation.vue rename to dbrepo-ui/components/identifier/Citation.vue diff --git a/fda-ui/components/query/Builder.vue b/dbrepo-ui/components/query/Builder.vue similarity index 100% rename from fda-ui/components/query/Builder.vue rename to dbrepo-ui/components/query/Builder.vue diff --git a/fda-ui/components/query/Filters.vue b/dbrepo-ui/components/query/Filters.vue similarity index 100% rename from fda-ui/components/query/Filters.vue rename to dbrepo-ui/components/query/Filters.vue diff --git a/fda-ui/components/query/Raw.vue b/dbrepo-ui/components/query/Raw.vue similarity index 100% rename from fda-ui/components/query/Raw.vue rename to dbrepo-ui/components/query/Raw.vue diff --git a/fda-ui/components/query/Results.vue b/dbrepo-ui/components/query/Results.vue similarity index 100% rename from fda-ui/components/query/Results.vue rename to dbrepo-ui/components/query/Results.vue diff --git a/fda-ui/docker-entrypoint.sh b/dbrepo-ui/docker-entrypoint.sh similarity index 100% rename from fda-ui/docker-entrypoint.sh rename to dbrepo-ui/docker-entrypoint.sh diff --git a/fda-ui/jest.config.js b/dbrepo-ui/jest.config.js similarity index 100% rename from fda-ui/jest.config.js rename to dbrepo-ui/jest.config.js diff --git a/fda-ui/lang/de-DE.js b/dbrepo-ui/lang/de-DE.js similarity index 100% rename from fda-ui/lang/de-DE.js rename to dbrepo-ui/lang/de-DE.js diff --git a/fda-ui/lang/en-US.js b/dbrepo-ui/lang/en-US.js similarity index 100% rename from fda-ui/lang/en-US.js rename to dbrepo-ui/lang/en-US.js diff --git a/fda-ui/layouts/default.vue b/dbrepo-ui/layouts/default.vue similarity index 100% rename from fda-ui/layouts/default.vue rename to dbrepo-ui/layouts/default.vue diff --git a/fda-ui/layouts/error.vue b/dbrepo-ui/layouts/error.vue similarity index 100% rename from fda-ui/layouts/error.vue rename to dbrepo-ui/layouts/error.vue diff --git a/fda-ui/nuxt.config.js b/dbrepo-ui/nuxt.config.js similarity index 100% rename from fda-ui/nuxt.config.js rename to dbrepo-ui/nuxt.config.js diff --git a/fda-ui/package.json b/dbrepo-ui/package.json similarity index 100% rename from fda-ui/package.json rename to dbrepo-ui/package.json diff --git a/fda-ui/pages/container/_container_id/database/_database_id/admin.vue b/dbrepo-ui/pages/container/_container_id/database/_database_id/admin.vue similarity index 100% rename from fda-ui/pages/container/_container_id/database/_database_id/admin.vue rename to dbrepo-ui/pages/container/_container_id/database/_database_id/admin.vue diff --git a/fda-ui/pages/container/_container_id/database/_database_id/index.vue b/dbrepo-ui/pages/container/_container_id/database/_database_id/index.vue similarity index 100% rename from fda-ui/pages/container/_container_id/database/_database_id/index.vue rename to dbrepo-ui/pages/container/_container_id/database/_database_id/index.vue diff --git a/fda-ui/pages/container/_container_id/database/_database_id/info.vue b/dbrepo-ui/pages/container/_container_id/database/_database_id/info.vue similarity index 100% rename from fda-ui/pages/container/_container_id/database/_database_id/info.vue rename to dbrepo-ui/pages/container/_container_id/database/_database_id/info.vue diff --git a/fda-ui/pages/container/_container_id/database/_database_id/query/_query_id/index.vue b/dbrepo-ui/pages/container/_container_id/database/_database_id/query/_query_id/index.vue similarity index 100% rename from fda-ui/pages/container/_container_id/database/_database_id/query/_query_id/index.vue rename to dbrepo-ui/pages/container/_container_id/database/_database_id/query/_query_id/index.vue diff --git a/fda-ui/pages/container/_container_id/database/_database_id/query/create.vue b/dbrepo-ui/pages/container/_container_id/database/_database_id/query/create.vue similarity index 100% rename from fda-ui/pages/container/_container_id/database/_database_id/query/create.vue rename to dbrepo-ui/pages/container/_container_id/database/_database_id/query/create.vue diff --git a/fda-ui/pages/container/_container_id/database/_database_id/query/index.vue b/dbrepo-ui/pages/container/_container_id/database/_database_id/query/index.vue similarity index 100% rename from fda-ui/pages/container/_container_id/database/_database_id/query/index.vue rename to dbrepo-ui/pages/container/_container_id/database/_database_id/query/index.vue diff --git a/fda-ui/pages/container/_container_id/database/_database_id/settings.vue b/dbrepo-ui/pages/container/_container_id/database/_database_id/settings.vue similarity index 100% rename from fda-ui/pages/container/_container_id/database/_database_id/settings.vue rename to dbrepo-ui/pages/container/_container_id/database/_database_id/settings.vue diff --git a/fda-ui/pages/container/_container_id/database/_database_id/table/_table_id/data.vue b/dbrepo-ui/pages/container/_container_id/database/_database_id/table/_table_id/data.vue similarity index 100% rename from fda-ui/pages/container/_container_id/database/_database_id/table/_table_id/data.vue rename to dbrepo-ui/pages/container/_container_id/database/_database_id/table/_table_id/data.vue diff --git a/fda-ui/pages/container/_container_id/database/_database_id/table/_table_id/import.vue b/dbrepo-ui/pages/container/_container_id/database/_database_id/table/_table_id/import.vue similarity index 100% rename from fda-ui/pages/container/_container_id/database/_database_id/table/_table_id/import.vue rename to dbrepo-ui/pages/container/_container_id/database/_database_id/table/_table_id/import.vue diff --git a/fda-ui/pages/container/_container_id/database/_database_id/table/_table_id/index.vue b/dbrepo-ui/pages/container/_container_id/database/_database_id/table/_table_id/index.vue similarity index 100% rename from fda-ui/pages/container/_container_id/database/_database_id/table/_table_id/index.vue rename to dbrepo-ui/pages/container/_container_id/database/_database_id/table/_table_id/index.vue diff --git a/fda-ui/pages/container/_container_id/database/_database_id/table/_table_id/info.vue b/dbrepo-ui/pages/container/_container_id/database/_database_id/table/_table_id/info.vue similarity index 100% rename from fda-ui/pages/container/_container_id/database/_database_id/table/_table_id/info.vue rename to dbrepo-ui/pages/container/_container_id/database/_database_id/table/_table_id/info.vue diff --git a/fda-ui/pages/container/_container_id/database/_database_id/table/_table_id/schema.vue b/dbrepo-ui/pages/container/_container_id/database/_database_id/table/_table_id/schema.vue similarity index 100% rename from fda-ui/pages/container/_container_id/database/_database_id/table/_table_id/schema.vue rename to dbrepo-ui/pages/container/_container_id/database/_database_id/table/_table_id/schema.vue diff --git a/fda-ui/pages/container/_container_id/database/_database_id/table/create.vue b/dbrepo-ui/pages/container/_container_id/database/_database_id/table/create.vue similarity index 100% rename from fda-ui/pages/container/_container_id/database/_database_id/table/create.vue rename to dbrepo-ui/pages/container/_container_id/database/_database_id/table/create.vue diff --git a/fda-ui/pages/container/_container_id/database/_database_id/table/import.vue b/dbrepo-ui/pages/container/_container_id/database/_database_id/table/import.vue similarity index 100% rename from fda-ui/pages/container/_container_id/database/_database_id/table/import.vue rename to dbrepo-ui/pages/container/_container_id/database/_database_id/table/import.vue diff --git a/fda-ui/pages/container/_container_id/database/_database_id/table/index.vue b/dbrepo-ui/pages/container/_container_id/database/_database_id/table/index.vue similarity index 100% rename from fda-ui/pages/container/_container_id/database/_database_id/table/index.vue rename to dbrepo-ui/pages/container/_container_id/database/_database_id/table/index.vue diff --git a/fda-ui/pages/container/_container_id/database/_database_id/view/_view_id/index.vue b/dbrepo-ui/pages/container/_container_id/database/_database_id/view/_view_id/index.vue similarity index 100% rename from fda-ui/pages/container/_container_id/database/_database_id/view/_view_id/index.vue rename to dbrepo-ui/pages/container/_container_id/database/_database_id/view/_view_id/index.vue diff --git a/fda-ui/pages/container/_container_id/database/_database_id/view/create.vue b/dbrepo-ui/pages/container/_container_id/database/_database_id/view/create.vue similarity index 100% rename from fda-ui/pages/container/_container_id/database/_database_id/view/create.vue rename to dbrepo-ui/pages/container/_container_id/database/_database_id/view/create.vue diff --git a/fda-ui/pages/container/_container_id/database/_database_id/view/index.vue b/dbrepo-ui/pages/container/_container_id/database/_database_id/view/index.vue similarity index 100% rename from fda-ui/pages/container/_container_id/database/_database_id/view/index.vue rename to dbrepo-ui/pages/container/_container_id/database/_database_id/view/index.vue diff --git a/fda-ui/pages/container/index.vue b/dbrepo-ui/pages/container/index.vue similarity index 100% rename from fda-ui/pages/container/index.vue rename to dbrepo-ui/pages/container/index.vue diff --git a/fda-ui/pages/forgot.vue b/dbrepo-ui/pages/forgot.vue similarity index 100% rename from fda-ui/pages/forgot.vue rename to dbrepo-ui/pages/forgot.vue diff --git a/fda-ui/pages/index.vue b/dbrepo-ui/pages/index.vue similarity index 100% rename from fda-ui/pages/index.vue rename to dbrepo-ui/pages/index.vue diff --git a/fda-ui/pages/login.vue b/dbrepo-ui/pages/login.vue similarity index 100% rename from fda-ui/pages/login.vue rename to dbrepo-ui/pages/login.vue diff --git a/fda-ui/pages/reset.vue b/dbrepo-ui/pages/reset.vue similarity index 100% rename from fda-ui/pages/reset.vue rename to dbrepo-ui/pages/reset.vue diff --git a/fda-ui/pages/search/index.vue b/dbrepo-ui/pages/search/index.vue similarity index 100% rename from fda-ui/pages/search/index.vue rename to dbrepo-ui/pages/search/index.vue diff --git a/fda-ui/pages/signup.vue b/dbrepo-ui/pages/signup.vue similarity index 100% rename from fda-ui/pages/signup.vue rename to dbrepo-ui/pages/signup.vue diff --git a/fda-ui/pages/user/authentication.vue b/dbrepo-ui/pages/user/authentication.vue similarity index 100% rename from fda-ui/pages/user/authentication.vue rename to dbrepo-ui/pages/user/authentication.vue diff --git a/fda-ui/pages/user/developer.vue b/dbrepo-ui/pages/user/developer.vue similarity index 100% rename from fda-ui/pages/user/developer.vue rename to dbrepo-ui/pages/user/developer.vue diff --git a/fda-ui/pages/user/index.vue b/dbrepo-ui/pages/user/index.vue similarity index 100% rename from fda-ui/pages/user/index.vue rename to dbrepo-ui/pages/user/index.vue diff --git a/fda-ui/pages/user/info.vue b/dbrepo-ui/pages/user/info.vue similarity index 100% rename from fda-ui/pages/user/info.vue rename to dbrepo-ui/pages/user/info.vue diff --git a/fda-ui/plugins/axios.js b/dbrepo-ui/plugins/axios.js similarity index 100% rename from fda-ui/plugins/axios.js rename to dbrepo-ui/plugins/axios.js diff --git a/fda-ui/plugins/mock.js b/dbrepo-ui/plugins/mock.js similarity index 100% rename from fda-ui/plugins/mock.js rename to dbrepo-ui/plugins/mock.js diff --git a/fda-ui/plugins/toast.js b/dbrepo-ui/plugins/toast.js similarity index 100% rename from fda-ui/plugins/toast.js rename to dbrepo-ui/plugins/toast.js diff --git a/fda-ui/plugins/vendors.js b/dbrepo-ui/plugins/vendors.js similarity index 100% rename from fda-ui/plugins/vendors.js rename to dbrepo-ui/plugins/vendors.js diff --git a/fda-ui/plugins/vuex-persist.js b/dbrepo-ui/plugins/vuex-persist.js similarity index 100% rename from fda-ui/plugins/vuex-persist.js rename to dbrepo-ui/plugins/vuex-persist.js diff --git a/fda-ui/server-middleware/index.js b/dbrepo-ui/server-middleware/index.js similarity index 100% rename from fda-ui/server-middleware/index.js rename to dbrepo-ui/server-middleware/index.js diff --git a/fda-ui/server-middleware/query/index.js b/dbrepo-ui/server-middleware/query/index.js similarity index 100% rename from fda-ui/server-middleware/query/index.js rename to dbrepo-ui/server-middleware/query/index.js diff --git a/fda-ui/server-middleware/query/operators.js b/dbrepo-ui/server-middleware/query/operators.js similarity index 100% rename from fda-ui/server-middleware/query/operators.js rename to dbrepo-ui/server-middleware/query/operators.js diff --git a/fda-ui/server-middleware/ready.js b/dbrepo-ui/server-middleware/ready.js similarity index 100% rename from fda-ui/server-middleware/ready.js rename to dbrepo-ui/server-middleware/ready.js diff --git a/fda-ui/static/favicon.ico b/dbrepo-ui/static/favicon.ico similarity index 100% rename from fda-ui/static/favicon.ico rename to dbrepo-ui/static/favicon.ico diff --git a/fda-ui/static/favicon.png b/dbrepo-ui/static/favicon.png similarity index 100% rename from fda-ui/static/favicon.png rename to dbrepo-ui/static/favicon.png diff --git a/fda-ui/static/logo.png b/dbrepo-ui/static/logo.png similarity index 100% rename from fda-ui/static/logo.png rename to dbrepo-ui/static/logo.png diff --git a/fda-ui/static/logo_tu_wien.png b/dbrepo-ui/static/logo_tu_wien.png similarity index 100% rename from fda-ui/static/logo_tu_wien.png rename to dbrepo-ui/static/logo_tu_wien.png diff --git a/fda-ui/static/teaser.mp4 b/dbrepo-ui/static/teaser.mp4 similarity index 100% rename from fda-ui/static/teaser.mp4 rename to dbrepo-ui/static/teaser.mp4 diff --git a/fda-ui/static/teaser_image.png b/dbrepo-ui/static/teaser_image.png similarity index 100% rename from fda-ui/static/teaser_image.png rename to dbrepo-ui/static/teaser_image.png diff --git a/fda-ui/store/index.js b/dbrepo-ui/store/index.js similarity index 100% rename from fda-ui/store/index.js rename to dbrepo-ui/store/index.js diff --git a/fda-ui/test/_setup.js b/dbrepo-ui/test/_setup.js similarity index 100% rename from fda-ui/test/_setup.js rename to dbrepo-ui/test/_setup.js diff --git a/fda-ui/test/e2e/_utils.js b/dbrepo-ui/test/e2e/_utils.js similarity index 100% rename from fda-ui/test/e2e/_utils.js rename to dbrepo-ui/test/e2e/_utils.js diff --git a/fda-ui/test/e2e/database.js b/dbrepo-ui/test/e2e/database.js similarity index 100% rename from fda-ui/test/e2e/database.js rename to dbrepo-ui/test/e2e/database.js diff --git a/fda-ui/test/e2e/index.js b/dbrepo-ui/test/e2e/index.js similarity index 100% rename from fda-ui/test/e2e/index.js rename to dbrepo-ui/test/e2e/index.js diff --git a/fda-ui/test/e2e/tables.js b/dbrepo-ui/test/e2e/tables.js similarity index 100% rename from fda-ui/test/e2e/tables.js rename to dbrepo-ui/test/e2e/tables.js diff --git a/fda-ui/test/specs/QBFilters.spec.js b/dbrepo-ui/test/specs/QBFilters.spec.js similarity index 100% rename from fda-ui/test/specs/QBFilters.spec.js rename to dbrepo-ui/test/specs/QBFilters.spec.js diff --git a/fda-ui/test/unit/query.js b/dbrepo-ui/test/unit/query.js similarity index 100% rename from fda-ui/test/unit/query.js rename to dbrepo-ui/test/unit/query.js diff --git a/fda-ui/utils/index.js b/dbrepo-ui/utils/index.js similarity index 100% rename from fda-ui/utils/index.js rename to dbrepo-ui/utils/index.js diff --git a/fda-ui/yarn.lock b/dbrepo-ui/yarn.lock similarity index 100% rename from fda-ui/yarn.lock rename to dbrepo-ui/yarn.lock diff --git a/docker-compose.dbrepo1.yml b/docker-compose.dbrepo1.yml index dfd09f5097236500634958c7072211892968336c..5d89457c84f64126c67ed4a4b1180e0274af13e1 100644 --- a/docker-compose.dbrepo1.yml +++ b/docker-compose.dbrepo1.yml @@ -31,7 +31,7 @@ networks: services: - metadata-db: + dbrepo-metadata-db: restart: on-failure container_name: dbrepo-metadata-db hostname: metadata-db @@ -48,7 +48,7 @@ services: logging: driver: json-file - discovery-service: + dbrepo-discovery-service: restart: on-failure container_name: dbrepo-discovery-service hostname: discovery-service @@ -60,7 +60,7 @@ services: logging: driver: json-file - gateway-service: + dbrepo-gateway-service: restart: on-failure container_name: dbrepo-gateway-service hostname: gateway-service @@ -72,12 +72,12 @@ services: env_file: - .env depends_on: - discovery-service: + dbrepo-discovery-service: condition: service_healthy logging: driver: json-file - database-service: + dbrepo-database-service: restart: on-failure container_name: dbrepo-database-service hostname: database-service @@ -90,16 +90,16 @@ services: volumes: - /var/run/docker.sock:/var/run/docker.sock depends_on: - container-service: + dbrepo-container-service: condition: service_healthy - broker-service: + dbrepo-broker-service: condition: service_started - authentication-service: + dbrepo-authentication-service: condition: service_healthy logging: driver: json-file - container-service: + dbrepo-container-service: restart: on-failure container_name: dbrepo-container-service hostname: container-service @@ -111,12 +111,12 @@ services: volumes: - /var/run/docker.sock:/var/run/docker.sock depends_on: - authentication-service: + dbrepo-authentication-service: condition: service_healthy logging: driver: json-file - authentication-service: + dbrepo-authentication-service: restart: on-failure container_name: dbrepo-authentication-service hostname: authentication-service @@ -126,16 +126,16 @@ services: env_file: - .env depends_on: - discovery-service: + dbrepo-discovery-service: condition: service_healthy - broker-service: + dbrepo-broker-service: condition: service_started - metadata-db: + dbrepo-metadata-db: condition: service_healthy logging: driver: json-file - query-service: + dbrepo-query-service: restart: on-failure container_name: dbrepo-query-service hostname: query-service @@ -148,14 +148,14 @@ services: volumes: - ${SHARED_FILESYSTEM}:/tmp depends_on: - table-service: + dbrepo-table-service: condition: service_healthy - authentication-service: + dbrepo-authentication-service: condition: service_healthy logging: driver: json-file - table-service: + dbrepo-table-service: restart: on-failure container_name: dbrepo-table-service hostname: table-service @@ -169,16 +169,16 @@ services: - /var/run/docker.sock:/var/run/docker.sock - ${SHARED_FILESYSTEM}:/tmp depends_on: - authentication-service: + dbrepo-authentication-service: condition: service_healthy - search-service: + dbrepo-search-service: condition: service_started - broker-service: + dbrepo-broker-service: condition: service_started logging: driver: json-file - identifier-service: + dbrepo-identifier-service: restart: on-failure container_name: dbrepo-identifier-service hostname: identifier-service @@ -188,16 +188,16 @@ services: env_file: - .env depends_on: - query-service: + dbrepo-query-service: condition: service_healthy - authentication-service: + dbrepo-authentication-service: condition: service_healthy volumes: - ${SHARED_FILESYSTEM}:/tmp logging: driver: json-file - fda-metadata-service: + dbrepo-metadata-service: restart: on-failure container_name: dbrepo-metadata-service hostname: metadata-service @@ -207,12 +207,12 @@ services: env_file: - .env depends_on: - metadata-db: + dbrepo-metadata-db: condition: service_started logging: driver: json-file - analyse-service: + dbrepo-analyse-service: restart: on-failure container_name: dbrepo-analyse-service hostname: analyse-service @@ -226,12 +226,12 @@ services: - ${SHARED_FILESYSTEM}:/tmp - /var/run/docker.sock:/var/run/docker.sock depends_on: - discovery-service: + dbrepo-discovery-service: condition: service_healthy logging: driver: json-file - semantics-service: + dbrepo-semantics-service: restart: on-failure container_name: dbrepo-semantics-service hostname: semantics-service @@ -244,14 +244,14 @@ services: - ${SHARED_FILESYSTEM}:/tmp - /var/run/docker.sock:/var/run/docker.sock depends_on: - discovery-service: + dbrepo-discovery-service: condition: service_healthy - metadata-db: + dbrepo-metadata-db: condition: service_healthy logging: driver: json-file - broker-service: + dbrepo-broker-service: restart: on-failure container_name: dbrepo-broker-service hostname: broker-service @@ -264,14 +264,14 @@ services: env_file: - .env depends_on: - discovery-service: + dbrepo-discovery-service: condition: service_healthy volumes: - broker-service-data:/var/lib/rabbitmq/ logging: driver: json-file - search-service: + dbrepo-search-service: restart: always container_name: dbrepo-search-service hostname: search-service @@ -279,7 +279,7 @@ services: networks: core: depends_on: - discovery-service: + dbrepo-discovery-service: condition: service_healthy ports: - 9200:9200 @@ -290,7 +290,7 @@ services: logging: driver: json-file - ui: + dbrepo-ui: restart: on-failure container_name: dbrepo-ui hostname: ui @@ -303,9 +303,9 @@ services: volumes: - ${SHARED_FILESYSTEM}:/tmp depends_on: - identifier-service: + dbrepo-identifier-service: condition: service_healthy - database-service: + dbrepo-database-service: condition: service_healthy logging: driver: json-file diff --git a/docker-compose.dbrepo2.yml b/docker-compose.dbrepo2.yml index dbd34f265e1c072684a60209978b9304a1b04fd4..22bc02fc10b2c27ad77cd804d3e6b23246b3920c 100644 --- a/docker-compose.dbrepo2.yml +++ b/docker-compose.dbrepo2.yml @@ -31,7 +31,7 @@ networks: services: - metadata-db: + dbrepo-metadata-db: restart: on-failure container_name: dbrepo-metadata-db hostname: metadata-db @@ -48,7 +48,7 @@ services: logging: driver: json-file - discovery-service: + dbrepo-discovery-service: restart: on-failure container_name: dbrepo-discovery-service hostname: discovery-service @@ -60,7 +60,7 @@ services: logging: driver: json-file - gateway-service: + dbrepo-gateway-service: restart: on-failure container_name: dbrepo-gateway-service hostname: gateway-service @@ -72,16 +72,16 @@ services: env_file: - .env depends_on: - discovery-service: + dbrepo-discovery-service: condition: service_healthy logging: driver: json-file - database-service: + dbrepo-database-service: restart: on-failure container_name: dbrepo-database-service hostname: database-service - image: dbrepo/database-service:latest + image: dbrepo/database-service:1.2 networks: userdb: core: @@ -90,16 +90,16 @@ services: volumes: - /var/run/docker.sock:/var/run/docker.sock depends_on: - container-service: + dbrepo-container-service: condition: service_healthy - broker-service: + dbrepo-broker-service: condition: service_started - authentication-service: + dbrepo-authentication-service: condition: service_healthy logging: driver: json-file - container-service: + dbrepo-container-service: restart: on-failure container_name: dbrepo-container-service hostname: container-service @@ -111,12 +111,12 @@ services: volumes: - /var/run/docker.sock:/var/run/docker.sock depends_on: - authentication-service: + dbrepo-authentication-service: condition: service_healthy logging: driver: json-file - authentication-service: + dbrepo-authentication-service: restart: on-failure container_name: dbrepo-authentication-service hostname: authentication-service @@ -126,16 +126,16 @@ services: env_file: - .env depends_on: - discovery-service: + dbrepo-discovery-service: condition: service_healthy - broker-service: + dbrepo-broker-service: condition: service_started - metadata-db: + dbrepo-metadata-db: condition: service_healthy logging: driver: json-file - query-service: + dbrepo-query-service: restart: on-failure container_name: dbrepo-query-service hostname: query-service @@ -148,14 +148,14 @@ services: volumes: - ${SHARED_FILESYSTEM}:/tmp depends_on: - table-service: + dbrepo-table-service: condition: service_healthy - authentication-service: + dbrepo-authentication-service: condition: service_healthy logging: driver: json-file - table-service: + dbrepo-table-service: restart: on-failure container_name: dbrepo-table-service hostname: table-service @@ -169,16 +169,16 @@ services: - /var/run/docker.sock:/var/run/docker.sock - ${SHARED_FILESYSTEM}:/tmp depends_on: - authentication-service: + dbrepo-authentication-service: condition: service_healthy - search-service: + dbrepo-search-service: condition: service_started - broker-service: + dbrepo-broker-service: condition: service_started logging: driver: json-file - identifier-service: + dbrepo-identifier-service: restart: on-failure container_name: dbrepo-identifier-service hostname: identifier-service @@ -188,16 +188,16 @@ services: env_file: - .env depends_on: - query-service: + dbrepo-query-service: condition: service_healthy - authentication-service: + dbrepo-authentication-service: condition: service_healthy volumes: - ${SHARED_FILESYSTEM}:/tmp logging: driver: json-file - metadata-service: + dbrepo-metadata-service: restart: on-failure container_name: dbrepo-metadata-service hostname: metadata-service @@ -207,12 +207,12 @@ services: env_file: - .env depends_on: - metadata-db: + dbrepo-metadata-db: condition: service_started logging: driver: json-file - analyse-service: + dbrepo-analyse-service: restart: on-failure container_name: dbrepo-analyse-service hostname: analyse-service @@ -226,12 +226,12 @@ services: - ${SHARED_FILESYSTEM}:/tmp - /var/run/docker.sock:/var/run/docker.sock depends_on: - discovery-service: + dbrepo-discovery-service: condition: service_healthy logging: driver: json-file - semantics-service: + dbrepo-semantics-service: restart: on-failure container_name: dbrepo-semantics-service hostname: semantics-service @@ -244,14 +244,14 @@ services: - ${SHARED_FILESYSTEM}:/tmp - /var/run/docker.sock:/var/run/docker.sock depends_on: - discovery-service: + dbrepo-discovery-service: condition: service_healthy - metadata-db: + dbrepo-metadata-db: condition: service_healthy logging: driver: json-file - broker-service: + dbrepo-broker-service: restart: on-failure container_name: dbrepo-broker-service hostname: broker-service @@ -264,14 +264,14 @@ services: env_file: - .env depends_on: - discovery-service: + dbrepo-discovery-service: condition: service_healthy volumes: - broker-service-data:/var/lib/rabbitmq/ logging: driver: json-file - search-service: + dbrepo-search-service: restart: always container_name: dbrepo-search-service hostname: search-service @@ -279,8 +279,10 @@ services: networks: core: depends_on: - discovery-service: + dbrepo-discovery-service: condition: service_healthy + ports: + - 9200:9200 env_file: - .env volumes: @@ -288,7 +290,7 @@ services: logging: driver: json-file - ui: + dbrepo-ui: restart: on-failure container_name: dbrepo-ui hostname: ui @@ -301,9 +303,9 @@ services: volumes: - ${SHARED_FILESYSTEM}:/tmp depends_on: - identifier-service: + dbrepo-identifier-service: condition: service_healthy - database-service: + dbrepo-database-service: condition: service_healthy logging: driver: json-file diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index 8dffa725c1febcd0ce08eb324b3d152a7ee37b5c..14f847bb6ca522872a5d7be3b01c1ebdae29a3d1 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -31,7 +31,7 @@ networks: services: - metadata-db: + dbrepo-metadata-db: restart: on-failure container_name: dbrepo-metadata-db hostname: metadata-db @@ -48,7 +48,7 @@ services: logging: driver: json-file - discovery-service: + dbrepo-discovery-service: restart: on-failure container_name: dbrepo-discovery-service hostname: discovery-service @@ -60,7 +60,7 @@ services: logging: driver: json-file - gateway-service: + dbrepo-gateway-service: restart: on-failure container_name: dbrepo-gateway-service hostname: gateway-service @@ -72,12 +72,12 @@ services: env_file: - .env depends_on: - discovery-service: + dbrepo-discovery-service: condition: service_healthy logging: driver: json-file - database-service: + dbrepo-database-service: restart: on-failure container_name: dbrepo-database-service hostname: database-service @@ -90,16 +90,16 @@ services: volumes: - /var/run/docker.sock:/var/run/docker.sock depends_on: - container-service: + dbrepo-container-service: condition: service_healthy - broker-service: + dbrepo-broker-service: condition: service_started - authentication-service: + dbrepo-authentication-service: condition: service_healthy logging: driver: json-file - container-service: + dbrepo-container-service: restart: on-failure container_name: dbrepo-container-service hostname: container-service @@ -111,12 +111,12 @@ services: volumes: - /var/run/docker.sock:/var/run/docker.sock depends_on: - authentication-service: + dbrepo-authentication-service: condition: service_healthy logging: driver: json-file - authentication-service: + dbrepo-authentication-service: restart: on-failure container_name: dbrepo-authentication-service hostname: authentication-service @@ -126,16 +126,16 @@ services: env_file: - .env depends_on: - discovery-service: + dbrepo-discovery-service: condition: service_healthy - broker-service: + dbrepo-broker-service: condition: service_started - metadata-db: + dbrepo-metadata-db: condition: service_healthy logging: driver: json-file - query-service: + dbrepo-query-service: restart: on-failure container_name: dbrepo-query-service hostname: query-service @@ -148,14 +148,14 @@ services: volumes: - ${SHARED_FILESYSTEM}:/tmp depends_on: - table-service: + dbrepo-table-service: condition: service_healthy - authentication-service: + dbrepo-authentication-service: condition: service_healthy logging: driver: json-file - table-service: + dbrepo-table-service: restart: on-failure container_name: dbrepo-table-service hostname: table-service @@ -169,16 +169,16 @@ services: - /var/run/docker.sock:/var/run/docker.sock - ${SHARED_FILESYSTEM}:/tmp depends_on: - authentication-service: + dbrepo-authentication-service: condition: service_healthy - search-service: + dbrepo-search-service: condition: service_started - broker-service: + dbrepo-broker-service: condition: service_started logging: driver: json-file - identifier-service: + dbrepo-identifier-service: restart: on-failure container_name: dbrepo-identifier-service hostname: identifier-service @@ -188,16 +188,16 @@ services: env_file: - .env depends_on: - query-service: + dbrepo-query-service: condition: service_healthy - authentication-service: + dbrepo-authentication-service: condition: service_healthy volumes: - ${SHARED_FILESYSTEM}:/tmp logging: driver: json-file - metadata-service: + dbrepo-metadata-service: restart: on-failure container_name: dbrepo-metadata-service hostname: metadata-service @@ -207,12 +207,12 @@ services: env_file: - .env depends_on: - metadata-db: + dbrepo-metadata-db: condition: service_started logging: driver: json-file - analyse-service: + dbrepo-analyse-service: restart: on-failure container_name: dbrepo-analyse-service hostname: analyse-service @@ -226,12 +226,12 @@ services: - ${SHARED_FILESYSTEM}:/tmp - /var/run/docker.sock:/var/run/docker.sock depends_on: - discovery-service: + dbrepo-discovery-service: condition: service_healthy logging: driver: json-file - semantics-service: + dbrepo-semantics-service: restart: on-failure container_name: dbrepo-semantics-service hostname: semantics-service @@ -244,14 +244,14 @@ services: - ${SHARED_FILESYSTEM}:/tmp - /var/run/docker.sock:/var/run/docker.sock depends_on: - discovery-service: + dbrepo-discovery-service: condition: service_healthy - metadata-db: + dbrepo-metadata-db: condition: service_healthy logging: driver: json-file - broker-service: + dbrepo-broker-service: restart: on-failure container_name: dbrepo-broker-service hostname: broker-service @@ -263,14 +263,14 @@ services: env_file: - .env depends_on: - discovery-service: + dbrepo-discovery-service: condition: service_healthy volumes: - broker-service-data:/var/lib/rabbitmq/ logging: driver: json-file - search-service: + dbrepo-search-service: restart: always container_name: dbrepo-search-service hostname: search-service @@ -278,7 +278,7 @@ services: networks: core: depends_on: - discovery-service: + dbrepo-discovery-service: condition: service_healthy env_file: - .env @@ -287,7 +287,7 @@ services: logging: driver: json-file - ui: + dbrepo-ui: restart: on-failure container_name: dbrepo-ui hostname: ui @@ -300,9 +300,9 @@ services: volumes: - ${SHARED_FILESYSTEM}:/tmp depends_on: - identifier-service: + dbrepo-identifier-service: condition: service_healthy - database-service: + dbrepo-database-service: condition: service_healthy logging: driver: json-file diff --git a/fda-userdb/Dockerfile b/fda-userdb/Dockerfile deleted file mode 100644 index 79269300da74865624043dd2ab126d823f0ed44c..0000000000000000000000000000000000000000 --- a/fda-userdb/Dockerfile +++ /dev/null @@ -1,6 +0,0 @@ -FROM mariadb:10.5 as runtime -MAINTAINER Martin Weise <martin.weise@tuwien.ac.at> - -COPY ./querystore.sql /docker-entrypoint-initdb.d/querystore.sql - -HEALTHCHECK --interval=10s --timeout=5s --retries=12 CMD mysqladmin ping --host=127.0.0.1 \ No newline at end of file