diff --git a/README.md b/README.md index c4e9843..2a85ed8 100644 --- a/README.md +++ b/README.md @@ -103,10 +103,11 @@ Maven's `pom.xml` should contain following content: YAML - ch.sbb.polarion.extension.generic.rest.controller + ch.sbb.polarion.extension.generic.rest.controller.info + ch.sbb.polarion.extension.generic.rest.controller.settings ch.sbb.polarion.extension.generic.rest.model - ch.sbb.polarion.extension.pdf.exporter.rest.controller - ch.sbb.polarion.extension.pdf.exporter.rest.model + ch.sbb.polarion.extension.pdf_exporter.rest.controller + ch.sbb.polarion.extension.pdf_exporter.rest.model diff --git a/app/src/main/java/ch/sbb/polarion/extension/generic/rest/GenericRestApplication.java b/app/src/main/java/ch/sbb/polarion/extension/generic/rest/GenericRestApplication.java index eda8667..f143259 100644 --- a/app/src/main/java/ch/sbb/polarion/extension/generic/rest/GenericRestApplication.java +++ b/app/src/main/java/ch/sbb/polarion/extension/generic/rest/GenericRestApplication.java @@ -8,9 +8,9 @@ import javax.ws.rs.core.Application; -import ch.sbb.polarion.extension.generic.rest.controller.NamedSettingsApiController; -import ch.sbb.polarion.extension.generic.rest.controller.NamedSettingsApiScopeAgnosticController; -import ch.sbb.polarion.extension.generic.rest.controller.NamedSettingsInternalController; +import ch.sbb.polarion.extension.generic.rest.controller.settings.NamedSettingsApiController; +import ch.sbb.polarion.extension.generic.rest.controller.settings.NamedSettingsApiScopeAgnosticController; +import ch.sbb.polarion.extension.generic.rest.controller.settings.NamedSettingsInternalController; import ch.sbb.polarion.extension.generic.rest.exception.ForbiddenExceptionMapper; import ch.sbb.polarion.extension.generic.rest.exception.IllegalStateExceptionMapper; import ch.sbb.polarion.extension.generic.rest.exception.ObjectNotFoundExceptionMapper; @@ -19,10 +19,10 @@ import org.glassfish.jersey.jackson.JacksonFeature; import org.jetbrains.annotations.NotNull; -import ch.sbb.polarion.extension.generic.rest.controller.ExtensionInfoApiController; -import ch.sbb.polarion.extension.generic.rest.controller.ExtensionInfoInternalController; -import ch.sbb.polarion.extension.generic.rest.controller.SwaggerController; -import ch.sbb.polarion.extension.generic.rest.controller.SwaggerDefinitionController; +import ch.sbb.polarion.extension.generic.rest.controller.info.ExtensionInfoApiController; +import ch.sbb.polarion.extension.generic.rest.controller.info.ExtensionInfoInternalController; +import ch.sbb.polarion.extension.generic.rest.controller.swagger.SwaggerController; +import ch.sbb.polarion.extension.generic.rest.controller.swagger.SwaggerDefinitionController; import ch.sbb.polarion.extension.generic.rest.exception.BadRequestExceptionMapper; import ch.sbb.polarion.extension.generic.rest.exception.IllegalArgumentExceptionMapper; import ch.sbb.polarion.extension.generic.rest.exception.InternalServerErrorExceptionMapper; diff --git a/app/src/main/java/ch/sbb/polarion/extension/generic/rest/controller/ExtensionInfoApiController.java b/app/src/main/java/ch/sbb/polarion/extension/generic/rest/controller/info/ExtensionInfoApiController.java similarity index 75% rename from app/src/main/java/ch/sbb/polarion/extension/generic/rest/controller/ExtensionInfoApiController.java rename to app/src/main/java/ch/sbb/polarion/extension/generic/rest/controller/info/ExtensionInfoApiController.java index 51558af..8760114 100644 --- a/app/src/main/java/ch/sbb/polarion/extension/generic/rest/controller/ExtensionInfoApiController.java +++ b/app/src/main/java/ch/sbb/polarion/extension/generic/rest/controller/info/ExtensionInfoApiController.java @@ -1,4 +1,4 @@ -package ch.sbb.polarion.extension.generic.rest.controller; +package ch.sbb.polarion.extension.generic.rest.controller.info; import javax.ws.rs.Path; diff --git a/app/src/main/java/ch/sbb/polarion/extension/generic/rest/controller/ExtensionInfoInternalController.java b/app/src/main/java/ch/sbb/polarion/extension/generic/rest/controller/info/ExtensionInfoInternalController.java similarity index 91% rename from app/src/main/java/ch/sbb/polarion/extension/generic/rest/controller/ExtensionInfoInternalController.java rename to app/src/main/java/ch/sbb/polarion/extension/generic/rest/controller/info/ExtensionInfoInternalController.java index 1a06420..3e0ea69 100644 --- a/app/src/main/java/ch/sbb/polarion/extension/generic/rest/controller/ExtensionInfoInternalController.java +++ b/app/src/main/java/ch/sbb/polarion/extension/generic/rest/controller/info/ExtensionInfoInternalController.java @@ -1,12 +1,10 @@ -package ch.sbb.polarion.extension.generic.rest.controller; +package ch.sbb.polarion.extension.generic.rest.controller.info; import ch.sbb.polarion.extension.generic.rest.model.Context; import ch.sbb.polarion.extension.generic.rest.model.Version; import ch.sbb.polarion.extension.generic.util.ExtensionInfo; import io.swagger.v3.oas.annotations.Hidden; -import io.swagger.v3.oas.annotations.OpenAPIDefinition; import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.info.Info; import io.swagger.v3.oas.annotations.media.Content; import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.responses.ApiResponse; diff --git a/app/src/main/java/ch/sbb/polarion/extension/generic/rest/controller/NamedSettingsApiController.java b/app/src/main/java/ch/sbb/polarion/extension/generic/rest/controller/settings/NamedSettingsApiController.java similarity index 96% rename from app/src/main/java/ch/sbb/polarion/extension/generic/rest/controller/NamedSettingsApiController.java rename to app/src/main/java/ch/sbb/polarion/extension/generic/rest/controller/settings/NamedSettingsApiController.java index 5fb7a3d..206a3e3 100644 --- a/app/src/main/java/ch/sbb/polarion/extension/generic/rest/controller/NamedSettingsApiController.java +++ b/app/src/main/java/ch/sbb/polarion/extension/generic/rest/controller/settings/NamedSettingsApiController.java @@ -1,4 +1,4 @@ -package ch.sbb.polarion.extension.generic.rest.controller; +package ch.sbb.polarion.extension.generic.rest.controller.settings; import ch.sbb.polarion.extension.generic.rest.filter.Secured; import ch.sbb.polarion.extension.generic.settings.Revision; diff --git a/app/src/main/java/ch/sbb/polarion/extension/generic/rest/controller/NamedSettingsApiScopeAgnosticController.java b/app/src/main/java/ch/sbb/polarion/extension/generic/rest/controller/settings/NamedSettingsApiScopeAgnosticController.java similarity index 98% rename from app/src/main/java/ch/sbb/polarion/extension/generic/rest/controller/NamedSettingsApiScopeAgnosticController.java rename to app/src/main/java/ch/sbb/polarion/extension/generic/rest/controller/settings/NamedSettingsApiScopeAgnosticController.java index e9526ee..6450929 100644 --- a/app/src/main/java/ch/sbb/polarion/extension/generic/rest/controller/NamedSettingsApiScopeAgnosticController.java +++ b/app/src/main/java/ch/sbb/polarion/extension/generic/rest/controller/settings/NamedSettingsApiScopeAgnosticController.java @@ -1,4 +1,4 @@ -package ch.sbb.polarion.extension.generic.rest.controller; +package ch.sbb.polarion.extension.generic.rest.controller.settings; import ch.sbb.polarion.extension.generic.rest.filter.Secured; import ch.sbb.polarion.extension.generic.settings.Revision; diff --git a/app/src/main/java/ch/sbb/polarion/extension/generic/rest/controller/NamedSettingsInternalController.java b/app/src/main/java/ch/sbb/polarion/extension/generic/rest/controller/settings/NamedSettingsInternalController.java similarity index 99% rename from app/src/main/java/ch/sbb/polarion/extension/generic/rest/controller/NamedSettingsInternalController.java rename to app/src/main/java/ch/sbb/polarion/extension/generic/rest/controller/settings/NamedSettingsInternalController.java index 8aa6003..b04cd23 100644 --- a/app/src/main/java/ch/sbb/polarion/extension/generic/rest/controller/NamedSettingsInternalController.java +++ b/app/src/main/java/ch/sbb/polarion/extension/generic/rest/controller/settings/NamedSettingsInternalController.java @@ -1,4 +1,4 @@ -package ch.sbb.polarion.extension.generic.rest.controller; +package ch.sbb.polarion.extension.generic.rest.controller.settings; import ch.sbb.polarion.extension.generic.service.PolarionService; import ch.sbb.polarion.extension.generic.settings.GenericNamedSettings; diff --git a/app/src/main/java/ch/sbb/polarion/extension/generic/rest/controller/SwaggerController.java b/app/src/main/java/ch/sbb/polarion/extension/generic/rest/controller/swagger/SwaggerController.java similarity index 96% rename from app/src/main/java/ch/sbb/polarion/extension/generic/rest/controller/SwaggerController.java rename to app/src/main/java/ch/sbb/polarion/extension/generic/rest/controller/swagger/SwaggerController.java index 9f9af4b..ed91480 100644 --- a/app/src/main/java/ch/sbb/polarion/extension/generic/rest/controller/SwaggerController.java +++ b/app/src/main/java/ch/sbb/polarion/extension/generic/rest/controller/swagger/SwaggerController.java @@ -1,4 +1,4 @@ -package ch.sbb.polarion.extension.generic.rest.controller; +package ch.sbb.polarion.extension.generic.rest.controller.swagger; import java.io.IOException; import java.io.InputStream; diff --git a/app/src/main/java/ch/sbb/polarion/extension/generic/rest/controller/SwaggerDefinitionController.java b/app/src/main/java/ch/sbb/polarion/extension/generic/rest/controller/swagger/SwaggerDefinitionController.java similarity index 98% rename from app/src/main/java/ch/sbb/polarion/extension/generic/rest/controller/SwaggerDefinitionController.java rename to app/src/main/java/ch/sbb/polarion/extension/generic/rest/controller/swagger/SwaggerDefinitionController.java index bf76d7f..392e076 100644 --- a/app/src/main/java/ch/sbb/polarion/extension/generic/rest/controller/SwaggerDefinitionController.java +++ b/app/src/main/java/ch/sbb/polarion/extension/generic/rest/controller/swagger/SwaggerDefinitionController.java @@ -1,7 +1,7 @@ /* * Copyright 2020 Polarion AG */ -package ch.sbb.polarion.extension.generic.rest.controller; +package ch.sbb.polarion.extension.generic.rest.controller.swagger; import java.util.List; import java.util.Set; diff --git a/app/src/test/java/ch/sbb/polarion/extension/generic/fields/CustomFieldEnumConverterTest.java b/app/src/test/java/ch/sbb/polarion/extension/generic/fields/CustomFieldEnumConverterTest.java index 5ae5893..144cd27 100644 --- a/app/src/test/java/ch/sbb/polarion/extension/generic/fields/CustomFieldEnumConverterTest.java +++ b/app/src/test/java/ch/sbb/polarion/extension/generic/fields/CustomFieldEnumConverterTest.java @@ -2,8 +2,8 @@ import ch.sbb.polarion.extension.generic.fields.converters.ChainConverter; import ch.sbb.polarion.extension.generic.fields.model.FieldMetadata; -import ch.sbb.polarion.extension.generic.polarion.CustomExtensionMock; -import ch.sbb.polarion.extension.generic.polarion.PlatformContextMockExtension; +import ch.sbb.polarion.extension.generic.test_extensions.CustomExtensionMock; +import ch.sbb.polarion.extension.generic.test_extensions.PlatformContextMockExtension; import com.polarion.alm.shared.util.Pair; import com.polarion.alm.tracker.ITrackerService; import com.polarion.platform.persistence.IDataService; diff --git a/app/src/test/java/ch/sbb/polarion/extension/generic/rest/controller/NamedSettingsInternalControllerTest.java b/app/src/test/java/ch/sbb/polarion/extension/generic/rest/controller/NamedSettingsInternalControllerTest.java index baaa78a..528c5a0 100644 --- a/app/src/test/java/ch/sbb/polarion/extension/generic/rest/controller/NamedSettingsInternalControllerTest.java +++ b/app/src/test/java/ch/sbb/polarion/extension/generic/rest/controller/NamedSettingsInternalControllerTest.java @@ -1,6 +1,7 @@ package ch.sbb.polarion.extension.generic.rest.controller; import ch.sbb.polarion.extension.generic.exception.ObjectNotFoundException; +import ch.sbb.polarion.extension.generic.rest.controller.settings.NamedSettingsInternalController; import ch.sbb.polarion.extension.generic.service.PolarionService; import ch.sbb.polarion.extension.generic.settings.GenericNamedSettings; import ch.sbb.polarion.extension.generic.settings.NamedSettingsRegistry; diff --git a/app/src/test/java/ch/sbb/polarion/extension/generic/service/PolarionServiceTest.java b/app/src/test/java/ch/sbb/polarion/extension/generic/service/PolarionServiceTest.java index 61e5dea..b7d0d09 100644 --- a/app/src/test/java/ch/sbb/polarion/extension/generic/service/PolarionServiceTest.java +++ b/app/src/test/java/ch/sbb/polarion/extension/generic/service/PolarionServiceTest.java @@ -4,8 +4,8 @@ import ch.sbb.polarion.extension.generic.fields.FieldType; import ch.sbb.polarion.extension.generic.fields.model.FieldMetadata; import ch.sbb.polarion.extension.generic.fields.model.Option; -import ch.sbb.polarion.extension.generic.polarion.PlatformContextMockExtension; -import ch.sbb.polarion.extension.generic.polarion.TransactionalExecutorExtension; +import ch.sbb.polarion.extension.generic.test_extensions.PlatformContextMockExtension; +import ch.sbb.polarion.extension.generic.test_extensions.TransactionalExecutorExtension; import ch.sbb.polarion.extension.generic.util.AssigneeUtils; import ch.sbb.polarion.extension.generic.util.TestUtils; import com.polarion.alm.projects.IProjectService; diff --git a/app/src/test/java/ch/sbb/polarion/extension/generic/settings/SettingsServiceTest.java b/app/src/test/java/ch/sbb/polarion/extension/generic/settings/SettingsServiceTest.java index fdd7450..552c4f8 100644 --- a/app/src/test/java/ch/sbb/polarion/extension/generic/settings/SettingsServiceTest.java +++ b/app/src/test/java/ch/sbb/polarion/extension/generic/settings/SettingsServiceTest.java @@ -1,8 +1,8 @@ package ch.sbb.polarion.extension.generic.settings; -import ch.sbb.polarion.extension.generic.polarion.CustomExtensionMock; -import ch.sbb.polarion.extension.generic.polarion.PlatformContextMockExtension; -import ch.sbb.polarion.extension.generic.polarion.TransactionalExecutorExtension; +import ch.sbb.polarion.extension.generic.test_extensions.CustomExtensionMock; +import ch.sbb.polarion.extension.generic.test_extensions.PlatformContextMockExtension; +import ch.sbb.polarion.extension.generic.test_extensions.TransactionalExecutorExtension; import com.polarion.alm.projects.IProjectService; import com.polarion.alm.projects.model.IUser; import com.polarion.alm.tracker.ITrackerService; diff --git a/app/src/test/java/ch/sbb/polarion/extension/generic/polarion/CustomExtensionMock.java b/app/src/test/java/ch/sbb/polarion/extension/generic/test_extensions/CustomExtensionMock.java similarity index 81% rename from app/src/test/java/ch/sbb/polarion/extension/generic/polarion/CustomExtensionMock.java rename to app/src/test/java/ch/sbb/polarion/extension/generic/test_extensions/CustomExtensionMock.java index fece097..fb3315d 100644 --- a/app/src/test/java/ch/sbb/polarion/extension/generic/polarion/CustomExtensionMock.java +++ b/app/src/test/java/ch/sbb/polarion/extension/generic/test_extensions/CustomExtensionMock.java @@ -1,4 +1,4 @@ -package ch.sbb.polarion.extension.generic.polarion; +package ch.sbb.polarion.extension.generic.test_extensions; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/app/src/test/java/ch/sbb/polarion/extension/generic/polarion/CustomExtensionMockInjector.java b/app/src/test/java/ch/sbb/polarion/extension/generic/test_extensions/CustomExtensionMockInjector.java similarity index 92% rename from app/src/test/java/ch/sbb/polarion/extension/generic/polarion/CustomExtensionMockInjector.java rename to app/src/test/java/ch/sbb/polarion/extension/generic/test_extensions/CustomExtensionMockInjector.java index 41fe194..a6abe5a 100644 --- a/app/src/test/java/ch/sbb/polarion/extension/generic/polarion/CustomExtensionMockInjector.java +++ b/app/src/test/java/ch/sbb/polarion/extension/generic/test_extensions/CustomExtensionMockInjector.java @@ -1,4 +1,4 @@ -package ch.sbb.polarion.extension.generic.polarion; +package ch.sbb.polarion.extension.generic.test_extensions; import org.junit.jupiter.api.extension.ExtensionContext; diff --git a/app/src/test/java/ch/sbb/polarion/extension/generic/polarion/PlatformContextMockExtension.java b/app/src/test/java/ch/sbb/polarion/extension/generic/test_extensions/PlatformContextMockExtension.java similarity index 98% rename from app/src/test/java/ch/sbb/polarion/extension/generic/polarion/PlatformContextMockExtension.java rename to app/src/test/java/ch/sbb/polarion/extension/generic/test_extensions/PlatformContextMockExtension.java index e0f39ad..a5301b5 100644 --- a/app/src/test/java/ch/sbb/polarion/extension/generic/polarion/PlatformContextMockExtension.java +++ b/app/src/test/java/ch/sbb/polarion/extension/generic/test_extensions/PlatformContextMockExtension.java @@ -1,4 +1,4 @@ -package ch.sbb.polarion.extension.generic.polarion; +package ch.sbb.polarion.extension.generic.test_extensions; import com.polarion.alm.projects.IProjectService; import com.polarion.alm.tracker.ITestManagementService; diff --git a/app/src/test/java/ch/sbb/polarion/extension/generic/polarion/TransactionalExecutorExtension.java b/app/src/test/java/ch/sbb/polarion/extension/generic/test_extensions/TransactionalExecutorExtension.java similarity index 98% rename from app/src/test/java/ch/sbb/polarion/extension/generic/polarion/TransactionalExecutorExtension.java rename to app/src/test/java/ch/sbb/polarion/extension/generic/test_extensions/TransactionalExecutorExtension.java index f991e83..8deeb2a 100644 --- a/app/src/test/java/ch/sbb/polarion/extension/generic/polarion/TransactionalExecutorExtension.java +++ b/app/src/test/java/ch/sbb/polarion/extension/generic/test_extensions/TransactionalExecutorExtension.java @@ -1,4 +1,4 @@ -package ch.sbb.polarion.extension.generic.polarion; +package ch.sbb.polarion.extension.generic.test_extensions; import com.polarion.alm.shared.api.transaction.RunnableInReadOnlyTransaction; import com.polarion.alm.shared.api.transaction.TransactionalExecutor;