diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 97853aae..239e8355 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,7 +6,7 @@ jobs: build: strategy: matrix: - java: [ '8', '11', '17' ] + java: [ '11', '17', '21' ] name: Build on Java ${{ matrix.java }} runs-on: ubuntu-latest steps: diff --git a/.java-version b/.java-version index 62593409..2dbc24b3 100644 --- a/.java-version +++ b/.java-version @@ -1 +1 @@ -1.8 +11.0 diff --git a/NOTICE b/NOTICE index ffe5cf0a..d034815e 100644 --- a/NOTICE +++ b/NOTICE @@ -12,21 +12,23 @@ specific language governing permissions and limitations under the License. This project includes: - Bean Validation API under Apache License 2.0 - ClassMate under The Apache Software License, Version 2.0 + Angus Activation Registries under EDL 1.0 + ClassMate under Apache License, Version 2.0 Digipost Data Types under The Apache Software License, Version 2.0 - Digipost JAXB Resolver - com.sun.xml.bind under The Apache Software License, Version 2.0 - Expression Language 3.0 API under CDDL + GPLv2 with classpath exception + Eclipse Expressly under Eclipse Public License v. 2.0 or GNU General Public License, version 2 with the GNU Classpath Exception Hibernate Validator Engine under Apache License 2.0 + istack common utility code runtime under Eclipse Distribution License - v 1.0 Jackson datatype: JSR310 under The Apache Software License, Version 2.0 Jackson-annotations under The Apache Software License, Version 2.0 Jackson-core under The Apache Software License, Version 2.0 jackson-databind under The Apache Software License, Version 2.0 - Jakarta Expression Language 3.0 Implementation under EPL 2.0 or GPL2 w/ CPE - JavaBeans Activation Framework API jar under CDDL/GPLv2+CE - jaxb-api under CDDL 1.1 or GPL2 w/ CPE + Jakarta Activation API under EDL 1.0 + Jakarta Bean Validation API under Apache License 2.0 + Jakarta Expression Language API under Eclipse Public License v. 2.0 or GNU General Public License, version 2 with the GNU Classpath Exception + Jakarta XML Binding API under Eclipse Distribution License - v 1.0 + JAXB Core under Eclipse Distribution License - v 1.0 + JAXB Runtime under Eclipse Distribution License - v 1.0 JBoss Logging 3 under Apache License, version 2.0 - Old JAXB Core under CDDL+GPL License - Old JAXB Runtime under Eclipse Distribution License - v 1.0 Project Lombok under The MIT License + TXW2 Runtime under Eclipse Distribution License - v 1.0 diff --git a/datatypes.xsd b/datatypes.xsd index 27a5089a..024df0f5 100644 --- a/datatypes.xsd +++ b/datatypes.xsd @@ -1,531 +1,466 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pom.xml b/pom.xml index c8a38569..b3c6da3b 100644 --- a/pom.xml +++ b/pom.xml @@ -14,23 +14,17 @@ Data types for Digipost messages - 1.8 - 1.8 + 11 + 11 + 1.18.30 - - no.digipost - jaxb-resolver-com.sun.xml.bind-bom - 1.0 - pom - import - com.fasterxml.jackson jackson-bom - 2.14.2 + 2.16.0 pom import @@ -48,7 +42,7 @@ org.projectlombok lombok - 1.18.20 + ${lombok.version} provided @@ -68,50 +62,40 @@ jackson-core - javax.validation - validation-api - 2.0.1.Final - + jakarta.validation + jakarta.validation-api + 3.0.2 + org.hibernate.validator hibernate-validator - 6.1.5.Final + 8.0.0.Final runtime true - - - jakarta.validation - jakarta.validation-api - - - com.sun.el - el-ri - 3.0.4 + org.glassfish.expressly + expressly + 5.0.0 runtime true - - - jakarta.el - jakarta.el-api - - - javax.el - javax.el-api - 3.0.0 + jakarta.el + jakarta.el-api + 5.0.1 runtime true - javax.xml.bind - jaxb-api + jakarta.xml.bind + jakarta.xml.bind-api + 4.0.1 - no.digipost - jaxb-resolver-com.sun.xml.bind + org.glassfish.jaxb + jaxb-runtime + 4.0.4 runtime @@ -133,7 +117,7 @@ org.hamcrest hamcrest - 2.2-rc1 + 2.2 test @@ -259,8 +243,15 @@ + + + org.projectlombok + lombok + ${lombok.version} + + - ${project.build.sourceDirectory} + ${project.build.sourceDirectory}/no/digipost/api/datatypes/types/ ${project.build.directory}/schemagen-work/lombok false @@ -268,7 +259,7 @@ org.codehaus.mojo jaxb2-maven-plugin - 2.3.1 + 3.1.0 schemagen @@ -281,12 +272,12 @@ jakarta.xml.bind jakarta.xml.bind-api - 2.3.2 + 4.0.1 org.glassfish.jaxb jaxb-runtime - 2.3.2 + 4.0.4 runtime @@ -294,15 +285,6 @@ ${project.build.directory}/schemagen-work/lombok - - - - marshalling - validation - documentation - - - http://api.digipost.no/schema/datatypes @@ -352,8 +334,8 @@ org.jasig.maven - maven-notice-plugin - 1.1.0 + notice-maven-plugin + 2.0.0 test diff --git a/src/main/java/no/digipost/api/datatypes/DataTypeIdentifier.java b/src/main/java/no/digipost/api/datatypes/DataTypeIdentifier.java index 315647a4..785e756a 100644 --- a/src/main/java/no/digipost/api/datatypes/DataTypeIdentifier.java +++ b/src/main/java/no/digipost/api/datatypes/DataTypeIdentifier.java @@ -15,6 +15,8 @@ import no.digipost.api.datatypes.types.proof.Proof; import no.digipost.api.datatypes.types.receipt.Receipt; import no.digipost.api.datatypes.types.share.ShareDocumentsRequest; +import no.digipost.api.datatypes.types.share.ShareDocumentsRequestDocumentsShared; +import no.digipost.api.datatypes.types.share.ShareDocumentsRequestSharingStopped; import java.util.Collections; import java.util.Map; @@ -28,9 +30,6 @@ import static java.util.stream.Collectors.toMap; import static java.util.stream.Collectors.toSet; -import no.digipost.api.datatypes.types.share.ShareDocumentsRequestDocumentsShared; -import no.digipost.api.datatypes.types.share.ShareDocumentsRequestSharingStopped; - /** * HOWTO: Add new data type * diff --git a/src/main/java/no/digipost/api/datatypes/documentation/DocumentationGenerator.java b/src/main/java/no/digipost/api/datatypes/documentation/DocumentationGenerator.java index 107a43b5..18974da8 100644 --- a/src/main/java/no/digipost/api/datatypes/documentation/DocumentationGenerator.java +++ b/src/main/java/no/digipost/api/datatypes/documentation/DocumentationGenerator.java @@ -1,10 +1,10 @@ package no.digipost.api.datatypes.documentation; +import jakarta.xml.bind.JAXBException; import no.digipost.api.datatypes.DataType; import no.digipost.api.datatypes.DataTypeIdentifier; import no.digipost.api.datatypes.marshalling.DataTypesJAXBContext; -import javax.xml.bind.JAXBException; import java.io.IOException; import java.nio.charset.StandardCharsets; import java.nio.file.Files; diff --git a/src/main/java/no/digipost/api/datatypes/documentation/DocumentationStructureBuilder.java b/src/main/java/no/digipost/api/datatypes/documentation/DocumentationStructureBuilder.java index 7976cbce..c9e0b98d 100644 --- a/src/main/java/no/digipost/api/datatypes/documentation/DocumentationStructureBuilder.java +++ b/src/main/java/no/digipost/api/datatypes/documentation/DocumentationStructureBuilder.java @@ -1,9 +1,9 @@ package no.digipost.api.datatypes.documentation; +import jakarta.validation.constraints.NotNull; +import jakarta.xml.bind.annotation.XmlElement; import no.digipost.api.datatypes.ComplementedBy; -import javax.validation.constraints.NotNull; -import javax.xml.bind.annotation.XmlElement; import java.lang.reflect.AnnotatedElement; import java.lang.reflect.Field; import java.util.Collections; diff --git a/src/main/java/no/digipost/api/datatypes/documentation/MarkdownPrinter.java b/src/main/java/no/digipost/api/datatypes/documentation/MarkdownPrinter.java index dc93173d..a9d0fb89 100644 --- a/src/main/java/no/digipost/api/datatypes/documentation/MarkdownPrinter.java +++ b/src/main/java/no/digipost/api/datatypes/documentation/MarkdownPrinter.java @@ -2,11 +2,11 @@ import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.SerializationFeature; +import jakarta.xml.bind.JAXBContext; +import jakarta.xml.bind.JAXBException; +import jakarta.xml.bind.Marshaller; import no.digipost.api.datatypes.marshalling.DataTypesJsonMapper; -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Marshaller; import java.io.StringWriter; import java.util.HashSet; import java.util.List; diff --git a/src/main/java/no/digipost/api/datatypes/marshalling/DataTypeXmlAdapter.java b/src/main/java/no/digipost/api/datatypes/marshalling/DataTypeXmlAdapter.java index e8e1535e..78c20849 100644 --- a/src/main/java/no/digipost/api/datatypes/marshalling/DataTypeXmlAdapter.java +++ b/src/main/java/no/digipost/api/datatypes/marshalling/DataTypeXmlAdapter.java @@ -1,12 +1,12 @@ package no.digipost.api.datatypes.marshalling; +import jakarta.xml.bind.Marshaller; +import jakarta.xml.bind.Unmarshaller; +import jakarta.xml.bind.annotation.adapters.XmlAdapter; import no.digipost.api.datatypes.DataType; import org.w3c.dom.Document; import org.w3c.dom.Element; -import javax.xml.bind.Marshaller; -import javax.xml.bind.Unmarshaller; -import javax.xml.bind.annotation.adapters.XmlAdapter; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.transform.dom.DOMSource; diff --git a/src/main/java/no/digipost/api/datatypes/marshalling/DataTypesJAXBContext.java b/src/main/java/no/digipost/api/datatypes/marshalling/DataTypesJAXBContext.java index 2fc9bd8a..1173f3d1 100644 --- a/src/main/java/no/digipost/api/datatypes/marshalling/DataTypesJAXBContext.java +++ b/src/main/java/no/digipost/api/datatypes/marshalling/DataTypesJAXBContext.java @@ -1,7 +1,7 @@ package no.digipost.api.datatypes.marshalling; -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBException; +import jakarta.xml.bind.JAXBContext; +import jakarta.xml.bind.JAXBException; public class DataTypesJAXBContext { diff --git a/src/main/java/no/digipost/api/datatypes/marshalling/LocalDateTimeXmlAdapter.java b/src/main/java/no/digipost/api/datatypes/marshalling/LocalDateTimeXmlAdapter.java index ba06bfee..3b65356f 100644 --- a/src/main/java/no/digipost/api/datatypes/marshalling/LocalDateTimeXmlAdapter.java +++ b/src/main/java/no/digipost/api/datatypes/marshalling/LocalDateTimeXmlAdapter.java @@ -1,6 +1,7 @@ package no.digipost.api.datatypes.marshalling; -import javax.xml.bind.annotation.adapters.XmlAdapter; +import jakarta.xml.bind.annotation.adapters.XmlAdapter; + import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; diff --git a/src/main/java/no/digipost/api/datatypes/marshalling/MoneyBigDecimalXmlAdapter.java b/src/main/java/no/digipost/api/datatypes/marshalling/MoneyBigDecimalXmlAdapter.java index e2a1e084..cdec06f2 100644 --- a/src/main/java/no/digipost/api/datatypes/marshalling/MoneyBigDecimalXmlAdapter.java +++ b/src/main/java/no/digipost/api/datatypes/marshalling/MoneyBigDecimalXmlAdapter.java @@ -1,6 +1,7 @@ package no.digipost.api.datatypes.marshalling; -import javax.xml.bind.annotation.adapters.XmlAdapter; +import jakarta.xml.bind.annotation.adapters.XmlAdapter; + import java.math.BigDecimal; import static java.math.BigDecimal.ROUND_HALF_UP; diff --git a/src/main/java/no/digipost/api/datatypes/marshalling/ZonedDateTimeXmlAdapter.java b/src/main/java/no/digipost/api/datatypes/marshalling/ZonedDateTimeXmlAdapter.java index 24c5d48f..bd973f1c 100644 --- a/src/main/java/no/digipost/api/datatypes/marshalling/ZonedDateTimeXmlAdapter.java +++ b/src/main/java/no/digipost/api/datatypes/marshalling/ZonedDateTimeXmlAdapter.java @@ -1,7 +1,8 @@ package no.digipost.api.datatypes.marshalling; -import javax.xml.bind.DatatypeConverter; -import javax.xml.bind.annotation.adapters.XmlAdapter; +import jakarta.xml.bind.DatatypeConverter; +import jakarta.xml.bind.annotation.adapters.XmlAdapter; + import java.time.LocalDateTime; import java.time.ZoneOffset; import java.time.ZonedDateTime; diff --git a/src/main/java/no/digipost/api/datatypes/types/Address.java b/src/main/java/no/digipost/api/datatypes/types/Address.java index 2a7bd631..f1166634 100644 --- a/src/main/java/no/digipost/api/datatypes/types/Address.java +++ b/src/main/java/no/digipost/api/datatypes/types/Address.java @@ -1,5 +1,8 @@ package no.digipost.api.datatypes.types; +import jakarta.validation.constraints.Size; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlType; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; @@ -7,10 +10,6 @@ import lombok.With; import no.digipost.api.datatypes.documentation.Description; -import javax.validation.constraints.Size; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - @XmlType @Value @AllArgsConstructor diff --git a/src/main/java/no/digipost/api/datatypes/types/Appointment.java b/src/main/java/no/digipost/api/datatypes/types/Appointment.java index 489b887e..10f85881 100644 --- a/src/main/java/no/digipost/api/datatypes/types/Appointment.java +++ b/src/main/java/no/digipost/api/datatypes/types/Appointment.java @@ -1,5 +1,10 @@ package no.digipost.api.datatypes.types; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; @@ -8,11 +13,6 @@ import no.digipost.api.datatypes.DataType; import no.digipost.api.datatypes.documentation.Description; -import javax.validation.Valid; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; import java.time.ZoneId; import java.time.ZonedDateTime; import java.util.List; diff --git a/src/main/java/no/digipost/api/datatypes/types/Barcode.java b/src/main/java/no/digipost/api/datatypes/types/Barcode.java index cccc1b06..210d231a 100644 --- a/src/main/java/no/digipost/api/datatypes/types/Barcode.java +++ b/src/main/java/no/digipost/api/datatypes/types/Barcode.java @@ -1,5 +1,8 @@ package no.digipost.api.datatypes.types; +import jakarta.validation.constraints.Size; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlType; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; @@ -7,10 +10,6 @@ import lombok.With; import no.digipost.api.datatypes.documentation.Description; -import javax.validation.constraints.Size; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - @XmlType @Value @AllArgsConstructor diff --git a/src/main/java/no/digipost/api/datatypes/types/Boligdetaljer.java b/src/main/java/no/digipost/api/datatypes/types/Boligdetaljer.java index afa3ed40..572e81d1 100644 --- a/src/main/java/no/digipost/api/datatypes/types/Boligdetaljer.java +++ b/src/main/java/no/digipost/api/datatypes/types/Boligdetaljer.java @@ -1,5 +1,11 @@ package no.digipost.api.datatypes.types; +import jakarta.validation.Valid; +import jakarta.validation.constraints.Min; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; @@ -9,12 +15,6 @@ import no.digipost.api.datatypes.DataType; import no.digipost.api.datatypes.documentation.Description; -import javax.validation.Valid; -import javax.validation.constraints.Min; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; import java.time.ZoneId; import java.time.ZonedDateTime; import java.util.Collections; diff --git a/src/main/java/no/digipost/api/datatypes/types/Event.java b/src/main/java/no/digipost/api/datatypes/types/Event.java index d57210bd..d17c2684 100644 --- a/src/main/java/no/digipost/api/datatypes/types/Event.java +++ b/src/main/java/no/digipost/api/datatypes/types/Event.java @@ -1,5 +1,10 @@ package no.digipost.api.datatypes.types; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.Size; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; @@ -8,11 +13,6 @@ import no.digipost.api.datatypes.DataType; import no.digipost.api.datatypes.documentation.Description; -import javax.validation.Valid; -import javax.validation.constraints.NotEmpty; -import javax.validation.constraints.Size; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; import java.util.List; import static java.util.Collections.singletonList; diff --git a/src/main/java/no/digipost/api/datatypes/types/ExternalLink.java b/src/main/java/no/digipost/api/datatypes/types/ExternalLink.java index 1c68fbe4..cc1a5667 100644 --- a/src/main/java/no/digipost/api/datatypes/types/ExternalLink.java +++ b/src/main/java/no/digipost/api/datatypes/types/ExternalLink.java @@ -1,5 +1,10 @@ package no.digipost.api.datatypes.types; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlSchemaType; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; @@ -9,11 +14,6 @@ import no.digipost.api.datatypes.documentation.Description; import no.digipost.api.datatypes.validation.WebUrl; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlSchemaType; import java.net.URI; import java.time.ZoneId; import java.time.ZonedDateTime; diff --git a/src/main/java/no/digipost/api/datatypes/types/ForeignCurrencyPayment.java b/src/main/java/no/digipost/api/datatypes/types/ForeignCurrencyPayment.java index 4d5aa842..365b69e5 100644 --- a/src/main/java/no/digipost/api/datatypes/types/ForeignCurrencyPayment.java +++ b/src/main/java/no/digipost/api/datatypes/types/ForeignCurrencyPayment.java @@ -1,5 +1,8 @@ package no.digipost.api.datatypes.types; +import jakarta.validation.constraints.Size; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlType; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; @@ -7,9 +10,6 @@ import lombok.With; import no.digipost.api.datatypes.documentation.Description; -import javax.validation.constraints.Size; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; import java.math.BigDecimal; @XmlType diff --git a/src/main/java/no/digipost/api/datatypes/types/Heftelse.java b/src/main/java/no/digipost/api/datatypes/types/Heftelse.java index 4ae4e2d7..6f668ce9 100644 --- a/src/main/java/no/digipost/api/datatypes/types/Heftelse.java +++ b/src/main/java/no/digipost/api/datatypes/types/Heftelse.java @@ -1,16 +1,15 @@ package no.digipost.api.datatypes.types; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlType; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; import lombok.Value; import lombok.With; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - @XmlType @Value @AllArgsConstructor diff --git a/src/main/java/no/digipost/api/datatypes/types/Hjemmelshaver.java b/src/main/java/no/digipost/api/datatypes/types/Hjemmelshaver.java index 4ca47b9a..3e988ffc 100644 --- a/src/main/java/no/digipost/api/datatypes/types/Hjemmelshaver.java +++ b/src/main/java/no/digipost/api/datatypes/types/Hjemmelshaver.java @@ -1,15 +1,14 @@ package no.digipost.api.datatypes.types; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlType; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; import lombok.Value; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - @XmlType @Value @AllArgsConstructor diff --git a/src/main/java/no/digipost/api/datatypes/types/Info.java b/src/main/java/no/digipost/api/datatypes/types/Info.java index 52d238f0..457d3019 100644 --- a/src/main/java/no/digipost/api/datatypes/types/Info.java +++ b/src/main/java/no/digipost/api/datatypes/types/Info.java @@ -1,15 +1,14 @@ package no.digipost.api.datatypes.types; +import jakarta.validation.constraints.Size; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlType; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; import lombok.Value; import no.digipost.api.datatypes.documentation.Description; -import javax.validation.constraints.Size; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - @XmlType @Value @AllArgsConstructor diff --git a/src/main/java/no/digipost/api/datatypes/types/Inkasso.java b/src/main/java/no/digipost/api/datatypes/types/Inkasso.java index 1bead773..6b9cc67a 100644 --- a/src/main/java/no/digipost/api/datatypes/types/Inkasso.java +++ b/src/main/java/no/digipost/api/datatypes/types/Inkasso.java @@ -1,5 +1,8 @@ package no.digipost.api.datatypes.types; +import jakarta.validation.constraints.Size; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; @@ -10,9 +13,6 @@ import no.digipost.api.datatypes.documentation.Description; import no.digipost.api.datatypes.types.invoice.InvoicePayment; -import javax.validation.constraints.Size; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; import java.math.BigDecimal; import java.time.ZoneId; import java.time.ZonedDateTime; diff --git a/src/main/java/no/digipost/api/datatypes/types/Link.java b/src/main/java/no/digipost/api/datatypes/types/Link.java index 3c12421d..fd49d024 100644 --- a/src/main/java/no/digipost/api/datatypes/types/Link.java +++ b/src/main/java/no/digipost/api/datatypes/types/Link.java @@ -1,5 +1,10 @@ package no.digipost.api.datatypes.types; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlSchemaType; +import jakarta.xml.bind.annotation.XmlType; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; @@ -8,11 +13,6 @@ import no.digipost.api.datatypes.documentation.Description; import no.digipost.api.datatypes.validation.WebUrl; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; import java.net.URI; @XmlType diff --git a/src/main/java/no/digipost/api/datatypes/types/Matrikkel.java b/src/main/java/no/digipost/api/datatypes/types/Matrikkel.java index edd9f706..57b406a5 100644 --- a/src/main/java/no/digipost/api/datatypes/types/Matrikkel.java +++ b/src/main/java/no/digipost/api/datatypes/types/Matrikkel.java @@ -1,18 +1,17 @@ package no.digipost.api.datatypes.types; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Pattern; +import jakarta.validation.constraints.Size; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlType; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; import lombok.Value; import lombok.With; -import javax.validation.Valid; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Pattern; -import javax.validation.constraints.Size; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - @XmlType @Value @AllArgsConstructor diff --git a/src/main/java/no/digipost/api/datatypes/types/Omsetningshistorikk.java b/src/main/java/no/digipost/api/datatypes/types/Omsetningshistorikk.java index cf652c1c..57693337 100644 --- a/src/main/java/no/digipost/api/datatypes/types/Omsetningshistorikk.java +++ b/src/main/java/no/digipost/api/datatypes/types/Omsetningshistorikk.java @@ -1,5 +1,9 @@ package no.digipost.api.datatypes.types; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlType; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; @@ -7,10 +11,6 @@ import lombok.With; import no.digipost.api.datatypes.documentation.Description; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; import java.time.ZonedDateTime; @XmlType diff --git a/src/main/java/no/digipost/api/datatypes/types/Payslip.java b/src/main/java/no/digipost/api/datatypes/types/Payslip.java index 9e78fde1..8433a7c4 100644 --- a/src/main/java/no/digipost/api/datatypes/types/Payslip.java +++ b/src/main/java/no/digipost/api/datatypes/types/Payslip.java @@ -1,12 +1,11 @@ package no.digipost.api.datatypes.types; +import jakarta.xml.bind.annotation.XmlRootElement; import lombok.AllArgsConstructor; import lombok.Value; import no.digipost.api.datatypes.DataType; import no.digipost.api.datatypes.documentation.Description; -import javax.xml.bind.annotation.XmlRootElement; - @XmlRootElement @Value @AllArgsConstructor diff --git a/src/main/java/no/digipost/api/datatypes/types/Residence.java b/src/main/java/no/digipost/api/datatypes/types/Residence.java index 0ff9c967..640a7ad9 100644 --- a/src/main/java/no/digipost/api/datatypes/types/Residence.java +++ b/src/main/java/no/digipost/api/datatypes/types/Residence.java @@ -1,5 +1,10 @@ package no.digipost.api.datatypes.types; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; @@ -8,12 +13,6 @@ import no.digipost.api.datatypes.DataType; import no.digipost.api.datatypes.documentation.Description; -import javax.validation.Valid; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; - @XmlRootElement @Value @AllArgsConstructor diff --git a/src/main/java/no/digipost/api/datatypes/types/ResidenceAddress.java b/src/main/java/no/digipost/api/datatypes/types/ResidenceAddress.java index c231cef0..0b928fe4 100644 --- a/src/main/java/no/digipost/api/datatypes/types/ResidenceAddress.java +++ b/src/main/java/no/digipost/api/datatypes/types/ResidenceAddress.java @@ -1,5 +1,9 @@ package no.digipost.api.datatypes.types; +import jakarta.validation.constraints.Pattern; +import jakarta.validation.constraints.Size; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlType; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; @@ -7,11 +11,6 @@ import lombok.With; import no.digipost.api.datatypes.documentation.Description; -import javax.validation.constraints.Pattern; -import javax.validation.constraints.Size; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - @XmlType @Value @AllArgsConstructor diff --git a/src/main/java/no/digipost/api/datatypes/types/SignedDocument.java b/src/main/java/no/digipost/api/datatypes/types/SignedDocument.java index 71b942bd..e24ddd43 100644 --- a/src/main/java/no/digipost/api/datatypes/types/SignedDocument.java +++ b/src/main/java/no/digipost/api/datatypes/types/SignedDocument.java @@ -1,5 +1,8 @@ package no.digipost.api.datatypes.types; +import jakarta.validation.constraints.NotNull; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; @@ -8,9 +11,6 @@ import no.digipost.api.datatypes.DataType; import no.digipost.api.datatypes.documentation.Description; -import javax.validation.constraints.NotNull; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; import java.time.ZoneId; import java.time.ZonedDateTime; diff --git a/src/main/java/no/digipost/api/datatypes/types/TimeInterval.java b/src/main/java/no/digipost/api/datatypes/types/TimeInterval.java index 30847c03..9d0ba6ef 100644 --- a/src/main/java/no/digipost/api/datatypes/types/TimeInterval.java +++ b/src/main/java/no/digipost/api/datatypes/types/TimeInterval.java @@ -1,5 +1,8 @@ package no.digipost.api.datatypes.types; +import jakarta.validation.constraints.NotNull; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlType; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; @@ -7,9 +10,6 @@ import lombok.With; import no.digipost.api.datatypes.documentation.Description; -import javax.validation.constraints.NotNull; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; import java.time.ZoneId; import java.time.ZonedDateTime; diff --git a/src/main/java/no/digipost/api/datatypes/types/invoice/Bank.java b/src/main/java/no/digipost/api/datatypes/types/invoice/Bank.java index 4a018996..24551617 100644 --- a/src/main/java/no/digipost/api/datatypes/types/invoice/Bank.java +++ b/src/main/java/no/digipost/api/datatypes/types/invoice/Bank.java @@ -1,5 +1,7 @@ package no.digipost.api.datatypes.types.invoice; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlType; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; @@ -7,9 +9,6 @@ import lombok.With; import no.digipost.api.datatypes.documentation.Description; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - @XmlType @Value @AllArgsConstructor diff --git a/src/main/java/no/digipost/api/datatypes/types/invoice/Invoice.java b/src/main/java/no/digipost/api/datatypes/types/invoice/Invoice.java index 9f857266..496fd742 100644 --- a/src/main/java/no/digipost/api/datatypes/types/invoice/Invoice.java +++ b/src/main/java/no/digipost/api/datatypes/types/invoice/Invoice.java @@ -1,5 +1,8 @@ package no.digipost.api.datatypes.types.invoice; +import jakarta.validation.constraints.Size; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; @@ -10,9 +13,6 @@ import no.digipost.api.datatypes.documentation.Description; import no.digipost.api.datatypes.types.ExternalLink; -import javax.validation.constraints.Size; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; import java.math.BigDecimal; import java.time.ZoneId; import java.time.ZonedDateTime; diff --git a/src/main/java/no/digipost/api/datatypes/types/invoice/InvoicePayment.java b/src/main/java/no/digipost/api/datatypes/types/invoice/InvoicePayment.java index 2cd20803..ecbe4bb0 100644 --- a/src/main/java/no/digipost/api/datatypes/types/invoice/InvoicePayment.java +++ b/src/main/java/no/digipost/api/datatypes/types/invoice/InvoicePayment.java @@ -1,5 +1,9 @@ package no.digipost.api.datatypes.types.invoice; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; @@ -9,10 +13,6 @@ import no.digipost.api.datatypes.DataType; import no.digipost.api.datatypes.documentation.Description; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; import java.time.ZoneId; import java.time.ZonedDateTime; diff --git a/src/main/java/no/digipost/api/datatypes/types/invoice/package-info.java b/src/main/java/no/digipost/api/datatypes/types/invoice/package-info.java index 2b501b67..ca815124 100644 --- a/src/main/java/no/digipost/api/datatypes/types/invoice/package-info.java +++ b/src/main/java/no/digipost/api/datatypes/types/invoice/package-info.java @@ -1,15 +1,14 @@ -@XmlSchema(namespace = DIGIPOST_DATATYPES_NAMESPACE, elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) +@XmlSchema(namespace = DIGIPOST_DATATYPES_NAMESPACE, elementFormDefault = jakarta.xml.bind.annotation.XmlNsForm.QUALIFIED) @XmlAccessorType(XmlAccessType.FIELD) @XmlJavaTypeAdapter(ZonedDateTimeXmlAdapter.class) @DataTypePackage package no.digipost.api.datatypes.types.invoice; +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlSchema; +import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter; import no.digipost.api.datatypes.documentation.DataTypePackage; import no.digipost.api.datatypes.marshalling.ZonedDateTimeXmlAdapter; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlSchema; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - import static no.digipost.api.datatypes.marshalling.DataTypesJAXBContext.DIGIPOST_DATATYPES_NAMESPACE; diff --git a/src/main/java/no/digipost/api/datatypes/types/package-info.java b/src/main/java/no/digipost/api/datatypes/types/package-info.java index bf56dc0a..c73bf86e 100644 --- a/src/main/java/no/digipost/api/datatypes/types/package-info.java +++ b/src/main/java/no/digipost/api/datatypes/types/package-info.java @@ -1,4 +1,4 @@ -@XmlSchema(namespace = DIGIPOST_DATATYPES_NAMESPACE, elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) +@XmlSchema(namespace = DIGIPOST_DATATYPES_NAMESPACE, elementFormDefault = jakarta.xml.bind.annotation.XmlNsForm.QUALIFIED) @XmlAccessorType(XmlAccessType.FIELD) @XmlJavaTypeAdapters({ @XmlJavaTypeAdapter(ZonedDateTimeXmlAdapter.class), @@ -7,14 +7,13 @@ @DataTypePackage package no.digipost.api.datatypes.types; +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlSchema; +import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter; +import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapters; import no.digipost.api.datatypes.documentation.DataTypePackage; import no.digipost.api.datatypes.marshalling.LocalDateTimeXmlAdapter; import no.digipost.api.datatypes.marshalling.ZonedDateTimeXmlAdapter; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlSchema; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapters; - import static no.digipost.api.datatypes.marshalling.DataTypesJAXBContext.DIGIPOST_DATATYPES_NAMESPACE; diff --git a/src/main/java/no/digipost/api/datatypes/types/pickup/Cost.java b/src/main/java/no/digipost/api/datatypes/types/pickup/Cost.java index b40903b0..11583059 100644 --- a/src/main/java/no/digipost/api/datatypes/types/pickup/Cost.java +++ b/src/main/java/no/digipost/api/datatypes/types/pickup/Cost.java @@ -1,5 +1,7 @@ package no.digipost.api.datatypes.types.pickup; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlType; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; @@ -7,8 +9,6 @@ import lombok.With; import no.digipost.api.datatypes.documentation.Description; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; import java.math.BigDecimal; @XmlType diff --git a/src/main/java/no/digipost/api/datatypes/types/pickup/Package.java b/src/main/java/no/digipost/api/datatypes/types/pickup/Package.java index cedcaec7..e6cb7f29 100644 --- a/src/main/java/no/digipost/api/datatypes/types/pickup/Package.java +++ b/src/main/java/no/digipost/api/datatypes/types/pickup/Package.java @@ -1,5 +1,7 @@ package no.digipost.api.datatypes.types.pickup; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlType; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; @@ -7,9 +9,6 @@ import lombok.With; import no.digipost.api.datatypes.documentation.Description; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - @XmlType @Value @AllArgsConstructor diff --git a/src/main/java/no/digipost/api/datatypes/types/pickup/PickupNotice.java b/src/main/java/no/digipost/api/datatypes/types/pickup/PickupNotice.java index 5c1bfb8f..a162fa8b 100644 --- a/src/main/java/no/digipost/api/datatypes/types/pickup/PickupNotice.java +++ b/src/main/java/no/digipost/api/datatypes/types/pickup/PickupNotice.java @@ -1,5 +1,9 @@ package no.digipost.api.datatypes.types.pickup; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; @@ -13,10 +17,6 @@ import no.digipost.api.datatypes.types.Language; import no.digipost.api.datatypes.types.Tag; -import javax.validation.Valid; -import javax.validation.constraints.NotNull; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; import java.time.ZoneId; import java.time.ZonedDateTime; import java.util.Collections; diff --git a/src/main/java/no/digipost/api/datatypes/types/pickup/PickupNoticeStatus.java b/src/main/java/no/digipost/api/datatypes/types/pickup/PickupNoticeStatus.java index f0c9fc74..5f75c54d 100644 --- a/src/main/java/no/digipost/api/datatypes/types/pickup/PickupNoticeStatus.java +++ b/src/main/java/no/digipost/api/datatypes/types/pickup/PickupNoticeStatus.java @@ -1,5 +1,9 @@ package no.digipost.api.datatypes.types.pickup; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; @@ -8,10 +12,6 @@ import no.digipost.api.datatypes.DataType; import no.digipost.api.datatypes.documentation.Description; -import javax.validation.Valid; -import javax.validation.constraints.NotNull; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; import java.time.ZoneId; import java.time.ZonedDateTime; diff --git a/src/main/java/no/digipost/api/datatypes/types/pickup/PickupPlace.java b/src/main/java/no/digipost/api/datatypes/types/pickup/PickupPlace.java index 6cfe1b2b..9ca2a448 100644 --- a/src/main/java/no/digipost/api/datatypes/types/pickup/PickupPlace.java +++ b/src/main/java/no/digipost/api/datatypes/types/pickup/PickupPlace.java @@ -1,5 +1,8 @@ package no.digipost.api.datatypes.types.pickup; +import jakarta.validation.constraints.NotNull; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlType; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; @@ -8,10 +11,6 @@ import no.digipost.api.datatypes.documentation.Description; import no.digipost.api.datatypes.types.Address; -import javax.validation.constraints.NotNull; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - @XmlType @Value @AllArgsConstructor diff --git a/src/main/java/no/digipost/api/datatypes/types/pickup/Recipient.java b/src/main/java/no/digipost/api/datatypes/types/pickup/Recipient.java index 9990f8d1..81d611bf 100644 --- a/src/main/java/no/digipost/api/datatypes/types/pickup/Recipient.java +++ b/src/main/java/no/digipost/api/datatypes/types/pickup/Recipient.java @@ -1,5 +1,7 @@ package no.digipost.api.datatypes.types.pickup; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlType; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; @@ -8,9 +10,6 @@ import no.digipost.api.datatypes.documentation.Description; import no.digipost.api.datatypes.types.Address; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - @XmlType @Value @AllArgsConstructor diff --git a/src/main/java/no/digipost/api/datatypes/types/pickup/Sender.java b/src/main/java/no/digipost/api/datatypes/types/pickup/Sender.java index af579481..5537799e 100644 --- a/src/main/java/no/digipost/api/datatypes/types/pickup/Sender.java +++ b/src/main/java/no/digipost/api/datatypes/types/pickup/Sender.java @@ -1,5 +1,7 @@ package no.digipost.api.datatypes.types.pickup; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlType; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; @@ -8,9 +10,6 @@ import no.digipost.api.datatypes.documentation.Description; import no.digipost.api.datatypes.types.Address; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - @XmlType @Value @AllArgsConstructor diff --git a/src/main/java/no/digipost/api/datatypes/types/pickup/package-info.java b/src/main/java/no/digipost/api/datatypes/types/pickup/package-info.java index 310cbdd5..ae5fb786 100644 --- a/src/main/java/no/digipost/api/datatypes/types/pickup/package-info.java +++ b/src/main/java/no/digipost/api/datatypes/types/pickup/package-info.java @@ -1,15 +1,14 @@ -@XmlSchema(namespace = DIGIPOST_DATATYPES_NAMESPACE, elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) +@XmlSchema(namespace = DIGIPOST_DATATYPES_NAMESPACE, elementFormDefault = jakarta.xml.bind.annotation.XmlNsForm.QUALIFIED) @XmlAccessorType(XmlAccessType.FIELD) @XmlJavaTypeAdapter(ZonedDateTimeXmlAdapter.class) @DataTypePackage package no.digipost.api.datatypes.types.pickup; +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlSchema; +import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter; import no.digipost.api.datatypes.documentation.DataTypePackage; import no.digipost.api.datatypes.marshalling.ZonedDateTimeXmlAdapter; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlSchema; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - import static no.digipost.api.datatypes.marshalling.DataTypesJAXBContext.DIGIPOST_DATATYPES_NAMESPACE; diff --git a/src/main/java/no/digipost/api/datatypes/types/proof/CalendarDate.java b/src/main/java/no/digipost/api/datatypes/types/proof/CalendarDate.java index 8d388cfc..370f5796 100644 --- a/src/main/java/no/digipost/api/datatypes/types/proof/CalendarDate.java +++ b/src/main/java/no/digipost/api/datatypes/types/proof/CalendarDate.java @@ -1,17 +1,16 @@ package no.digipost.api.datatypes.types.proof; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Pattern; +import jakarta.validation.constraints.Size; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlType; import lombok.AccessLevel; import lombok.NoArgsConstructor; import lombok.Value; import lombok.With; import no.digipost.api.datatypes.documentation.Description; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Pattern; -import javax.validation.constraints.Size; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - @XmlType @Value @NoArgsConstructor(force = true, access = AccessLevel.PRIVATE) diff --git a/src/main/java/no/digipost/api/datatypes/types/proof/Period.java b/src/main/java/no/digipost/api/datatypes/types/proof/Period.java index 2a4c38ae..8377858d 100644 --- a/src/main/java/no/digipost/api/datatypes/types/proof/Period.java +++ b/src/main/java/no/digipost/api/datatypes/types/proof/Period.java @@ -1,5 +1,7 @@ package no.digipost.api.datatypes.types.proof; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlType; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.EqualsAndHashCode; @@ -9,8 +11,6 @@ import no.digipost.api.datatypes.documentation.Description; import no.digipost.api.datatypes.validation.ValidPeriode; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; import java.time.LocalDateTime; @XmlType diff --git a/src/main/java/no/digipost/api/datatypes/types/proof/Proof.java b/src/main/java/no/digipost/api/datatypes/types/proof/Proof.java index d13a222d..1665bb85 100644 --- a/src/main/java/no/digipost/api/datatypes/types/proof/Proof.java +++ b/src/main/java/no/digipost/api/datatypes/types/proof/Proof.java @@ -1,5 +1,10 @@ package no.digipost.api.datatypes.types.proof; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Pattern; +import jakarta.validation.constraints.Size; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; @@ -10,11 +15,6 @@ import no.digipost.api.datatypes.types.Info; import no.digipost.api.datatypes.types.Language; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Pattern; -import javax.validation.constraints.Size; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; import java.time.ZoneId; import java.time.ZonedDateTime; import java.util.List; diff --git a/src/main/java/no/digipost/api/datatypes/types/proof/ProofHolder.java b/src/main/java/no/digipost/api/datatypes/types/proof/ProofHolder.java index f9e2b97d..f7c514e6 100644 --- a/src/main/java/no/digipost/api/datatypes/types/proof/ProofHolder.java +++ b/src/main/java/no/digipost/api/datatypes/types/proof/ProofHolder.java @@ -1,5 +1,9 @@ package no.digipost.api.datatypes.types.proof; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Pattern; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlType; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; @@ -8,11 +12,6 @@ import no.digipost.api.datatypes.documentation.Description; import no.digipost.api.datatypes.types.Address; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Pattern; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - @XmlType @Value @AllArgsConstructor diff --git a/src/main/java/no/digipost/api/datatypes/types/proof/ValidPeriod.java b/src/main/java/no/digipost/api/datatypes/types/proof/ValidPeriod.java index 6063b45b..197f408b 100644 --- a/src/main/java/no/digipost/api/datatypes/types/proof/ValidPeriod.java +++ b/src/main/java/no/digipost/api/datatypes/types/proof/ValidPeriod.java @@ -1,16 +1,15 @@ package no.digipost.api.datatypes.types.proof; +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlType; import lombok.AccessLevel; import lombok.NoArgsConstructor; import lombok.Value; import lombok.With; import no.digipost.api.datatypes.documentation.Description; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - @XmlType @Value @XmlAccessorType(XmlAccessType.FIELD) diff --git a/src/main/java/no/digipost/api/datatypes/types/proof/YearlyRepeatingPeriod.java b/src/main/java/no/digipost/api/datatypes/types/proof/YearlyRepeatingPeriod.java index be957173..e07ef568 100644 --- a/src/main/java/no/digipost/api/datatypes/types/proof/YearlyRepeatingPeriod.java +++ b/src/main/java/no/digipost/api/datatypes/types/proof/YearlyRepeatingPeriod.java @@ -1,5 +1,8 @@ package no.digipost.api.datatypes.types.proof; +import jakarta.validation.constraints.NotNull; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlType; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.EqualsAndHashCode; @@ -8,9 +11,6 @@ import lombok.With; import no.digipost.api.datatypes.documentation.Description; -import javax.validation.constraints.NotNull; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; import java.time.LocalDateTime; @XmlType diff --git a/src/main/java/no/digipost/api/datatypes/types/proof/package-info.java b/src/main/java/no/digipost/api/datatypes/types/proof/package-info.java index 83ed5009..d8612027 100644 --- a/src/main/java/no/digipost/api/datatypes/types/proof/package-info.java +++ b/src/main/java/no/digipost/api/datatypes/types/proof/package-info.java @@ -1,4 +1,4 @@ -@XmlSchema(namespace = DIGIPOST_DATATYPES_NAMESPACE, elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) +@XmlSchema(namespace = DIGIPOST_DATATYPES_NAMESPACE, elementFormDefault = jakarta.xml.bind.annotation.XmlNsForm.QUALIFIED) @XmlAccessorType(XmlAccessType.FIELD) @XmlJavaTypeAdapters({ @XmlJavaTypeAdapter(ZonedDateTimeXmlAdapter.class), @@ -7,15 +7,14 @@ @DataTypePackage package no.digipost.api.datatypes.types.proof; +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlSchema; +import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter; +import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapters; import no.digipost.api.datatypes.documentation.DataTypePackage; import no.digipost.api.datatypes.marshalling.LocalDateTimeXmlAdapter; import no.digipost.api.datatypes.marshalling.ZonedDateTimeXmlAdapter; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlSchema; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapters; - import static no.digipost.api.datatypes.marshalling.DataTypesJAXBContext.DIGIPOST_DATATYPES_NAMESPACE; diff --git a/src/main/java/no/digipost/api/datatypes/types/receipt/Customer.java b/src/main/java/no/digipost/api/datatypes/types/receipt/Customer.java index 38dc7b72..da5a8981 100644 --- a/src/main/java/no/digipost/api/datatypes/types/receipt/Customer.java +++ b/src/main/java/no/digipost/api/datatypes/types/receipt/Customer.java @@ -1,5 +1,7 @@ package no.digipost.api.datatypes.types.receipt; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlType; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; @@ -7,9 +9,6 @@ import lombok.With; import no.digipost.api.datatypes.types.Address; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - @XmlType @Value @AllArgsConstructor diff --git a/src/main/java/no/digipost/api/datatypes/types/receipt/Delivery.java b/src/main/java/no/digipost/api/datatypes/types/receipt/Delivery.java index d6b1742c..e763dc20 100644 --- a/src/main/java/no/digipost/api/datatypes/types/receipt/Delivery.java +++ b/src/main/java/no/digipost/api/datatypes/types/receipt/Delivery.java @@ -1,5 +1,7 @@ package no.digipost.api.datatypes.types.receipt; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlType; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; @@ -7,9 +9,6 @@ import lombok.With; import no.digipost.api.datatypes.types.Address; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - @XmlType @Value @AllArgsConstructor diff --git a/src/main/java/no/digipost/api/datatypes/types/receipt/Payment.java b/src/main/java/no/digipost/api/datatypes/types/receipt/Payment.java index 2b628c9b..4537ad87 100644 --- a/src/main/java/no/digipost/api/datatypes/types/receipt/Payment.java +++ b/src/main/java/no/digipost/api/datatypes/types/receipt/Payment.java @@ -1,5 +1,8 @@ package no.digipost.api.datatypes.types.receipt; +import jakarta.validation.constraints.Size; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlType; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; @@ -8,9 +11,6 @@ import no.digipost.api.datatypes.documentation.Description; import no.digipost.api.datatypes.types.ForeignCurrencyPayment; -import javax.validation.constraints.Size; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; import java.math.BigDecimal; @XmlType diff --git a/src/main/java/no/digipost/api/datatypes/types/receipt/Receipt.java b/src/main/java/no/digipost/api/datatypes/types/receipt/Receipt.java index e3be2bdf..f31d2666 100644 --- a/src/main/java/no/digipost/api/datatypes/types/receipt/Receipt.java +++ b/src/main/java/no/digipost/api/datatypes/types/receipt/Receipt.java @@ -1,5 +1,10 @@ package no.digipost.api.datatypes.types.receipt; +import jakarta.validation.Valid; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; @@ -11,11 +16,6 @@ import no.digipost.api.datatypes.types.Barcode; import no.digipost.api.datatypes.types.Language; -import javax.validation.Valid; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; import java.math.BigDecimal; import java.time.ZoneId; import java.time.ZonedDateTime; diff --git a/src/main/java/no/digipost/api/datatypes/types/receipt/ReceiptLine.java b/src/main/java/no/digipost/api/datatypes/types/receipt/ReceiptLine.java index 87ec2d5e..9ea6aab8 100644 --- a/src/main/java/no/digipost/api/datatypes/types/receipt/ReceiptLine.java +++ b/src/main/java/no/digipost/api/datatypes/types/receipt/ReceiptLine.java @@ -1,5 +1,7 @@ package no.digipost.api.datatypes.types.receipt; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlType; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; @@ -7,8 +9,6 @@ import lombok.With; import no.digipost.api.datatypes.documentation.Description; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; import java.math.BigDecimal; import static java.math.BigDecimal.ROUND_HALF_UP; diff --git a/src/main/java/no/digipost/api/datatypes/types/receipt/TaxiDetails.java b/src/main/java/no/digipost/api/datatypes/types/receipt/TaxiDetails.java index b25baca6..00494aa0 100644 --- a/src/main/java/no/digipost/api/datatypes/types/receipt/TaxiDetails.java +++ b/src/main/java/no/digipost/api/datatypes/types/receipt/TaxiDetails.java @@ -1,5 +1,8 @@ package no.digipost.api.datatypes.types.receipt; +import jakarta.validation.Valid; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlType; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; @@ -7,9 +10,6 @@ import lombok.With; import no.digipost.api.datatypes.documentation.Description; -import javax.validation.Valid; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; import java.math.BigDecimal; import java.time.ZoneId; import java.time.ZonedDateTime; diff --git a/src/main/java/no/digipost/api/datatypes/types/receipt/VatDetails.java b/src/main/java/no/digipost/api/datatypes/types/receipt/VatDetails.java index d553625f..732bc63e 100644 --- a/src/main/java/no/digipost/api/datatypes/types/receipt/VatDetails.java +++ b/src/main/java/no/digipost/api/datatypes/types/receipt/VatDetails.java @@ -1,14 +1,14 @@ package no.digipost.api.datatypes.types.receipt; +import jakarta.validation.Valid; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlType; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; import lombok.Value; import lombok.With; -import javax.validation.Valid; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; import java.math.BigDecimal; import java.util.Collections; import java.util.List; diff --git a/src/main/java/no/digipost/api/datatypes/types/receipt/VatLevel.java b/src/main/java/no/digipost/api/datatypes/types/receipt/VatLevel.java index 18887f7f..62a3bdea 100644 --- a/src/main/java/no/digipost/api/datatypes/types/receipt/VatLevel.java +++ b/src/main/java/no/digipost/api/datatypes/types/receipt/VatLevel.java @@ -1,5 +1,7 @@ package no.digipost.api.datatypes.types.receipt; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlType; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; @@ -7,8 +9,6 @@ import lombok.With; import no.digipost.api.datatypes.documentation.Description; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; import java.math.BigDecimal; @XmlType diff --git a/src/main/java/no/digipost/api/datatypes/types/receipt/package-info.java b/src/main/java/no/digipost/api/datatypes/types/receipt/package-info.java index 90c53d63..047ebe48 100644 --- a/src/main/java/no/digipost/api/datatypes/types/receipt/package-info.java +++ b/src/main/java/no/digipost/api/datatypes/types/receipt/package-info.java @@ -1,4 +1,4 @@ -@XmlSchema(namespace = DIGIPOST_DATATYPES_NAMESPACE, elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) +@XmlSchema(namespace = DIGIPOST_DATATYPES_NAMESPACE, elementFormDefault = jakarta.xml.bind.annotation.XmlNsForm.QUALIFIED) @XmlAccessorType(XmlAccessType.FIELD) @XmlJavaTypeAdapters({ @XmlJavaTypeAdapter(ZonedDateTimeXmlAdapter.class), @@ -7,15 +7,14 @@ @DataTypePackage package no.digipost.api.datatypes.types.receipt; +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlSchema; +import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter; +import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapters; import no.digipost.api.datatypes.documentation.DataTypePackage; import no.digipost.api.datatypes.marshalling.MoneyBigDecimalXmlAdapter; import no.digipost.api.datatypes.marshalling.ZonedDateTimeXmlAdapter; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlSchema; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapters; - import static no.digipost.api.datatypes.marshalling.DataTypesJAXBContext.DIGIPOST_DATATYPES_NAMESPACE; diff --git a/src/main/java/no/digipost/api/datatypes/types/share/ShareDocumentsRequest.java b/src/main/java/no/digipost/api/datatypes/types/share/ShareDocumentsRequest.java index 41fdb1d9..8cdad03d 100644 --- a/src/main/java/no/digipost/api/datatypes/types/share/ShareDocumentsRequest.java +++ b/src/main/java/no/digipost/api/datatypes/types/share/ShareDocumentsRequest.java @@ -1,5 +1,8 @@ package no.digipost.api.datatypes.types.share; +import jakarta.validation.constraints.NotNull; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; @@ -9,10 +12,6 @@ import no.digipost.api.datatypes.DataType; import no.digipost.api.datatypes.documentation.Description; -import javax.validation.constraints.NotNull; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; - @XmlRootElement(name = "share-documents-request") @Value @AllArgsConstructor diff --git a/src/main/java/no/digipost/api/datatypes/types/share/ShareDocumentsRequestDocumentsShared.java b/src/main/java/no/digipost/api/datatypes/types/share/ShareDocumentsRequestDocumentsShared.java index 1880e245..b3e8d14b 100644 --- a/src/main/java/no/digipost/api/datatypes/types/share/ShareDocumentsRequestDocumentsShared.java +++ b/src/main/java/no/digipost/api/datatypes/types/share/ShareDocumentsRequestDocumentsShared.java @@ -1,5 +1,7 @@ package no.digipost.api.datatypes.types.share; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; @@ -8,8 +10,6 @@ import no.digipost.api.datatypes.DataType; import no.digipost.api.datatypes.documentation.Description; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/no/digipost/api/datatypes/types/share/ShareDocumentsRequestSharingStopped.java b/src/main/java/no/digipost/api/datatypes/types/share/ShareDocumentsRequestSharingStopped.java index 66aa74f4..f96b7803 100644 --- a/src/main/java/no/digipost/api/datatypes/types/share/ShareDocumentsRequestSharingStopped.java +++ b/src/main/java/no/digipost/api/datatypes/types/share/ShareDocumentsRequestSharingStopped.java @@ -1,15 +1,13 @@ package no.digipost.api.datatypes.types.share; +import jakarta.xml.bind.annotation.XmlRootElement; import lombok.AccessLevel; -import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; import lombok.Value; import lombok.With; import no.digipost.api.datatypes.DataType; import no.digipost.api.datatypes.documentation.Description; -import javax.xml.bind.annotation.XmlRootElement; - @XmlRootElement(name = "share-documents-request-sharing-stopped") @Value @NoArgsConstructor(force = true, access = AccessLevel.PUBLIC) diff --git a/src/main/java/no/digipost/api/datatypes/types/share/package-info.java b/src/main/java/no/digipost/api/datatypes/types/share/package-info.java index 0c5168d0..c4672344 100644 --- a/src/main/java/no/digipost/api/datatypes/types/share/package-info.java +++ b/src/main/java/no/digipost/api/datatypes/types/share/package-info.java @@ -1,4 +1,4 @@ -@XmlSchema(namespace = DIGIPOST_DATATYPES_NAMESPACE, elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) +@XmlSchema(namespace = DIGIPOST_DATATYPES_NAMESPACE, elementFormDefault = jakarta.xml.bind.annotation.XmlNsForm.QUALIFIED) @XmlAccessorType(XmlAccessType.FIELD) @XmlJavaTypeAdapters({ @XmlJavaTypeAdapter(ZonedDateTimeXmlAdapter.class), @@ -7,15 +7,14 @@ @DataTypePackage package no.digipost.api.datatypes.types.share; +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlSchema; +import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter; +import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapters; import no.digipost.api.datatypes.documentation.DataTypePackage; import no.digipost.api.datatypes.marshalling.LocalDateTimeXmlAdapter; import no.digipost.api.datatypes.marshalling.ZonedDateTimeXmlAdapter; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlSchema; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapters; - import static no.digipost.api.datatypes.marshalling.DataTypesJAXBContext.DIGIPOST_DATATYPES_NAMESPACE; diff --git a/src/main/java/no/digipost/api/datatypes/validation/DataTypesValidationError.java b/src/main/java/no/digipost/api/datatypes/validation/DataTypesValidationError.java index ad9c81f2..931cb01c 100644 --- a/src/main/java/no/digipost/api/datatypes/validation/DataTypesValidationError.java +++ b/src/main/java/no/digipost/api/datatypes/validation/DataTypesValidationError.java @@ -1,9 +1,8 @@ package no.digipost.api.datatypes.validation; +import jakarta.validation.ConstraintViolation; import lombok.Value; -import javax.validation.ConstraintViolation; - @Value public class DataTypesValidationError { ConstraintViolation constraintViolation; diff --git a/src/main/java/no/digipost/api/datatypes/validation/DataTypesValidator.java b/src/main/java/no/digipost/api/datatypes/validation/DataTypesValidator.java index 56e94d39..7b261eb5 100644 --- a/src/main/java/no/digipost/api/datatypes/validation/DataTypesValidator.java +++ b/src/main/java/no/digipost/api/datatypes/validation/DataTypesValidator.java @@ -1,7 +1,8 @@ package no.digipost.api.datatypes.validation; -import javax.validation.Validation; -import javax.validation.Validator; +import jakarta.validation.Validation; +import jakarta.validation.Validator; + import java.util.Collection; import java.util.Optional; import java.util.Set; diff --git a/src/main/java/no/digipost/api/datatypes/validation/PeriodeValidator.java b/src/main/java/no/digipost/api/datatypes/validation/PeriodeValidator.java index 705b9c13..b78c84c1 100644 --- a/src/main/java/no/digipost/api/datatypes/validation/PeriodeValidator.java +++ b/src/main/java/no/digipost/api/datatypes/validation/PeriodeValidator.java @@ -1,10 +1,9 @@ package no.digipost.api.datatypes.validation; +import jakarta.validation.ConstraintValidator; +import jakarta.validation.ConstraintValidatorContext; import no.digipost.api.datatypes.types.proof.Period; -import javax.validation.ConstraintValidator; -import javax.validation.ConstraintValidatorContext; - public class PeriodeValidator implements ConstraintValidator { @Override public boolean isValid(Period periode, ConstraintValidatorContext context) { diff --git a/src/main/java/no/digipost/api/datatypes/validation/ValidPeriode.java b/src/main/java/no/digipost/api/datatypes/validation/ValidPeriode.java index 58ce4e3d..5a45d59a 100644 --- a/src/main/java/no/digipost/api/datatypes/validation/ValidPeriode.java +++ b/src/main/java/no/digipost/api/datatypes/validation/ValidPeriode.java @@ -1,7 +1,8 @@ package no.digipost.api.datatypes.validation; -import javax.validation.Constraint; -import javax.validation.Payload; +import jakarta.validation.Constraint; +import jakarta.validation.Payload; + import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; diff --git a/src/main/java/no/digipost/api/datatypes/validation/WebUrl.java b/src/main/java/no/digipost/api/datatypes/validation/WebUrl.java index 1fe10e54..75bf9a66 100644 --- a/src/main/java/no/digipost/api/datatypes/validation/WebUrl.java +++ b/src/main/java/no/digipost/api/datatypes/validation/WebUrl.java @@ -1,7 +1,8 @@ package no.digipost.api.datatypes.validation; -import javax.validation.Constraint; -import javax.validation.Payload; +import jakarta.validation.Constraint; +import jakarta.validation.Payload; + import java.lang.annotation.Documented; import java.lang.annotation.Retention; import java.lang.annotation.Target; diff --git a/src/main/java/no/digipost/api/datatypes/validation/WebUrlValidator.java b/src/main/java/no/digipost/api/datatypes/validation/WebUrlValidator.java index 121fa3ea..f7ae9cf8 100644 --- a/src/main/java/no/digipost/api/datatypes/validation/WebUrlValidator.java +++ b/src/main/java/no/digipost/api/datatypes/validation/WebUrlValidator.java @@ -1,7 +1,8 @@ package no.digipost.api.datatypes.validation; -import javax.validation.ConstraintValidator; -import javax.validation.ConstraintValidatorContext; +import jakarta.validation.ConstraintValidator; +import jakarta.validation.ConstraintValidatorContext; + import java.net.URI; public class WebUrlValidator implements ConstraintValidator { diff --git a/src/test/java/no/digipost/api/datatypes/documentation/DocumentationTest.java b/src/test/java/no/digipost/api/datatypes/documentation/DocumentationTest.java index e84b6197..db18c41d 100644 --- a/src/test/java/no/digipost/api/datatypes/documentation/DocumentationTest.java +++ b/src/test/java/no/digipost/api/datatypes/documentation/DocumentationTest.java @@ -5,8 +5,8 @@ import no.digipost.api.datatypes.types.ShortTextMessage; import org.junit.jupiter.api.Test; -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBException; +import jakarta.xml.bind.JAXBContext; +import jakarta.xml.bind.JAXBException; import java.io.IOException; import java.net.URISyntaxException; import java.nio.file.Files; diff --git a/src/test/java/no/digipost/api/datatypes/marshalling/DataTypeXmlAdapterTest.java b/src/test/java/no/digipost/api/datatypes/marshalling/DataTypeXmlAdapterTest.java index 8af05b7e..899aee4d 100644 --- a/src/test/java/no/digipost/api/datatypes/marshalling/DataTypeXmlAdapterTest.java +++ b/src/test/java/no/digipost/api/datatypes/marshalling/DataTypeXmlAdapterTest.java @@ -1,19 +1,18 @@ package no.digipost.api.datatypes.marshalling; +import jakarta.xml.bind.JAXBContext; +import jakarta.xml.bind.JAXBException; import no.digipost.api.datatypes.DataType; import no.digipost.api.datatypes.types.Appointment; import no.digipost.api.datatypes.types.Residence; import org.junit.jupiter.api.Test; import org.w3c.dom.Element; -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBException; import javax.xml.transform.OutputKeys; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerFactory; import javax.xml.transform.dom.DOMSource; import javax.xml.transform.stream.StreamResult; - import java.io.StringWriter; import static java.util.Collections.singletonList; diff --git a/src/test/java/no/digipost/api/datatypes/marshalling/MarshallingTest.java b/src/test/java/no/digipost/api/datatypes/marshalling/MarshallingTest.java index 15465781..6e47fc38 100644 --- a/src/test/java/no/digipost/api/datatypes/marshalling/MarshallingTest.java +++ b/src/test/java/no/digipost/api/datatypes/marshalling/MarshallingTest.java @@ -1,15 +1,14 @@ package no.digipost.api.datatypes.marshalling; import com.fasterxml.jackson.databind.ObjectMapper; +import jakarta.xml.bind.JAXBContext; +import jakarta.xml.bind.JAXBException; +import jakarta.xml.bind.Marshaller; +import jakarta.xml.bind.Unmarshaller; import no.digipost.api.datatypes.DataType; import no.digipost.api.datatypes.DataTypeIdentifier; import org.junit.jupiter.api.Test; -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Marshaller; -import javax.xml.bind.Unmarshaller; - import java.io.IOException; import java.io.StringReader; import java.io.StringWriter; diff --git a/src/test/java/no/digipost/api/datatypes/marshalling/TestDocument.java b/src/test/java/no/digipost/api/datatypes/marshalling/TestDocument.java index ad88f9bb..d5eb1b9d 100644 --- a/src/test/java/no/digipost/api/datatypes/marshalling/TestDocument.java +++ b/src/test/java/no/digipost/api/datatypes/marshalling/TestDocument.java @@ -2,10 +2,10 @@ import no.digipost.api.datatypes.DataType; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlElementWrapper; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; +import jakarta.xml.bind.annotation.XmlAnyElement; +import jakarta.xml.bind.annotation.XmlElementWrapper; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.adapters.XmlJavaTypeAdapter; import java.util.List; @XmlRootElement diff --git a/src/test/java/no/digipost/api/datatypes/types/Addition.java b/src/test/java/no/digipost/api/datatypes/types/Addition.java index 68599634..f996cfd0 100644 --- a/src/test/java/no/digipost/api/datatypes/types/Addition.java +++ b/src/test/java/no/digipost/api/datatypes/types/Addition.java @@ -7,8 +7,8 @@ import no.digipost.api.datatypes.DataType; import no.digipost.api.datatypes.documentation.Description; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; @Description("Addition") @XmlRootElement diff --git a/src/test/java/no/digipost/api/datatypes/types/MetaData.java b/src/test/java/no/digipost/api/datatypes/types/MetaData.java index 0afe4d70..f0d62268 100644 --- a/src/test/java/no/digipost/api/datatypes/types/MetaData.java +++ b/src/test/java/no/digipost/api/datatypes/types/MetaData.java @@ -6,8 +6,8 @@ import lombok.Value; import no.digipost.api.datatypes.documentation.Description; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; @Description("Metainformation") @XmlRootElement diff --git a/src/test/java/no/digipost/api/datatypes/types/ShortTextMessage.java b/src/test/java/no/digipost/api/datatypes/types/ShortTextMessage.java index 68fd52bb..aeb26072 100644 --- a/src/test/java/no/digipost/api/datatypes/types/ShortTextMessage.java +++ b/src/test/java/no/digipost/api/datatypes/types/ShortTextMessage.java @@ -1,17 +1,17 @@ package no.digipost.api.datatypes.types; +import jakarta.validation.constraints.Max; +import jakarta.validation.constraints.NotNull; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; import lombok.Value; +import no.digipost.api.datatypes.ComplementedBy; import no.digipost.api.datatypes.DataType; import no.digipost.api.datatypes.documentation.Description; -import no.digipost.api.datatypes.ComplementedBy; -import javax.validation.constraints.Max; -import javax.validation.constraints.NotNull; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; @Description("150 character short message") @XmlRootElement diff --git a/src/test/java/no/digipost/api/datatypes/validation/DataTypesValidatorTest.java b/src/test/java/no/digipost/api/datatypes/validation/DataTypesValidatorTest.java index e7a835d9..7d332062 100644 --- a/src/test/java/no/digipost/api/datatypes/validation/DataTypesValidatorTest.java +++ b/src/test/java/no/digipost/api/datatypes/validation/DataTypesValidatorTest.java @@ -24,7 +24,7 @@ class DataTypesValidatorTest { - private static DataTypesValidator validator = new DataTypesValidator(); + private static final DataTypesValidator validator = new DataTypesValidator(); private final Appointment appointment = Appointment.EXAMPLE.withAddress(new Address("Storgata 2", null,"00000000001", "Oslo", null)); private final String error = "The value for field 'Appointment.address.postalCode' size must be between 0 and 10. The invalid value was '00000000001'"; diff --git a/src/test/java/no/digipost/api/datatypes/validation/PeriodeValidatorTest.java b/src/test/java/no/digipost/api/datatypes/validation/PeriodeValidatorTest.java index debb6bc7..e961b90c 100644 --- a/src/test/java/no/digipost/api/datatypes/validation/PeriodeValidatorTest.java +++ b/src/test/java/no/digipost/api/datatypes/validation/PeriodeValidatorTest.java @@ -8,7 +8,9 @@ import static java.util.stream.Collectors.toList; import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.*; +import static org.hamcrest.Matchers.empty; +import static org.hamcrest.Matchers.hasSize; +import static org.hamcrest.Matchers.is; public class PeriodeValidatorTest {