diff --git a/README.md b/README.md index 069fabe1a..6b121a34e 100644 --- a/README.md +++ b/README.md @@ -128,7 +128,7 @@ Other Spring profiles are useful during development: the JPA entities. Rename the generated Flyway script to the correct version and give it a meaningful name. The script may need to be modified. If you need to migrate using Java code you can use a Flyway callback (executed before the entity manager is initialized) or add code to - [TailormapDatabaseMigration.java](src%2Fmain%2Fjava%2Fnl%2Fb3p%2Ftailormap%2Fapi%2Fconfiguration%2FTailormapDatabaseMigration.java) + [TailormapDatabaseMigration.java](src%2Fmain%2Fjava%2Forg%2Ftailormap%2Fapi%2Fconfiguration%2FTailormapDatabaseMigration.java) if you can use the entity manager after all SQL migrations. * **[dev](src%2Fmain%2Fresources%2Fapplication-dev.properties)** Use during development to: @@ -144,7 +144,7 @@ Other Spring profiles are useful during development: connects to spatial databases which can be started using Docker Compose (see [Spatial database stack](#spatial-database-stack)). The class which loads the testdata is - [PopulateTestData.java](src%2Fmain%2Fjava%2Fnl%2Fb3p%2Ftailormap%2Fapi%2Fconfiguration%2Fdev%2FPopulateTestData.java). + [PopulateTestData.java](src%2Fmain%2Fjava%2Forg%2Ftailormap%2Fapi%2Fconfiguration%2Fdev%2FPopulateTestData.java). The default admin username and password is `tm-admin` instead of randomly generated as in the default profile, but you can change it if you expose your environment publicly by specifying a property. diff --git a/pom.xml b/pom.xml index fd59c64cc..a822c22e1 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,7 @@ SPDX-License-Identifier: MIT spring-boot-starter-parent 3.3.3 - nl.b3p.tailormap + org.tailormap tailormap-api 11.4.0-SNAPSHOT jar @@ -88,7 +88,7 @@ SPDX-License-Identifier: MIT gh-pages github pages site - scm:git:ssh://git@github.com/b3partners/tailormap-api.git + scm:git:ssh://git@github.com/tailormap/tailormap-api.git @@ -162,7 +162,7 @@ SPDX-License-Identifier: MIT sort all,-missing - + ghcr.io false Always @@ -635,8 +635,8 @@ SPDX-License-Identifier: MIT jacoco-maven-plugin - nl/b3p/tailormap/api/viewer/model/** - nl/b3p/tailormap/api/persistence/json/** + org/tailormap/api/viewer/model/** + org/tailormap/api/persistence/json/** @@ -816,7 +816,7 @@ SPDX-License-Identifier: MIT ${project.basedir}/src/main/resources/openapi/persistence-schemas.yaml spring - nl.b3p.tailormap.api.persistence.json + org.tailormap.api.persistence.json spring-boot @@ -849,7 +849,7 @@ SPDX-License-Identifier: MIT ${project.basedir}/src/main/resources/openapi/admin-schemas.yaml spring - nl.b3p.tailormap.api.admin.model + org.tailormap.api.admin.model spring-boot java8 @@ -879,7 +879,7 @@ SPDX-License-Identifier: MIT ${project.basedir}/src/main/resources/openapi/viewer-api.yaml spring - nl.b3p.tailormap.api.viewer.model + org.tailormap.api.viewer.model spring-boot @@ -893,19 +893,19 @@ SPDX-License-Identifier: MIT true - TileLayerHiDpiMode=nl.b3p.tailormap.api.persistence.json.TileLayerHiDpiMode, - GeoServiceProtocol=nl.b3p.tailormap.api.persistence.json.GeoServiceProtocol, - Bounds=nl.b3p.tailormap.api.persistence.json.Bounds, - BoundsWithCRS=nl.b3p.tailormap.api.persistence.json.BoundsWithCRS, - TMAttributeType=nl.b3p.tailormap.api.persistence.json.TMAttributeType, - TMGeometryType=nl.b3p.tailormap.api.persistence.json.TMGeometryType, - WMSStyle=nl.b3p.tailormap.api.persistence.json.WMSStyle, - AppI18nSettings=nl.b3p.tailormap.api.persistence.json.AppI18nSettings, - AppUiSettings=nl.b3p.tailormap.api.persistence.json.AppUiSettings, - FormOptions=nl.b3p.tailormap.api.persistence.json.FormOptions, - FormTab=nl.b3p.tailormap.api.persistence.json.FormTab, - FormField=nl.b3p.tailormap.api.persistence.json.FormField, - FormFieldValue=nl.b3p.tailormap.api.persistence.json.FormFieldValue + TileLayerHiDpiMode=org.tailormap.api.persistence.json.TileLayerHiDpiMode, + GeoServiceProtocol=org.tailormap.api.persistence.json.GeoServiceProtocol, + Bounds=org.tailormap.api.persistence.json.Bounds, + BoundsWithCRS=org.tailormap.api.persistence.json.BoundsWithCRS, + TMAttributeType=org.tailormap.api.persistence.json.TMAttributeType, + TMGeometryType=org.tailormap.api.persistence.json.TMGeometryType, + WMSStyle=org.tailormap.api.persistence.json.WMSStyle, + AppI18nSettings=org.tailormap.api.persistence.json.AppI18nSettings, + AppUiSettings=org.tailormap.api.persistence.json.AppUiSettings, + FormOptions=org.tailormap.api.persistence.json.FormOptions, + FormTab=org.tailormap.api.persistence.json.FormTab, + FormField=org.tailormap.api.persistence.json.FormField, + FormFieldValue=org.tailormap.api.persistence.json.FormFieldValue ${project.basedir}/src/main/resources/openapi/common-schemas-openapi-ignore false true @@ -941,7 +941,7 @@ SPDX-License-Identifier: MIT - + @@ -1231,8 +1231,9 @@ SPDX-License-Identifier: MIT push + docker login - whatever value is ${docker.deploy.repo} + see: https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry + --> deploy @@ -1420,8 +1421,8 @@ SPDX-License-Identifier: MIT - nl/b3p/tailormap/api/viewer/model/** - nl/b3p/tailormap/api/persistence/json/** + org/tailormap/api/viewer/model/** + org/tailormap/api/persistence/json/** diff --git a/src/main/java/nl/b3p/tailormap/api/TailormapApiApplication.java b/src/main/java/org/tailormap/api/TailormapApiApplication.java similarity index 93% rename from src/main/java/nl/b3p/tailormap/api/TailormapApiApplication.java rename to src/main/java/org/tailormap/api/TailormapApiApplication.java index 4e622c5e7..b8ceab3e1 100644 --- a/src/main/java/nl/b3p/tailormap/api/TailormapApiApplication.java +++ b/src/main/java/org/tailormap/api/TailormapApiApplication.java @@ -4,7 +4,7 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api; +package org.tailormap.api; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; diff --git a/src/main/java/nl/b3p/tailormap/api/annotation/AppRestController.java b/src/main/java/org/tailormap/api/annotation/AppRestController.java similarity index 91% rename from src/main/java/nl/b3p/tailormap/api/annotation/AppRestController.java rename to src/main/java/org/tailormap/api/annotation/AppRestController.java index 10fe3cf1c..df5e53f0c 100644 --- a/src/main/java/nl/b3p/tailormap/api/annotation/AppRestController.java +++ b/src/main/java/org/tailormap/api/annotation/AppRestController.java @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.annotation; +package org.tailormap.api.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/src/main/java/nl/b3p/tailormap/api/configuration/CaseInsensitiveEnumConverter.java b/src/main/java/org/tailormap/api/configuration/CaseInsensitiveEnumConverter.java similarity index 93% rename from src/main/java/nl/b3p/tailormap/api/configuration/CaseInsensitiveEnumConverter.java rename to src/main/java/org/tailormap/api/configuration/CaseInsensitiveEnumConverter.java index ab03eed39..d5c979e5d 100644 --- a/src/main/java/nl/b3p/tailormap/api/configuration/CaseInsensitiveEnumConverter.java +++ b/src/main/java/org/tailormap/api/configuration/CaseInsensitiveEnumConverter.java @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.configuration; +package org.tailormap.api.configuration; import java.util.Locale; import org.springframework.core.convert.converter.Converter; diff --git a/src/main/java/nl/b3p/tailormap/api/configuration/GeoToolsEPSGAliasesConfiguration.java b/src/main/java/org/tailormap/api/configuration/GeoToolsEPSGAliasesConfiguration.java similarity index 98% rename from src/main/java/nl/b3p/tailormap/api/configuration/GeoToolsEPSGAliasesConfiguration.java rename to src/main/java/org/tailormap/api/configuration/GeoToolsEPSGAliasesConfiguration.java index 6e3274784..9bfd7f1a9 100644 --- a/src/main/java/nl/b3p/tailormap/api/configuration/GeoToolsEPSGAliasesConfiguration.java +++ b/src/main/java/org/tailormap/api/configuration/GeoToolsEPSGAliasesConfiguration.java @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.configuration; +package org.tailormap.api.configuration; import jakarta.annotation.PostConstruct; import java.io.File; diff --git a/src/main/java/nl/b3p/tailormap/api/configuration/JPAConfiguration.java b/src/main/java/org/tailormap/api/configuration/JPAConfiguration.java similarity index 96% rename from src/main/java/nl/b3p/tailormap/api/configuration/JPAConfiguration.java rename to src/main/java/org/tailormap/api/configuration/JPAConfiguration.java index 2ef7647e8..c4a8efb73 100644 --- a/src/main/java/nl/b3p/tailormap/api/configuration/JPAConfiguration.java +++ b/src/main/java/org/tailormap/api/configuration/JPAConfiguration.java @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.configuration; +package org.tailormap.api.configuration; import jakarta.persistence.EntityManagerFactory; import org.springframework.boot.autoconfigure.domain.EntityScan; diff --git a/src/main/java/nl/b3p/tailormap/api/configuration/MonitoringConfiguration.java b/src/main/java/org/tailormap/api/configuration/MonitoringConfiguration.java similarity index 93% rename from src/main/java/nl/b3p/tailormap/api/configuration/MonitoringConfiguration.java rename to src/main/java/org/tailormap/api/configuration/MonitoringConfiguration.java index 5bba55928..a6a5abd1d 100644 --- a/src/main/java/nl/b3p/tailormap/api/configuration/MonitoringConfiguration.java +++ b/src/main/java/org/tailormap/api/configuration/MonitoringConfiguration.java @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.configuration; +package org.tailormap.api.configuration; import io.micrometer.core.aop.TimedAspect; import io.micrometer.core.instrument.MeterRegistry; diff --git a/src/main/java/nl/b3p/tailormap/api/configuration/RestConfiguration.java b/src/main/java/org/tailormap/api/configuration/RestConfiguration.java similarity index 95% rename from src/main/java/nl/b3p/tailormap/api/configuration/RestConfiguration.java rename to src/main/java/org/tailormap/api/configuration/RestConfiguration.java index 4de45ba1b..ce75308f6 100644 --- a/src/main/java/nl/b3p/tailormap/api/configuration/RestConfiguration.java +++ b/src/main/java/org/tailormap/api/configuration/RestConfiguration.java @@ -4,7 +4,7 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.configuration; +package org.tailormap.api.configuration; import jakarta.persistence.EntityManager; import jakarta.persistence.metamodel.Type; diff --git a/src/main/java/nl/b3p/tailormap/api/configuration/TailormapConfig.java b/src/main/java/org/tailormap/api/configuration/TailormapConfig.java similarity index 94% rename from src/main/java/nl/b3p/tailormap/api/configuration/TailormapConfig.java rename to src/main/java/org/tailormap/api/configuration/TailormapConfig.java index ec03a73a9..7127f516a 100644 --- a/src/main/java/nl/b3p/tailormap/api/configuration/TailormapConfig.java +++ b/src/main/java/org/tailormap/api/configuration/TailormapConfig.java @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.configuration; +package org.tailormap.api.configuration; import ch.rasc.sse.eventbus.config.EnableSseEventBus; import org.springframework.boot.context.properties.ConfigurationProperties; diff --git a/src/main/java/nl/b3p/tailormap/api/configuration/TailormapDatabaseMigration.java b/src/main/java/org/tailormap/api/configuration/TailormapDatabaseMigration.java similarity index 83% rename from src/main/java/nl/b3p/tailormap/api/configuration/TailormapDatabaseMigration.java rename to src/main/java/org/tailormap/api/configuration/TailormapDatabaseMigration.java index 590b1b936..a397d4846 100644 --- a/src/main/java/nl/b3p/tailormap/api/configuration/TailormapDatabaseMigration.java +++ b/src/main/java/org/tailormap/api/configuration/TailormapDatabaseMigration.java @@ -4,17 +4,17 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.configuration; +package org.tailormap.api.configuration; import jakarta.annotation.PostConstruct; import java.util.List; -import nl.b3p.tailormap.api.configuration.ddl.FlywayMigrationResult; -import nl.b3p.tailormap.api.persistence.Catalog; -import nl.b3p.tailormap.api.persistence.json.CatalogNode; -import nl.b3p.tailormap.api.repository.CatalogRepository; -import nl.b3p.tailormap.api.security.InternalAdminAuthentication; import org.flywaydb.core.api.output.MigrateResult; import org.springframework.context.annotation.Configuration; +import org.tailormap.api.configuration.ddl.FlywayMigrationResult; +import org.tailormap.api.persistence.Catalog; +import org.tailormap.api.persistence.json.CatalogNode; +import org.tailormap.api.repository.CatalogRepository; +import org.tailormap.api.security.InternalAdminAuthentication; /** * Migrate the database using JPA entities, after Flyway has migrated and the entity manager is diff --git a/src/main/java/nl/b3p/tailormap/api/configuration/TailormapPasswordStrengthConfig.java b/src/main/java/org/tailormap/api/configuration/TailormapPasswordStrengthConfig.java similarity index 97% rename from src/main/java/nl/b3p/tailormap/api/configuration/TailormapPasswordStrengthConfig.java rename to src/main/java/org/tailormap/api/configuration/TailormapPasswordStrengthConfig.java index be88541dc..f27655b9d 100644 --- a/src/main/java/nl/b3p/tailormap/api/configuration/TailormapPasswordStrengthConfig.java +++ b/src/main/java/org/tailormap/api/configuration/TailormapPasswordStrengthConfig.java @@ -4,7 +4,7 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.configuration; +package org.tailormap.api.configuration; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties; diff --git a/src/main/java/nl/b3p/tailormap/api/configuration/base/FrontController.java b/src/main/java/org/tailormap/api/configuration/base/FrontController.java similarity index 94% rename from src/main/java/nl/b3p/tailormap/api/configuration/base/FrontController.java rename to src/main/java/org/tailormap/api/configuration/base/FrontController.java index d7430c8aa..966b3f439 100644 --- a/src/main/java/nl/b3p/tailormap/api/configuration/base/FrontController.java +++ b/src/main/java/org/tailormap/api/configuration/base/FrontController.java @@ -3,16 +3,12 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.configuration.base; +package org.tailormap.api.configuration.base; import jakarta.servlet.http.HttpServletRequest; import java.nio.charset.StandardCharsets; import java.util.List; import java.util.Locale; -import nl.b3p.tailormap.api.persistence.Application; -import nl.b3p.tailormap.api.persistence.Configuration; -import nl.b3p.tailormap.api.repository.ApplicationRepository; -import nl.b3p.tailormap.api.repository.ConfigurationRepository; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Controller; @@ -20,6 +16,10 @@ import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.servlet.i18n.AcceptHeaderLocaleResolver; import org.springframework.web.util.UriUtils; +import org.tailormap.api.persistence.Application; +import org.tailormap.api.persistence.Configuration; +import org.tailormap.api.repository.ApplicationRepository; +import org.tailormap.api.repository.ConfigurationRepository; /** * Front controller which forwards requests to URLs created by the Angular routing module to the diff --git a/src/main/java/nl/b3p/tailormap/api/configuration/base/IndexHtmlTransformer.java b/src/main/java/org/tailormap/api/configuration/base/IndexHtmlTransformer.java similarity index 97% rename from src/main/java/nl/b3p/tailormap/api/configuration/base/IndexHtmlTransformer.java rename to src/main/java/org/tailormap/api/configuration/base/IndexHtmlTransformer.java index 32bf9fbf8..4d15a3e9f 100644 --- a/src/main/java/nl/b3p/tailormap/api/configuration/base/IndexHtmlTransformer.java +++ b/src/main/java/org/tailormap/api/configuration/base/IndexHtmlTransformer.java @@ -4,7 +4,7 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.configuration.base; +package org.tailormap.api.configuration.base; import static java.nio.charset.StandardCharsets.UTF_8; import static org.apache.commons.lang3.StringUtils.isNotBlank; diff --git a/src/main/java/nl/b3p/tailormap/api/configuration/base/SourceMapSecurityFilter.java b/src/main/java/org/tailormap/api/configuration/base/SourceMapSecurityFilter.java similarity index 97% rename from src/main/java/nl/b3p/tailormap/api/configuration/base/SourceMapSecurityFilter.java rename to src/main/java/org/tailormap/api/configuration/base/SourceMapSecurityFilter.java index a60ac1c1f..50b89b7f3 100644 --- a/src/main/java/nl/b3p/tailormap/api/configuration/base/SourceMapSecurityFilter.java +++ b/src/main/java/org/tailormap/api/configuration/base/SourceMapSecurityFilter.java @@ -4,7 +4,7 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.configuration.base; +package org.tailormap.api.configuration.base; import static jakarta.servlet.http.HttpServletResponse.SC_FORBIDDEN; import static jakarta.servlet.http.HttpServletResponse.SC_UNAUTHORIZED; diff --git a/src/main/java/nl/b3p/tailormap/api/configuration/base/TailormapApiConfiguration.java b/src/main/java/org/tailormap/api/configuration/base/TailormapApiConfiguration.java similarity index 90% rename from src/main/java/nl/b3p/tailormap/api/configuration/base/TailormapApiConfiguration.java rename to src/main/java/org/tailormap/api/configuration/base/TailormapApiConfiguration.java index 96ff07409..e1ff97ea0 100644 --- a/src/main/java/nl/b3p/tailormap/api/configuration/base/TailormapApiConfiguration.java +++ b/src/main/java/org/tailormap/api/configuration/base/TailormapApiConfiguration.java @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.configuration.base; +package org.tailormap.api.configuration.base; import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression; import org.springframework.context.annotation.ComponentScan; diff --git a/src/main/java/nl/b3p/tailormap/api/configuration/base/WebMvcConfig.java b/src/main/java/org/tailormap/api/configuration/base/WebMvcConfig.java similarity index 92% rename from src/main/java/nl/b3p/tailormap/api/configuration/base/WebMvcConfig.java rename to src/main/java/org/tailormap/api/configuration/base/WebMvcConfig.java index 6a5b7a836..1c53ccac6 100644 --- a/src/main/java/nl/b3p/tailormap/api/configuration/base/WebMvcConfig.java +++ b/src/main/java/org/tailormap/api/configuration/base/WebMvcConfig.java @@ -4,11 +4,9 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.configuration.base; +package org.tailormap.api.configuration.base; import java.util.List; -import nl.b3p.tailormap.api.configuration.CaseInsensitiveEnumConverter; -import nl.b3p.tailormap.api.persistence.json.GeoServiceProtocol; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Configuration; import org.springframework.format.FormatterRegistry; @@ -17,6 +15,8 @@ import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; import org.springframework.web.servlet.resource.EncodedResourceResolver; +import org.tailormap.api.configuration.CaseInsensitiveEnumConverter; +import org.tailormap.api.persistence.json.GeoServiceProtocol; @Configuration public class WebMvcConfig implements WebMvcConfigurer { diff --git a/src/main/java/nl/b3p/tailormap/api/configuration/ddl/DeleteDDLScriptBeforeCreating.java b/src/main/java/org/tailormap/api/configuration/ddl/DeleteDDLScriptBeforeCreating.java similarity index 97% rename from src/main/java/nl/b3p/tailormap/api/configuration/ddl/DeleteDDLScriptBeforeCreating.java rename to src/main/java/org/tailormap/api/configuration/ddl/DeleteDDLScriptBeforeCreating.java index a00a6ed80..1b8336947 100644 --- a/src/main/java/nl/b3p/tailormap/api/configuration/ddl/DeleteDDLScriptBeforeCreating.java +++ b/src/main/java/org/tailormap/api/configuration/ddl/DeleteDDLScriptBeforeCreating.java @@ -4,7 +4,7 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.configuration.ddl; +package org.tailormap.api.configuration.ddl; import jakarta.annotation.PostConstruct; import java.io.File; diff --git a/src/main/java/nl/b3p/tailormap/api/configuration/ddl/ExitAfterCreatingDDL.java b/src/main/java/org/tailormap/api/configuration/ddl/ExitAfterCreatingDDL.java similarity index 95% rename from src/main/java/nl/b3p/tailormap/api/configuration/ddl/ExitAfterCreatingDDL.java rename to src/main/java/org/tailormap/api/configuration/ddl/ExitAfterCreatingDDL.java index 6fa1d2d71..ca1c013a9 100644 --- a/src/main/java/nl/b3p/tailormap/api/configuration/ddl/ExitAfterCreatingDDL.java +++ b/src/main/java/org/tailormap/api/configuration/ddl/ExitAfterCreatingDDL.java @@ -4,7 +4,7 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.configuration.ddl; +package org.tailormap.api.configuration.ddl; import jakarta.annotation.PostConstruct; import java.lang.invoke.MethodHandles; diff --git a/src/main/java/nl/b3p/tailormap/api/configuration/ddl/FlywayCleanSchema.java b/src/main/java/org/tailormap/api/configuration/ddl/FlywayCleanSchema.java similarity index 93% rename from src/main/java/nl/b3p/tailormap/api/configuration/ddl/FlywayCleanSchema.java rename to src/main/java/org/tailormap/api/configuration/ddl/FlywayCleanSchema.java index 2439e9a73..71ae6ada9 100644 --- a/src/main/java/nl/b3p/tailormap/api/configuration/ddl/FlywayCleanSchema.java +++ b/src/main/java/org/tailormap/api/configuration/ddl/FlywayCleanSchema.java @@ -4,7 +4,7 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.configuration.ddl; +package org.tailormap.api.configuration.ddl; import org.flywaydb.core.Flyway; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; diff --git a/src/main/java/nl/b3p/tailormap/api/configuration/ddl/FlywayDefaultStrategy.java b/src/main/java/org/tailormap/api/configuration/ddl/FlywayDefaultStrategy.java similarity index 93% rename from src/main/java/nl/b3p/tailormap/api/configuration/ddl/FlywayDefaultStrategy.java rename to src/main/java/org/tailormap/api/configuration/ddl/FlywayDefaultStrategy.java index 263bf23dd..387721882 100644 --- a/src/main/java/nl/b3p/tailormap/api/configuration/ddl/FlywayDefaultStrategy.java +++ b/src/main/java/org/tailormap/api/configuration/ddl/FlywayDefaultStrategy.java @@ -4,7 +4,7 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.configuration.ddl; +package org.tailormap.api.configuration.ddl; import org.springframework.boot.autoconfigure.flyway.FlywayMigrationStrategy; import org.springframework.context.annotation.Bean; diff --git a/src/main/java/nl/b3p/tailormap/api/configuration/ddl/FlywayMigrationResult.java b/src/main/java/org/tailormap/api/configuration/ddl/FlywayMigrationResult.java similarity index 90% rename from src/main/java/nl/b3p/tailormap/api/configuration/ddl/FlywayMigrationResult.java rename to src/main/java/org/tailormap/api/configuration/ddl/FlywayMigrationResult.java index f59f6c344..0ea1dcf52 100644 --- a/src/main/java/nl/b3p/tailormap/api/configuration/ddl/FlywayMigrationResult.java +++ b/src/main/java/org/tailormap/api/configuration/ddl/FlywayMigrationResult.java @@ -4,7 +4,7 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.configuration.ddl; +package org.tailormap.api.configuration.ddl; import org.flywaydb.core.api.output.MigrateResult; import org.springframework.stereotype.Component; diff --git a/src/main/java/nl/b3p/tailormap/api/configuration/ddl/FlywayStartWithNewSchema.java b/src/main/java/org/tailormap/api/configuration/ddl/FlywayStartWithNewSchema.java similarity index 95% rename from src/main/java/nl/b3p/tailormap/api/configuration/ddl/FlywayStartWithNewSchema.java rename to src/main/java/org/tailormap/api/configuration/ddl/FlywayStartWithNewSchema.java index 73e40e891..998e678d2 100644 --- a/src/main/java/nl/b3p/tailormap/api/configuration/ddl/FlywayStartWithNewSchema.java +++ b/src/main/java/org/tailormap/api/configuration/ddl/FlywayStartWithNewSchema.java @@ -4,7 +4,7 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.configuration.ddl; +package org.tailormap.api.configuration.ddl; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.autoconfigure.flyway.FlywayMigrationStrategy; diff --git a/src/main/java/nl/b3p/tailormap/api/configuration/dev/PopulateTestData.java b/src/main/java/org/tailormap/api/configuration/dev/PopulateTestData.java similarity index 95% rename from src/main/java/nl/b3p/tailormap/api/configuration/dev/PopulateTestData.java rename to src/main/java/org/tailormap/api/configuration/dev/PopulateTestData.java index 1a89b97a7..ce2460e76 100644 --- a/src/main/java/nl/b3p/tailormap/api/configuration/dev/PopulateTestData.java +++ b/src/main/java/org/tailormap/api/configuration/dev/PopulateTestData.java @@ -3,12 +3,12 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.configuration.dev; +package org.tailormap.api.configuration.dev; -import static nl.b3p.tailormap.api.persistence.json.GeoServiceProtocol.WMS; -import static nl.b3p.tailormap.api.persistence.json.GeoServiceProtocol.WMTS; -import static nl.b3p.tailormap.api.persistence.json.GeoServiceProtocol.XYZ; -import static nl.b3p.tailormap.api.security.AuthorizationService.ACCESS_TYPE_READ; +import static org.tailormap.api.persistence.json.GeoServiceProtocol.WMS; +import static org.tailormap.api.persistence.json.GeoServiceProtocol.WMTS; +import static org.tailormap.api.persistence.json.GeoServiceProtocol.XYZ; +import static org.tailormap.api.security.AuthorizationService.ACCESS_TYPE_READ; import com.fasterxml.jackson.databind.ObjectMapper; import java.lang.invoke.MethodHandles; @@ -20,54 +20,6 @@ import java.util.Map; import java.util.NoSuchElementException; import java.util.concurrent.TimeUnit; -import nl.b3p.tailormap.api.geotools.featuresources.FeatureSourceFactoryHelper; -import nl.b3p.tailormap.api.geotools.featuresources.JDBCFeatureSourceHelper; -import nl.b3p.tailormap.api.geotools.featuresources.WFSFeatureSourceHelper; -import nl.b3p.tailormap.api.persistence.Application; -import nl.b3p.tailormap.api.persistence.Catalog; -import nl.b3p.tailormap.api.persistence.Configuration; -import nl.b3p.tailormap.api.persistence.GeoService; -import nl.b3p.tailormap.api.persistence.Group; -import nl.b3p.tailormap.api.persistence.SearchIndex; -import nl.b3p.tailormap.api.persistence.TMFeatureSource; -import nl.b3p.tailormap.api.persistence.TMFeatureType; -import nl.b3p.tailormap.api.persistence.Upload; -import nl.b3p.tailormap.api.persistence.User; -import nl.b3p.tailormap.api.persistence.helper.GeoServiceHelper; -import nl.b3p.tailormap.api.persistence.json.AdminAdditionalProperty; -import nl.b3p.tailormap.api.persistence.json.AppContent; -import nl.b3p.tailormap.api.persistence.json.AppLayerSettings; -import nl.b3p.tailormap.api.persistence.json.AppSettings; -import nl.b3p.tailormap.api.persistence.json.AppTreeLayerNode; -import nl.b3p.tailormap.api.persistence.json.AppTreeLevelNode; -import nl.b3p.tailormap.api.persistence.json.AppTreeNode; -import nl.b3p.tailormap.api.persistence.json.AttributeSettings; -import nl.b3p.tailormap.api.persistence.json.AuthorizationRule; -import nl.b3p.tailormap.api.persistence.json.AuthorizationRuleDecision; -import nl.b3p.tailormap.api.persistence.json.Bounds; -import nl.b3p.tailormap.api.persistence.json.CatalogNode; -import nl.b3p.tailormap.api.persistence.json.FeatureTypeRef; -import nl.b3p.tailormap.api.persistence.json.GeoServiceDefaultLayerSettings; -import nl.b3p.tailormap.api.persistence.json.GeoServiceLayerSettings; -import nl.b3p.tailormap.api.persistence.json.GeoServiceSettings; -import nl.b3p.tailormap.api.persistence.json.JDBCConnectionProperties; -import nl.b3p.tailormap.api.persistence.json.ServiceAuthentication; -import nl.b3p.tailormap.api.persistence.json.TailormapObjectRef; -import nl.b3p.tailormap.api.persistence.json.TileLayerHiDpiMode; -import nl.b3p.tailormap.api.repository.ApplicationRepository; -import nl.b3p.tailormap.api.repository.CatalogRepository; -import nl.b3p.tailormap.api.repository.ConfigurationRepository; -import nl.b3p.tailormap.api.repository.FeatureSourceRepository; -import nl.b3p.tailormap.api.repository.GeoServiceRepository; -import nl.b3p.tailormap.api.repository.GroupRepository; -import nl.b3p.tailormap.api.repository.SearchIndexRepository; -import nl.b3p.tailormap.api.repository.UploadRepository; -import nl.b3p.tailormap.api.repository.UserRepository; -import nl.b3p.tailormap.api.security.InternalAdminAuthentication; -import nl.b3p.tailormap.api.solr.SolrHelper; -import nl.b3p.tailormap.api.viewer.model.AppStyling; -import nl.b3p.tailormap.api.viewer.model.Component; -import nl.b3p.tailormap.api.viewer.model.ComponentConfig; import org.apache.solr.client.solrj.impl.ConcurrentUpdateHttp2SolrClient; import org.apache.solr.client.solrj.impl.Http2SolrClient; import org.slf4j.Logger; @@ -80,6 +32,54 @@ import org.springframework.context.event.EventListener; import org.springframework.core.io.ClassPathResource; import org.springframework.transaction.annotation.Transactional; +import org.tailormap.api.geotools.featuresources.FeatureSourceFactoryHelper; +import org.tailormap.api.geotools.featuresources.JDBCFeatureSourceHelper; +import org.tailormap.api.geotools.featuresources.WFSFeatureSourceHelper; +import org.tailormap.api.persistence.Application; +import org.tailormap.api.persistence.Catalog; +import org.tailormap.api.persistence.Configuration; +import org.tailormap.api.persistence.GeoService; +import org.tailormap.api.persistence.Group; +import org.tailormap.api.persistence.SearchIndex; +import org.tailormap.api.persistence.TMFeatureSource; +import org.tailormap.api.persistence.TMFeatureType; +import org.tailormap.api.persistence.Upload; +import org.tailormap.api.persistence.User; +import org.tailormap.api.persistence.helper.GeoServiceHelper; +import org.tailormap.api.persistence.json.AdminAdditionalProperty; +import org.tailormap.api.persistence.json.AppContent; +import org.tailormap.api.persistence.json.AppLayerSettings; +import org.tailormap.api.persistence.json.AppSettings; +import org.tailormap.api.persistence.json.AppTreeLayerNode; +import org.tailormap.api.persistence.json.AppTreeLevelNode; +import org.tailormap.api.persistence.json.AppTreeNode; +import org.tailormap.api.persistence.json.AttributeSettings; +import org.tailormap.api.persistence.json.AuthorizationRule; +import org.tailormap.api.persistence.json.AuthorizationRuleDecision; +import org.tailormap.api.persistence.json.Bounds; +import org.tailormap.api.persistence.json.CatalogNode; +import org.tailormap.api.persistence.json.FeatureTypeRef; +import org.tailormap.api.persistence.json.GeoServiceDefaultLayerSettings; +import org.tailormap.api.persistence.json.GeoServiceLayerSettings; +import org.tailormap.api.persistence.json.GeoServiceSettings; +import org.tailormap.api.persistence.json.JDBCConnectionProperties; +import org.tailormap.api.persistence.json.ServiceAuthentication; +import org.tailormap.api.persistence.json.TailormapObjectRef; +import org.tailormap.api.persistence.json.TileLayerHiDpiMode; +import org.tailormap.api.repository.ApplicationRepository; +import org.tailormap.api.repository.CatalogRepository; +import org.tailormap.api.repository.ConfigurationRepository; +import org.tailormap.api.repository.FeatureSourceRepository; +import org.tailormap.api.repository.GeoServiceRepository; +import org.tailormap.api.repository.GroupRepository; +import org.tailormap.api.repository.SearchIndexRepository; +import org.tailormap.api.repository.UploadRepository; +import org.tailormap.api.repository.UserRepository; +import org.tailormap.api.security.InternalAdminAuthentication; +import org.tailormap.api.solr.SolrHelper; +import org.tailormap.api.viewer.model.AppStyling; +import org.tailormap.api.viewer.model.Component; +import org.tailormap.api.viewer.model.ComponentConfig; /** * Populates entities to add services and applications to demo functionality, support development diff --git a/src/main/java/nl/b3p/tailormap/api/controller/AppRestControllerAdvice.java b/src/main/java/org/tailormap/api/controller/AppRestControllerAdvice.java similarity index 89% rename from src/main/java/nl/b3p/tailormap/api/controller/AppRestControllerAdvice.java rename to src/main/java/org/tailormap/api/controller/AppRestControllerAdvice.java index b108d3f55..ffca3debf 100644 --- a/src/main/java/nl/b3p/tailormap/api/controller/AppRestControllerAdvice.java +++ b/src/main/java/org/tailormap/api/controller/AppRestControllerAdvice.java @@ -3,21 +3,9 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.controller; +package org.tailormap.api.controller; import jakarta.servlet.http.HttpServletRequest; -import nl.b3p.tailormap.api.annotation.AppRestController; -import nl.b3p.tailormap.api.persistence.Application; -import nl.b3p.tailormap.api.persistence.GeoService; -import nl.b3p.tailormap.api.persistence.helper.ApplicationHelper; -import nl.b3p.tailormap.api.persistence.json.AppTreeLayerNode; -import nl.b3p.tailormap.api.persistence.json.GeoServiceLayer; -import nl.b3p.tailormap.api.repository.ApplicationRepository; -import nl.b3p.tailormap.api.repository.GeoServiceRepository; -import nl.b3p.tailormap.api.security.AuthorizationService; -import nl.b3p.tailormap.api.viewer.model.ErrorResponse; -import nl.b3p.tailormap.api.viewer.model.RedirectResponse; -import nl.b3p.tailormap.api.viewer.model.ViewerResponse; import org.springframework.beans.factory.annotation.Value; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; @@ -30,6 +18,18 @@ import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestControllerAdvice; import org.springframework.web.server.ResponseStatusException; +import org.tailormap.api.annotation.AppRestController; +import org.tailormap.api.persistence.Application; +import org.tailormap.api.persistence.GeoService; +import org.tailormap.api.persistence.helper.ApplicationHelper; +import org.tailormap.api.persistence.json.AppTreeLayerNode; +import org.tailormap.api.persistence.json.GeoServiceLayer; +import org.tailormap.api.repository.ApplicationRepository; +import org.tailormap.api.repository.GeoServiceRepository; +import org.tailormap.api.security.AuthorizationService; +import org.tailormap.api.viewer.model.ErrorResponse; +import org.tailormap.api.viewer.model.RedirectResponse; +import org.tailormap.api.viewer.model.ViewerResponse; @RestControllerAdvice(annotations = AppRestController.class) public class AppRestControllerAdvice { diff --git a/src/main/java/nl/b3p/tailormap/api/controller/ConfigurationController.java b/src/main/java/org/tailormap/api/controller/ConfigurationController.java similarity index 85% rename from src/main/java/nl/b3p/tailormap/api/controller/ConfigurationController.java rename to src/main/java/org/tailormap/api/controller/ConfigurationController.java index a5444d539..2e8fb2584 100644 --- a/src/main/java/nl/b3p/tailormap/api/controller/ConfigurationController.java +++ b/src/main/java/org/tailormap/api/controller/ConfigurationController.java @@ -3,21 +3,21 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.controller; +package org.tailormap.api.controller; import io.micrometer.core.annotation.Counted; import io.micrometer.core.annotation.Timed; import java.io.Serializable; -import nl.b3p.tailormap.api.annotation.AppRestController; -import nl.b3p.tailormap.api.persistence.Configuration; -import nl.b3p.tailormap.api.repository.ConfigurationRepository; -import nl.b3p.tailormap.api.viewer.model.ConfigResponse; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.server.ResponseStatusException; +import org.tailormap.api.annotation.AppRestController; +import org.tailormap.api.persistence.Configuration; +import org.tailormap.api.repository.ConfigurationRepository; +import org.tailormap.api.viewer.model.ConfigResponse; /** Provides global configuration values which are available to viewers */ @AppRestController diff --git a/src/main/java/nl/b3p/tailormap/api/controller/EditFeatureController.java b/src/main/java/org/tailormap/api/controller/EditFeatureController.java similarity index 93% rename from src/main/java/nl/b3p/tailormap/api/controller/EditFeatureController.java rename to src/main/java/org/tailormap/api/controller/EditFeatureController.java index fe421c09c..11e3a81df 100644 --- a/src/main/java/nl/b3p/tailormap/api/controller/EditFeatureController.java +++ b/src/main/java/org/tailormap/api/controller/EditFeatureController.java @@ -3,11 +3,11 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.controller; +package org.tailormap.api.controller; -import static nl.b3p.tailormap.api.persistence.helper.TMFeatureTypeHelper.getNonHiddenAttributeNames; -import static nl.b3p.tailormap.api.persistence.helper.TMFeatureTypeHelper.getNonHiddenAttributes; -import static nl.b3p.tailormap.api.persistence.helper.TMFeatureTypeHelper.getReadOnlyAttributes; +import static org.tailormap.api.persistence.helper.TMFeatureTypeHelper.getNonHiddenAttributeNames; +import static org.tailormap.api.persistence.helper.TMFeatureTypeHelper.getNonHiddenAttributes; +import static org.tailormap.api.persistence.helper.TMFeatureTypeHelper.getReadOnlyAttributes; import io.micrometer.core.annotation.Counted; import io.micrometer.core.annotation.Timed; @@ -17,20 +17,6 @@ import java.util.Collections; import java.util.List; import java.util.Map; -import nl.b3p.tailormap.api.annotation.AppRestController; -import nl.b3p.tailormap.api.geotools.TransformationUtil; -import nl.b3p.tailormap.api.geotools.featuresources.FeatureSourceFactoryHelper; -import nl.b3p.tailormap.api.geotools.processing.GeometryProcessor; -import nl.b3p.tailormap.api.persistence.Application; -import nl.b3p.tailormap.api.persistence.GeoService; -import nl.b3p.tailormap.api.persistence.TMFeatureType; -import nl.b3p.tailormap.api.persistence.helper.TMAttributeTypeHelper; -import nl.b3p.tailormap.api.persistence.json.AppLayerSettings; -import nl.b3p.tailormap.api.persistence.json.AppTreeLayerNode; -import nl.b3p.tailormap.api.persistence.json.GeoServiceLayer; -import nl.b3p.tailormap.api.repository.FeatureSourceRepository; -import nl.b3p.tailormap.api.util.Constants; -import nl.b3p.tailormap.api.viewer.model.Feature; import org.geotools.api.data.FeatureStore; import org.geotools.api.data.SimpleFeatureSource; import org.geotools.api.data.SimpleFeatureStore; @@ -68,6 +54,20 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.server.ResponseStatusException; +import org.tailormap.api.annotation.AppRestController; +import org.tailormap.api.geotools.TransformationUtil; +import org.tailormap.api.geotools.featuresources.FeatureSourceFactoryHelper; +import org.tailormap.api.geotools.processing.GeometryProcessor; +import org.tailormap.api.persistence.Application; +import org.tailormap.api.persistence.GeoService; +import org.tailormap.api.persistence.TMFeatureType; +import org.tailormap.api.persistence.helper.TMAttributeTypeHelper; +import org.tailormap.api.persistence.json.AppLayerSettings; +import org.tailormap.api.persistence.json.AppTreeLayerNode; +import org.tailormap.api.persistence.json.GeoServiceLayer; +import org.tailormap.api.repository.FeatureSourceRepository; +import org.tailormap.api.util.Constants; +import org.tailormap.api.viewer.model.Feature; @AppRestController @Validated diff --git a/src/main/java/nl/b3p/tailormap/api/controller/FeaturesController.java b/src/main/java/org/tailormap/api/controller/FeaturesController.java similarity index 92% rename from src/main/java/nl/b3p/tailormap/api/controller/FeaturesController.java rename to src/main/java/org/tailormap/api/controller/FeaturesController.java index 8ee7881d2..64d97f04c 100644 --- a/src/main/java/nl/b3p/tailormap/api/controller/FeaturesController.java +++ b/src/main/java/org/tailormap/api/controller/FeaturesController.java @@ -3,12 +3,12 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.controller; +package org.tailormap.api.controller; -import static nl.b3p.tailormap.api.persistence.helper.TMAttributeTypeHelper.isGeometry; -import static nl.b3p.tailormap.api.persistence.helper.TMFeatureTypeHelper.getConfiguredAttributes; import static org.springframework.web.bind.annotation.RequestMethod.GET; import static org.springframework.web.bind.annotation.RequestMethod.POST; +import static org.tailormap.api.persistence.helper.TMAttributeTypeHelper.isGeometry; +import static org.tailormap.api.persistence.helper.TMFeatureTypeHelper.getConfiguredAttributes; import io.micrometer.core.annotation.Timed; import jakarta.validation.constraints.NotNull; @@ -19,24 +19,6 @@ import java.util.Locale; import java.util.Map; import java.util.stream.Collectors; -import nl.b3p.tailormap.api.annotation.AppRestController; -import nl.b3p.tailormap.api.geotools.TransformationUtil; -import nl.b3p.tailormap.api.geotools.featuresources.FeatureSourceFactoryHelper; -import nl.b3p.tailormap.api.geotools.processing.GeometryProcessor; -import nl.b3p.tailormap.api.persistence.Application; -import nl.b3p.tailormap.api.persistence.GeoService; -import nl.b3p.tailormap.api.persistence.TMFeatureType; -import nl.b3p.tailormap.api.persistence.json.AppLayerSettings; -import nl.b3p.tailormap.api.persistence.json.AppTreeLayerNode; -import nl.b3p.tailormap.api.persistence.json.AttributeSettings; -import nl.b3p.tailormap.api.persistence.json.GeoServiceLayer; -import nl.b3p.tailormap.api.persistence.json.TMAttributeDescriptor; -import nl.b3p.tailormap.api.persistence.json.TMAttributeType; -import nl.b3p.tailormap.api.repository.FeatureSourceRepository; -import nl.b3p.tailormap.api.util.Constants; -import nl.b3p.tailormap.api.viewer.model.ColumnMetadata; -import nl.b3p.tailormap.api.viewer.model.Feature; -import nl.b3p.tailormap.api.viewer.model.FeaturesResponse; import org.apache.commons.lang3.tuple.Pair; import org.geotools.api.data.Query; import org.geotools.api.data.SimpleFeatureSource; @@ -68,6 +50,24 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.server.ResponseStatusException; +import org.tailormap.api.annotation.AppRestController; +import org.tailormap.api.geotools.TransformationUtil; +import org.tailormap.api.geotools.featuresources.FeatureSourceFactoryHelper; +import org.tailormap.api.geotools.processing.GeometryProcessor; +import org.tailormap.api.persistence.Application; +import org.tailormap.api.persistence.GeoService; +import org.tailormap.api.persistence.TMFeatureType; +import org.tailormap.api.persistence.json.AppLayerSettings; +import org.tailormap.api.persistence.json.AppTreeLayerNode; +import org.tailormap.api.persistence.json.AttributeSettings; +import org.tailormap.api.persistence.json.GeoServiceLayer; +import org.tailormap.api.persistence.json.TMAttributeDescriptor; +import org.tailormap.api.persistence.json.TMAttributeType; +import org.tailormap.api.repository.FeatureSourceRepository; +import org.tailormap.api.util.Constants; +import org.tailormap.api.viewer.model.ColumnMetadata; +import org.tailormap.api.viewer.model.Feature; +import org.tailormap.api.viewer.model.FeaturesResponse; @AppRestController @Validated diff --git a/src/main/java/nl/b3p/tailormap/api/controller/GeoServiceProxyController.java b/src/main/java/org/tailormap/api/controller/GeoServiceProxyController.java similarity index 92% rename from src/main/java/nl/b3p/tailormap/api/controller/GeoServiceProxyController.java rename to src/main/java/org/tailormap/api/controller/GeoServiceProxyController.java index 6e5f6dd93..b631577e2 100644 --- a/src/main/java/nl/b3p/tailormap/api/controller/GeoServiceProxyController.java +++ b/src/main/java/org/tailormap/api/controller/GeoServiceProxyController.java @@ -3,14 +3,14 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.controller; +package org.tailormap.api.controller; -import static nl.b3p.tailormap.api.util.HttpProxyUtil.addForwardedForRequestHeaders; -import static nl.b3p.tailormap.api.util.HttpProxyUtil.passthroughRequestHeaders; -import static nl.b3p.tailormap.api.util.HttpProxyUtil.passthroughResponseHeaders; -import static nl.b3p.tailormap.api.util.HttpProxyUtil.setHttpBasicAuthenticationHeader; import static org.springframework.web.bind.annotation.RequestMethod.GET; import static org.springframework.web.bind.annotation.RequestMethod.POST; +import static org.tailormap.api.util.HttpProxyUtil.addForwardedForRequestHeaders; +import static org.tailormap.api.util.HttpProxyUtil.passthroughRequestHeaders; +import static org.tailormap.api.util.HttpProxyUtil.passthroughResponseHeaders; +import static org.tailormap.api.util.HttpProxyUtil.setHttpBasicAuthenticationHeader; import io.micrometer.core.annotation.Timed; import jakarta.servlet.http.HttpServletRequest; @@ -29,14 +29,6 @@ import java.util.Set; import java.util.stream.Collectors; import javax.annotation.Nullable; -import nl.b3p.tailormap.api.annotation.AppRestController; -import nl.b3p.tailormap.api.persistence.Application; -import nl.b3p.tailormap.api.persistence.GeoService; -import nl.b3p.tailormap.api.persistence.helper.GeoServiceHelper; -import nl.b3p.tailormap.api.persistence.json.GeoServiceLayer; -import nl.b3p.tailormap.api.persistence.json.GeoServiceProtocol; -import nl.b3p.tailormap.api.persistence.json.ServiceAuthentication; -import nl.b3p.tailormap.api.security.AuthorizationService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.core.io.InputStreamResource; @@ -52,6 +44,14 @@ import org.springframework.web.server.ResponseStatusException; import org.springframework.web.util.UriComponentsBuilder; import org.springframework.web.util.UriUtils; +import org.tailormap.api.annotation.AppRestController; +import org.tailormap.api.persistence.Application; +import org.tailormap.api.persistence.GeoService; +import org.tailormap.api.persistence.helper.GeoServiceHelper; +import org.tailormap.api.persistence.json.GeoServiceLayer; +import org.tailormap.api.persistence.json.GeoServiceProtocol; +import org.tailormap.api.persistence.json.ServiceAuthentication; +import org.tailormap.api.security.AuthorizationService; /** * Proxy controller for OGC WMS and WMTS services. Does not attempt to hide the original service diff --git a/src/main/java/nl/b3p/tailormap/api/controller/LayerDescriptionController.java b/src/main/java/org/tailormap/api/controller/LayerDescriptionController.java similarity index 77% rename from src/main/java/nl/b3p/tailormap/api/controller/LayerDescriptionController.java rename to src/main/java/org/tailormap/api/controller/LayerDescriptionController.java index 81980dcec..bfbfee8a9 100644 --- a/src/main/java/nl/b3p/tailormap/api/controller/LayerDescriptionController.java +++ b/src/main/java/org/tailormap/api/controller/LayerDescriptionController.java @@ -3,31 +3,14 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.controller; +package org.tailormap.api.controller; -import static nl.b3p.tailormap.api.persistence.helper.TMAttributeTypeHelper.isGeometry; -import static nl.b3p.tailormap.api.persistence.helper.TMFeatureTypeHelper.getConfiguredAttributes; +import static org.tailormap.api.persistence.helper.TMAttributeTypeHelper.isGeometry; +import static org.tailormap.api.persistence.helper.TMFeatureTypeHelper.getConfiguredAttributes; import io.micrometer.core.annotation.Timed; import java.io.Serializable; import java.util.Set; -import nl.b3p.tailormap.api.annotation.AppRestController; -import nl.b3p.tailormap.api.persistence.Application; -import nl.b3p.tailormap.api.persistence.Form; -import nl.b3p.tailormap.api.persistence.GeoService; -import nl.b3p.tailormap.api.persistence.TMFeatureType; -import nl.b3p.tailormap.api.persistence.helper.TMFeatureTypeHelper; -import nl.b3p.tailormap.api.persistence.json.AppLayerSettings; -import nl.b3p.tailormap.api.persistence.json.AppTreeLayerNode; -import nl.b3p.tailormap.api.persistence.json.GeoServiceLayer; -import nl.b3p.tailormap.api.persistence.json.TMAttributeDescriptor; -import nl.b3p.tailormap.api.persistence.json.TMAttributeType; -import nl.b3p.tailormap.api.persistence.json.TMGeometryType; -import nl.b3p.tailormap.api.repository.FeatureSourceRepository; -import nl.b3p.tailormap.api.repository.FormRepository; -import nl.b3p.tailormap.api.viewer.model.Attribute; -import nl.b3p.tailormap.api.viewer.model.LayerDetails; -import nl.b3p.tailormap.api.viewer.model.LayerDetailsForm; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -37,6 +20,23 @@ import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.server.ResponseStatusException; +import org.tailormap.api.annotation.AppRestController; +import org.tailormap.api.persistence.Application; +import org.tailormap.api.persistence.Form; +import org.tailormap.api.persistence.GeoService; +import org.tailormap.api.persistence.TMFeatureType; +import org.tailormap.api.persistence.helper.TMFeatureTypeHelper; +import org.tailormap.api.persistence.json.AppLayerSettings; +import org.tailormap.api.persistence.json.AppTreeLayerNode; +import org.tailormap.api.persistence.json.GeoServiceLayer; +import org.tailormap.api.persistence.json.TMAttributeDescriptor; +import org.tailormap.api.persistence.json.TMAttributeType; +import org.tailormap.api.persistence.json.TMGeometryType; +import org.tailormap.api.repository.FeatureSourceRepository; +import org.tailormap.api.repository.FormRepository; +import org.tailormap.api.viewer.model.Attribute; +import org.tailormap.api.viewer.model.LayerDetails; +import org.tailormap.api.viewer.model.LayerDetailsForm; @AppRestController @Validated diff --git a/src/main/java/nl/b3p/tailormap/api/controller/LayerExportController.java b/src/main/java/org/tailormap/api/controller/LayerExportController.java similarity index 92% rename from src/main/java/nl/b3p/tailormap/api/controller/LayerExportController.java rename to src/main/java/org/tailormap/api/controller/LayerExportController.java index 7faadd93b..989b75a99 100644 --- a/src/main/java/nl/b3p/tailormap/api/controller/LayerExportController.java +++ b/src/main/java/org/tailormap/api/controller/LayerExportController.java @@ -3,10 +3,10 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.controller; +package org.tailormap.api.controller; -import static nl.b3p.tailormap.api.persistence.helper.TMFeatureTypeHelper.getConfiguredAttributes; -import static nl.b3p.tailormap.api.util.HttpProxyUtil.passthroughResponseHeaders; +import static org.tailormap.api.persistence.helper.TMFeatureTypeHelper.getConfiguredAttributes; +import static org.tailormap.api.util.HttpProxyUtil.passthroughResponseHeaders; import io.micrometer.core.annotation.Counted; import io.micrometer.core.annotation.Timed; @@ -25,21 +25,6 @@ import java.util.Map; import java.util.Set; import java.util.stream.Collectors; -import nl.b3p.tailormap.api.annotation.AppRestController; -import nl.b3p.tailormap.api.geotools.wfs.SimpleWFSHelper; -import nl.b3p.tailormap.api.geotools.wfs.SimpleWFSLayerDescription; -import nl.b3p.tailormap.api.geotools.wfs.WFSProxy; -import nl.b3p.tailormap.api.persistence.Application; -import nl.b3p.tailormap.api.persistence.GeoService; -import nl.b3p.tailormap.api.persistence.TMFeatureSource; -import nl.b3p.tailormap.api.persistence.TMFeatureType; -import nl.b3p.tailormap.api.persistence.json.AppLayerSettings; -import nl.b3p.tailormap.api.persistence.json.AppTreeLayerNode; -import nl.b3p.tailormap.api.persistence.json.GeoServiceLayer; -import nl.b3p.tailormap.api.persistence.json.GeoServiceProtocol; -import nl.b3p.tailormap.api.persistence.json.ServiceAuthentication; -import nl.b3p.tailormap.api.repository.FeatureSourceRepository; -import nl.b3p.tailormap.api.viewer.model.LayerExportCapabilities; import org.geotools.api.feature.type.AttributeDescriptor; import org.geotools.data.wfs.WFSDataStore; import org.geotools.data.wfs.WFSDataStoreFactory; @@ -57,6 +42,21 @@ import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.server.ResponseStatusException; +import org.tailormap.api.annotation.AppRestController; +import org.tailormap.api.geotools.wfs.SimpleWFSHelper; +import org.tailormap.api.geotools.wfs.SimpleWFSLayerDescription; +import org.tailormap.api.geotools.wfs.WFSProxy; +import org.tailormap.api.persistence.Application; +import org.tailormap.api.persistence.GeoService; +import org.tailormap.api.persistence.TMFeatureSource; +import org.tailormap.api.persistence.TMFeatureType; +import org.tailormap.api.persistence.json.AppLayerSettings; +import org.tailormap.api.persistence.json.AppTreeLayerNode; +import org.tailormap.api.persistence.json.GeoServiceLayer; +import org.tailormap.api.persistence.json.GeoServiceProtocol; +import org.tailormap.api.persistence.json.ServiceAuthentication; +import org.tailormap.api.repository.FeatureSourceRepository; +import org.tailormap.api.viewer.model.LayerExportCapabilities; @AppRestController @RequestMapping( diff --git a/src/main/java/nl/b3p/tailormap/api/controller/SearchController.java b/src/main/java/org/tailormap/api/controller/SearchController.java similarity index 88% rename from src/main/java/nl/b3p/tailormap/api/controller/SearchController.java rename to src/main/java/org/tailormap/api/controller/SearchController.java index f46f7aed5..b3c1c5fd8 100644 --- a/src/main/java/nl/b3p/tailormap/api/controller/SearchController.java +++ b/src/main/java/org/tailormap/api/controller/SearchController.java @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.controller; +package org.tailormap.api.controller; import static org.springframework.web.bind.annotation.RequestMethod.GET; @@ -13,15 +13,6 @@ import java.io.Serializable; import java.lang.invoke.MethodHandles; import java.util.concurrent.TimeUnit; -import nl.b3p.tailormap.api.annotation.AppRestController; -import nl.b3p.tailormap.api.persistence.Application; -import nl.b3p.tailormap.api.persistence.GeoService; -import nl.b3p.tailormap.api.persistence.SearchIndex; -import nl.b3p.tailormap.api.persistence.json.AppLayerSettings; -import nl.b3p.tailormap.api.persistence.json.AppTreeLayerNode; -import nl.b3p.tailormap.api.repository.SearchIndexRepository; -import nl.b3p.tailormap.api.solr.SolrHelper; -import nl.b3p.tailormap.api.viewer.model.SearchResponse; import org.apache.solr.client.solrj.SolrClient; import org.apache.solr.client.solrj.SolrServerException; import org.apache.solr.client.solrj.impl.Http2SolrClient; @@ -38,6 +29,15 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.server.ResponseStatusException; +import org.tailormap.api.annotation.AppRestController; +import org.tailormap.api.persistence.Application; +import org.tailormap.api.persistence.GeoService; +import org.tailormap.api.persistence.SearchIndex; +import org.tailormap.api.persistence.json.AppLayerSettings; +import org.tailormap.api.persistence.json.AppTreeLayerNode; +import org.tailormap.api.repository.SearchIndexRepository; +import org.tailormap.api.solr.SolrHelper; +import org.tailormap.api.viewer.model.SearchResponse; @AppRestController @Validated diff --git a/src/main/java/nl/b3p/tailormap/api/controller/UnauthorizedController.java b/src/main/java/org/tailormap/api/controller/UnauthorizedController.java similarity index 86% rename from src/main/java/nl/b3p/tailormap/api/controller/UnauthorizedController.java rename to src/main/java/org/tailormap/api/controller/UnauthorizedController.java index 94cb66b6f..b0771c5bb 100644 --- a/src/main/java/nl/b3p/tailormap/api/controller/UnauthorizedController.java +++ b/src/main/java/org/tailormap/api/controller/UnauthorizedController.java @@ -4,14 +4,14 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.controller; +package org.tailormap.api.controller; import io.micrometer.core.annotation.Counted; -import nl.b3p.tailormap.api.viewer.model.UnauthorizedResponse; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.ResponseStatus; import org.springframework.web.bind.annotation.RestController; +import org.tailormap.api.viewer.model.UnauthorizedResponse; @RestController public class UnauthorizedController { diff --git a/src/main/java/nl/b3p/tailormap/api/controller/UniqueValuesController.java b/src/main/java/org/tailormap/api/controller/UniqueValuesController.java similarity index 89% rename from src/main/java/nl/b3p/tailormap/api/controller/UniqueValuesController.java rename to src/main/java/org/tailormap/api/controller/UniqueValuesController.java index 51c90b649..762bb2b78 100644 --- a/src/main/java/nl/b3p/tailormap/api/controller/UniqueValuesController.java +++ b/src/main/java/org/tailormap/api/controller/UniqueValuesController.java @@ -3,11 +3,11 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.controller; +package org.tailormap.api.controller; -import static nl.b3p.tailormap.api.persistence.helper.TMFeatureTypeHelper.getNonHiddenAttributeNames; import static org.springframework.web.bind.annotation.RequestMethod.GET; import static org.springframework.web.bind.annotation.RequestMethod.POST; +import static org.tailormap.api.persistence.helper.TMFeatureTypeHelper.getNonHiddenAttributeNames; import io.micrometer.core.annotation.Counted; import io.micrometer.core.annotation.Timed; @@ -16,16 +16,6 @@ import java.lang.invoke.MethodHandles; import java.util.Set; import java.util.TreeSet; -import nl.b3p.tailormap.api.annotation.AppRestController; -import nl.b3p.tailormap.api.geotools.featuresources.FeatureSourceFactoryHelper; -import nl.b3p.tailormap.api.persistence.Application; -import nl.b3p.tailormap.api.persistence.GeoService; -import nl.b3p.tailormap.api.persistence.TMFeatureType; -import nl.b3p.tailormap.api.persistence.json.AppLayerSettings; -import nl.b3p.tailormap.api.persistence.json.AppTreeLayerNode; -import nl.b3p.tailormap.api.persistence.json.GeoServiceLayer; -import nl.b3p.tailormap.api.repository.FeatureSourceRepository; -import nl.b3p.tailormap.api.viewer.model.UniqueValuesResponse; import org.apache.commons.lang3.StringUtils; import org.geotools.api.data.Query; import org.geotools.api.data.SimpleFeatureSource; @@ -50,6 +40,16 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.server.ResponseStatusException; +import org.tailormap.api.annotation.AppRestController; +import org.tailormap.api.geotools.featuresources.FeatureSourceFactoryHelper; +import org.tailormap.api.persistence.Application; +import org.tailormap.api.persistence.GeoService; +import org.tailormap.api.persistence.TMFeatureType; +import org.tailormap.api.persistence.json.AppLayerSettings; +import org.tailormap.api.persistence.json.AppTreeLayerNode; +import org.tailormap.api.persistence.json.GeoServiceLayer; +import org.tailormap.api.repository.FeatureSourceRepository; +import org.tailormap.api.viewer.model.UniqueValuesResponse; @AppRestController @Validated diff --git a/src/main/java/nl/b3p/tailormap/api/controller/UploadsController.java b/src/main/java/org/tailormap/api/controller/UploadsController.java similarity index 92% rename from src/main/java/nl/b3p/tailormap/api/controller/UploadsController.java rename to src/main/java/org/tailormap/api/controller/UploadsController.java index 05425db8b..0059f1ef3 100644 --- a/src/main/java/nl/b3p/tailormap/api/controller/UploadsController.java +++ b/src/main/java/org/tailormap/api/controller/UploadsController.java @@ -4,18 +4,16 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.controller; +package org.tailormap.api.controller; -import static nl.b3p.tailormap.api.util.Constants.UUID_REGEX; import static org.springframework.http.HttpStatus.NOT_FOUND; import static org.springframework.http.HttpStatus.NOT_MODIFIED; +import static org.tailormap.api.util.Constants.UUID_REGEX; import jakarta.servlet.http.HttpServletRequest; import java.time.OffsetDateTime; import java.time.temporal.ChronoField; import java.util.UUID; -import nl.b3p.tailormap.api.persistence.Upload; -import nl.b3p.tailormap.api.repository.UploadRepository; import org.springframework.http.CacheControl; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; @@ -23,6 +21,8 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.server.ResponseStatusException; +import org.tailormap.api.persistence.Upload; +import org.tailormap.api.repository.UploadRepository; @RestController // Can't use ${tailormap-api.base-path} because linkTo() won't work diff --git a/src/main/java/nl/b3p/tailormap/api/controller/UserController.java b/src/main/java/org/tailormap/api/controller/UserController.java similarity index 87% rename from src/main/java/nl/b3p/tailormap/api/controller/UserController.java rename to src/main/java/org/tailormap/api/controller/UserController.java index c8d0ef4cd..287055c19 100644 --- a/src/main/java/nl/b3p/tailormap/api/controller/UserController.java +++ b/src/main/java/org/tailormap/api/controller/UserController.java @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.controller; +package org.tailormap.api.controller; import java.io.Serializable; import java.util.ArrayList; @@ -11,16 +11,6 @@ import java.util.Objects; import java.util.function.Function; import java.util.stream.Collectors; -import nl.b3p.tailormap.api.persistence.Group; -import nl.b3p.tailormap.api.persistence.User; -import nl.b3p.tailormap.api.persistence.json.AdminAdditionalProperty; -import nl.b3p.tailormap.api.repository.GroupRepository; -import nl.b3p.tailormap.api.repository.UserRepository; -import nl.b3p.tailormap.api.security.OIDCRepository; -import nl.b3p.tailormap.api.viewer.model.AdditionalProperty; -import nl.b3p.tailormap.api.viewer.model.LoginConfiguration; -import nl.b3p.tailormap.api.viewer.model.LoginConfigurationSsoLinksInner; -import nl.b3p.tailormap.api.viewer.model.UserResponse; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; @@ -31,6 +21,16 @@ import org.springframework.security.oauth2.client.registration.ClientRegistration; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; +import org.tailormap.api.persistence.Group; +import org.tailormap.api.persistence.User; +import org.tailormap.api.persistence.json.AdminAdditionalProperty; +import org.tailormap.api.repository.GroupRepository; +import org.tailormap.api.repository.UserRepository; +import org.tailormap.api.security.OIDCRepository; +import org.tailormap.api.viewer.model.AdditionalProperty; +import org.tailormap.api.viewer.model.LoginConfiguration; +import org.tailormap.api.viewer.model.LoginConfigurationSsoLinksInner; +import org.tailormap.api.viewer.model.UserResponse; /** Provides user and login information */ @RestController diff --git a/src/main/java/nl/b3p/tailormap/api/controller/ViewerController.java b/src/main/java/org/tailormap/api/controller/ViewerController.java similarity index 86% rename from src/main/java/nl/b3p/tailormap/api/controller/ViewerController.java rename to src/main/java/org/tailormap/api/controller/ViewerController.java index edb762872..14a0c2f16 100644 --- a/src/main/java/nl/b3p/tailormap/api/controller/ViewerController.java +++ b/src/main/java/org/tailormap/api/controller/ViewerController.java @@ -4,31 +4,31 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.controller; +package org.tailormap.api.controller; -import static nl.b3p.tailormap.api.util.Constants.UUID_REGEX; import static org.springframework.hateoas.server.mvc.WebMvcLinkBuilder.linkTo; +import static org.tailormap.api.util.Constants.UUID_REGEX; import io.micrometer.core.annotation.Counted; import io.micrometer.core.annotation.Timed; import java.util.Map; import java.util.UUID; -import nl.b3p.tailormap.api.annotation.AppRestController; -import nl.b3p.tailormap.api.persistence.Application; -import nl.b3p.tailormap.api.persistence.Configuration; -import nl.b3p.tailormap.api.persistence.Upload; -import nl.b3p.tailormap.api.persistence.helper.ApplicationHelper; -import nl.b3p.tailormap.api.repository.ApplicationRepository; -import nl.b3p.tailormap.api.repository.ConfigurationRepository; -import nl.b3p.tailormap.api.repository.UploadRepository; -import nl.b3p.tailormap.api.security.AuthorizationService; -import nl.b3p.tailormap.api.viewer.model.AppStyling; -import nl.b3p.tailormap.api.viewer.model.MapResponse; -import nl.b3p.tailormap.api.viewer.model.ViewerResponse; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.server.ResponseStatusException; +import org.tailormap.api.annotation.AppRestController; +import org.tailormap.api.persistence.Application; +import org.tailormap.api.persistence.Configuration; +import org.tailormap.api.persistence.Upload; +import org.tailormap.api.persistence.helper.ApplicationHelper; +import org.tailormap.api.repository.ApplicationRepository; +import org.tailormap.api.repository.ConfigurationRepository; +import org.tailormap.api.repository.UploadRepository; +import org.tailormap.api.security.AuthorizationService; +import org.tailormap.api.viewer.model.AppStyling; +import org.tailormap.api.viewer.model.MapResponse; +import org.tailormap.api.viewer.model.ViewerResponse; @AppRestController public class ViewerController { diff --git a/src/main/java/nl/b3p/tailormap/api/controller/admin/AdminRepositoryRestExceptionHandler.java b/src/main/java/org/tailormap/api/controller/admin/AdminRepositoryRestExceptionHandler.java similarity index 93% rename from src/main/java/nl/b3p/tailormap/api/controller/admin/AdminRepositoryRestExceptionHandler.java rename to src/main/java/org/tailormap/api/controller/admin/AdminRepositoryRestExceptionHandler.java index 57fcbcf4e..2bd01c2eb 100644 --- a/src/main/java/nl/b3p/tailormap/api/controller/admin/AdminRepositoryRestExceptionHandler.java +++ b/src/main/java/org/tailormap/api/controller/admin/AdminRepositoryRestExceptionHandler.java @@ -4,7 +4,7 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.controller.admin; +package org.tailormap.api.controller.admin; import org.springframework.context.MessageSource; import org.springframework.data.rest.webmvc.RepositoryRestExceptionHandler; diff --git a/src/main/java/nl/b3p/tailormap/api/controller/admin/FeatureSourceAdminController.java b/src/main/java/org/tailormap/api/controller/admin/FeatureSourceAdminController.java similarity index 93% rename from src/main/java/nl/b3p/tailormap/api/controller/admin/FeatureSourceAdminController.java rename to src/main/java/org/tailormap/api/controller/admin/FeatureSourceAdminController.java index a85918e30..dff8afe6d 100644 --- a/src/main/java/nl/b3p/tailormap/api/controller/admin/FeatureSourceAdminController.java +++ b/src/main/java/org/tailormap/api/controller/admin/FeatureSourceAdminController.java @@ -4,12 +4,10 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.controller.admin; +package org.tailormap.api.controller.admin; import jakarta.servlet.http.HttpServletResponse; import java.lang.invoke.MethodHandles; -import nl.b3p.tailormap.api.persistence.TMFeatureSource; -import nl.b3p.tailormap.api.repository.FeatureSourceRepository; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.context.ApplicationContext; @@ -22,6 +20,8 @@ import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.server.ResponseStatusException; +import org.tailormap.api.persistence.TMFeatureSource; +import org.tailormap.api.repository.FeatureSourceRepository; @RestController public class FeatureSourceAdminController { diff --git a/src/main/java/nl/b3p/tailormap/api/controller/admin/GeoServiceAdminController.java b/src/main/java/org/tailormap/api/controller/admin/GeoServiceAdminController.java similarity index 92% rename from src/main/java/nl/b3p/tailormap/api/controller/admin/GeoServiceAdminController.java rename to src/main/java/org/tailormap/api/controller/admin/GeoServiceAdminController.java index 0357f013f..8ad3a8222 100644 --- a/src/main/java/nl/b3p/tailormap/api/controller/admin/GeoServiceAdminController.java +++ b/src/main/java/org/tailormap/api/controller/admin/GeoServiceAdminController.java @@ -4,11 +4,9 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.controller.admin; +package org.tailormap.api.controller.admin; import jakarta.servlet.http.HttpServletResponse; -import nl.b3p.tailormap.api.persistence.GeoService; -import nl.b3p.tailormap.api.repository.GeoServiceRepository; import org.springframework.context.ApplicationContext; import org.springframework.data.rest.core.event.BeforeSaveEvent; import org.springframework.data.rest.webmvc.support.RepositoryEntityLinks; @@ -18,6 +16,8 @@ import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.server.ResponseStatusException; +import org.tailormap.api.persistence.GeoService; +import org.tailormap.api.repository.GeoServiceRepository; @RestController public class GeoServiceAdminController { diff --git a/src/main/java/nl/b3p/tailormap/api/controller/admin/PasswordValidationController.java b/src/main/java/org/tailormap/api/controller/admin/PasswordValidationController.java similarity index 84% rename from src/main/java/nl/b3p/tailormap/api/controller/admin/PasswordValidationController.java rename to src/main/java/org/tailormap/api/controller/admin/PasswordValidationController.java index 2547a5919..6c9679976 100644 --- a/src/main/java/nl/b3p/tailormap/api/controller/admin/PasswordValidationController.java +++ b/src/main/java/org/tailormap/api/controller/admin/PasswordValidationController.java @@ -4,16 +4,16 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.controller.admin; +package org.tailormap.api.controller.admin; import com.fasterxml.jackson.databind.ObjectMapper; import java.io.Serializable; -import nl.b3p.tailormap.api.configuration.TailormapPasswordStrengthConfig; -import nl.b3p.tailormap.api.util.TMPasswordDeserializer; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; +import org.tailormap.api.configuration.TailormapPasswordStrengthConfig; +import org.tailormap.api.util.TMPasswordDeserializer; @RestController public class PasswordValidationController { diff --git a/src/main/java/nl/b3p/tailormap/api/controller/admin/RestExceptionHandler.java b/src/main/java/org/tailormap/api/controller/admin/RestExceptionHandler.java similarity index 92% rename from src/main/java/nl/b3p/tailormap/api/controller/admin/RestExceptionHandler.java rename to src/main/java/org/tailormap/api/controller/admin/RestExceptionHandler.java index 72c3455c1..450524c62 100644 --- a/src/main/java/nl/b3p/tailormap/api/controller/admin/RestExceptionHandler.java +++ b/src/main/java/org/tailormap/api/controller/admin/RestExceptionHandler.java @@ -3,11 +3,9 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.controller.admin; +package org.tailormap.api.controller.admin; import java.lang.invoke.MethodHandles; -import nl.b3p.tailormap.api.security.InvalidPasswordException; -import nl.b3p.tailormap.api.viewer.model.ErrorResponse; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.http.HttpStatus; @@ -18,6 +16,8 @@ import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.RestControllerAdvice; import org.springframework.web.context.request.WebRequest; +import org.tailormap.api.security.InvalidPasswordException; +import org.tailormap.api.viewer.model.ErrorResponse; @RestControllerAdvice public class RestExceptionHandler { diff --git a/src/main/java/nl/b3p/tailormap/api/controller/admin/ServerSentEventsAdminController.java b/src/main/java/org/tailormap/api/controller/admin/ServerSentEventsAdminController.java similarity index 93% rename from src/main/java/nl/b3p/tailormap/api/controller/admin/ServerSentEventsAdminController.java rename to src/main/java/org/tailormap/api/controller/admin/ServerSentEventsAdminController.java index a36ab002b..2cfea48ee 100644 --- a/src/main/java/nl/b3p/tailormap/api/controller/admin/ServerSentEventsAdminController.java +++ b/src/main/java/org/tailormap/api/controller/admin/ServerSentEventsAdminController.java @@ -4,17 +4,16 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.controller.admin; +package org.tailormap.api.controller.admin; import static ch.rasc.sse.eventbus.SseEvent.DEFAULT_EVENT; -import static nl.b3p.tailormap.api.admin.model.ServerSentEvent.EventTypeEnum.KEEP_ALIVE; +import static org.tailormap.api.admin.model.ServerSentEvent.EventTypeEnum.KEEP_ALIVE; import ch.rasc.sse.eventbus.SseEvent; import ch.rasc.sse.eventbus.SseEventBus; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import java.lang.invoke.MethodHandles; -import nl.b3p.tailormap.api.admin.model.ServerSentEvent; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.scheduling.annotation.Scheduled; @@ -22,6 +21,7 @@ import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.servlet.mvc.method.annotation.SseEmitter; +import org.tailormap.api.admin.model.ServerSentEvent; @RestController public class ServerSentEventsAdminController { diff --git a/src/main/java/nl/b3p/tailormap/api/controller/admin/SolrAdminController.java b/src/main/java/org/tailormap/api/controller/admin/SolrAdminController.java similarity index 94% rename from src/main/java/nl/b3p/tailormap/api/controller/admin/SolrAdminController.java rename to src/main/java/org/tailormap/api/controller/admin/SolrAdminController.java index 146717829..e9b8b566d 100644 --- a/src/main/java/nl/b3p/tailormap/api/controller/admin/SolrAdminController.java +++ b/src/main/java/org/tailormap/api/controller/admin/SolrAdminController.java @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.controller.admin; +package org.tailormap.api.controller.admin; import com.fasterxml.jackson.databind.ObjectMapper; import io.micrometer.core.annotation.Timed; @@ -15,15 +15,6 @@ import java.lang.invoke.MethodHandles; import java.util.NoSuchElementException; import java.util.concurrent.TimeUnit; -import nl.b3p.tailormap.api.geotools.featuresources.FeatureSourceFactoryHelper; -import nl.b3p.tailormap.api.persistence.SearchIndex; -import nl.b3p.tailormap.api.persistence.TMFeatureType; -import nl.b3p.tailormap.api.repository.FeatureSourceRepository; -import nl.b3p.tailormap.api.repository.FeatureTypeRepository; -import nl.b3p.tailormap.api.repository.GeoServiceRepository; -import nl.b3p.tailormap.api.repository.SearchIndexRepository; -import nl.b3p.tailormap.api.solr.SolrHelper; -import nl.b3p.tailormap.api.viewer.model.ErrorResponse; import org.apache.solr.client.solrj.SolrClient; import org.apache.solr.client.solrj.SolrServerException; import org.apache.solr.client.solrj.impl.ConcurrentUpdateHttp2SolrClient; @@ -43,6 +34,15 @@ import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.server.ResponseStatusException; +import org.tailormap.api.geotools.featuresources.FeatureSourceFactoryHelper; +import org.tailormap.api.persistence.SearchIndex; +import org.tailormap.api.persistence.TMFeatureType; +import org.tailormap.api.repository.FeatureSourceRepository; +import org.tailormap.api.repository.FeatureTypeRepository; +import org.tailormap.api.repository.GeoServiceRepository; +import org.tailormap.api.repository.SearchIndexRepository; +import org.tailormap.api.solr.SolrHelper; +import org.tailormap.api.viewer.model.ErrorResponse; /** Admin controller for Solr. */ @RestController diff --git a/src/main/java/nl/b3p/tailormap/api/controller/admin/TestAdminController.java b/src/main/java/org/tailormap/api/controller/admin/TestAdminController.java similarity index 92% rename from src/main/java/nl/b3p/tailormap/api/controller/admin/TestAdminController.java rename to src/main/java/org/tailormap/api/controller/admin/TestAdminController.java index fe454a7c9..4b87f475b 100644 --- a/src/main/java/nl/b3p/tailormap/api/controller/admin/TestAdminController.java +++ b/src/main/java/org/tailormap/api/controller/admin/TestAdminController.java @@ -4,7 +4,7 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.controller.admin; +package org.tailormap.api.controller.admin; import com.fasterxml.jackson.databind.ObjectMapper; import java.io.Serializable; diff --git a/src/main/java/nl/b3p/tailormap/api/geotools/ResponseTeeingHTTPClient.java b/src/main/java/org/tailormap/api/geotools/ResponseTeeingHTTPClient.java similarity index 99% rename from src/main/java/nl/b3p/tailormap/api/geotools/ResponseTeeingHTTPClient.java rename to src/main/java/org/tailormap/api/geotools/ResponseTeeingHTTPClient.java index 239191d75..a627337c7 100644 --- a/src/main/java/nl/b3p/tailormap/api/geotools/ResponseTeeingHTTPClient.java +++ b/src/main/java/org/tailormap/api/geotools/ResponseTeeingHTTPClient.java @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.geotools; +package org.tailormap.api.geotools; import java.io.ByteArrayOutputStream; import java.io.IOException; diff --git a/src/main/java/nl/b3p/tailormap/api/geotools/TransformationUtil.java b/src/main/java/org/tailormap/api/geotools/TransformationUtil.java similarity index 97% rename from src/main/java/nl/b3p/tailormap/api/geotools/TransformationUtil.java rename to src/main/java/org/tailormap/api/geotools/TransformationUtil.java index 1ea429695..a557d3d61 100644 --- a/src/main/java/nl/b3p/tailormap/api/geotools/TransformationUtil.java +++ b/src/main/java/org/tailormap/api/geotools/TransformationUtil.java @@ -3,15 +3,15 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.geotools; +package org.tailormap.api.geotools; import jakarta.validation.constraints.NotNull; -import nl.b3p.tailormap.api.persistence.Application; import org.geotools.api.data.SimpleFeatureSource; import org.geotools.api.referencing.FactoryException; import org.geotools.api.referencing.crs.CoordinateReferenceSystem; import org.geotools.api.referencing.operation.MathTransform; import org.geotools.referencing.CRS; +import org.tailormap.api.persistence.Application; public class TransformationUtil { private TransformationUtil() { diff --git a/src/main/java/nl/b3p/tailormap/api/geotools/WMSServiceExceptionUtil.java b/src/main/java/org/tailormap/api/geotools/WMSServiceExceptionUtil.java similarity index 98% rename from src/main/java/nl/b3p/tailormap/api/geotools/WMSServiceExceptionUtil.java rename to src/main/java/org/tailormap/api/geotools/WMSServiceExceptionUtil.java index f0e8c0c76..59ab4dbab 100644 --- a/src/main/java/nl/b3p/tailormap/api/geotools/WMSServiceExceptionUtil.java +++ b/src/main/java/org/tailormap/api/geotools/WMSServiceExceptionUtil.java @@ -4,7 +4,7 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.geotools; +package org.tailormap.api.geotools; import java.io.ByteArrayInputStream; import javax.xml.XMLConstants; diff --git a/src/main/java/nl/b3p/tailormap/api/geotools/featuresources/FeatureSourceFactoryHelper.java b/src/main/java/org/tailormap/api/geotools/featuresources/FeatureSourceFactoryHelper.java similarity index 86% rename from src/main/java/nl/b3p/tailormap/api/geotools/featuresources/FeatureSourceFactoryHelper.java rename to src/main/java/org/tailormap/api/geotools/featuresources/FeatureSourceFactoryHelper.java index e0a0f4e2f..e0f06594c 100644 --- a/src/main/java/nl/b3p/tailormap/api/geotools/featuresources/FeatureSourceFactoryHelper.java +++ b/src/main/java/org/tailormap/api/geotools/featuresources/FeatureSourceFactoryHelper.java @@ -3,14 +3,14 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.geotools.featuresources; +package org.tailormap.api.geotools.featuresources; import java.io.IOException; -import nl.b3p.tailormap.api.persistence.TMFeatureSource; -import nl.b3p.tailormap.api.persistence.TMFeatureType; import org.geotools.api.data.SimpleFeatureSource; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; +import org.tailormap.api.persistence.TMFeatureSource; +import org.tailormap.api.persistence.TMFeatureType; @Service public class FeatureSourceFactoryHelper { diff --git a/src/main/java/nl/b3p/tailormap/api/geotools/featuresources/FeatureSourceHelper.java b/src/main/java/org/tailormap/api/geotools/featuresources/FeatureSourceHelper.java similarity index 91% rename from src/main/java/nl/b3p/tailormap/api/geotools/featuresources/FeatureSourceHelper.java rename to src/main/java/org/tailormap/api/geotools/featuresources/FeatureSourceHelper.java index 2713bdd41..642073c0e 100644 --- a/src/main/java/nl/b3p/tailormap/api/geotools/featuresources/FeatureSourceHelper.java +++ b/src/main/java/org/tailormap/api/geotools/featuresources/FeatureSourceHelper.java @@ -3,9 +3,9 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.geotools.featuresources; +package org.tailormap.api.geotools.featuresources; -import static nl.b3p.tailormap.api.persistence.helper.GeoToolsHelper.crsToString; +import static org.tailormap.api.persistence.helper.GeoToolsHelper.crsToString; import java.io.IOException; import java.lang.invoke.MethodHandles; @@ -13,14 +13,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import nl.b3p.tailormap.api.persistence.TMFeatureSource; -import nl.b3p.tailormap.api.persistence.TMFeatureType; -import nl.b3p.tailormap.api.persistence.helper.GeoToolsHelper; -import nl.b3p.tailormap.api.persistence.json.TMAttributeDescriptor; -import nl.b3p.tailormap.api.persistence.json.TMAttributeType; -import nl.b3p.tailormap.api.persistence.json.TMFeatureTypeInfo; -import nl.b3p.tailormap.api.persistence.json.TMServiceCaps; -import nl.b3p.tailormap.api.persistence.json.TMServiceInfo; import org.apache.commons.lang3.StringUtils; import org.geotools.api.data.DataStore; import org.geotools.api.data.DataStoreFinder; @@ -31,6 +23,14 @@ import org.geotools.api.feature.type.AttributeType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.tailormap.api.persistence.TMFeatureSource; +import org.tailormap.api.persistence.TMFeatureType; +import org.tailormap.api.persistence.helper.GeoToolsHelper; +import org.tailormap.api.persistence.json.TMAttributeDescriptor; +import org.tailormap.api.persistence.json.TMAttributeType; +import org.tailormap.api.persistence.json.TMFeatureTypeInfo; +import org.tailormap.api.persistence.json.TMServiceCaps; +import org.tailormap.api.persistence.json.TMServiceInfo; public abstract class FeatureSourceHelper { private static final Logger logger = diff --git a/src/main/java/nl/b3p/tailormap/api/geotools/featuresources/JDBCFeatureSourceHelper.java b/src/main/java/org/tailormap/api/geotools/featuresources/JDBCFeatureSourceHelper.java similarity index 93% rename from src/main/java/nl/b3p/tailormap/api/geotools/featuresources/JDBCFeatureSourceHelper.java rename to src/main/java/org/tailormap/api/geotools/featuresources/JDBCFeatureSourceHelper.java index befec3aa3..6e8047b64 100644 --- a/src/main/java/nl/b3p/tailormap/api/geotools/featuresources/JDBCFeatureSourceHelper.java +++ b/src/main/java/org/tailormap/api/geotools/featuresources/JDBCFeatureSourceHelper.java @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.geotools.featuresources; +package org.tailormap.api.geotools.featuresources; import static org.geotools.data.sqlserver.SQLServerDataStoreFactory.GEOMETRY_METADATA_TABLE; import static org.geotools.jdbc.JDBCDataStoreFactory.DATABASE; @@ -22,10 +22,10 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; -import nl.b3p.tailormap.api.persistence.TMFeatureSource; -import nl.b3p.tailormap.api.persistence.json.JDBCConnectionProperties; -import nl.b3p.tailormap.api.persistence.json.ServiceAuthentication; import org.geotools.api.data.DataStore; +import org.tailormap.api.persistence.TMFeatureSource; +import org.tailormap.api.persistence.json.JDBCConnectionProperties; +import org.tailormap.api.persistence.json.ServiceAuthentication; public class JDBCFeatureSourceHelper extends FeatureSourceHelper { private static final Map defaultPorts = diff --git a/src/main/java/nl/b3p/tailormap/api/geotools/featuresources/WFSFeatureSourceHelper.java b/src/main/java/org/tailormap/api/geotools/featuresources/WFSFeatureSourceHelper.java similarity index 86% rename from src/main/java/nl/b3p/tailormap/api/geotools/featuresources/WFSFeatureSourceHelper.java rename to src/main/java/org/tailormap/api/geotools/featuresources/WFSFeatureSourceHelper.java index 828573459..f5c1101a3 100644 --- a/src/main/java/nl/b3p/tailormap/api/geotools/featuresources/WFSFeatureSourceHelper.java +++ b/src/main/java/org/tailormap/api/geotools/featuresources/WFSFeatureSourceHelper.java @@ -3,23 +3,23 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.geotools.featuresources; +package org.tailormap.api.geotools.featuresources; import java.io.IOException; import java.util.HashMap; import java.util.Locale; import java.util.Map; import java.util.Set; -import nl.b3p.tailormap.api.persistence.TMFeatureSource; -import nl.b3p.tailormap.api.persistence.TMFeatureType; -import nl.b3p.tailormap.api.persistence.helper.GeoToolsHelper; -import nl.b3p.tailormap.api.persistence.json.ServiceAuthentication; -import nl.b3p.tailormap.api.persistence.json.TMFeatureTypeInfo; import org.geotools.api.data.DataStore; import org.geotools.api.data.ResourceInfo; import org.geotools.api.data.SimpleFeatureSource; import org.geotools.data.wfs.WFSDataStoreFactory; import org.geotools.data.wfs.internal.FeatureTypeInfo; +import org.tailormap.api.persistence.TMFeatureSource; +import org.tailormap.api.persistence.TMFeatureType; +import org.tailormap.api.persistence.helper.GeoToolsHelper; +import org.tailormap.api.persistence.json.ServiceAuthentication; +import org.tailormap.api.persistence.json.TMFeatureTypeInfo; public class WFSFeatureSourceHelper extends FeatureSourceHelper { @Override diff --git a/src/main/java/nl/b3p/tailormap/api/geotools/processing/GeometryProcessor.java b/src/main/java/org/tailormap/api/geotools/processing/GeometryProcessor.java similarity index 99% rename from src/main/java/nl/b3p/tailormap/api/geotools/processing/GeometryProcessor.java rename to src/main/java/org/tailormap/api/geotools/processing/GeometryProcessor.java index d4c9e27a9..6ace52719 100644 --- a/src/main/java/nl/b3p/tailormap/api/geotools/processing/GeometryProcessor.java +++ b/src/main/java/org/tailormap/api/geotools/processing/GeometryProcessor.java @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.geotools.processing; +package org.tailormap.api.geotools.processing; import jakarta.validation.constraints.NotNull; import java.lang.invoke.MethodHandles; diff --git a/src/main/java/nl/b3p/tailormap/api/geotools/wfs/SimpleWFSHelper.java b/src/main/java/org/tailormap/api/geotools/wfs/SimpleWFSHelper.java similarity index 98% rename from src/main/java/nl/b3p/tailormap/api/geotools/wfs/SimpleWFSHelper.java rename to src/main/java/org/tailormap/api/geotools/wfs/SimpleWFSHelper.java index 1df6ddcb1..af131a6bf 100644 --- a/src/main/java/nl/b3p/tailormap/api/geotools/wfs/SimpleWFSHelper.java +++ b/src/main/java/org/tailormap/api/geotools/wfs/SimpleWFSHelper.java @@ -3,9 +3,9 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.geotools.wfs; +package org.tailormap.api.geotools.wfs; -import static nl.b3p.tailormap.api.util.HttpProxyUtil.setHttpBasicAuthenticationHeader; +import static org.tailormap.api.util.HttpProxyUtil.setHttpBasicAuthenticationHeader; import java.io.IOException; import java.io.InputStream; diff --git a/src/main/java/nl/b3p/tailormap/api/geotools/wfs/SimpleWFSLayerDescription.java b/src/main/java/org/tailormap/api/geotools/wfs/SimpleWFSLayerDescription.java similarity index 92% rename from src/main/java/nl/b3p/tailormap/api/geotools/wfs/SimpleWFSLayerDescription.java rename to src/main/java/org/tailormap/api/geotools/wfs/SimpleWFSLayerDescription.java index e7db61625..9647dc58d 100644 --- a/src/main/java/nl/b3p/tailormap/api/geotools/wfs/SimpleWFSLayerDescription.java +++ b/src/main/java/org/tailormap/api/geotools/wfs/SimpleWFSLayerDescription.java @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.geotools.wfs; +package org.tailormap.api.geotools.wfs; public class SimpleWFSLayerDescription { private final String wfsUrl; diff --git a/src/main/java/nl/b3p/tailormap/api/geotools/wfs/WFSProxy.java b/src/main/java/org/tailormap/api/geotools/wfs/WFSProxy.java similarity index 78% rename from src/main/java/nl/b3p/tailormap/api/geotools/wfs/WFSProxy.java rename to src/main/java/org/tailormap/api/geotools/wfs/WFSProxy.java index 1058a4388..421dd73cf 100644 --- a/src/main/java/nl/b3p/tailormap/api/geotools/wfs/WFSProxy.java +++ b/src/main/java/org/tailormap/api/geotools/wfs/WFSProxy.java @@ -3,11 +3,11 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.geotools.wfs; +package org.tailormap.api.geotools.wfs; -import static nl.b3p.tailormap.api.util.HttpProxyUtil.addForwardedForRequestHeaders; -import static nl.b3p.tailormap.api.util.HttpProxyUtil.passthroughRequestHeaders; -import static nl.b3p.tailormap.api.util.HttpProxyUtil.setHttpBasicAuthenticationHeader; +import static org.tailormap.api.util.HttpProxyUtil.addForwardedForRequestHeaders; +import static org.tailormap.api.util.HttpProxyUtil.passthroughRequestHeaders; +import static org.tailormap.api.util.HttpProxyUtil.setHttpBasicAuthenticationHeader; import jakarta.servlet.http.HttpServletRequest; import java.io.InputStream; diff --git a/src/main/java/nl/b3p/tailormap/api/persistence/Application.java b/src/main/java/org/tailormap/api/persistence/Application.java similarity index 91% rename from src/main/java/nl/b3p/tailormap/api/persistence/Application.java rename to src/main/java/org/tailormap/api/persistence/Application.java index 338d7bd3f..58468dbc3 100644 --- a/src/main/java/nl/b3p/tailormap/api/persistence/Application.java +++ b/src/main/java/org/tailormap/api/persistence/Application.java @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.persistence; +package org.tailormap.api.persistence; import static java.util.Objects.requireNonNullElse; @@ -24,22 +24,22 @@ import java.util.List; import java.util.Optional; import java.util.stream.Stream; -import nl.b3p.tailormap.api.persistence.json.AppContent; -import nl.b3p.tailormap.api.persistence.json.AppI18nSettings; -import nl.b3p.tailormap.api.persistence.json.AppLayerSettings; -import nl.b3p.tailormap.api.persistence.json.AppSettings; -import nl.b3p.tailormap.api.persistence.json.AppTreeLayerNode; -import nl.b3p.tailormap.api.persistence.json.AppUiSettings; -import nl.b3p.tailormap.api.persistence.json.AuthorizationRule; -import nl.b3p.tailormap.api.persistence.json.Bounds; -import nl.b3p.tailormap.api.persistence.listener.EntityEventPublisher; -import nl.b3p.tailormap.api.viewer.model.AppStyling; -import nl.b3p.tailormap.api.viewer.model.Component; -import nl.b3p.tailormap.api.viewer.model.ViewerResponse; import org.geotools.referencing.CRS; import org.hibernate.annotations.Type; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.tailormap.api.persistence.json.AppContent; +import org.tailormap.api.persistence.json.AppI18nSettings; +import org.tailormap.api.persistence.json.AppLayerSettings; +import org.tailormap.api.persistence.json.AppSettings; +import org.tailormap.api.persistence.json.AppTreeLayerNode; +import org.tailormap.api.persistence.json.AppUiSettings; +import org.tailormap.api.persistence.json.AuthorizationRule; +import org.tailormap.api.persistence.json.Bounds; +import org.tailormap.api.persistence.listener.EntityEventPublisher; +import org.tailormap.api.viewer.model.AppStyling; +import org.tailormap.api.viewer.model.Component; +import org.tailormap.api.viewer.model.ViewerResponse; @Entity @EntityListeners(EntityEventPublisher.class) diff --git a/src/main/java/nl/b3p/tailormap/api/persistence/Catalog.java b/src/main/java/org/tailormap/api/persistence/Catalog.java similarity index 87% rename from src/main/java/nl/b3p/tailormap/api/persistence/Catalog.java rename to src/main/java/org/tailormap/api/persistence/Catalog.java index 98522b3de..c43c3146c 100644 --- a/src/main/java/nl/b3p/tailormap/api/persistence/Catalog.java +++ b/src/main/java/org/tailormap/api/persistence/Catalog.java @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.persistence; +package org.tailormap.api.persistence; import jakarta.persistence.Column; import jakarta.persistence.Entity; @@ -13,9 +13,9 @@ import jakarta.validation.constraints.NotNull; import java.util.ArrayList; import java.util.List; -import nl.b3p.tailormap.api.persistence.json.CatalogNode; -import nl.b3p.tailormap.api.persistence.listener.EntityEventPublisher; import org.hibernate.annotations.Type; +import org.tailormap.api.persistence.json.CatalogNode; +import org.tailormap.api.persistence.listener.EntityEventPublisher; @Entity @EntityListeners(EntityEventPublisher.class) diff --git a/src/main/java/nl/b3p/tailormap/api/persistence/Configuration.java b/src/main/java/org/tailormap/api/persistence/Configuration.java similarity index 93% rename from src/main/java/nl/b3p/tailormap/api/persistence/Configuration.java rename to src/main/java/org/tailormap/api/persistence/Configuration.java index 0603e58da..816b3c8d9 100644 --- a/src/main/java/nl/b3p/tailormap/api/persistence/Configuration.java +++ b/src/main/java/org/tailormap/api/persistence/Configuration.java @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.persistence; +package org.tailormap.api.persistence; import com.fasterxml.jackson.databind.JsonNode; import jakarta.persistence.Column; @@ -11,8 +11,8 @@ import jakarta.persistence.EntityListeners; import jakarta.persistence.Id; import jakarta.persistence.Version; -import nl.b3p.tailormap.api.persistence.listener.EntityEventPublisher; import org.hibernate.annotations.Type; +import org.tailormap.api.persistence.listener.EntityEventPublisher; @Entity @EntityListeners(EntityEventPublisher.class) diff --git a/src/main/java/nl/b3p/tailormap/api/persistence/Form.java b/src/main/java/org/tailormap/api/persistence/Form.java similarity index 90% rename from src/main/java/nl/b3p/tailormap/api/persistence/Form.java rename to src/main/java/org/tailormap/api/persistence/Form.java index aa52171bd..9a0ec00b1 100644 --- a/src/main/java/nl/b3p/tailormap/api/persistence/Form.java +++ b/src/main/java/org/tailormap/api/persistence/Form.java @@ -4,7 +4,7 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.persistence; +package org.tailormap.api.persistence; import jakarta.persistence.Column; import jakarta.persistence.Entity; @@ -16,10 +16,10 @@ import jakarta.validation.constraints.NotNull; import java.util.ArrayList; import java.util.List; -import nl.b3p.tailormap.api.persistence.json.FormField; -import nl.b3p.tailormap.api.persistence.json.FormOptions; -import nl.b3p.tailormap.api.persistence.listener.EntityEventPublisher; import org.hibernate.annotations.Type; +import org.tailormap.api.persistence.json.FormField; +import org.tailormap.api.persistence.json.FormOptions; +import org.tailormap.api.persistence.listener.EntityEventPublisher; @Entity @EntityListeners(EntityEventPublisher.class) diff --git a/src/main/java/nl/b3p/tailormap/api/persistence/GeoService.java b/src/main/java/org/tailormap/api/persistence/GeoService.java similarity index 93% rename from src/main/java/nl/b3p/tailormap/api/persistence/GeoService.java rename to src/main/java/org/tailormap/api/persistence/GeoService.java index ec195a93b..94288e5f4 100644 --- a/src/main/java/nl/b3p/tailormap/api/persistence/GeoService.java +++ b/src/main/java/org/tailormap/api/persistence/GeoService.java @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.persistence; +package org.tailormap.api.persistence; import com.fasterxml.jackson.annotation.JsonIgnore; import io.hypersistence.tsid.TSID; @@ -27,19 +27,6 @@ import java.util.Locale; import java.util.Map; import java.util.Optional; -import nl.b3p.tailormap.api.persistence.helper.GeoServiceHelper; -import nl.b3p.tailormap.api.persistence.json.AuthorizationRule; -import nl.b3p.tailormap.api.persistence.json.GeoServiceDefaultLayerSettings; -import nl.b3p.tailormap.api.persistence.json.GeoServiceLayer; -import nl.b3p.tailormap.api.persistence.json.GeoServiceLayerSettings; -import nl.b3p.tailormap.api.persistence.json.GeoServiceProtocol; -import nl.b3p.tailormap.api.persistence.json.GeoServiceSettings; -import nl.b3p.tailormap.api.persistence.json.ServiceAuthentication; -import nl.b3p.tailormap.api.persistence.json.TMServiceCaps; -import nl.b3p.tailormap.api.persistence.listener.EntityEventPublisher; -import nl.b3p.tailormap.api.repository.FeatureSourceRepository; -import nl.b3p.tailormap.api.util.TMStringUtils; -import nl.b3p.tailormap.api.viewer.model.Service; import org.apache.commons.lang3.StringUtils; import org.hibernate.annotations.Type; import org.slf4j.Logger; @@ -48,6 +35,19 @@ import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.MultiValueMap; import org.springframework.web.util.UriComponentsBuilder; +import org.tailormap.api.persistence.helper.GeoServiceHelper; +import org.tailormap.api.persistence.json.AuthorizationRule; +import org.tailormap.api.persistence.json.GeoServiceDefaultLayerSettings; +import org.tailormap.api.persistence.json.GeoServiceLayer; +import org.tailormap.api.persistence.json.GeoServiceLayerSettings; +import org.tailormap.api.persistence.json.GeoServiceProtocol; +import org.tailormap.api.persistence.json.GeoServiceSettings; +import org.tailormap.api.persistence.json.ServiceAuthentication; +import org.tailormap.api.persistence.json.TMServiceCaps; +import org.tailormap.api.persistence.listener.EntityEventPublisher; +import org.tailormap.api.repository.FeatureSourceRepository; +import org.tailormap.api.util.TMStringUtils; +import org.tailormap.api.viewer.model.Service; @Entity @EntityListeners(EntityEventPublisher.class) diff --git a/src/main/java/nl/b3p/tailormap/api/persistence/Group.java b/src/main/java/org/tailormap/api/persistence/Group.java similarity index 93% rename from src/main/java/nl/b3p/tailormap/api/persistence/Group.java rename to src/main/java/org/tailormap/api/persistence/Group.java index acf94802d..0301dbe24 100644 --- a/src/main/java/nl/b3p/tailormap/api/persistence/Group.java +++ b/src/main/java/org/tailormap/api/persistence/Group.java @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.persistence; +package org.tailormap.api.persistence; import jakarta.persistence.Column; import jakarta.persistence.Entity; @@ -18,10 +18,10 @@ import java.util.HashSet; import java.util.List; import java.util.Set; -import nl.b3p.tailormap.api.persistence.json.AdminAdditionalProperty; -import nl.b3p.tailormap.api.persistence.listener.EntityEventPublisher; -import nl.b3p.tailormap.api.util.Constants; import org.hibernate.annotations.Type; +import org.tailormap.api.persistence.json.AdminAdditionalProperty; +import org.tailormap.api.persistence.listener.EntityEventPublisher; +import org.tailormap.api.util.Constants; @Entity @Table(name = "groups") diff --git a/src/main/java/nl/b3p/tailormap/api/persistence/OIDCConfiguration.java b/src/main/java/org/tailormap/api/persistence/OIDCConfiguration.java similarity index 94% rename from src/main/java/nl/b3p/tailormap/api/persistence/OIDCConfiguration.java rename to src/main/java/org/tailormap/api/persistence/OIDCConfiguration.java index df845808c..a2370fa48 100644 --- a/src/main/java/nl/b3p/tailormap/api/persistence/OIDCConfiguration.java +++ b/src/main/java/org/tailormap/api/persistence/OIDCConfiguration.java @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.persistence; +package org.tailormap.api.persistence; import jakarta.persistence.Entity; import jakarta.persistence.EntityListeners; @@ -12,7 +12,7 @@ import jakarta.persistence.Id; import jakarta.persistence.Version; import jakarta.validation.constraints.NotNull; -import nl.b3p.tailormap.api.persistence.listener.EntityEventPublisher; +import org.tailormap.api.persistence.listener.EntityEventPublisher; @Entity @EntityListeners(EntityEventPublisher.class) diff --git a/src/main/java/nl/b3p/tailormap/api/persistence/SearchIndex.java b/src/main/java/org/tailormap/api/persistence/SearchIndex.java similarity index 99% rename from src/main/java/nl/b3p/tailormap/api/persistence/SearchIndex.java rename to src/main/java/org/tailormap/api/persistence/SearchIndex.java index 80909fd8b..24978e2f1 100644 --- a/src/main/java/nl/b3p/tailormap/api/persistence/SearchIndex.java +++ b/src/main/java/org/tailormap/api/persistence/SearchIndex.java @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.persistence; +package org.tailormap.api.persistence; import com.fasterxml.jackson.annotation.JsonProperty; import jakarta.persistence.Column; diff --git a/src/main/java/nl/b3p/tailormap/api/persistence/TMFeatureSource.java b/src/main/java/org/tailormap/api/persistence/TMFeatureSource.java similarity index 95% rename from src/main/java/nl/b3p/tailormap/api/persistence/TMFeatureSource.java rename to src/main/java/org/tailormap/api/persistence/TMFeatureSource.java index 598c78621..67f88f65a 100644 --- a/src/main/java/nl/b3p/tailormap/api/persistence/TMFeatureSource.java +++ b/src/main/java/org/tailormap/api/persistence/TMFeatureSource.java @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.persistence; +package org.tailormap.api.persistence; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; @@ -28,11 +28,11 @@ import jakarta.validation.constraints.NotNull; import java.util.ArrayList; import java.util.List; -import nl.b3p.tailormap.api.persistence.json.JDBCConnectionProperties; -import nl.b3p.tailormap.api.persistence.json.ServiceAuthentication; -import nl.b3p.tailormap.api.persistence.json.TMServiceCaps; -import nl.b3p.tailormap.api.persistence.listener.EntityEventPublisher; import org.hibernate.annotations.Type; +import org.tailormap.api.persistence.json.JDBCConnectionProperties; +import org.tailormap.api.persistence.json.ServiceAuthentication; +import org.tailormap.api.persistence.json.TMServiceCaps; +import org.tailormap.api.persistence.listener.EntityEventPublisher; @Entity @Table(name = "feature_source") diff --git a/src/main/java/nl/b3p/tailormap/api/persistence/TMFeatureType.java b/src/main/java/org/tailormap/api/persistence/TMFeatureType.java similarity index 93% rename from src/main/java/nl/b3p/tailormap/api/persistence/TMFeatureType.java rename to src/main/java/org/tailormap/api/persistence/TMFeatureType.java index ae431a3aa..3e7da4cc0 100644 --- a/src/main/java/nl/b3p/tailormap/api/persistence/TMFeatureType.java +++ b/src/main/java/org/tailormap/api/persistence/TMFeatureType.java @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.persistence; +package org.tailormap.api.persistence; import jakarta.persistence.Column; import jakarta.persistence.Entity; @@ -21,12 +21,12 @@ import java.util.ArrayList; import java.util.List; import java.util.Optional; -import nl.b3p.tailormap.api.persistence.helper.TMAttributeTypeHelper; -import nl.b3p.tailormap.api.persistence.json.FeatureTypeSettings; -import nl.b3p.tailormap.api.persistence.json.TMAttributeDescriptor; -import nl.b3p.tailormap.api.persistence.json.TMFeatureTypeInfo; -import nl.b3p.tailormap.api.persistence.listener.EntityEventPublisher; import org.hibernate.annotations.Type; +import org.tailormap.api.persistence.helper.TMAttributeTypeHelper; +import org.tailormap.api.persistence.json.FeatureTypeSettings; +import org.tailormap.api.persistence.json.TMAttributeDescriptor; +import org.tailormap.api.persistence.json.TMFeatureTypeInfo; +import org.tailormap.api.persistence.listener.EntityEventPublisher; @Entity @Table(name = "feature_type") diff --git a/src/main/java/nl/b3p/tailormap/api/persistence/Upload.java b/src/main/java/org/tailormap/api/persistence/Upload.java similarity index 95% rename from src/main/java/nl/b3p/tailormap/api/persistence/Upload.java rename to src/main/java/org/tailormap/api/persistence/Upload.java index 4ea3d6ae7..e7aa0e01e 100644 --- a/src/main/java/nl/b3p/tailormap/api/persistence/Upload.java +++ b/src/main/java/org/tailormap/api/persistence/Upload.java @@ -4,7 +4,7 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.persistence; +package org.tailormap.api.persistence; import jakarta.persistence.Basic; import jakarta.persistence.Entity; @@ -17,7 +17,7 @@ import java.time.OffsetDateTime; import java.time.ZoneId; import java.util.UUID; -import nl.b3p.tailormap.api.persistence.listener.EntityEventPublisher; +import org.tailormap.api.persistence.listener.EntityEventPublisher; @Entity @EntityListeners(EntityEventPublisher.class) diff --git a/src/main/java/nl/b3p/tailormap/api/persistence/User.java b/src/main/java/org/tailormap/api/persistence/User.java similarity index 93% rename from src/main/java/nl/b3p/tailormap/api/persistence/User.java rename to src/main/java/org/tailormap/api/persistence/User.java index 476761147..bd8f9a903 100644 --- a/src/main/java/nl/b3p/tailormap/api/persistence/User.java +++ b/src/main/java/org/tailormap/api/persistence/User.java @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.persistence; +package org.tailormap.api.persistence; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; @@ -25,11 +25,11 @@ import java.util.HashSet; import java.util.List; import java.util.Set; -import nl.b3p.tailormap.api.persistence.json.AdminAdditionalProperty; -import nl.b3p.tailormap.api.persistence.listener.EntityEventPublisher; -import nl.b3p.tailormap.api.util.Constants; -import nl.b3p.tailormap.api.util.TMPasswordDeserializer; import org.hibernate.annotations.Type; +import org.tailormap.api.persistence.json.AdminAdditionalProperty; +import org.tailormap.api.persistence.listener.EntityEventPublisher; +import org.tailormap.api.util.Constants; +import org.tailormap.api.util.TMPasswordDeserializer; @Entity @Table(name = "users") diff --git a/src/main/java/nl/b3p/tailormap/api/persistence/helper/ApplicationHelper.java b/src/main/java/org/tailormap/api/persistence/helper/ApplicationHelper.java similarity index 89% rename from src/main/java/nl/b3p/tailormap/api/persistence/helper/ApplicationHelper.java rename to src/main/java/org/tailormap/api/persistence/helper/ApplicationHelper.java index 87a169cf8..5dac33691 100644 --- a/src/main/java/nl/b3p/tailormap/api/persistence/helper/ApplicationHelper.java +++ b/src/main/java/org/tailormap/api/persistence/helper/ApplicationHelper.java @@ -3,11 +3,11 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.persistence.helper; +package org.tailormap.api.persistence.helper; -import static nl.b3p.tailormap.api.persistence.json.GeoServiceProtocol.PROXIEDLEGEND; -import static nl.b3p.tailormap.api.util.TMStringUtils.nullIfEmpty; import static org.springframework.hateoas.server.mvc.WebMvcLinkBuilder.linkTo; +import static org.tailormap.api.persistence.json.GeoServiceProtocol.PROXIEDLEGEND; +import static org.tailormap.api.util.TMStringUtils.nullIfEmpty; import jakarta.persistence.EntityManager; import java.lang.invoke.MethodHandles; @@ -17,34 +17,6 @@ import java.util.Map; import java.util.Objects; import java.util.Optional; -import nl.b3p.tailormap.api.controller.GeoServiceProxyController; -import nl.b3p.tailormap.api.persistence.Application; -import nl.b3p.tailormap.api.persistence.Configuration; -import nl.b3p.tailormap.api.persistence.GeoService; -import nl.b3p.tailormap.api.persistence.SearchIndex; -import nl.b3p.tailormap.api.persistence.TMFeatureType; -import nl.b3p.tailormap.api.persistence.json.AppContent; -import nl.b3p.tailormap.api.persistence.json.AppLayerSettings; -import nl.b3p.tailormap.api.persistence.json.AppTreeLayerNode; -import nl.b3p.tailormap.api.persistence.json.AppTreeLevelNode; -import nl.b3p.tailormap.api.persistence.json.AppTreeNode; -import nl.b3p.tailormap.api.persistence.json.Bounds; -import nl.b3p.tailormap.api.persistence.json.GeoServiceDefaultLayerSettings; -import nl.b3p.tailormap.api.persistence.json.GeoServiceLayer; -import nl.b3p.tailormap.api.persistence.json.GeoServiceLayerSettings; -import nl.b3p.tailormap.api.persistence.json.ServicePublishingSettings; -import nl.b3p.tailormap.api.persistence.json.TileLayerHiDpiMode; -import nl.b3p.tailormap.api.repository.ApplicationRepository; -import nl.b3p.tailormap.api.repository.ConfigurationRepository; -import nl.b3p.tailormap.api.repository.FeatureSourceRepository; -import nl.b3p.tailormap.api.repository.GeoServiceRepository; -import nl.b3p.tailormap.api.repository.SearchIndexRepository; -import nl.b3p.tailormap.api.security.AuthorizationService; -import nl.b3p.tailormap.api.viewer.model.AppLayer; -import nl.b3p.tailormap.api.viewer.model.LayerSearchIndex; -import nl.b3p.tailormap.api.viewer.model.LayerTreeNode; -import nl.b3p.tailormap.api.viewer.model.MapResponse; -import nl.b3p.tailormap.api.viewer.model.TMCoordinateReferenceSystem; import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.tuple.Triple; import org.geotools.api.referencing.crs.CoordinateReferenceSystem; @@ -54,6 +26,34 @@ import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import org.tailormap.api.controller.GeoServiceProxyController; +import org.tailormap.api.persistence.Application; +import org.tailormap.api.persistence.Configuration; +import org.tailormap.api.persistence.GeoService; +import org.tailormap.api.persistence.SearchIndex; +import org.tailormap.api.persistence.TMFeatureType; +import org.tailormap.api.persistence.json.AppContent; +import org.tailormap.api.persistence.json.AppLayerSettings; +import org.tailormap.api.persistence.json.AppTreeLayerNode; +import org.tailormap.api.persistence.json.AppTreeLevelNode; +import org.tailormap.api.persistence.json.AppTreeNode; +import org.tailormap.api.persistence.json.Bounds; +import org.tailormap.api.persistence.json.GeoServiceDefaultLayerSettings; +import org.tailormap.api.persistence.json.GeoServiceLayer; +import org.tailormap.api.persistence.json.GeoServiceLayerSettings; +import org.tailormap.api.persistence.json.ServicePublishingSettings; +import org.tailormap.api.persistence.json.TileLayerHiDpiMode; +import org.tailormap.api.repository.ApplicationRepository; +import org.tailormap.api.repository.ConfigurationRepository; +import org.tailormap.api.repository.FeatureSourceRepository; +import org.tailormap.api.repository.GeoServiceRepository; +import org.tailormap.api.repository.SearchIndexRepository; +import org.tailormap.api.security.AuthorizationService; +import org.tailormap.api.viewer.model.AppLayer; +import org.tailormap.api.viewer.model.LayerSearchIndex; +import org.tailormap.api.viewer.model.LayerTreeNode; +import org.tailormap.api.viewer.model.MapResponse; +import org.tailormap.api.viewer.model.TMCoordinateReferenceSystem; @Service public class ApplicationHelper { diff --git a/src/main/java/nl/b3p/tailormap/api/persistence/helper/GeoServiceHelper.java b/src/main/java/org/tailormap/api/persistence/helper/GeoServiceHelper.java similarity index 90% rename from src/main/java/nl/b3p/tailormap/api/persistence/helper/GeoServiceHelper.java rename to src/main/java/org/tailormap/api/persistence/helper/GeoServiceHelper.java index 6f5323558..92f00f1ba 100644 --- a/src/main/java/nl/b3p/tailormap/api/persistence/helper/GeoServiceHelper.java +++ b/src/main/java/org/tailormap/api/persistence/helper/GeoServiceHelper.java @@ -3,12 +3,12 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.persistence.helper; +package org.tailormap.api.persistence.helper; -import static nl.b3p.tailormap.api.persistence.TMFeatureSource.Protocol.WFS; -import static nl.b3p.tailormap.api.persistence.json.GeoServiceProtocol.TILESET3D; -import static nl.b3p.tailormap.api.persistence.json.GeoServiceProtocol.WMS; -import static nl.b3p.tailormap.api.persistence.json.GeoServiceProtocol.XYZ; +import static org.tailormap.api.persistence.TMFeatureSource.Protocol.WFS; +import static org.tailormap.api.persistence.json.GeoServiceProtocol.TILESET3D; +import static org.tailormap.api.persistence.json.GeoServiceProtocol.WMS; +import static org.tailormap.api.persistence.json.GeoServiceProtocol.XYZ; import java.io.IOException; import java.lang.invoke.MethodHandles; @@ -27,24 +27,6 @@ import java.util.Set; import java.util.function.Predicate; import java.util.stream.Collectors; -import nl.b3p.tailormap.api.configuration.TailormapConfig; -import nl.b3p.tailormap.api.geotools.ResponseTeeingHTTPClient; -import nl.b3p.tailormap.api.geotools.WMSServiceExceptionUtil; -import nl.b3p.tailormap.api.geotools.featuresources.WFSFeatureSourceHelper; -import nl.b3p.tailormap.api.geotools.wfs.SimpleWFSHelper; -import nl.b3p.tailormap.api.geotools.wfs.SimpleWFSLayerDescription; -import nl.b3p.tailormap.api.persistence.GeoService; -import nl.b3p.tailormap.api.persistence.TMFeatureSource; -import nl.b3p.tailormap.api.persistence.json.GeoServiceLayer; -import nl.b3p.tailormap.api.persistence.json.ServiceAuthentication; -import nl.b3p.tailormap.api.persistence.json.TMServiceCapabilitiesRequest; -import nl.b3p.tailormap.api.persistence.json.TMServiceCapabilitiesRequestGetFeatureInfo; -import nl.b3p.tailormap.api.persistence.json.TMServiceCapabilitiesRequestGetMap; -import nl.b3p.tailormap.api.persistence.json.TMServiceCaps; -import nl.b3p.tailormap.api.persistence.json.TMServiceCapsCapabilities; -import nl.b3p.tailormap.api.persistence.json.TMServiceInfo; -import nl.b3p.tailormap.api.persistence.json.WMSStyle; -import nl.b3p.tailormap.api.repository.FeatureSourceRepository; import org.apache.commons.lang3.StringUtils; import org.geotools.api.data.ServiceInfo; import org.geotools.data.ows.AbstractOpenWebService; @@ -62,6 +44,24 @@ import org.springframework.http.MediaType; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; +import org.tailormap.api.configuration.TailormapConfig; +import org.tailormap.api.geotools.ResponseTeeingHTTPClient; +import org.tailormap.api.geotools.WMSServiceExceptionUtil; +import org.tailormap.api.geotools.featuresources.WFSFeatureSourceHelper; +import org.tailormap.api.geotools.wfs.SimpleWFSHelper; +import org.tailormap.api.geotools.wfs.SimpleWFSLayerDescription; +import org.tailormap.api.persistence.GeoService; +import org.tailormap.api.persistence.TMFeatureSource; +import org.tailormap.api.persistence.json.GeoServiceLayer; +import org.tailormap.api.persistence.json.ServiceAuthentication; +import org.tailormap.api.persistence.json.TMServiceCapabilitiesRequest; +import org.tailormap.api.persistence.json.TMServiceCapabilitiesRequestGetFeatureInfo; +import org.tailormap.api.persistence.json.TMServiceCapabilitiesRequestGetMap; +import org.tailormap.api.persistence.json.TMServiceCaps; +import org.tailormap.api.persistence.json.TMServiceCapsCapabilities; +import org.tailormap.api.persistence.json.TMServiceInfo; +import org.tailormap.api.persistence.json.WMSStyle; +import org.tailormap.api.repository.FeatureSourceRepository; @Service public class GeoServiceHelper { @@ -78,22 +78,21 @@ public GeoServiceHelper( this.featureSourceRepository = featureSourceRepository; } - public nl.b3p.tailormap.api.viewer.model.Service.ServerTypeEnum guessServerTypeFromUrl( - String url) { + public org.tailormap.api.viewer.model.Service.ServerTypeEnum guessServerTypeFromUrl(String url) { if (StringUtils.isBlank(url)) { - return nl.b3p.tailormap.api.viewer.model.Service.ServerTypeEnum.GENERIC; + return org.tailormap.api.viewer.model.Service.ServerTypeEnum.GENERIC; } if (url.contains("/arcgis/")) { - return nl.b3p.tailormap.api.viewer.model.Service.ServerTypeEnum.GENERIC; + return org.tailormap.api.viewer.model.Service.ServerTypeEnum.GENERIC; } if (url.contains("/geoserver/")) { - return nl.b3p.tailormap.api.viewer.model.Service.ServerTypeEnum.GEOSERVER; + return org.tailormap.api.viewer.model.Service.ServerTypeEnum.GEOSERVER; } if (url.contains("/mapserv")) { // /cgi-bin/mapserv, /cgi-bin/mapserv.cgi, /cgi-bin/mapserv.fcgi - return nl.b3p.tailormap.api.viewer.model.Service.ServerTypeEnum.MAPSERVER; + return org.tailormap.api.viewer.model.Service.ServerTypeEnum.MAPSERVER; } - return nl.b3p.tailormap.api.viewer.model.Service.ServerTypeEnum.GENERIC; + return org.tailormap.api.viewer.model.Service.ServerTypeEnum.GENERIC; } public void loadServiceCapabilities(GeoService geoService) throws Exception { diff --git a/src/main/java/nl/b3p/tailormap/api/persistence/helper/GeoToolsHelper.java b/src/main/java/org/tailormap/api/persistence/helper/GeoToolsHelper.java similarity index 84% rename from src/main/java/nl/b3p/tailormap/api/persistence/helper/GeoToolsHelper.java rename to src/main/java/org/tailormap/api/persistence/helper/GeoToolsHelper.java index 16338335b..fd8263c87 100644 --- a/src/main/java/nl/b3p/tailormap/api/persistence/helper/GeoToolsHelper.java +++ b/src/main/java/org/tailormap/api/persistence/helper/GeoToolsHelper.java @@ -3,10 +3,9 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.persistence.helper; +package org.tailormap.api.persistence.helper; import java.math.BigDecimal; -import nl.b3p.tailormap.api.persistence.json.TMAttributeType; import org.geotools.api.feature.type.AttributeType; import org.geotools.api.referencing.crs.CoordinateReferenceSystem; import org.geotools.ows.wms.CRSEnvelope; @@ -20,26 +19,26 @@ import org.locationtech.jts.geom.MultiPolygon; import org.locationtech.jts.geom.Point; import org.locationtech.jts.geom.Polygon; +import org.tailormap.api.persistence.json.Bounds; +import org.tailormap.api.persistence.json.TMAttributeType; public class GeoToolsHelper { - public static nl.b3p.tailormap.api.persistence.json.Bounds boundsFromCRSEnvelope( - CRSEnvelope crsEnvelope) { + public static Bounds boundsFromCRSEnvelope(CRSEnvelope crsEnvelope) { return crsEnvelope == null ? null - : new nl.b3p.tailormap.api.persistence.json.Bounds() + : new Bounds() .maxx(crsEnvelope.getMaxX()) .maxy(crsEnvelope.getMaxY()) .minx(crsEnvelope.getMinX()) .miny(crsEnvelope.getMinY()); } - public static nl.b3p.tailormap.api.persistence.json.Bounds fromCRS( - CoordinateReferenceSystem crs) { + public static Bounds fromCRS(CoordinateReferenceSystem crs) { org.geotools.api.geometry.Bounds envelope = CRS.getEnvelope(crs); return envelope == null ? null - : new nl.b3p.tailormap.api.persistence.json.Bounds() + : new Bounds() // ordinate choice may not always be correct...eg. with flipped axis .maxx(envelope.getUpperCorner().getOrdinate(0)) .maxy(envelope.getUpperCorner().getOrdinate(1)) @@ -47,10 +46,10 @@ public static nl.b3p.tailormap.api.persistence.json.Bounds fromCRS( .miny(envelope.getLowerCorner().getOrdinate(1)); } - public static nl.b3p.tailormap.api.persistence.json.Bounds fromEnvelope(Envelope envelope) { + public static Bounds fromEnvelope(Envelope envelope) { return envelope == null ? null - : new nl.b3p.tailormap.api.persistence.json.Bounds() + : new Bounds() .maxx(envelope.getMaxX()) .maxy(envelope.getMaxY()) .minx(envelope.getMinX()) diff --git a/src/main/java/nl/b3p/tailormap/api/persistence/helper/TMAttributeTypeHelper.java b/src/main/java/org/tailormap/api/persistence/helper/TMAttributeTypeHelper.java similarity index 67% rename from src/main/java/nl/b3p/tailormap/api/persistence/helper/TMAttributeTypeHelper.java rename to src/main/java/org/tailormap/api/persistence/helper/TMAttributeTypeHelper.java index 0c7de5076..1ffb0af20 100644 --- a/src/main/java/nl/b3p/tailormap/api/persistence/helper/TMAttributeTypeHelper.java +++ b/src/main/java/org/tailormap/api/persistence/helper/TMAttributeTypeHelper.java @@ -4,10 +4,10 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.persistence.helper; +package org.tailormap.api.persistence.helper; -import nl.b3p.tailormap.api.persistence.json.TMAttributeType; -import nl.b3p.tailormap.api.persistence.json.TMGeometryType; +import org.tailormap.api.persistence.json.TMAttributeType; +import org.tailormap.api.persistence.json.TMGeometryType; public class TMAttributeTypeHelper { public static boolean isGeometry(TMAttributeType attributeType) { diff --git a/src/main/java/nl/b3p/tailormap/api/persistence/helper/TMFeatureTypeHelper.java b/src/main/java/org/tailormap/api/persistence/helper/TMFeatureTypeHelper.java similarity index 93% rename from src/main/java/nl/b3p/tailormap/api/persistence/helper/TMFeatureTypeHelper.java rename to src/main/java/org/tailormap/api/persistence/helper/TMFeatureTypeHelper.java index b6869afc6..fe599af72 100644 --- a/src/main/java/nl/b3p/tailormap/api/persistence/helper/TMFeatureTypeHelper.java +++ b/src/main/java/org/tailormap/api/persistence/helper/TMFeatureTypeHelper.java @@ -4,7 +4,7 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.persistence.helper; +package org.tailormap.api.persistence.helper; import jakarta.validation.constraints.NotNull; import java.util.HashSet; @@ -14,13 +14,13 @@ import java.util.Optional; import java.util.Set; import java.util.stream.Collectors; -import nl.b3p.tailormap.api.persistence.Application; -import nl.b3p.tailormap.api.persistence.TMFeatureType; -import nl.b3p.tailormap.api.persistence.json.AppLayerSettings; -import nl.b3p.tailormap.api.persistence.json.AppTreeLayerNode; -import nl.b3p.tailormap.api.persistence.json.AttributeSettings; -import nl.b3p.tailormap.api.persistence.json.TMAttributeDescriptor; import org.apache.commons.lang3.tuple.Pair; +import org.tailormap.api.persistence.Application; +import org.tailormap.api.persistence.TMFeatureType; +import org.tailormap.api.persistence.json.AppLayerSettings; +import org.tailormap.api.persistence.json.AppTreeLayerNode; +import org.tailormap.api.persistence.json.AttributeSettings; +import org.tailormap.api.persistence.json.TMAttributeDescriptor; public class TMFeatureTypeHelper { public static boolean isEditable( diff --git a/src/main/java/nl/b3p/tailormap/api/persistence/listener/EntityEventPublisher.java b/src/main/java/org/tailormap/api/persistence/listener/EntityEventPublisher.java similarity index 87% rename from src/main/java/nl/b3p/tailormap/api/persistence/listener/EntityEventPublisher.java rename to src/main/java/org/tailormap/api/persistence/listener/EntityEventPublisher.java index 21066f4ab..856ee9a0f 100644 --- a/src/main/java/nl/b3p/tailormap/api/persistence/listener/EntityEventPublisher.java +++ b/src/main/java/org/tailormap/api/persistence/listener/EntityEventPublisher.java @@ -4,12 +4,12 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.persistence.listener; +package org.tailormap.api.persistence.listener; import static ch.rasc.sse.eventbus.SseEvent.DEFAULT_EVENT; -import static nl.b3p.tailormap.api.admin.model.ServerSentEvent.EventTypeEnum.ENTITY_CREATED; -import static nl.b3p.tailormap.api.admin.model.ServerSentEvent.EventTypeEnum.ENTITY_DELETED; -import static nl.b3p.tailormap.api.admin.model.ServerSentEvent.EventTypeEnum.ENTITY_UPDATED; +import static org.tailormap.api.admin.model.ServerSentEvent.EventTypeEnum.ENTITY_CREATED; +import static org.tailormap.api.admin.model.ServerSentEvent.EventTypeEnum.ENTITY_DELETED; +import static org.tailormap.api.admin.model.ServerSentEvent.EventTypeEnum.ENTITY_UPDATED; import ch.rasc.sse.eventbus.SseEvent; import ch.rasc.sse.eventbus.SseEventBus; @@ -19,9 +19,6 @@ import jakarta.persistence.PostRemove; import jakarta.persistence.PostUpdate; import java.lang.invoke.MethodHandles; -import nl.b3p.tailormap.api.admin.model.EntityEvent; -import nl.b3p.tailormap.api.admin.model.ServerSentEvent; -import nl.b3p.tailormap.api.persistence.TMFeatureType; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -29,6 +26,9 @@ import org.springframework.data.rest.webmvc.config.RepositoryRestMvcConfiguration; import org.springframework.stereotype.Component; import org.springframework.web.context.request.RequestContextHolder; +import org.tailormap.api.admin.model.EntityEvent; +import org.tailormap.api.admin.model.ServerSentEvent; +import org.tailormap.api.persistence.TMFeatureType; @Component public class EntityEventPublisher { diff --git a/src/main/java/nl/b3p/tailormap/api/persistence/projections/FormSummary.java b/src/main/java/org/tailormap/api/persistence/projections/FormSummary.java similarity index 77% rename from src/main/java/nl/b3p/tailormap/api/persistence/projections/FormSummary.java rename to src/main/java/org/tailormap/api/persistence/projections/FormSummary.java index 501bb7dc8..d293bae05 100644 --- a/src/main/java/nl/b3p/tailormap/api/persistence/projections/FormSummary.java +++ b/src/main/java/org/tailormap/api/persistence/projections/FormSummary.java @@ -4,10 +4,10 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.persistence.projections; +package org.tailormap.api.persistence.projections; -import nl.b3p.tailormap.api.persistence.Form; import org.springframework.data.rest.core.config.Projection; +import org.tailormap.api.persistence.Form; @Projection( name = "summary", diff --git a/src/main/java/nl/b3p/tailormap/api/persistence/projections/GeoServiceSummary.java b/src/main/java/org/tailormap/api/persistence/projections/GeoServiceSummary.java similarity index 56% rename from src/main/java/nl/b3p/tailormap/api/persistence/projections/GeoServiceSummary.java rename to src/main/java/org/tailormap/api/persistence/projections/GeoServiceSummary.java index a3a0d3af3..f67441009 100644 --- a/src/main/java/nl/b3p/tailormap/api/persistence/projections/GeoServiceSummary.java +++ b/src/main/java/org/tailormap/api/persistence/projections/GeoServiceSummary.java @@ -4,15 +4,15 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.persistence.projections; +package org.tailormap.api.persistence.projections; import java.util.List; -import nl.b3p.tailormap.api.persistence.GeoService; -import nl.b3p.tailormap.api.persistence.json.AuthorizationRule; -import nl.b3p.tailormap.api.persistence.json.GeoServiceLayer; -import nl.b3p.tailormap.api.persistence.json.GeoServiceProtocol; -import nl.b3p.tailormap.api.persistence.json.GeoServiceSettings; import org.springframework.data.rest.core.config.Projection; +import org.tailormap.api.persistence.GeoService; +import org.tailormap.api.persistence.json.AuthorizationRule; +import org.tailormap.api.persistence.json.GeoServiceLayer; +import org.tailormap.api.persistence.json.GeoServiceProtocol; +import org.tailormap.api.persistence.json.GeoServiceSettings; @Projection( name = "summary", diff --git a/src/main/java/nl/b3p/tailormap/api/persistence/projections/GroupName.java b/src/main/java/org/tailormap/api/persistence/projections/GroupName.java similarity index 71% rename from src/main/java/nl/b3p/tailormap/api/persistence/projections/GroupName.java rename to src/main/java/org/tailormap/api/persistence/projections/GroupName.java index ed2ef5ee1..b887bf46f 100644 --- a/src/main/java/nl/b3p/tailormap/api/persistence/projections/GroupName.java +++ b/src/main/java/org/tailormap/api/persistence/projections/GroupName.java @@ -3,10 +3,10 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.persistence.projections; +package org.tailormap.api.persistence.projections; -import nl.b3p.tailormap.api.persistence.Group; import org.springframework.data.rest.core.config.Projection; +import org.tailormap.api.persistence.Group; @Projection( name = "groupName", diff --git a/src/main/java/nl/b3p/tailormap/api/persistence/projections/TMFeatureSourceSummary.java b/src/main/java/org/tailormap/api/persistence/projections/TMFeatureSourceSummary.java similarity index 79% rename from src/main/java/nl/b3p/tailormap/api/persistence/projections/TMFeatureSourceSummary.java rename to src/main/java/org/tailormap/api/persistence/projections/TMFeatureSourceSummary.java index 6a68e2339..eefb9d4b9 100644 --- a/src/main/java/nl/b3p/tailormap/api/persistence/projections/TMFeatureSourceSummary.java +++ b/src/main/java/org/tailormap/api/persistence/projections/TMFeatureSourceSummary.java @@ -4,14 +4,14 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.persistence.projections; +package org.tailormap.api.persistence.projections; import com.fasterxml.jackson.annotation.JsonIgnore; import java.util.List; -import nl.b3p.tailormap.api.persistence.TMFeatureSource; -import nl.b3p.tailormap.api.persistence.json.JDBCConnectionProperties; -import nl.b3p.tailormap.api.persistence.json.TMAttributeDescriptor; import org.springframework.data.rest.core.config.Projection; +import org.tailormap.api.persistence.TMFeatureSource; +import org.tailormap.api.persistence.json.JDBCConnectionProperties; +import org.tailormap.api.persistence.json.TMAttributeDescriptor; @Projection( name = "summary", diff --git a/src/main/java/nl/b3p/tailormap/api/persistence/projections/UploadSummary.java b/src/main/java/org/tailormap/api/persistence/projections/UploadSummary.java similarity index 83% rename from src/main/java/nl/b3p/tailormap/api/persistence/projections/UploadSummary.java rename to src/main/java/org/tailormap/api/persistence/projections/UploadSummary.java index e90657f58..2058477b2 100644 --- a/src/main/java/nl/b3p/tailormap/api/persistence/projections/UploadSummary.java +++ b/src/main/java/org/tailormap/api/persistence/projections/UploadSummary.java @@ -4,11 +4,11 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.persistence.projections; +package org.tailormap.api.persistence.projections; import java.time.OffsetDateTime; -import nl.b3p.tailormap.api.persistence.Upload; import org.springframework.data.rest.core.config.Projection; +import org.tailormap.api.persistence.Upload; @Projection( name = "summary", diff --git a/src/main/java/nl/b3p/tailormap/api/persistence/projections/UserGroups.java b/src/main/java/org/tailormap/api/persistence/projections/UserGroups.java similarity index 81% rename from src/main/java/nl/b3p/tailormap/api/persistence/projections/UserGroups.java rename to src/main/java/org/tailormap/api/persistence/projections/UserGroups.java index 1ee600cb6..406a2187a 100644 --- a/src/main/java/nl/b3p/tailormap/api/persistence/projections/UserGroups.java +++ b/src/main/java/org/tailormap/api/persistence/projections/UserGroups.java @@ -3,14 +3,14 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.persistence.projections; +package org.tailormap.api.persistence.projections; import com.fasterxml.jackson.databind.JsonNode; import java.time.ZonedDateTime; import java.util.Set; -import nl.b3p.tailormap.api.persistence.Group; -import nl.b3p.tailormap.api.persistence.User; import org.springframework.data.rest.core.config.Projection; +import org.tailormap.api.persistence.Group; +import org.tailormap.api.persistence.User; /** Projection for {@link User} that includes the groups (but only the group name). */ @Projection( diff --git a/src/main/java/nl/b3p/tailormap/api/repository/ApplicationRepository.java b/src/main/java/org/tailormap/api/repository/ApplicationRepository.java similarity index 77% rename from src/main/java/nl/b3p/tailormap/api/repository/ApplicationRepository.java rename to src/main/java/org/tailormap/api/repository/ApplicationRepository.java index 01b4b13b2..7fe9fc88e 100644 --- a/src/main/java/nl/b3p/tailormap/api/repository/ApplicationRepository.java +++ b/src/main/java/org/tailormap/api/repository/ApplicationRepository.java @@ -3,14 +3,14 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.repository; +package org.tailormap.api.repository; import java.util.Optional; -import nl.b3p.tailormap.api.persistence.Application; -import nl.b3p.tailormap.api.security.annotation.PreAuthorizeAdmin; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.lang.NonNull; import org.springframework.security.access.prepost.PreAuthorize; +import org.tailormap.api.persistence.Application; +import org.tailormap.api.security.annotation.PreAuthorizeAdmin; @PreAuthorizeAdmin public interface ApplicationRepository extends JpaRepository { diff --git a/src/main/java/nl/b3p/tailormap/api/repository/CatalogRepository.java b/src/main/java/org/tailormap/api/repository/CatalogRepository.java similarity index 60% rename from src/main/java/nl/b3p/tailormap/api/repository/CatalogRepository.java rename to src/main/java/org/tailormap/api/repository/CatalogRepository.java index 641dff39b..e45ec4cf8 100644 --- a/src/main/java/nl/b3p/tailormap/api/repository/CatalogRepository.java +++ b/src/main/java/org/tailormap/api/repository/CatalogRepository.java @@ -3,11 +3,11 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.repository; +package org.tailormap.api.repository; -import nl.b3p.tailormap.api.persistence.Catalog; -import nl.b3p.tailormap.api.security.annotation.PreAuthorizeAdmin; import org.springframework.data.jpa.repository.JpaRepository; +import org.tailormap.api.persistence.Catalog; +import org.tailormap.api.security.annotation.PreAuthorizeAdmin; @PreAuthorizeAdmin public interface CatalogRepository extends JpaRepository {} diff --git a/src/main/java/nl/b3p/tailormap/api/repository/ConfigurationRepository.java b/src/main/java/org/tailormap/api/repository/ConfigurationRepository.java similarity index 88% rename from src/main/java/nl/b3p/tailormap/api/repository/ConfigurationRepository.java rename to src/main/java/org/tailormap/api/repository/ConfigurationRepository.java index 2efba3802..606413f07 100644 --- a/src/main/java/nl/b3p/tailormap/api/repository/ConfigurationRepository.java +++ b/src/main/java/org/tailormap/api/repository/ConfigurationRepository.java @@ -3,16 +3,16 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.repository; +package org.tailormap.api.repository; import java.util.Optional; -import nl.b3p.tailormap.api.persistence.Configuration; -import nl.b3p.tailormap.api.security.annotation.PreAuthorizeAdmin; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; import org.springframework.data.rest.core.annotation.RepositoryRestResource; import org.springframework.security.access.prepost.PreAuthorize; +import org.tailormap.api.persistence.Configuration; +import org.tailormap.api.security.annotation.PreAuthorizeAdmin; @PreAuthorizeAdmin @RepositoryRestResource( diff --git a/src/main/java/nl/b3p/tailormap/api/repository/FeatureSourceRepository.java b/src/main/java/org/tailormap/api/repository/FeatureSourceRepository.java similarity index 90% rename from src/main/java/nl/b3p/tailormap/api/repository/FeatureSourceRepository.java rename to src/main/java/org/tailormap/api/repository/FeatureSourceRepository.java index 4d1d56298..76dd67c46 100644 --- a/src/main/java/nl/b3p/tailormap/api/repository/FeatureSourceRepository.java +++ b/src/main/java/org/tailormap/api/repository/FeatureSourceRepository.java @@ -4,18 +4,18 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.repository; +package org.tailormap.api.repository; import java.util.List; import java.util.Optional; -import nl.b3p.tailormap.api.persistence.TMFeatureSource; -import nl.b3p.tailormap.api.security.annotation.PreAuthorizeAdmin; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; import org.springframework.data.rest.core.annotation.RepositoryRestResource; import org.springframework.lang.NonNull; import org.springframework.security.access.prepost.PreAuthorize; +import org.tailormap.api.persistence.TMFeatureSource; +import org.tailormap.api.security.annotation.PreAuthorizeAdmin; @PreAuthorizeAdmin @RepositoryRestResource( diff --git a/src/main/java/nl/b3p/tailormap/api/repository/FeatureTypeRepository.java b/src/main/java/org/tailormap/api/repository/FeatureTypeRepository.java similarity index 82% rename from src/main/java/nl/b3p/tailormap/api/repository/FeatureTypeRepository.java rename to src/main/java/org/tailormap/api/repository/FeatureTypeRepository.java index 6790e4dbe..1a425785a 100644 --- a/src/main/java/nl/b3p/tailormap/api/repository/FeatureTypeRepository.java +++ b/src/main/java/org/tailormap/api/repository/FeatureTypeRepository.java @@ -3,11 +3,11 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.repository; +package org.tailormap.api.repository; -import nl.b3p.tailormap.api.persistence.TMFeatureType; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.rest.core.annotation.RepositoryRestResource; +import org.tailormap.api.persistence.TMFeatureType; @RepositoryRestResource( path = "feature-types", diff --git a/src/main/java/nl/b3p/tailormap/api/repository/FormRepository.java b/src/main/java/org/tailormap/api/repository/FormRepository.java similarity index 81% rename from src/main/java/nl/b3p/tailormap/api/repository/FormRepository.java rename to src/main/java/org/tailormap/api/repository/FormRepository.java index c44925033..9fc8f19b0 100644 --- a/src/main/java/nl/b3p/tailormap/api/repository/FormRepository.java +++ b/src/main/java/org/tailormap/api/repository/FormRepository.java @@ -4,11 +4,11 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.repository; +package org.tailormap.api.repository; -import nl.b3p.tailormap.api.persistence.Form; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.rest.core.annotation.RepositoryRestResource; +import org.tailormap.api.persistence.Form; @RepositoryRestResource(path = "forms", collectionResourceRel = "forms", itemResourceRel = "form") public interface FormRepository extends JpaRepository {} diff --git a/src/main/java/nl/b3p/tailormap/api/repository/GeoServiceRepository.java b/src/main/java/org/tailormap/api/repository/GeoServiceRepository.java similarity index 91% rename from src/main/java/nl/b3p/tailormap/api/repository/GeoServiceRepository.java rename to src/main/java/org/tailormap/api/repository/GeoServiceRepository.java index 27bc961f2..6a33806d0 100644 --- a/src/main/java/nl/b3p/tailormap/api/repository/GeoServiceRepository.java +++ b/src/main/java/org/tailormap/api/repository/GeoServiceRepository.java @@ -3,18 +3,18 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.repository; +package org.tailormap.api.repository; import java.util.List; import java.util.Optional; -import nl.b3p.tailormap.api.persistence.GeoService; -import nl.b3p.tailormap.api.security.annotation.PreAuthorizeAdmin; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; import org.springframework.data.rest.core.annotation.RepositoryRestResource; import org.springframework.lang.NonNull; import org.springframework.security.access.prepost.PreAuthorize; +import org.tailormap.api.persistence.GeoService; +import org.tailormap.api.security.annotation.PreAuthorizeAdmin; @PreAuthorizeAdmin @RepositoryRestResource( diff --git a/src/main/java/nl/b3p/tailormap/api/repository/GroupRepository.java b/src/main/java/org/tailormap/api/repository/GroupRepository.java similarity index 78% rename from src/main/java/nl/b3p/tailormap/api/repository/GroupRepository.java rename to src/main/java/org/tailormap/api/repository/GroupRepository.java index c54c5cd00..b7d98db5d 100644 --- a/src/main/java/nl/b3p/tailormap/api/repository/GroupRepository.java +++ b/src/main/java/org/tailormap/api/repository/GroupRepository.java @@ -3,11 +3,11 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.repository; +package org.tailormap.api.repository; -import nl.b3p.tailormap.api.persistence.Group; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.rest.core.annotation.RepositoryRestResource; +import org.tailormap.api.persistence.Group; @RepositoryRestResource() public interface GroupRepository extends JpaRepository {} diff --git a/src/main/java/nl/b3p/tailormap/api/repository/OIDCConfigurationRepository.java b/src/main/java/org/tailormap/api/repository/OIDCConfigurationRepository.java similarity index 82% rename from src/main/java/nl/b3p/tailormap/api/repository/OIDCConfigurationRepository.java rename to src/main/java/org/tailormap/api/repository/OIDCConfigurationRepository.java index e4b1bd5b5..ad362ac1d 100644 --- a/src/main/java/nl/b3p/tailormap/api/repository/OIDCConfigurationRepository.java +++ b/src/main/java/org/tailormap/api/repository/OIDCConfigurationRepository.java @@ -3,11 +3,11 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.repository; +package org.tailormap.api.repository; -import nl.b3p.tailormap.api.persistence.OIDCConfiguration; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.rest.core.annotation.RepositoryRestResource; +import org.tailormap.api.persistence.OIDCConfiguration; @RepositoryRestResource( path = "oidc-configurations", diff --git a/src/main/java/nl/b3p/tailormap/api/repository/SearchIndexRepository.java b/src/main/java/org/tailormap/api/repository/SearchIndexRepository.java similarity index 84% rename from src/main/java/nl/b3p/tailormap/api/repository/SearchIndexRepository.java rename to src/main/java/org/tailormap/api/repository/SearchIndexRepository.java index 1ab818477..3337cae9a 100644 --- a/src/main/java/nl/b3p/tailormap/api/repository/SearchIndexRepository.java +++ b/src/main/java/org/tailormap/api/repository/SearchIndexRepository.java @@ -3,12 +3,12 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.repository; +package org.tailormap.api.repository; import java.util.List; -import nl.b3p.tailormap.api.persistence.SearchIndex; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.rest.core.annotation.RepositoryRestResource; +import org.tailormap.api.persistence.SearchIndex; @RepositoryRestResource( path = "search-indexes", diff --git a/src/main/java/nl/b3p/tailormap/api/repository/UploadRepository.java b/src/main/java/org/tailormap/api/repository/UploadRepository.java similarity index 92% rename from src/main/java/nl/b3p/tailormap/api/repository/UploadRepository.java rename to src/main/java/org/tailormap/api/repository/UploadRepository.java index 3e0973506..58652f17b 100644 --- a/src/main/java/nl/b3p/tailormap/api/repository/UploadRepository.java +++ b/src/main/java/org/tailormap/api/repository/UploadRepository.java @@ -4,18 +4,18 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.repository; +package org.tailormap.api.repository; import java.time.OffsetDateTime; import java.util.List; import java.util.Optional; import java.util.UUID; -import nl.b3p.tailormap.api.persistence.Upload; import org.springframework.data.jpa.repository.EntityGraph; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.lang.NonNull; import org.springframework.security.access.prepost.PreAuthorize; +import org.tailormap.api.persistence.Upload; public interface UploadRepository extends JpaRepository { @PreAuthorize("permitAll()") diff --git a/src/main/java/nl/b3p/tailormap/api/repository/UserRepository.java b/src/main/java/org/tailormap/api/repository/UserRepository.java similarity index 83% rename from src/main/java/nl/b3p/tailormap/api/repository/UserRepository.java rename to src/main/java/org/tailormap/api/repository/UserRepository.java index baab86ca0..6ee3b5bd5 100644 --- a/src/main/java/nl/b3p/tailormap/api/repository/UserRepository.java +++ b/src/main/java/org/tailormap/api/repository/UserRepository.java @@ -3,17 +3,17 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.repository; +package org.tailormap.api.repository; import java.util.Collection; import java.util.Optional; -import nl.b3p.tailormap.api.persistence.User; -import nl.b3p.tailormap.api.security.annotation.PreAuthorizeAdmin; import org.springframework.data.jpa.repository.EntityGraph; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.rest.core.annotation.RepositoryRestResource; import org.springframework.lang.NonNull; import org.springframework.security.access.prepost.PreAuthorize; +import org.tailormap.api.persistence.User; +import org.tailormap.api.security.annotation.PreAuthorizeAdmin; @PreAuthorizeAdmin @RepositoryRestResource() diff --git a/src/main/java/nl/b3p/tailormap/api/repository/events/OIDCConfigurationEventHandler.java b/src/main/java/org/tailormap/api/repository/events/OIDCConfigurationEventHandler.java similarity index 90% rename from src/main/java/nl/b3p/tailormap/api/repository/events/OIDCConfigurationEventHandler.java rename to src/main/java/org/tailormap/api/repository/events/OIDCConfigurationEventHandler.java index 6c0ff0f3a..edcc34c9a 100644 --- a/src/main/java/nl/b3p/tailormap/api/repository/events/OIDCConfigurationEventHandler.java +++ b/src/main/java/org/tailormap/api/repository/events/OIDCConfigurationEventHandler.java @@ -3,10 +3,8 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.repository.events; +package org.tailormap.api.repository.events; -import nl.b3p.tailormap.api.persistence.OIDCConfiguration; -import nl.b3p.tailormap.api.security.OIDCRepository; import org.springframework.data.rest.core.annotation.HandleAfterCreate; import org.springframework.data.rest.core.annotation.HandleAfterDelete; import org.springframework.data.rest.core.annotation.HandleAfterSave; @@ -14,6 +12,8 @@ import org.springframework.data.rest.core.annotation.HandleBeforeSave; import org.springframework.data.rest.core.annotation.RepositoryEventHandler; import org.springframework.stereotype.Component; +import org.tailormap.api.persistence.OIDCConfiguration; +import org.tailormap.api.security.OIDCRepository; @RepositoryEventHandler @Component diff --git a/src/main/java/nl/b3p/tailormap/api/repository/validation/ApplicationValidator.java b/src/main/java/org/tailormap/api/repository/validation/ApplicationValidator.java similarity index 86% rename from src/main/java/nl/b3p/tailormap/api/repository/validation/ApplicationValidator.java rename to src/main/java/org/tailormap/api/repository/validation/ApplicationValidator.java index f254d22a7..a25998f2f 100644 --- a/src/main/java/nl/b3p/tailormap/api/repository/validation/ApplicationValidator.java +++ b/src/main/java/org/tailormap/api/repository/validation/ApplicationValidator.java @@ -4,14 +4,14 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.repository.validation; +package org.tailormap.api.repository.validation; -import nl.b3p.tailormap.api.persistence.Application; -import nl.b3p.tailormap.api.repository.ApplicationRepository; import org.springframework.lang.NonNull; import org.springframework.stereotype.Component; import org.springframework.validation.Errors; import org.springframework.validation.Validator; +import org.tailormap.api.persistence.Application; +import org.tailormap.api.repository.ApplicationRepository; @Component public class ApplicationValidator implements Validator { diff --git a/src/main/java/nl/b3p/tailormap/api/repository/validation/FeatureSourceValidator.java b/src/main/java/org/tailormap/api/repository/validation/FeatureSourceValidator.java similarity index 91% rename from src/main/java/nl/b3p/tailormap/api/repository/validation/FeatureSourceValidator.java rename to src/main/java/org/tailormap/api/repository/validation/FeatureSourceValidator.java index dc135a373..d5db48ba0 100644 --- a/src/main/java/nl/b3p/tailormap/api/repository/validation/FeatureSourceValidator.java +++ b/src/main/java/org/tailormap/api/repository/validation/FeatureSourceValidator.java @@ -4,17 +4,14 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.repository.validation; +package org.tailormap.api.repository.validation; -import static nl.b3p.tailormap.api.util.TMExceptionUtils.joinAllThrowableMessages; +import static org.tailormap.api.util.TMExceptionUtils.joinAllThrowableMessages; import java.lang.invoke.MethodHandles; import java.net.URI; import java.net.URL; import java.net.UnknownHostException; -import nl.b3p.tailormap.api.geotools.featuresources.JDBCFeatureSourceHelper; -import nl.b3p.tailormap.api.geotools.featuresources.WFSFeatureSourceHelper; -import nl.b3p.tailormap.api.persistence.TMFeatureSource; import org.apache.commons.lang3.exception.ExceptionUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -23,6 +20,9 @@ import org.springframework.validation.Errors; import org.springframework.validation.ValidationUtils; import org.springframework.validation.Validator; +import org.tailormap.api.geotools.featuresources.JDBCFeatureSourceHelper; +import org.tailormap.api.geotools.featuresources.WFSFeatureSourceHelper; +import org.tailormap.api.persistence.TMFeatureSource; @Component public class FeatureSourceValidator implements Validator { diff --git a/src/main/java/nl/b3p/tailormap/api/repository/validation/GeoServiceValidator.java b/src/main/java/org/tailormap/api/repository/validation/GeoServiceValidator.java similarity index 89% rename from src/main/java/nl/b3p/tailormap/api/repository/validation/GeoServiceValidator.java rename to src/main/java/org/tailormap/api/repository/validation/GeoServiceValidator.java index 6383a2a90..72945a707 100644 --- a/src/main/java/nl/b3p/tailormap/api/repository/validation/GeoServiceValidator.java +++ b/src/main/java/org/tailormap/api/repository/validation/GeoServiceValidator.java @@ -4,23 +4,23 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.repository.validation; +package org.tailormap.api.repository.validation; -import static nl.b3p.tailormap.api.persistence.json.GeoServiceProtocol.XYZ; -import static nl.b3p.tailormap.api.util.TMExceptionUtils.joinAllThrowableMessages; +import static org.tailormap.api.persistence.json.GeoServiceProtocol.XYZ; +import static org.tailormap.api.util.TMExceptionUtils.joinAllThrowableMessages; import java.lang.invoke.MethodHandles; import java.net.URI; import java.net.URL; import java.net.UnknownHostException; -import nl.b3p.tailormap.api.persistence.GeoService; -import nl.b3p.tailormap.api.persistence.helper.GeoServiceHelper; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.lang.NonNull; import org.springframework.stereotype.Component; import org.springframework.validation.Errors; import org.springframework.validation.Validator; +import org.tailormap.api.persistence.GeoService; +import org.tailormap.api.persistence.helper.GeoServiceHelper; @Component public class GeoServiceValidator implements Validator { diff --git a/src/main/java/nl/b3p/tailormap/api/repository/validation/ValidationConfiguration.java b/src/main/java/org/tailormap/api/repository/validation/ValidationConfiguration.java similarity index 97% rename from src/main/java/nl/b3p/tailormap/api/repository/validation/ValidationConfiguration.java rename to src/main/java/org/tailormap/api/repository/validation/ValidationConfiguration.java index 149a5d0ce..969136d69 100644 --- a/src/main/java/nl/b3p/tailormap/api/repository/validation/ValidationConfiguration.java +++ b/src/main/java/org/tailormap/api/repository/validation/ValidationConfiguration.java @@ -4,7 +4,7 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.repository.validation; +package org.tailormap.api.repository.validation; import org.springframework.context.annotation.Configuration; import org.springframework.data.rest.core.event.ValidatingRepositoryEventListener; diff --git a/src/main/java/nl/b3p/tailormap/api/security/ActuatorSecurityConfiguration.java b/src/main/java/org/tailormap/api/security/ActuatorSecurityConfiguration.java similarity index 94% rename from src/main/java/nl/b3p/tailormap/api/security/ActuatorSecurityConfiguration.java rename to src/main/java/org/tailormap/api/security/ActuatorSecurityConfiguration.java index b37d885b1..c9b9cf9f9 100644 --- a/src/main/java/nl/b3p/tailormap/api/security/ActuatorSecurityConfiguration.java +++ b/src/main/java/org/tailormap/api/security/ActuatorSecurityConfiguration.java @@ -4,13 +4,9 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.security; +package org.tailormap.api.security; import java.lang.invoke.MethodHandles; -import nl.b3p.tailormap.api.persistence.Group; -import nl.b3p.tailormap.api.persistence.User; -import nl.b3p.tailormap.api.repository.GroupRepository; -import nl.b3p.tailormap.api.repository.UserRepository; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -27,6 +23,10 @@ import org.springframework.security.web.authentication.AnonymousAuthenticationFilter; import org.springframework.security.web.csrf.CookieCsrfTokenRepository; import org.springframework.transaction.annotation.Transactional; +import org.tailormap.api.persistence.Group; +import org.tailormap.api.persistence.User; +import org.tailormap.api.repository.GroupRepository; +import org.tailormap.api.repository.UserRepository; @Configuration @Order(1) diff --git a/src/main/java/nl/b3p/tailormap/api/security/AdminAccountCreator.java b/src/main/java/org/tailormap/api/security/AdminAccountCreator.java similarity index 94% rename from src/main/java/nl/b3p/tailormap/api/security/AdminAccountCreator.java rename to src/main/java/org/tailormap/api/security/AdminAccountCreator.java index cd44ec84b..d65c185df 100644 --- a/src/main/java/nl/b3p/tailormap/api/security/AdminAccountCreator.java +++ b/src/main/java/org/tailormap/api/security/AdminAccountCreator.java @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.security; +package org.tailormap.api.security; import static org.apache.commons.lang3.StringUtils.isNotBlank; @@ -13,10 +13,6 @@ import java.util.List; import java.util.Map; import java.util.UUID; -import nl.b3p.tailormap.api.persistence.Group; -import nl.b3p.tailormap.api.persistence.User; -import nl.b3p.tailormap.api.repository.GroupRepository; -import nl.b3p.tailormap.api.repository.UserRepository; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Value; @@ -33,6 +29,10 @@ import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.StreamUtils; +import org.tailormap.api.persistence.Group; +import org.tailormap.api.persistence.User; +import org.tailormap.api.repository.GroupRepository; +import org.tailormap.api.repository.UserRepository; @Configuration @ConditionalOnProperty( diff --git a/src/main/java/nl/b3p/tailormap/api/security/ApiSecurityConfiguration.java b/src/main/java/org/tailormap/api/security/ApiSecurityConfiguration.java similarity index 97% rename from src/main/java/nl/b3p/tailormap/api/security/ApiSecurityConfiguration.java rename to src/main/java/org/tailormap/api/security/ApiSecurityConfiguration.java index f711b95cf..cb230c55c 100644 --- a/src/main/java/nl/b3p/tailormap/api/security/ApiSecurityConfiguration.java +++ b/src/main/java/org/tailormap/api/security/ApiSecurityConfiguration.java @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.security; +package org.tailormap.api.security; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; @@ -12,9 +12,6 @@ import java.util.HashSet; import java.util.List; import java.util.Set; -import nl.b3p.tailormap.api.persistence.Group; -import nl.b3p.tailormap.api.repository.GroupRepository; -import nl.b3p.tailormap.api.repository.OIDCConfigurationRepository; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.web.server.Cookie; import org.springframework.context.annotation.Bean; @@ -37,6 +34,9 @@ import org.springframework.security.web.authentication.www.BasicAuthenticationFilter; import org.springframework.security.web.csrf.CookieCsrfTokenRepository; import org.springframework.security.web.csrf.CsrfTokenRequestAttributeHandler; +import org.tailormap.api.persistence.Group; +import org.tailormap.api.repository.GroupRepository; +import org.tailormap.api.repository.OIDCConfigurationRepository; @Configuration @EnableWebSecurity diff --git a/src/main/java/nl/b3p/tailormap/api/security/AuditInterceptor.java b/src/main/java/org/tailormap/api/security/AuditInterceptor.java similarity index 97% rename from src/main/java/nl/b3p/tailormap/api/security/AuditInterceptor.java rename to src/main/java/org/tailormap/api/security/AuditInterceptor.java index bfdcf89e8..9e2671ee2 100644 --- a/src/main/java/nl/b3p/tailormap/api/security/AuditInterceptor.java +++ b/src/main/java/org/tailormap/api/security/AuditInterceptor.java @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.security; +package org.tailormap.api.security; import jakarta.servlet.FilterChain; import jakarta.servlet.ServletException; diff --git a/src/main/java/nl/b3p/tailormap/api/security/AuthorizationService.java b/src/main/java/org/tailormap/api/security/AuthorizationService.java similarity index 91% rename from src/main/java/nl/b3p/tailormap/api/security/AuthorizationService.java rename to src/main/java/org/tailormap/api/security/AuthorizationService.java index c35bc15e6..b8e501df6 100644 --- a/src/main/java/nl/b3p/tailormap/api/security/AuthorizationService.java +++ b/src/main/java/org/tailormap/api/security/AuthorizationService.java @@ -3,24 +3,24 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.security; +package org.tailormap.api.security; import java.util.HashSet; import java.util.List; import java.util.Optional; import java.util.Set; -import nl.b3p.tailormap.api.persistence.Application; -import nl.b3p.tailormap.api.persistence.GeoService; -import nl.b3p.tailormap.api.persistence.Group; -import nl.b3p.tailormap.api.persistence.json.AuthorizationRule; -import nl.b3p.tailormap.api.persistence.json.AuthorizationRuleDecision; -import nl.b3p.tailormap.api.persistence.json.GeoServiceLayer; -import nl.b3p.tailormap.api.persistence.json.GeoServiceLayerSettings; import org.springframework.security.authentication.AnonymousAuthenticationToken; import org.springframework.security.core.Authentication; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.stereotype.Service; +import org.tailormap.api.persistence.Application; +import org.tailormap.api.persistence.GeoService; +import org.tailormap.api.persistence.Group; +import org.tailormap.api.persistence.json.AuthorizationRule; +import org.tailormap.api.persistence.json.AuthorizationRuleDecision; +import org.tailormap.api.persistence.json.GeoServiceLayer; +import org.tailormap.api.persistence.json.GeoServiceLayerSettings; /** * Validates access control rules. Any call to mayUserRead will verify that the currently logged in diff --git a/src/main/java/nl/b3p/tailormap/api/security/CsrfCookieFilter.java b/src/main/java/org/tailormap/api/security/CsrfCookieFilter.java similarity index 96% rename from src/main/java/nl/b3p/tailormap/api/security/CsrfCookieFilter.java rename to src/main/java/org/tailormap/api/security/CsrfCookieFilter.java index ef1eea3e4..6c3152039 100644 --- a/src/main/java/nl/b3p/tailormap/api/security/CsrfCookieFilter.java +++ b/src/main/java/org/tailormap/api/security/CsrfCookieFilter.java @@ -4,7 +4,7 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.security; +package org.tailormap.api.security; import jakarta.servlet.FilterChain; import jakarta.servlet.ServletException; diff --git a/src/main/java/nl/b3p/tailormap/api/security/InternalAdminAuthentication.java b/src/main/java/org/tailormap/api/security/InternalAdminAuthentication.java similarity index 95% rename from src/main/java/nl/b3p/tailormap/api/security/InternalAdminAuthentication.java rename to src/main/java/org/tailormap/api/security/InternalAdminAuthentication.java index e0b346571..252f45808 100644 --- a/src/main/java/nl/b3p/tailormap/api/security/InternalAdminAuthentication.java +++ b/src/main/java/org/tailormap/api/security/InternalAdminAuthentication.java @@ -4,16 +4,16 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.security; +package org.tailormap.api.security; import java.util.Collection; import java.util.List; -import nl.b3p.tailormap.api.persistence.Group; import org.springframework.security.core.Authentication; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.security.core.context.SecurityContext; import org.springframework.security.core.context.SecurityContextHolder; +import org.tailormap.api.persistence.Group; public class InternalAdminAuthentication implements Authentication { public static final InternalAdminAuthentication INSTANCE = new InternalAdminAuthentication(); diff --git a/src/main/java/nl/b3p/tailormap/api/security/InvalidPasswordException.java b/src/main/java/org/tailormap/api/security/InvalidPasswordException.java similarity index 95% rename from src/main/java/nl/b3p/tailormap/api/security/InvalidPasswordException.java rename to src/main/java/org/tailormap/api/security/InvalidPasswordException.java index 877503c29..58958b633 100644 --- a/src/main/java/nl/b3p/tailormap/api/security/InvalidPasswordException.java +++ b/src/main/java/org/tailormap/api/security/InvalidPasswordException.java @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.security; +package org.tailormap.api.security; import com.fasterxml.jackson.core.JsonLocation; import com.fasterxml.jackson.databind.JsonMappingException; diff --git a/src/main/java/nl/b3p/tailormap/api/security/OIDCRepository.java b/src/main/java/org/tailormap/api/security/OIDCRepository.java similarity index 97% rename from src/main/java/nl/b3p/tailormap/api/security/OIDCRepository.java rename to src/main/java/org/tailormap/api/security/OIDCRepository.java index e6c67163b..0b2fdf0ea 100644 --- a/src/main/java/nl/b3p/tailormap/api/security/OIDCRepository.java +++ b/src/main/java/org/tailormap/api/security/OIDCRepository.java @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.security; +package org.tailormap.api.security; import static org.apache.commons.lang3.StringUtils.isNotBlank; @@ -18,8 +18,6 @@ import java.util.HashMap; import java.util.Iterator; import java.util.Map; -import nl.b3p.tailormap.api.persistence.OIDCConfiguration; -import nl.b3p.tailormap.api.repository.OIDCConfigurationRepository; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Value; @@ -27,6 +25,8 @@ import org.springframework.security.oauth2.client.registration.ClientRegistrationRepository; import org.springframework.security.oauth2.core.AuthorizationGrantType; import org.springframework.security.oauth2.core.ClientAuthenticationMethod; +import org.tailormap.api.persistence.OIDCConfiguration; +import org.tailormap.api.repository.OIDCConfigurationRepository; public class OIDCRepository implements ClientRegistrationRepository, Iterable { public static class OIDCRegistrationMetadata { diff --git a/src/main/java/nl/b3p/tailormap/api/security/TailormapUserDetails.java b/src/main/java/org/tailormap/api/security/TailormapUserDetails.java similarity index 91% rename from src/main/java/nl/b3p/tailormap/api/security/TailormapUserDetails.java rename to src/main/java/org/tailormap/api/security/TailormapUserDetails.java index 3b073ec11..e7854fe9d 100644 --- a/src/main/java/nl/b3p/tailormap/api/security/TailormapUserDetails.java +++ b/src/main/java/org/tailormap/api/security/TailormapUserDetails.java @@ -3,17 +3,17 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.security; +package org.tailormap.api.security; import java.time.ZoneId; import java.time.ZonedDateTime; import java.util.Collection; import java.util.stream.Collectors; -import nl.b3p.tailormap.api.persistence.Group; -import nl.b3p.tailormap.api.persistence.User; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.security.core.userdetails.UserDetails; +import org.tailormap.api.persistence.Group; +import org.tailormap.api.persistence.User; public class TailormapUserDetails implements UserDetails { diff --git a/src/main/java/nl/b3p/tailormap/api/security/TailormapUserDetailsService.java b/src/main/java/org/tailormap/api/security/TailormapUserDetailsService.java similarity index 90% rename from src/main/java/nl/b3p/tailormap/api/security/TailormapUserDetailsService.java rename to src/main/java/org/tailormap/api/security/TailormapUserDetailsService.java index f117b86ce..61c398f11 100644 --- a/src/main/java/nl/b3p/tailormap/api/security/TailormapUserDetailsService.java +++ b/src/main/java/org/tailormap/api/security/TailormapUserDetailsService.java @@ -3,17 +3,17 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.security; +package org.tailormap.api.security; import java.lang.invoke.MethodHandles; -import nl.b3p.tailormap.api.persistence.User; -import nl.b3p.tailormap.api.repository.UserRepository; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.core.userdetails.UsernameNotFoundException; import org.springframework.stereotype.Service; +import org.tailormap.api.persistence.User; +import org.tailormap.api.repository.UserRepository; @Service public class TailormapUserDetailsService implements UserDetailsService { diff --git a/src/main/java/nl/b3p/tailormap/api/security/annotation/PreAuthorizeAdmin.java b/src/main/java/org/tailormap/api/security/annotation/PreAuthorizeAdmin.java similarity index 83% rename from src/main/java/nl/b3p/tailormap/api/security/annotation/PreAuthorizeAdmin.java rename to src/main/java/org/tailormap/api/security/annotation/PreAuthorizeAdmin.java index 824d72b1a..ea841a095 100644 --- a/src/main/java/nl/b3p/tailormap/api/security/annotation/PreAuthorizeAdmin.java +++ b/src/main/java/org/tailormap/api/security/annotation/PreAuthorizeAdmin.java @@ -4,14 +4,14 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.security.annotation; +package org.tailormap.api.security.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import nl.b3p.tailormap.api.persistence.Group; import org.springframework.security.access.prepost.PreAuthorize; +import org.tailormap.api.persistence.Group; @Target({ElementType.TYPE, ElementType.METHOD}) @Retention(RetentionPolicy.RUNTIME) diff --git a/src/main/java/nl/b3p/tailormap/api/solr/FeatureIndexingDocument.java b/src/main/java/org/tailormap/api/solr/FeatureIndexingDocument.java similarity index 93% rename from src/main/java/nl/b3p/tailormap/api/solr/FeatureIndexingDocument.java rename to src/main/java/org/tailormap/api/solr/FeatureIndexingDocument.java index 636c30b83..4030c190e 100644 --- a/src/main/java/nl/b3p/tailormap/api/solr/FeatureIndexingDocument.java +++ b/src/main/java/org/tailormap/api/solr/FeatureIndexingDocument.java @@ -3,10 +3,10 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.solr; +package org.tailormap.api.solr; -import nl.b3p.tailormap.api.util.Constants; import org.apache.solr.client.solrj.beans.Field; +import org.tailormap.api.util.Constants; public class FeatureIndexingDocument implements Constants { @Field(value = ID) diff --git a/src/main/java/nl/b3p/tailormap/api/solr/SolrHelper.java b/src/main/java/org/tailormap/api/solr/SolrHelper.java similarity index 97% rename from src/main/java/nl/b3p/tailormap/api/solr/SolrHelper.java rename to src/main/java/org/tailormap/api/solr/SolrHelper.java index d9c64a34f..98c09611b 100644 --- a/src/main/java/nl/b3p/tailormap/api/solr/SolrHelper.java +++ b/src/main/java/org/tailormap/api/solr/SolrHelper.java @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.solr; +package org.tailormap.api.solr; import jakarta.validation.constraints.NotNull; import java.io.IOException; @@ -16,13 +16,6 @@ import java.util.List; import java.util.Map; import java.util.Set; -import nl.b3p.tailormap.api.geotools.featuresources.FeatureSourceFactoryHelper; -import nl.b3p.tailormap.api.geotools.processing.GeometryProcessor; -import nl.b3p.tailormap.api.persistence.SearchIndex; -import nl.b3p.tailormap.api.persistence.TMFeatureType; -import nl.b3p.tailormap.api.util.Constants; -import nl.b3p.tailormap.api.viewer.model.SearchDocument; -import nl.b3p.tailormap.api.viewer.model.SearchResponse; import org.apache.solr.client.solrj.SolrClient; import org.apache.solr.client.solrj.SolrQuery; import org.apache.solr.client.solrj.SolrServerException; @@ -40,6 +33,13 @@ import org.locationtech.jts.geom.Geometry; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.tailormap.api.geotools.featuresources.FeatureSourceFactoryHelper; +import org.tailormap.api.geotools.processing.GeometryProcessor; +import org.tailormap.api.persistence.SearchIndex; +import org.tailormap.api.persistence.TMFeatureType; +import org.tailormap.api.util.Constants; +import org.tailormap.api.viewer.model.SearchDocument; +import org.tailormap.api.viewer.model.SearchResponse; /** * Solr utility/wrapper class. This class provides methods to add or update a full-text feature type diff --git a/src/main/java/nl/b3p/tailormap/api/util/Constants.java b/src/main/java/org/tailormap/api/util/Constants.java similarity index 94% rename from src/main/java/nl/b3p/tailormap/api/util/Constants.java rename to src/main/java/org/tailormap/api/util/Constants.java index f5ce2d461..e252aead0 100644 --- a/src/main/java/nl/b3p/tailormap/api/util/Constants.java +++ b/src/main/java/org/tailormap/api/util/Constants.java @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.util; +package org.tailormap.api.util; public interface Constants { int DEFAULT_MAX_FEATURES = 10; diff --git a/src/main/java/nl/b3p/tailormap/api/util/HttpProxyUtil.java b/src/main/java/org/tailormap/api/util/HttpProxyUtil.java similarity index 98% rename from src/main/java/nl/b3p/tailormap/api/util/HttpProxyUtil.java rename to src/main/java/org/tailormap/api/util/HttpProxyUtil.java index 2a00d9c23..551b44d14 100644 --- a/src/main/java/nl/b3p/tailormap/api/util/HttpProxyUtil.java +++ b/src/main/java/org/tailormap/api/util/HttpProxyUtil.java @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.util; +package org.tailormap.api.util; import jakarta.servlet.http.HttpServletRequest; import java.net.Inet6Address; diff --git a/src/main/java/nl/b3p/tailormap/api/util/TMExceptionUtils.java b/src/main/java/org/tailormap/api/util/TMExceptionUtils.java similarity index 94% rename from src/main/java/nl/b3p/tailormap/api/util/TMExceptionUtils.java rename to src/main/java/org/tailormap/api/util/TMExceptionUtils.java index eb5c2495f..44cfb72d2 100644 --- a/src/main/java/nl/b3p/tailormap/api/util/TMExceptionUtils.java +++ b/src/main/java/org/tailormap/api/util/TMExceptionUtils.java @@ -4,7 +4,7 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.util; +package org.tailormap.api.util; import java.util.stream.Collectors; import org.apache.commons.lang3.exception.ExceptionUtils; diff --git a/src/main/java/nl/b3p/tailormap/api/util/TMPasswordDeserializer.java b/src/main/java/org/tailormap/api/util/TMPasswordDeserializer.java similarity index 94% rename from src/main/java/nl/b3p/tailormap/api/util/TMPasswordDeserializer.java rename to src/main/java/org/tailormap/api/util/TMPasswordDeserializer.java index dedb71d8f..996540b7c 100644 --- a/src/main/java/nl/b3p/tailormap/api/util/TMPasswordDeserializer.java +++ b/src/main/java/org/tailormap/api/util/TMPasswordDeserializer.java @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.util; +package org.tailormap.api.util; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.ObjectCodec; @@ -15,12 +15,12 @@ import java.util.Locale; import me.gosimple.nbvcxz.Nbvcxz; import me.gosimple.nbvcxz.resources.ConfigurationBuilder; -import nl.b3p.tailormap.api.configuration.TailormapPasswordStrengthConfig; -import nl.b3p.tailormap.api.security.InvalidPasswordException; import org.apache.commons.lang3.StringUtils; import org.springframework.context.i18n.LocaleContextHolder; import org.springframework.security.crypto.factory.PasswordEncoderFactories; import org.springframework.security.crypto.password.PasswordEncoder; +import org.tailormap.api.configuration.TailormapPasswordStrengthConfig; +import org.tailormap.api.security.InvalidPasswordException; public class TMPasswordDeserializer extends JsonDeserializer { private static final PasswordEncoder encoder = diff --git a/src/main/java/nl/b3p/tailormap/api/util/TMStringUtils.java b/src/main/java/org/tailormap/api/util/TMStringUtils.java similarity index 85% rename from src/main/java/nl/b3p/tailormap/api/util/TMStringUtils.java rename to src/main/java/org/tailormap/api/util/TMStringUtils.java index db0074f84..3b268bfca 100644 --- a/src/main/java/nl/b3p/tailormap/api/util/TMStringUtils.java +++ b/src/main/java/org/tailormap/api/util/TMStringUtils.java @@ -4,7 +4,7 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.util; +package org.tailormap.api.util; public class TMStringUtils { public static String nullIfEmpty(String s) { diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 2aba56c04..0f6b27ec9 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -120,6 +120,6 @@ logging.level.org.hibernate.engine.internal.StatisticalLoggingSessionEventListen # we don't use jTDS logging.level.org.geotools.data.sqlserver.jtds=OFF -logging.level.nl.b3p.tailormap.api=DEBUG +logging.level.org.tailormap.api=DEBUG -logging.level.nl.b3p.tailormap.api.persistence.helper.GeoServiceHelper=INFO +logging.level.org.tailormap.api.persistence.helper.GeoServiceHelper=INFO diff --git a/src/test/java/nl/b3p/tailormap/api/StaticTestData.java b/src/test/java/org/tailormap/api/StaticTestData.java similarity index 96% rename from src/test/java/nl/b3p/tailormap/api/StaticTestData.java rename to src/test/java/org/tailormap/api/StaticTestData.java index 255ee5f7f..197ecfb3e 100644 --- a/src/test/java/nl/b3p/tailormap/api/StaticTestData.java +++ b/src/test/java/org/tailormap/api/StaticTestData.java @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api; +package org.tailormap.api; import java.io.IOException; import java.nio.charset.StandardCharsets; diff --git a/src/test/java/nl/b3p/tailormap/api/TestRequestProcessor.java b/src/test/java/org/tailormap/api/TestRequestProcessor.java similarity index 93% rename from src/test/java/nl/b3p/tailormap/api/TestRequestProcessor.java rename to src/test/java/org/tailormap/api/TestRequestProcessor.java index 6d6d7408f..22a1a7002 100644 --- a/src/test/java/nl/b3p/tailormap/api/TestRequestProcessor.java +++ b/src/test/java/org/tailormap/api/TestRequestProcessor.java @@ -4,7 +4,7 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api; +package org.tailormap.api; import org.springframework.test.web.servlet.request.RequestPostProcessor; diff --git a/src/test/java/nl/b3p/tailormap/api/ValidateGeoToolsInArtifactIntegrationTest.java b/src/test/java/org/tailormap/api/ValidateGeoToolsInArtifactIntegrationTest.java similarity index 98% rename from src/test/java/nl/b3p/tailormap/api/ValidateGeoToolsInArtifactIntegrationTest.java rename to src/test/java/org/tailormap/api/ValidateGeoToolsInArtifactIntegrationTest.java index 751e23490..cdd55a98c 100644 --- a/src/test/java/nl/b3p/tailormap/api/ValidateGeoToolsInArtifactIntegrationTest.java +++ b/src/test/java/org/tailormap/api/ValidateGeoToolsInArtifactIntegrationTest.java @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api; +package org.tailormap.api; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; diff --git a/src/test/java/nl/b3p/tailormap/api/annotation/PostgresIntegrationTest.java b/src/test/java/org/tailormap/api/annotation/PostgresIntegrationTest.java similarity index 82% rename from src/test/java/nl/b3p/tailormap/api/annotation/PostgresIntegrationTest.java rename to src/test/java/org/tailormap/api/annotation/PostgresIntegrationTest.java index 0663ec1be..738c696f5 100644 --- a/src/test/java/nl/b3p/tailormap/api/annotation/PostgresIntegrationTest.java +++ b/src/test/java/org/tailormap/api/annotation/PostgresIntegrationTest.java @@ -3,21 +3,21 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.annotation; +package org.tailormap.api.annotation; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import nl.b3p.tailormap.api.configuration.JPAConfiguration; -import nl.b3p.tailormap.api.security.ActuatorSecurityConfiguration; -import nl.b3p.tailormap.api.security.ApiSecurityConfiguration; import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.context.annotation.ComponentScan; import org.springframework.test.context.ActiveProfiles; import org.springframework.web.servlet.config.annotation.EnableWebMvc; +import org.tailormap.api.configuration.JPAConfiguration; +import org.tailormap.api.security.ActuatorSecurityConfiguration; +import org.tailormap.api.security.ApiSecurityConfiguration; @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) diff --git a/src/test/java/nl/b3p/tailormap/api/controller/AppControllerIntegrationTest.java b/src/test/java/org/tailormap/api/controller/AppControllerIntegrationTest.java similarity index 95% rename from src/test/java/nl/b3p/tailormap/api/controller/AppControllerIntegrationTest.java rename to src/test/java/org/tailormap/api/controller/AppControllerIntegrationTest.java index 5156b8765..8e7d74edf 100644 --- a/src/test/java/nl/b3p/tailormap/api/controller/AppControllerIntegrationTest.java +++ b/src/test/java/org/tailormap/api/controller/AppControllerIntegrationTest.java @@ -3,19 +3,16 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.controller; +package org.tailormap.api.controller; -import static nl.b3p.tailormap.api.TestRequestProcessor.setServletPath; import static org.hamcrest.Matchers.matchesPattern; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; +import static org.tailormap.api.TestRequestProcessor.setServletPath; import jakarta.persistence.EntityManager; -import nl.b3p.tailormap.api.annotation.PostgresIntegrationTest; -import nl.b3p.tailormap.api.persistence.Configuration; -import nl.b3p.tailormap.api.repository.ConfigurationRepository; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; @@ -23,6 +20,9 @@ import org.springframework.http.MediaType; import org.springframework.test.web.servlet.MockMvc; import org.springframework.transaction.annotation.Transactional; +import org.tailormap.api.annotation.PostgresIntegrationTest; +import org.tailormap.api.persistence.Configuration; +import org.tailormap.api.repository.ConfigurationRepository; @AutoConfigureMockMvc @PostgresIntegrationTest diff --git a/src/test/java/nl/b3p/tailormap/api/controller/ConfigurationControllerIntegrationTest.java b/src/test/java/org/tailormap/api/controller/ConfigurationControllerIntegrationTest.java similarity index 95% rename from src/test/java/nl/b3p/tailormap/api/controller/ConfigurationControllerIntegrationTest.java rename to src/test/java/org/tailormap/api/controller/ConfigurationControllerIntegrationTest.java index 147a1c458..bf3c23ec1 100644 --- a/src/test/java/nl/b3p/tailormap/api/controller/ConfigurationControllerIntegrationTest.java +++ b/src/test/java/org/tailormap/api/controller/ConfigurationControllerIntegrationTest.java @@ -4,20 +4,20 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.controller; +package org.tailormap.api.controller; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -import nl.b3p.tailormap.api.annotation.PostgresIntegrationTest; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; import org.springframework.http.MediaType; import org.springframework.test.web.servlet.MockMvc; +import org.tailormap.api.annotation.PostgresIntegrationTest; @PostgresIntegrationTest @AutoConfigureMockMvc diff --git a/src/test/java/nl/b3p/tailormap/api/controller/EditFeatureControllerIntegrationTest.java b/src/test/java/org/tailormap/api/controller/EditFeatureControllerIntegrationTest.java similarity index 98% rename from src/test/java/nl/b3p/tailormap/api/controller/EditFeatureControllerIntegrationTest.java rename to src/test/java/org/tailormap/api/controller/EditFeatureControllerIntegrationTest.java index 557f69df9..e1fff845e 100644 --- a/src/test/java/nl/b3p/tailormap/api/controller/EditFeatureControllerIntegrationTest.java +++ b/src/test/java/org/tailormap/api/controller/EditFeatureControllerIntegrationTest.java @@ -3,10 +3,8 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.controller; +package org.tailormap.api.controller; -import static nl.b3p.tailormap.api.TestRequestProcessor.setServletPath; -import static nl.b3p.tailormap.api.persistence.Group.ADMIN; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.delete; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; @@ -16,13 +14,12 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; +import static org.tailormap.api.TestRequestProcessor.setServletPath; +import static org.tailormap.api.persistence.Group.ADMIN; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.node.ObjectNode; import com.jayway.jsonpath.JsonPath; -import nl.b3p.tailormap.api.StaticTestData; -import nl.b3p.tailormap.api.annotation.PostgresIntegrationTest; -import nl.b3p.tailormap.api.geotools.processing.GeometryProcessor; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.ClassOrderer; import org.junit.jupiter.api.MethodOrderer; @@ -42,6 +39,9 @@ import org.springframework.test.web.servlet.MvcResult; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.web.context.WebApplicationContext; +import org.tailormap.api.StaticTestData; +import org.tailormap.api.annotation.PostgresIntegrationTest; +import org.tailormap.api.geotools.processing.GeometryProcessor; @PostgresIntegrationTest @AutoConfigureMockMvc diff --git a/src/test/java/nl/b3p/tailormap/api/controller/FeaturesControllerIntegrationTest.java b/src/test/java/org/tailormap/api/controller/FeaturesControllerIntegrationTest.java similarity index 99% rename from src/test/java/nl/b3p/tailormap/api/controller/FeaturesControllerIntegrationTest.java rename to src/test/java/org/tailormap/api/controller/FeaturesControllerIntegrationTest.java index 246254ee4..a8a9614ab 100644 --- a/src/test/java/nl/b3p/tailormap/api/controller/FeaturesControllerIntegrationTest.java +++ b/src/test/java/org/tailormap/api/controller/FeaturesControllerIntegrationTest.java @@ -3,9 +3,8 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.controller; +package org.tailormap.api.controller; -import static nl.b3p.tailormap.api.TestRequestProcessor.setServletPath; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.params.provider.Arguments.arguments; @@ -13,14 +12,12 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; +import static org.tailormap.api.TestRequestProcessor.setServletPath; import com.jayway.jsonpath.JsonPath; import java.lang.invoke.MethodHandles; import java.util.List; import java.util.stream.Stream; -import nl.b3p.tailormap.api.StaticTestData; -import nl.b3p.tailormap.api.annotation.PostgresIntegrationTest; -import nl.b3p.tailormap.api.viewer.model.Service; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Order; @@ -45,6 +42,9 @@ import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.MvcResult; import org.springframework.test.web.servlet.ResultMatcher; +import org.tailormap.api.StaticTestData; +import org.tailormap.api.annotation.PostgresIntegrationTest; +import org.tailormap.api.viewer.model.Service; @AutoConfigureMockMvc @PostgresIntegrationTest diff --git a/src/test/java/nl/b3p/tailormap/api/controller/GeoServiceProxyControllerIntegrationTest.java b/src/test/java/org/tailormap/api/controller/GeoServiceProxyControllerIntegrationTest.java similarity index 98% rename from src/test/java/nl/b3p/tailormap/api/controller/GeoServiceProxyControllerIntegrationTest.java rename to src/test/java/org/tailormap/api/controller/GeoServiceProxyControllerIntegrationTest.java index 5eb56eda6..558eddad0 100644 --- a/src/test/java/nl/b3p/tailormap/api/controller/GeoServiceProxyControllerIntegrationTest.java +++ b/src/test/java/org/tailormap/api/controller/GeoServiceProxyControllerIntegrationTest.java @@ -3,9 +3,8 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.controller; +package org.tailormap.api.controller; -import static nl.b3p.tailormap.api.TestRequestProcessor.setServletPath; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.startsWith; import static org.junit.jupiter.api.Assertions.assertEquals; @@ -15,6 +14,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.header; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; +import static org.tailormap.api.TestRequestProcessor.setServletPath; import com.github.romankh3.image.comparison.ImageComparison; import com.github.romankh3.image.comparison.ImageComparisonUtil; @@ -29,7 +29,6 @@ import java.util.Locale; import java.util.Objects; import javax.imageio.ImageIO; -import nl.b3p.tailormap.api.annotation.PostgresIntegrationTest; import org.hamcrest.Description; import org.hamcrest.TypeSafeMatcher; import org.junit.jupiter.api.BeforeAll; @@ -48,6 +47,7 @@ import org.springframework.test.web.servlet.ResultActions; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.web.context.WebApplicationContext; +import org.tailormap.api.annotation.PostgresIntegrationTest; @PostgresIntegrationTest @AutoConfigureMockMvc diff --git a/src/test/java/nl/b3p/tailormap/api/controller/GeoServiceProxyControllerTest.java b/src/test/java/org/tailormap/api/controller/GeoServiceProxyControllerTest.java similarity index 97% rename from src/test/java/nl/b3p/tailormap/api/controller/GeoServiceProxyControllerTest.java rename to src/test/java/org/tailormap/api/controller/GeoServiceProxyControllerTest.java index fea1adcdd..ded1be9c3 100644 --- a/src/test/java/nl/b3p/tailormap/api/controller/GeoServiceProxyControllerTest.java +++ b/src/test/java/org/tailormap/api/controller/GeoServiceProxyControllerTest.java @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.controller; +package org.tailormap.api.controller; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/src/test/java/nl/b3p/tailormap/api/controller/LayerDescriptionControllerIntegrationTest.java b/src/test/java/org/tailormap/api/controller/LayerDescriptionControllerIntegrationTest.java similarity index 97% rename from src/test/java/nl/b3p/tailormap/api/controller/LayerDescriptionControllerIntegrationTest.java rename to src/test/java/org/tailormap/api/controller/LayerDescriptionControllerIntegrationTest.java index 02b81e2d7..9826dee06 100644 --- a/src/test/java/nl/b3p/tailormap/api/controller/LayerDescriptionControllerIntegrationTest.java +++ b/src/test/java/org/tailormap/api/controller/LayerDescriptionControllerIntegrationTest.java @@ -3,15 +3,14 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.controller; +package org.tailormap.api.controller; -import static nl.b3p.tailormap.api.TestRequestProcessor.setServletPath; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; +import static org.tailormap.api.TestRequestProcessor.setServletPath; -import nl.b3p.tailormap.api.annotation.PostgresIntegrationTest; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.parallel.Execution; import org.junit.jupiter.api.parallel.ExecutionMode; @@ -21,6 +20,7 @@ import org.springframework.http.MediaType; import org.springframework.security.test.context.support.WithMockUser; import org.springframework.test.web.servlet.MockMvc; +import org.tailormap.api.annotation.PostgresIntegrationTest; @PostgresIntegrationTest @AutoConfigureMockMvc diff --git a/src/test/java/nl/b3p/tailormap/api/controller/LayerExportControllerIntegrationTest.java b/src/test/java/org/tailormap/api/controller/LayerExportControllerIntegrationTest.java similarity index 97% rename from src/test/java/nl/b3p/tailormap/api/controller/LayerExportControllerIntegrationTest.java rename to src/test/java/org/tailormap/api/controller/LayerExportControllerIntegrationTest.java index 06c57b341..c83223545 100644 --- a/src/test/java/nl/b3p/tailormap/api/controller/LayerExportControllerIntegrationTest.java +++ b/src/test/java/org/tailormap/api/controller/LayerExportControllerIntegrationTest.java @@ -3,15 +3,14 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.controller; +package org.tailormap.api.controller; -import static nl.b3p.tailormap.api.TestRequestProcessor.setServletPath; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; +import static org.tailormap.api.TestRequestProcessor.setServletPath; -import nl.b3p.tailormap.api.annotation.PostgresIntegrationTest; import org.hamcrest.Matchers; import org.junit.jupiter.api.MethodOrderer; import org.junit.jupiter.api.Test; @@ -24,6 +23,8 @@ import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; import org.springframework.http.MediaType; import org.springframework.test.web.servlet.MockMvc; +import org.springframework.test.web.servlet.result.MockMvcResultHandlers; +import org.tailormap.api.annotation.PostgresIntegrationTest; @PostgresIntegrationTest @AutoConfigureMockMvc @@ -225,6 +226,7 @@ void shouldNotExportHiddenAttributesInGeoJSON() throws Exception { .with(setServletPath(url)) .param("outputFormat", "application/json") .param("filter", "(bronhouder ILIKE 'L0001')")) + .andDo(MockMvcResultHandlers.print()) .andExpect(status().isOk()) // GeoServer returns application/json;charset=UTF-8; but this is deprecated // .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) diff --git a/src/test/java/nl/b3p/tailormap/api/controller/SearchControllerIntegrationTest.java b/src/test/java/org/tailormap/api/controller/SearchControllerIntegrationTest.java similarity index 97% rename from src/test/java/nl/b3p/tailormap/api/controller/SearchControllerIntegrationTest.java rename to src/test/java/org/tailormap/api/controller/SearchControllerIntegrationTest.java index 03fe93e04..0c4945be6 100644 --- a/src/test/java/nl/b3p/tailormap/api/controller/SearchControllerIntegrationTest.java +++ b/src/test/java/org/tailormap/api/controller/SearchControllerIntegrationTest.java @@ -3,9 +3,8 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.controller; +package org.tailormap.api.controller; -import static nl.b3p.tailormap.api.TestRequestProcessor.setServletPath; import static org.hamcrest.Matchers.both; import static org.hamcrest.Matchers.contains; import static org.hamcrest.Matchers.greaterThan; @@ -16,9 +15,8 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; +import static org.tailormap.api.TestRequestProcessor.setServletPath; -import nl.b3p.tailormap.api.annotation.PostgresIntegrationTest; -import nl.b3p.tailormap.api.util.Constants; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.parallel.Execution; import org.junit.jupiter.api.parallel.ExecutionMode; @@ -28,6 +26,8 @@ import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; import org.springframework.http.MediaType; import org.springframework.test.web.servlet.MockMvc; +import org.tailormap.api.annotation.PostgresIntegrationTest; +import org.tailormap.api.util.Constants; @AutoConfigureMockMvc @PostgresIntegrationTest diff --git a/src/test/java/nl/b3p/tailormap/api/controller/UniqueValuesControllerIntegrationTest.java b/src/test/java/org/tailormap/api/controller/UniqueValuesControllerIntegrationTest.java similarity index 98% rename from src/test/java/nl/b3p/tailormap/api/controller/UniqueValuesControllerIntegrationTest.java rename to src/test/java/org/tailormap/api/controller/UniqueValuesControllerIntegrationTest.java index 474e51668..c36fabfe7 100644 --- a/src/test/java/nl/b3p/tailormap/api/controller/UniqueValuesControllerIntegrationTest.java +++ b/src/test/java/org/tailormap/api/controller/UniqueValuesControllerIntegrationTest.java @@ -3,9 +3,8 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.controller; +package org.tailormap.api.controller; -import static nl.b3p.tailormap.api.TestRequestProcessor.setServletPath; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.params.provider.Arguments.arguments; @@ -13,6 +12,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; +import static org.tailormap.api.TestRequestProcessor.setServletPath; import com.jayway.jsonpath.JsonPath; import java.nio.charset.StandardCharsets; @@ -23,7 +23,6 @@ import java.util.Set; import java.util.stream.Collectors; import java.util.stream.Stream; -import nl.b3p.tailormap.api.annotation.PostgresIntegrationTest; import org.hamcrest.Matchers; import org.junit.jupiter.api.Order; import org.junit.jupiter.api.Test; @@ -41,6 +40,7 @@ import org.springframework.http.MediaType; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.MvcResult; +import org.tailormap.api.annotation.PostgresIntegrationTest; @PostgresIntegrationTest @AutoConfigureMockMvc diff --git a/src/test/java/nl/b3p/tailormap/api/controller/UniqueValuesControllerReConfiguredIntegrationTest.java b/src/test/java/org/tailormap/api/controller/UniqueValuesControllerReConfiguredIntegrationTest.java similarity index 98% rename from src/test/java/nl/b3p/tailormap/api/controller/UniqueValuesControllerReConfiguredIntegrationTest.java rename to src/test/java/org/tailormap/api/controller/UniqueValuesControllerReConfiguredIntegrationTest.java index bb07ed8c3..dd458a7e2 100644 --- a/src/test/java/nl/b3p/tailormap/api/controller/UniqueValuesControllerReConfiguredIntegrationTest.java +++ b/src/test/java/org/tailormap/api/controller/UniqueValuesControllerReConfiguredIntegrationTest.java @@ -3,9 +3,8 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.controller; +package org.tailormap.api.controller; -import static nl.b3p.tailormap.api.TestRequestProcessor.setServletPath; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.params.provider.Arguments.arguments; @@ -13,6 +12,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; +import static org.tailormap.api.TestRequestProcessor.setServletPath; import com.jayway.jsonpath.JsonPath; import java.nio.charset.StandardCharsets; @@ -23,7 +23,6 @@ import java.util.Set; import java.util.stream.Collectors; import java.util.stream.Stream; -import nl.b3p.tailormap.api.annotation.PostgresIntegrationTest; import org.hamcrest.Matchers; import org.junit.jupiter.api.Order; import org.junit.jupiter.api.Test; @@ -42,6 +41,7 @@ import org.springframework.test.context.TestPropertySource; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.MvcResult; +import org.tailormap.api.annotation.PostgresIntegrationTest; @PostgresIntegrationTest @AutoConfigureMockMvc diff --git a/src/test/java/nl/b3p/tailormap/api/controller/UploadsControllerIntegrationTest.java b/src/test/java/org/tailormap/api/controller/UploadsControllerIntegrationTest.java similarity index 94% rename from src/test/java/nl/b3p/tailormap/api/controller/UploadsControllerIntegrationTest.java rename to src/test/java/org/tailormap/api/controller/UploadsControllerIntegrationTest.java index a2cbfe68b..3af95cc99 100644 --- a/src/test/java/nl/b3p/tailormap/api/controller/UploadsControllerIntegrationTest.java +++ b/src/test/java/org/tailormap/api/controller/UploadsControllerIntegrationTest.java @@ -4,16 +4,13 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.controller; +package org.tailormap.api.controller; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.header; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -import nl.b3p.tailormap.api.annotation.PostgresIntegrationTest; -import nl.b3p.tailormap.api.persistence.Upload; -import nl.b3p.tailormap.api.repository.UploadRepository; import org.junit.jupiter.api.MethodOrderer; import org.junit.jupiter.api.Order; import org.junit.jupiter.api.Test; @@ -25,6 +22,9 @@ import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.MvcResult; import org.springframework.transaction.annotation.Transactional; +import org.tailormap.api.annotation.PostgresIntegrationTest; +import org.tailormap.api.persistence.Upload; +import org.tailormap.api.repository.UploadRepository; @PostgresIntegrationTest @AutoConfigureMockMvc diff --git a/src/test/java/nl/b3p/tailormap/api/controller/UserControllerIntegrationTest.java b/src/test/java/org/tailormap/api/controller/UserControllerIntegrationTest.java similarity index 95% rename from src/test/java/nl/b3p/tailormap/api/controller/UserControllerIntegrationTest.java rename to src/test/java/org/tailormap/api/controller/UserControllerIntegrationTest.java index 4b71e2042..c11d66bc6 100644 --- a/src/test/java/nl/b3p/tailormap/api/controller/UserControllerIntegrationTest.java +++ b/src/test/java/org/tailormap/api/controller/UserControllerIntegrationTest.java @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.controller; +package org.tailormap.api.controller; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; @@ -11,8 +11,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -import nl.b3p.tailormap.api.annotation.PostgresIntegrationTest; -import nl.b3p.tailormap.api.persistence.Group; import org.hamcrest.Matchers; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; @@ -21,6 +19,8 @@ import org.springframework.http.MediaType; import org.springframework.security.test.context.support.WithMockUser; import org.springframework.test.web.servlet.MockMvc; +import org.tailormap.api.annotation.PostgresIntegrationTest; +import org.tailormap.api.persistence.Group; @PostgresIntegrationTest @AutoConfigureMockMvc diff --git a/src/test/java/nl/b3p/tailormap/api/controller/ViewerControllerIntegrationTest.java b/src/test/java/org/tailormap/api/controller/ViewerControllerIntegrationTest.java similarity index 97% rename from src/test/java/nl/b3p/tailormap/api/controller/ViewerControllerIntegrationTest.java rename to src/test/java/org/tailormap/api/controller/ViewerControllerIntegrationTest.java index 5ec50e241..343747918 100644 --- a/src/test/java/nl/b3p/tailormap/api/controller/ViewerControllerIntegrationTest.java +++ b/src/test/java/org/tailormap/api/controller/ViewerControllerIntegrationTest.java @@ -3,9 +3,8 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.controller; +package org.tailormap.api.controller; -import static nl.b3p.tailormap.api.TestRequestProcessor.setServletPath; import static org.hamcrest.Matchers.contains; import static org.hamcrest.Matchers.endsWith; import static org.hamcrest.Matchers.nullValue; @@ -16,14 +15,12 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; +import static org.tailormap.api.TestRequestProcessor.setServletPath; import com.jayway.jsonpath.JsonPath; import java.util.HashSet; import java.util.List; import java.util.Set; -import nl.b3p.tailormap.api.annotation.PostgresIntegrationTest; -import nl.b3p.tailormap.api.repository.ApplicationRepository; -import nl.b3p.tailormap.api.viewer.model.Service; import org.junit.jupiter.api.MethodOrderer; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.TestMethodOrder; @@ -35,6 +32,9 @@ import org.springframework.security.test.context.support.WithMockUser; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.MvcResult; +import org.tailormap.api.annotation.PostgresIntegrationTest; +import org.tailormap.api.repository.ApplicationRepository; +import org.tailormap.api.viewer.model.Service; @PostgresIntegrationTest @AutoConfigureMockMvc @@ -128,7 +128,7 @@ void should_contain_proxy_url() throws Exception { // replace it with a proxied version. Frontend will use normal URL to create standard WMS // GetLegendGraphic request, which usually works fine // Old 10.0 code: - // https://github.com/B3Partners/tailormap-api/blob/tailormap-api-10.0.0/src/main/java/nl/b3p/tailormap/api/controller/MapController.java#L440 + // https://github.com/Tailormap/tailormap-api/blob/tailormap-api-10.0.0/src/main/java/nl/b3p/tailormap/api/controller/MapController.java#L440 // .andExpect( // jsonPath("$.appLayers[?(@.id === // 'lyr:pdok-kadaster-bestuurlijkegebieden:Provinciegebied')].legendImageUrl") diff --git a/src/test/java/nl/b3p/tailormap/api/controller/admin/ApplicationAdminControllerIntegrationTest.java b/src/test/java/org/tailormap/api/controller/admin/ApplicationAdminControllerIntegrationTest.java similarity index 97% rename from src/test/java/nl/b3p/tailormap/api/controller/admin/ApplicationAdminControllerIntegrationTest.java rename to src/test/java/org/tailormap/api/controller/admin/ApplicationAdminControllerIntegrationTest.java index 3ec19540b..50a37872c 100644 --- a/src/test/java/nl/b3p/tailormap/api/controller/admin/ApplicationAdminControllerIntegrationTest.java +++ b/src/test/java/org/tailormap/api/controller/admin/ApplicationAdminControllerIntegrationTest.java @@ -4,7 +4,7 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.controller.admin; +package org.tailormap.api.controller.admin; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.patch; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; @@ -14,8 +14,6 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.node.ArrayNode; import com.fasterxml.jackson.databind.node.ObjectNode; -import nl.b3p.tailormap.api.annotation.PostgresIntegrationTest; -import nl.b3p.tailormap.api.persistence.Group; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.MethodOrderer; @@ -34,6 +32,8 @@ import org.springframework.test.web.servlet.result.MockMvcResultHandlers; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.web.context.WebApplicationContext; +import org.tailormap.api.annotation.PostgresIntegrationTest; +import org.tailormap.api.persistence.Group; @PostgresIntegrationTest @TestInstance(TestInstance.Lifecycle.PER_CLASS) diff --git a/src/test/java/nl/b3p/tailormap/api/controller/admin/FeatureSourceAdminControllerIntegrationTest.java b/src/test/java/org/tailormap/api/controller/admin/FeatureSourceAdminControllerIntegrationTest.java similarity index 97% rename from src/test/java/nl/b3p/tailormap/api/controller/admin/FeatureSourceAdminControllerIntegrationTest.java rename to src/test/java/org/tailormap/api/controller/admin/FeatureSourceAdminControllerIntegrationTest.java index 20ef2296d..e56f8d3a1 100644 --- a/src/test/java/nl/b3p/tailormap/api/controller/admin/FeatureSourceAdminControllerIntegrationTest.java +++ b/src/test/java/org/tailormap/api/controller/admin/FeatureSourceAdminControllerIntegrationTest.java @@ -1,4 +1,4 @@ -package nl.b3p.tailormap.api.controller.admin; +package org.tailormap.api.controller.admin; import static org.hamcrest.Matchers.equalTo; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; @@ -8,8 +8,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; import com.jayway.jsonpath.JsonPath; -import nl.b3p.tailormap.api.annotation.PostgresIntegrationTest; -import nl.b3p.tailormap.api.persistence.Group; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; @@ -21,6 +19,8 @@ import org.springframework.test.web.servlet.MvcResult; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.web.context.WebApplicationContext; +import org.tailormap.api.annotation.PostgresIntegrationTest; +import org.tailormap.api.persistence.Group; /* * Copyright (C) 2023 B3Partners B.V. diff --git a/src/test/java/nl/b3p/tailormap/api/controller/admin/GeoServiceAdminControllerIntegrationTest.java b/src/test/java/org/tailormap/api/controller/admin/GeoServiceAdminControllerIntegrationTest.java similarity index 98% rename from src/test/java/nl/b3p/tailormap/api/controller/admin/GeoServiceAdminControllerIntegrationTest.java rename to src/test/java/org/tailormap/api/controller/admin/GeoServiceAdminControllerIntegrationTest.java index bc019728c..970d28432 100644 --- a/src/test/java/nl/b3p/tailormap/api/controller/admin/GeoServiceAdminControllerIntegrationTest.java +++ b/src/test/java/org/tailormap/api/controller/admin/GeoServiceAdminControllerIntegrationTest.java @@ -1,6 +1,5 @@ -package nl.b3p.tailormap.api.controller.admin; +package org.tailormap.api.controller.admin; -import static nl.b3p.tailormap.api.StaticTestData.getResourceString; import static org.hamcrest.Matchers.equalTo; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; @@ -9,6 +8,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.header; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; +import static org.tailormap.api.StaticTestData.getResourceString; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.node.ObjectNode; @@ -16,8 +16,6 @@ import java.util.Objects; import mockwebserver3.MockResponse; import mockwebserver3.MockWebServer; -import nl.b3p.tailormap.api.annotation.PostgresIntegrationTest; -import nl.b3p.tailormap.api.persistence.Group; import okhttp3.Headers; import org.hamcrest.Matchers; import org.junit.jupiter.api.Test; @@ -31,6 +29,8 @@ import org.springframework.test.web.servlet.MvcResult; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.web.context.WebApplicationContext; +import org.tailormap.api.annotation.PostgresIntegrationTest; +import org.tailormap.api.persistence.Group; /* * Copyright (C) 2023 B3Partners B.V. diff --git a/src/test/java/nl/b3p/tailormap/api/controller/admin/JSR303ValidationIntegrationTest.java b/src/test/java/org/tailormap/api/controller/admin/JSR303ValidationIntegrationTest.java similarity index 92% rename from src/test/java/nl/b3p/tailormap/api/controller/admin/JSR303ValidationIntegrationTest.java rename to src/test/java/org/tailormap/api/controller/admin/JSR303ValidationIntegrationTest.java index 43d275a27..b145c3ef1 100644 --- a/src/test/java/nl/b3p/tailormap/api/controller/admin/JSR303ValidationIntegrationTest.java +++ b/src/test/java/org/tailormap/api/controller/admin/JSR303ValidationIntegrationTest.java @@ -4,15 +4,13 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.controller.admin; +package org.tailormap.api.controller.admin; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; import com.fasterxml.jackson.databind.ObjectMapper; -import nl.b3p.tailormap.api.annotation.PostgresIntegrationTest; -import nl.b3p.tailormap.api.persistence.Group; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; @@ -21,6 +19,8 @@ import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.web.context.WebApplicationContext; +import org.tailormap.api.annotation.PostgresIntegrationTest; +import org.tailormap.api.persistence.Group; @PostgresIntegrationTest class JSR303ValidationIntegrationTest { diff --git a/src/test/java/nl/b3p/tailormap/api/controller/admin/PasswordValidationControllerIntegrationTest.java b/src/test/java/org/tailormap/api/controller/admin/PasswordValidationControllerIntegrationTest.java similarity index 93% rename from src/test/java/nl/b3p/tailormap/api/controller/admin/PasswordValidationControllerIntegrationTest.java rename to src/test/java/org/tailormap/api/controller/admin/PasswordValidationControllerIntegrationTest.java index 267fe4e56..489e72ddf 100644 --- a/src/test/java/nl/b3p/tailormap/api/controller/admin/PasswordValidationControllerIntegrationTest.java +++ b/src/test/java/org/tailormap/api/controller/admin/PasswordValidationControllerIntegrationTest.java @@ -1,12 +1,10 @@ -package nl.b3p.tailormap.api.controller.admin; +package org.tailormap.api.controller.admin; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -import nl.b3p.tailormap.api.annotation.PostgresIntegrationTest; -import nl.b3p.tailormap.api.persistence.Group; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.TestInstance; import org.junit.jupiter.params.ParameterizedTest; @@ -19,6 +17,8 @@ import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.web.context.WebApplicationContext; +import org.tailormap.api.annotation.PostgresIntegrationTest; +import org.tailormap.api.persistence.Group; /* * Copyright (C) 2023 B3Partners B.V. diff --git a/src/test/java/nl/b3p/tailormap/api/controller/admin/PersistentJsonArrayPropertyIntegrationTest.java b/src/test/java/org/tailormap/api/controller/admin/PersistentJsonArrayPropertyIntegrationTest.java similarity index 95% rename from src/test/java/nl/b3p/tailormap/api/controller/admin/PersistentJsonArrayPropertyIntegrationTest.java rename to src/test/java/org/tailormap/api/controller/admin/PersistentJsonArrayPropertyIntegrationTest.java index 9eb3e1e3a..0868c5004 100644 --- a/src/test/java/nl/b3p/tailormap/api/controller/admin/PersistentJsonArrayPropertyIntegrationTest.java +++ b/src/test/java/org/tailormap/api/controller/admin/PersistentJsonArrayPropertyIntegrationTest.java @@ -4,7 +4,7 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.controller.admin; +package org.tailormap.api.controller.admin; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.patch; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; @@ -18,10 +18,6 @@ import com.jayway.jsonpath.JsonPath; import java.lang.invoke.MethodHandles; import java.util.List; -import nl.b3p.tailormap.api.annotation.PostgresIntegrationTest; -import nl.b3p.tailormap.api.persistence.Application; -import nl.b3p.tailormap.api.persistence.Group; -import nl.b3p.tailormap.api.viewer.model.Component; import org.junit.jupiter.api.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -33,6 +29,10 @@ import org.springframework.test.web.servlet.MvcResult; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.web.context.WebApplicationContext; +import org.tailormap.api.annotation.PostgresIntegrationTest; +import org.tailormap.api.persistence.Application; +import org.tailormap.api.persistence.Group; +import org.tailormap.api.viewer.model.Component; @PostgresIntegrationTest class PersistentJsonArrayPropertyIntegrationTest { diff --git a/src/test/java/nl/b3p/tailormap/api/controller/admin/SolrAdminControllerIntegrationTest.java b/src/test/java/org/tailormap/api/controller/admin/SolrAdminControllerIntegrationTest.java similarity index 96% rename from src/test/java/nl/b3p/tailormap/api/controller/admin/SolrAdminControllerIntegrationTest.java rename to src/test/java/org/tailormap/api/controller/admin/SolrAdminControllerIntegrationTest.java index a4e8a30ec..267f7d01e 100644 --- a/src/test/java/nl/b3p/tailormap/api/controller/admin/SolrAdminControllerIntegrationTest.java +++ b/src/test/java/org/tailormap/api/controller/admin/SolrAdminControllerIntegrationTest.java @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.controller.admin; +package org.tailormap.api.controller.admin; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.delete; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; @@ -12,8 +12,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -import nl.b3p.tailormap.api.annotation.PostgresIntegrationTest; -import nl.b3p.tailormap.api.persistence.Group; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.MethodOrderer; import org.junit.jupiter.api.Order; @@ -29,6 +27,8 @@ import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.web.context.WebApplicationContext; +import org.tailormap.api.annotation.PostgresIntegrationTest; +import org.tailormap.api.persistence.Group; @AutoConfigureMockMvc @Stopwatch diff --git a/src/test/java/nl/b3p/tailormap/api/geotools/processing/GeometryProcessorTest.java b/src/test/java/org/tailormap/api/geotools/processing/GeometryProcessorTest.java similarity index 98% rename from src/test/java/nl/b3p/tailormap/api/geotools/processing/GeometryProcessorTest.java rename to src/test/java/org/tailormap/api/geotools/processing/GeometryProcessorTest.java index a419a32df..cffacd962 100644 --- a/src/test/java/nl/b3p/tailormap/api/geotools/processing/GeometryProcessorTest.java +++ b/src/test/java/org/tailormap/api/geotools/processing/GeometryProcessorTest.java @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.geotools.processing; +package org.tailormap.api.geotools.processing; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.within; @@ -11,7 +11,6 @@ import static org.junit.jupiter.api.Assertions.assertNotEquals; import static org.junit.jupiter.api.Assertions.assertTrue; -import nl.b3p.tailormap.api.StaticTestData; import org.geotools.api.referencing.FactoryException; import org.geotools.api.referencing.operation.MathTransform; import org.geotools.geometry.jts.WKTReader2; @@ -20,6 +19,7 @@ import org.junitpioneer.jupiter.Stopwatch; import org.locationtech.jts.geom.Geometry; import org.locationtech.jts.io.ParseException; +import org.tailormap.api.StaticTestData; class GeometryProcessorTest extends StaticTestData { diff --git a/src/test/java/nl/b3p/tailormap/api/model/FeaturesResponseTest.java b/src/test/java/org/tailormap/api/model/FeaturesResponseTest.java similarity index 88% rename from src/test/java/nl/b3p/tailormap/api/model/FeaturesResponseTest.java rename to src/test/java/org/tailormap/api/model/FeaturesResponseTest.java index 8eba8af51..3c3c6a72e 100644 --- a/src/test/java/nl/b3p/tailormap/api/model/FeaturesResponseTest.java +++ b/src/test/java/org/tailormap/api/model/FeaturesResponseTest.java @@ -3,13 +3,13 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.model; +package org.tailormap.api.model; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertNull; -import nl.b3p.tailormap.api.viewer.model.FeaturesResponse; import org.junit.jupiter.api.Test; +import org.tailormap.api.viewer.model.FeaturesResponse; class FeaturesResponseTest { @Test diff --git a/src/test/java/nl/b3p/tailormap/api/persistence/GeoServiceTest.java b/src/test/java/org/tailormap/api/persistence/GeoServiceTest.java similarity index 98% rename from src/test/java/nl/b3p/tailormap/api/persistence/GeoServiceTest.java rename to src/test/java/org/tailormap/api/persistence/GeoServiceTest.java index a9de466cc..6fd36a4b3 100644 --- a/src/test/java/nl/b3p/tailormap/api/persistence/GeoServiceTest.java +++ b/src/test/java/org/tailormap/api/persistence/GeoServiceTest.java @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.persistence; +package org.tailormap.api.persistence; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.params.provider.Arguments.arguments; diff --git a/src/test/java/nl/b3p/tailormap/api/persistence/GroupTest.java b/src/test/java/org/tailormap/api/persistence/GroupTest.java similarity index 97% rename from src/test/java/nl/b3p/tailormap/api/persistence/GroupTest.java rename to src/test/java/org/tailormap/api/persistence/GroupTest.java index e07ad2e55..71f522741 100644 --- a/src/test/java/nl/b3p/tailormap/api/persistence/GroupTest.java +++ b/src/test/java/org/tailormap/api/persistence/GroupTest.java @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.persistence; +package org.tailormap.api.persistence; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; diff --git a/src/test/java/nl/b3p/tailormap/api/persistence/UserTest.java b/src/test/java/org/tailormap/api/persistence/UserTest.java similarity index 97% rename from src/test/java/nl/b3p/tailormap/api/persistence/UserTest.java rename to src/test/java/org/tailormap/api/persistence/UserTest.java index 980043509..976e01926 100644 --- a/src/test/java/nl/b3p/tailormap/api/persistence/UserTest.java +++ b/src/test/java/org/tailormap/api/persistence/UserTest.java @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.persistence; +package org.tailormap.api.persistence; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; @@ -17,11 +17,11 @@ import jakarta.validation.Validation; import jakarta.validation.Validator; import java.util.Set; -import nl.b3p.tailormap.api.security.InvalidPasswordException; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.boot.test.autoconfigure.json.JsonTest; import org.springframework.test.context.ActiveProfiles; +import org.tailormap.api.security.InvalidPasswordException; /** Test for json serializing an deserializing {@link User}. */ @JsonTest diff --git a/src/test/java/nl/b3p/tailormap/api/persistence/helper/ApplicationHelperTest.java b/src/test/java/org/tailormap/api/persistence/helper/ApplicationHelperTest.java similarity index 84% rename from src/test/java/nl/b3p/tailormap/api/persistence/helper/ApplicationHelperTest.java rename to src/test/java/org/tailormap/api/persistence/helper/ApplicationHelperTest.java index 3c6cf3418..c41468f15 100644 --- a/src/test/java/nl/b3p/tailormap/api/persistence/helper/ApplicationHelperTest.java +++ b/src/test/java/org/tailormap/api/persistence/helper/ApplicationHelperTest.java @@ -3,27 +3,27 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.persistence.helper; +package org.tailormap.api.persistence.helper; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import jakarta.persistence.EntityManager; -import nl.b3p.tailormap.api.StaticTestData; -import nl.b3p.tailormap.api.persistence.Application; -import nl.b3p.tailormap.api.persistence.json.Bounds; -import nl.b3p.tailormap.api.repository.ApplicationRepository; -import nl.b3p.tailormap.api.repository.ConfigurationRepository; -import nl.b3p.tailormap.api.repository.FeatureSourceRepository; -import nl.b3p.tailormap.api.repository.GeoServiceRepository; -import nl.b3p.tailormap.api.repository.SearchIndexRepository; -import nl.b3p.tailormap.api.security.AuthorizationService; -import nl.b3p.tailormap.api.viewer.model.MapResponse; -import nl.b3p.tailormap.api.viewer.model.TMCoordinateReferenceSystem; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.mock.mockito.MockBean; +import org.tailormap.api.StaticTestData; +import org.tailormap.api.persistence.Application; +import org.tailormap.api.persistence.json.Bounds; +import org.tailormap.api.repository.ApplicationRepository; +import org.tailormap.api.repository.ConfigurationRepository; +import org.tailormap.api.repository.FeatureSourceRepository; +import org.tailormap.api.repository.GeoServiceRepository; +import org.tailormap.api.repository.SearchIndexRepository; +import org.tailormap.api.security.AuthorizationService; +import org.tailormap.api.viewer.model.MapResponse; +import org.tailormap.api.viewer.model.TMCoordinateReferenceSystem; @SpringBootTest(classes = ApplicationHelper.class) class ApplicationHelperTest { diff --git a/src/test/java/nl/b3p/tailormap/api/persistence/helper/GeoServiceHelperIntegrationTest.java b/src/test/java/org/tailormap/api/persistence/helper/GeoServiceHelperIntegrationTest.java similarity index 76% rename from src/test/java/nl/b3p/tailormap/api/persistence/helper/GeoServiceHelperIntegrationTest.java rename to src/test/java/org/tailormap/api/persistence/helper/GeoServiceHelperIntegrationTest.java index 8089d46c9..fa77f9743 100644 --- a/src/test/java/nl/b3p/tailormap/api/persistence/helper/GeoServiceHelperIntegrationTest.java +++ b/src/test/java/org/tailormap/api/persistence/helper/GeoServiceHelperIntegrationTest.java @@ -3,16 +3,16 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.persistence.helper; +package org.tailormap.api.persistence.helper; import static org.junit.jupiter.api.Assertions.assertEquals; -import nl.b3p.tailormap.api.annotation.PostgresIntegrationTest; -import nl.b3p.tailormap.api.persistence.GeoService; -import nl.b3p.tailormap.api.persistence.json.GeoServiceLayer; -import nl.b3p.tailormap.api.repository.GeoServiceRepository; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; +import org.tailormap.api.annotation.PostgresIntegrationTest; +import org.tailormap.api.persistence.GeoService; +import org.tailormap.api.persistence.json.GeoServiceLayer; +import org.tailormap.api.repository.GeoServiceRepository; @PostgresIntegrationTest class GeoServiceHelperIntegrationTest { diff --git a/src/test/java/nl/b3p/tailormap/api/persistence/helper/TMFeatureTypeHelperTest.java b/src/test/java/org/tailormap/api/persistence/helper/TMFeatureTypeHelperTest.java similarity index 83% rename from src/test/java/nl/b3p/tailormap/api/persistence/helper/TMFeatureTypeHelperTest.java rename to src/test/java/org/tailormap/api/persistence/helper/TMFeatureTypeHelperTest.java index 224a4981e..fbeca7b17 100644 --- a/src/test/java/nl/b3p/tailormap/api/persistence/helper/TMFeatureTypeHelperTest.java +++ b/src/test/java/org/tailormap/api/persistence/helper/TMFeatureTypeHelperTest.java @@ -4,22 +4,22 @@ * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.persistence.helper; +package org.tailormap.api.persistence.helper; -import static nl.b3p.tailormap.api.persistence.helper.TMFeatureTypeHelper.getConfiguredAttributes; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.tailormap.api.persistence.helper.TMFeatureTypeHelper.getConfiguredAttributes; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.function.Function; -import nl.b3p.tailormap.api.persistence.TMFeatureType; -import nl.b3p.tailormap.api.persistence.json.AppLayerSettings; -import nl.b3p.tailormap.api.persistence.json.AttributeSettings; -import nl.b3p.tailormap.api.persistence.json.FeatureTypeSettings; -import nl.b3p.tailormap.api.persistence.json.TMAttributeDescriptor; import org.apache.commons.lang3.tuple.Pair; import org.junit.jupiter.api.Test; +import org.tailormap.api.persistence.TMFeatureType; +import org.tailormap.api.persistence.json.AppLayerSettings; +import org.tailormap.api.persistence.json.AttributeSettings; +import org.tailormap.api.persistence.json.FeatureTypeSettings; +import org.tailormap.api.persistence.json.TMAttributeDescriptor; class TMFeatureTypeHelperTest { diff --git a/src/test/java/nl/b3p/tailormap/api/repository/ApplicationRepositoryIntegrationTest.java b/src/test/java/org/tailormap/api/repository/ApplicationRepositoryIntegrationTest.java similarity index 85% rename from src/test/java/nl/b3p/tailormap/api/repository/ApplicationRepositoryIntegrationTest.java rename to src/test/java/org/tailormap/api/repository/ApplicationRepositoryIntegrationTest.java index 2cb6a1088..6fb458e51 100644 --- a/src/test/java/nl/b3p/tailormap/api/repository/ApplicationRepositoryIntegrationTest.java +++ b/src/test/java/org/tailormap/api/repository/ApplicationRepositoryIntegrationTest.java @@ -3,16 +3,16 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.repository; +package org.tailormap.api.repository; import static org.hibernate.validator.internal.util.Contracts.assertNotNull; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNull; -import nl.b3p.tailormap.api.annotation.PostgresIntegrationTest; -import nl.b3p.tailormap.api.persistence.Application; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; +import org.tailormap.api.annotation.PostgresIntegrationTest; +import org.tailormap.api.persistence.Application; @PostgresIntegrationTest class ApplicationRepositoryIntegrationTest { diff --git a/src/test/java/nl/b3p/tailormap/api/repository/ConfigurationRepositoryIntegrationTest.java b/src/test/java/org/tailormap/api/repository/ConfigurationRepositoryIntegrationTest.java similarity index 82% rename from src/test/java/nl/b3p/tailormap/api/repository/ConfigurationRepositoryIntegrationTest.java rename to src/test/java/org/tailormap/api/repository/ConfigurationRepositoryIntegrationTest.java index 892f4aadb..812f32785 100644 --- a/src/test/java/nl/b3p/tailormap/api/repository/ConfigurationRepositoryIntegrationTest.java +++ b/src/test/java/org/tailormap/api/repository/ConfigurationRepositoryIntegrationTest.java @@ -3,22 +3,22 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.repository; +package org.tailormap.api.repository; -import static nl.b3p.tailormap.api.persistence.Configuration.DEFAULT_APP; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertNull; +import static org.tailormap.api.persistence.Configuration.DEFAULT_APP; -import nl.b3p.tailormap.api.annotation.PostgresIntegrationTest; -import nl.b3p.tailormap.api.persistence.Configuration; -import nl.b3p.tailormap.api.security.InternalAdminAuthentication; import org.junit.jupiter.api.MethodOrderer.OrderAnnotation; import org.junit.jupiter.api.Order; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.TestMethodOrder; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.transaction.annotation.Transactional; +import org.tailormap.api.annotation.PostgresIntegrationTest; +import org.tailormap.api.persistence.Configuration; +import org.tailormap.api.security.InternalAdminAuthentication; @PostgresIntegrationTest @TestMethodOrder(OrderAnnotation.class) diff --git a/src/test/java/nl/b3p/tailormap/api/security/ActuatorSecurityConfigurationIntegrationTest.java b/src/test/java/org/tailormap/api/security/ActuatorSecurityConfigurationIntegrationTest.java similarity index 95% rename from src/test/java/nl/b3p/tailormap/api/security/ActuatorSecurityConfigurationIntegrationTest.java rename to src/test/java/org/tailormap/api/security/ActuatorSecurityConfigurationIntegrationTest.java index d96f0d70d..5fa4b8e62 100644 --- a/src/test/java/nl/b3p/tailormap/api/security/ActuatorSecurityConfigurationIntegrationTest.java +++ b/src/test/java/org/tailormap/api/security/ActuatorSecurityConfigurationIntegrationTest.java @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.security; +package org.tailormap.api.security; import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.startsWith; @@ -11,8 +11,6 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; -import nl.b3p.tailormap.api.annotation.PostgresIntegrationTest; -import nl.b3p.tailormap.api.persistence.Group; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; @@ -22,6 +20,8 @@ import org.springframework.security.test.context.support.WithMockUser; import org.springframework.test.context.TestPropertySource; import org.springframework.test.web.servlet.MockMvc; +import org.tailormap.api.annotation.PostgresIntegrationTest; +import org.tailormap.api.persistence.Group; /** * Integration test for the actuator security configuration. The test verifies that the actuator diff --git a/src/test/java/nl/b3p/tailormap/api/security/ApiSecurityConfigurationIntegrationTest.java b/src/test/java/org/tailormap/api/security/ApiSecurityConfigurationIntegrationTest.java similarity index 90% rename from src/test/java/nl/b3p/tailormap/api/security/ApiSecurityConfigurationIntegrationTest.java rename to src/test/java/org/tailormap/api/security/ApiSecurityConfigurationIntegrationTest.java index 3498b1496..81f339b05 100644 --- a/src/test/java/nl/b3p/tailormap/api/security/ApiSecurityConfigurationIntegrationTest.java +++ b/src/test/java/org/tailormap/api/security/ApiSecurityConfigurationIntegrationTest.java @@ -3,16 +3,14 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.security; +package org.tailormap.api.security; -import static nl.b3p.tailormap.api.TestRequestProcessor.setServletPath; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; +import static org.tailormap.api.TestRequestProcessor.setServletPath; -import nl.b3p.tailormap.api.annotation.PostgresIntegrationTest; -import nl.b3p.tailormap.api.persistence.Group; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; @@ -20,6 +18,8 @@ import org.springframework.http.MediaType; import org.springframework.security.test.context.support.WithMockUser; import org.springframework.test.web.servlet.MockMvc; +import org.tailormap.api.annotation.PostgresIntegrationTest; +import org.tailormap.api.persistence.Group; /** * Integration test for the API security configuration. The test indirectly verifies that the API diff --git a/src/test/java/nl/b3p/tailormap/api/security/TailormapUserDetailsServiceIntegrationTest.java b/src/test/java/org/tailormap/api/security/TailormapUserDetailsServiceIntegrationTest.java similarity index 89% rename from src/test/java/nl/b3p/tailormap/api/security/TailormapUserDetailsServiceIntegrationTest.java rename to src/test/java/org/tailormap/api/security/TailormapUserDetailsServiceIntegrationTest.java index 5b91b65a2..60730236f 100644 --- a/src/test/java/nl/b3p/tailormap/api/security/TailormapUserDetailsServiceIntegrationTest.java +++ b/src/test/java/org/tailormap/api/security/TailormapUserDetailsServiceIntegrationTest.java @@ -3,15 +3,15 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.security; +package org.tailormap.api.security; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertThrows; -import nl.b3p.tailormap.api.annotation.PostgresIntegrationTest; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.core.userdetails.UsernameNotFoundException; +import org.tailormap.api.annotation.PostgresIntegrationTest; @PostgresIntegrationTest class TailormapUserDetailsServiceIntegrationTest { diff --git a/src/test/java/nl/b3p/tailormap/api/util/TMPasswordDeserializerTest.java b/src/test/java/org/tailormap/api/util/TMPasswordDeserializerTest.java similarity index 96% rename from src/test/java/nl/b3p/tailormap/api/util/TMPasswordDeserializerTest.java rename to src/test/java/org/tailormap/api/util/TMPasswordDeserializerTest.java index 0e64cfbce..523373ad9 100644 --- a/src/test/java/nl/b3p/tailormap/api/util/TMPasswordDeserializerTest.java +++ b/src/test/java/org/tailormap/api/util/TMPasswordDeserializerTest.java @@ -3,7 +3,7 @@ * * SPDX-License-Identifier: MIT */ -package nl.b3p.tailormap.api.util; +package org.tailormap.api.util; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; @@ -14,8 +14,8 @@ import com.fasterxml.jackson.databind.DeserializationContext; import com.fasterxml.jackson.databind.ObjectMapper; import java.io.IOException; -import nl.b3p.tailormap.api.security.InvalidPasswordException; import org.junit.jupiter.api.Test; +import org.tailormap.api.security.InvalidPasswordException; class TMPasswordDeserializerTest { private final String testJsonTemplate = "{\"password\":\"%s\"}"; diff --git a/src/test/resources/application.properties b/src/test/resources/application.properties index cd0cc0b4c..280eaee71 100644 --- a/src/test/resources/application.properties +++ b/src/test/resources/application.properties @@ -18,7 +18,7 @@ spring.jmx.enabled=false # XXX does not work? logging.level.org.springframework=INFO -logging.level.nl.b3p.tailormap.api=TRACE +logging.level.org.tailormap.api=DEBUG # log all GeoTools jdbc interactions #logging.level.org.geotools.jdbc=DEBUG \ No newline at end of file diff --git a/src/test/resources/nl/b3p/tailormap/api/controller/begroeidterreindeelLegend_expected.png b/src/test/resources/org/tailormap/api/controller/begroeidterreindeelLegend_expected.png similarity index 100% rename from src/test/resources/nl/b3p/tailormap/api/controller/begroeidterreindeelLegend_expected.png rename to src/test/resources/org/tailormap/api/controller/begroeidterreindeelLegend_expected.png diff --git a/src/test/resources/nl/b3p/tailormap/api/controller/pdokWmsProvinciegebiedLegend_expected.png b/src/test/resources/org/tailormap/api/controller/pdokWmsProvinciegebiedLegend_expected.png similarity index 100% rename from src/test/resources/nl/b3p/tailormap/api/controller/pdokWmsProvinciegebiedLegend_expected.png rename to src/test/resources/org/tailormap/api/controller/pdokWmsProvinciegebiedLegend_expected.png