diff --git a/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/AbstractTestEntity.java b/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/AbstractTestEntity.java index 4aa8186f2..da28f6f66 100644 --- a/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/AbstractTestEntity.java +++ b/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/AbstractTestEntity.java @@ -16,13 +16,13 @@ import java.math.BigInteger; import java.util.Objects; -import javax.validation.constraints.NotNull; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSubTypes; import com.fasterxml.jackson.annotation.JsonTypeInfo; +import jakarta.validation.constraints.NotNull; + @JsonTypeInfo( use = JsonTypeInfo.Id.NAME ) @JsonSubTypes( { @JsonSubTypes.Type( value = ExtendingTestEntity.class, name = "ExtendingTestEntity" ) diff --git a/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/AspectWithAbstractEntity.java b/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/AspectWithAbstractEntity.java index 1445c3312..4802bd138 100644 --- a/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/AspectWithAbstractEntity.java +++ b/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/AspectWithAbstractEntity.java @@ -15,11 +15,11 @@ import java.util.Objects; -import javax.validation.constraints.NotNull; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.validation.constraints.NotNull; + public class AspectWithAbstractEntity { @NotNull diff --git a/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/AspectWithAbstractSingleEntity.java b/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/AspectWithAbstractSingleEntity.java index 6abccc864..39ba45a57 100644 --- a/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/AspectWithAbstractSingleEntity.java +++ b/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/AspectWithAbstractSingleEntity.java @@ -15,11 +15,11 @@ import java.util.Objects; -import javax.validation.constraints.NotNull; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.validation.constraints.NotNull; + public class AspectWithAbstractSingleEntity { @NotNull diff --git a/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/AspectWithCollectionWithAbstractEntity.java b/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/AspectWithCollectionWithAbstractEntity.java index 8f645310a..a889ca588 100644 --- a/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/AspectWithCollectionWithAbstractEntity.java +++ b/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/AspectWithCollectionWithAbstractEntity.java @@ -16,13 +16,13 @@ import java.util.Collection; import java.util.Objects; -import javax.validation.constraints.NotNull; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import org.eclipse.esmf.aspectmodel.java.CollectionAspect; +import jakarta.validation.constraints.NotNull; + public class AspectWithCollectionWithAbstractEntity implements CollectionAspect, AbstractTestEntity> { @NotNull diff --git a/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/AspectWithComplexSet.java b/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/AspectWithComplexSet.java index 637cfea25..194ae91aa 100644 --- a/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/AspectWithComplexSet.java +++ b/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/AspectWithComplexSet.java @@ -3,12 +3,12 @@ import java.util.Objects; import java.util.Set; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; + /** * Generated class for Test Aspect. This is a test description */ diff --git a/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/AspectWithConstrainedSet.java b/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/AspectWithConstrainedSet.java index f80162b40..d95323083 100644 --- a/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/AspectWithConstrainedSet.java +++ b/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/AspectWithConstrainedSet.java @@ -3,12 +3,12 @@ import java.util.Objects; import java.util.Set; -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Size; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; + /** * Generated class for Test Aspect. This is a test description */ diff --git a/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/AspectWithConstraints.java b/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/AspectWithConstraints.java index c6569fc0b..94d17f10b 100644 --- a/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/AspectWithConstraints.java +++ b/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/AspectWithConstraints.java @@ -17,14 +17,6 @@ import java.util.List; import java.util.Objects; -import javax.validation.constraints.DecimalMax; -import javax.validation.constraints.DecimalMin; -import javax.validation.constraints.Pattern; -import javax.validation.constraints.Size; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; - import org.eclipse.esmf.aspectmodel.java.customconstraint.DoubleMax; import org.eclipse.esmf.aspectmodel.java.customconstraint.DoubleMin; import org.eclipse.esmf.aspectmodel.java.customconstraint.FloatMax; @@ -33,6 +25,14 @@ import org.eclipse.esmf.aspectmodel.java.customconstraint.IntegerMin; import org.eclipse.esmf.metamodel.impl.BoundDefinition; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +import jakarta.validation.constraints.DecimalMax; +import jakarta.validation.constraints.DecimalMin; +import jakarta.validation.constraints.Pattern; +import jakarta.validation.constraints.Size; + /** Generated class for AspectWithConstraints. */ public class AspectWithConstraints { diff --git a/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/AspectWithGTypeForRangeConstraints.java b/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/AspectWithGTypeForRangeConstraints.java index 2fac4133d..b62b9acfa 100644 --- a/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/AspectWithGTypeForRangeConstraints.java +++ b/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/AspectWithGTypeForRangeConstraints.java @@ -14,16 +14,17 @@ import java.util.Objects; -import javax.validation.constraints.NotNull; import javax.xml.datatype.XMLGregorianCalendar; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; - import org.eclipse.esmf.aspectmodel.java.customconstraint.GregorianCalendarMax; import org.eclipse.esmf.aspectmodel.java.customconstraint.GregorianCalendarMin; import org.eclipse.esmf.metamodel.impl.BoundDefinition; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; + +import jakarta.validation.constraints.NotNull; + /** Generated class for AspectWithGTypeForRangeConstraints. */ public class AspectWithGTypeForRangeConstraints { diff --git a/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/AspectWithGenericNumericProperty.java b/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/AspectWithGenericNumericProperty.java index 1d483d38e..0621d8ea6 100644 --- a/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/AspectWithGenericNumericProperty.java +++ b/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/AspectWithGenericNumericProperty.java @@ -14,11 +14,11 @@ import java.util.Objects; -import javax.validation.constraints.NotNull; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.validation.constraints.NotNull; + /** * Class for testing aspects with variously typed and constrained numeric properties. */ diff --git a/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/AspectWithMultilanguageExampleValue.java b/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/AspectWithMultilanguageExampleValue.java index a2ec8681c..8a50f4492 100644 --- a/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/AspectWithMultilanguageExampleValue.java +++ b/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/AspectWithMultilanguageExampleValue.java @@ -2,13 +2,13 @@ import java.util.Objects; -import javax.validation.constraints.NotNull; - import org.eclipse.esmf.metamodel.datatypes.LangString; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.validation.constraints.NotNull; + /** * Generated class for AspectWithMultilanguageExampleValue. * diff --git a/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/AspectWithRangeConstraintWithoutMinMaxIntegerValue.java b/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/AspectWithRangeConstraintWithoutMinMaxIntegerValue.java index 5d76a64f4..84a0f1270 100644 --- a/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/AspectWithRangeConstraintWithoutMinMaxIntegerValue.java +++ b/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/AspectWithRangeConstraintWithoutMinMaxIntegerValue.java @@ -15,11 +15,11 @@ import java.math.BigInteger; import java.util.Objects; -import javax.validation.constraints.NotNull; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.validation.constraints.NotNull; + /** Generated class for Test Aspect. */ public class AspectWithRangeConstraintWithoutMinMaxIntegerValue { diff --git a/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/AspectWithRecursivePropertyWithOptional.java b/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/AspectWithRecursivePropertyWithOptional.java index dad6e6122..9ce1467b5 100644 --- a/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/AspectWithRecursivePropertyWithOptional.java +++ b/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/AspectWithRecursivePropertyWithOptional.java @@ -14,11 +14,11 @@ import java.util.Objects; -import javax.validation.constraints.NotNull; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.validation.constraints.NotNull; + /** Generated class for AspectWithRecursivePropertyWithOptional. */ public class AspectWithRecursivePropertyWithOptional { diff --git a/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/ExtendingTestEntity.java b/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/ExtendingTestEntity.java index fd6a23bc5..b1c89fc5f 100644 --- a/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/ExtendingTestEntity.java +++ b/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/ExtendingTestEntity.java @@ -16,11 +16,11 @@ import java.math.BigInteger; import java.util.Objects; -import javax.validation.constraints.NotNull; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.validation.constraints.NotNull; + public class ExtendingTestEntity extends AbstractTestEntity { @NotNull diff --git a/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/Id.java b/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/Id.java index 685628d49..522e769ee 100644 --- a/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/Id.java +++ b/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/json/testclasses/Id.java @@ -3,11 +3,11 @@ import java.net.URI; import java.util.Objects; -import javax.validation.constraints.NotNull; - import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.validation.constraints.NotNull; + /** * Generated class for Unique Identifier. * diff --git a/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/jsonschema/AspectModelJsonSchemaGeneratorTest.java b/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/jsonschema/AspectModelJsonSchemaGeneratorTest.java index 26457e507..6b5bcc659 100644 --- a/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/jsonschema/AspectModelJsonSchemaGeneratorTest.java +++ b/core/esmf-aspect-model-document-generators/src/test/java/org/eclipse/esmf/aspectmodel/generator/jsonschema/AspectModelJsonSchemaGeneratorTest.java @@ -839,8 +839,8 @@ public void testEnumComplexMapping( final KnownVersion metaModelVersion ) { + "['properties']['description']['enum'][0]" ) ).isEqualTo( "Result succeeded" ); assertThat( context. read( "$['components']['schemas']['ResultGood']['properties']['details']" + "['properties']['message']['enum'][0]" ) ).isEqualTo( "Evaluation succeeded." ); - assertThat( context. read( "$['components']['schemas']['ResultGood']['properties']['details']" - + "['properties']['numericCode']['enum'][0]" ) ).isCloseTo( 10.0d, Percentage.withPercentage( 1.0d ) ); + assertThat( context. read( "$['components']['schemas']['ResultGood']['properties']['details']" + + "['properties']['numericCode']['enum'][0]" ) ).isEqualTo( 10 ); } @ParameterizedTest diff --git a/core/esmf-aspect-model-java-generator/pom.xml b/core/esmf-aspect-model-java-generator/pom.xml index 96b92b9e9..43575a63a 100644 --- a/core/esmf-aspect-model-java-generator/pom.xml +++ b/core/esmf-aspect-model-java-generator/pom.xml @@ -41,8 +41,8 @@ esmf-aspect-model-generator - javax.validation - validation-api + jakarta.validation + jakarta.validation-api org.eclipse.esmf diff --git a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/ConstraintAnnotationBuilder.java b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/ConstraintAnnotationBuilder.java index 737c481c5..1c040707c 100644 --- a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/ConstraintAnnotationBuilder.java +++ b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/ConstraintAnnotationBuilder.java @@ -16,10 +16,6 @@ import java.math.BigInteger; import java.util.Optional; -import javax.validation.constraints.Digits; -import javax.validation.constraints.Pattern; -import javax.validation.constraints.Size; - import org.apache.commons.text.StringEscapeUtils; import org.eclipse.esmf.aspectmodel.java.rangeconstraint.AnnotationExpression; @@ -33,8 +29,12 @@ import org.eclipse.esmf.metamodel.ScalarValue; import org.eclipse.esmf.metamodel.impl.BoundDefinition; +import jakarta.validation.constraints.Digits; +import jakarta.validation.constraints.Pattern; +import jakarta.validation.constraints.Size; + /** - * Provides functionality to create javax.validation.constraints that are displayed in the generated java class + * Provides functionality to create jakarta.validation.constraints that are displayed in the generated java class */ public class ConstraintAnnotationBuilder { diff --git a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/DoubleMax.java b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/DoubleMax.java index 41bf3924d..afc5b67fa 100644 --- a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/DoubleMax.java +++ b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/DoubleMax.java @@ -20,11 +20,11 @@ import java.lang.annotation.Retention; import java.lang.annotation.Target; -import javax.validation.Constraint; -import javax.validation.Payload; - import org.eclipse.esmf.metamodel.impl.BoundDefinition; +import jakarta.validation.Constraint; +import jakarta.validation.Payload; + @Target( { FIELD, TYPE_USE } ) @Retention( RUNTIME ) @Constraint( validatedBy = { DoubleMaxValidator.class } ) diff --git a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/DoubleMaxValidator.java b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/DoubleMaxValidator.java index 08d073dbf..ddee5dcf3 100644 --- a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/DoubleMaxValidator.java +++ b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/DoubleMaxValidator.java @@ -13,11 +13,11 @@ package org.eclipse.esmf.aspectmodel.java.customconstraint; -import javax.validation.ConstraintValidator; -import javax.validation.ConstraintValidatorContext; - import org.eclipse.esmf.metamodel.impl.BoundDefinition; +import jakarta.validation.ConstraintValidator; +import jakarta.validation.ConstraintValidatorContext; + /** * Validates assigned values of type {@link Double}, which must be below or equal to this limit depending on the * provided {@link BoundDefinition}. diff --git a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/DoubleMin.java b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/DoubleMin.java index 2ea919dd6..abdb1b517 100644 --- a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/DoubleMin.java +++ b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/DoubleMin.java @@ -20,11 +20,11 @@ import java.lang.annotation.Retention; import java.lang.annotation.Target; -import javax.validation.Constraint; -import javax.validation.Payload; - import org.eclipse.esmf.metamodel.impl.BoundDefinition; +import jakarta.validation.Constraint; +import jakarta.validation.Payload; + @Target( { FIELD, TYPE_USE } ) @Retention( RUNTIME ) @Constraint( validatedBy = DoubleMinValidator.class ) diff --git a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/DoubleMinValidator.java b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/DoubleMinValidator.java index a582169ef..9ba9136de 100644 --- a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/DoubleMinValidator.java +++ b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/DoubleMinValidator.java @@ -12,12 +12,11 @@ */ package org.eclipse.esmf.aspectmodel.java.customconstraint; - -import javax.validation.ConstraintValidator; -import javax.validation.ConstraintValidatorContext; - import org.eclipse.esmf.metamodel.impl.BoundDefinition; +import jakarta.validation.ConstraintValidator; +import jakarta.validation.ConstraintValidatorContext; + /** * Validates assigned values of type {@link Double}, which must be above or equal to this limit depending on the * provided {@link BoundDefinition}. diff --git a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/DurationMax.java b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/DurationMax.java index 3ebbf4f51..b5cce1498 100644 --- a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/DurationMax.java +++ b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/DurationMax.java @@ -20,11 +20,11 @@ import java.lang.annotation.Retention; import java.lang.annotation.Target; -import javax.validation.Constraint; -import javax.validation.Payload; - import org.eclipse.esmf.metamodel.impl.BoundDefinition; +import jakarta.validation.Constraint; +import jakarta.validation.Payload; + @Target( { FIELD, TYPE_USE } ) @Retention( RUNTIME ) @Constraint( validatedBy = { DurationMaxValidator.class } ) diff --git a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/DurationMaxValidator.java b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/DurationMaxValidator.java index 266f6cc75..830ecb97a 100644 --- a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/DurationMaxValidator.java +++ b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/DurationMaxValidator.java @@ -12,17 +12,16 @@ */ package org.eclipse.esmf.aspectmodel.java.customconstraint; - -import javax.validation.ConstraintValidator; -import javax.validation.ConstraintValidatorContext; import javax.xml.datatype.DatatypeConfigurationException; import javax.xml.datatype.DatatypeFactory; import javax.xml.datatype.Duration; +import org.eclipse.esmf.metamodel.impl.BoundDefinition; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.eclipse.esmf.metamodel.impl.BoundDefinition; +import jakarta.validation.ConstraintValidator; +import jakarta.validation.ConstraintValidatorContext; /** * Validates assigned values of type {@link Duration}, which must be below or equal to this limit depending on the diff --git a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/DurationMin.java b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/DurationMin.java index ba2b2dc0b..62c04efe0 100644 --- a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/DurationMin.java +++ b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/DurationMin.java @@ -20,11 +20,11 @@ import java.lang.annotation.Retention; import java.lang.annotation.Target; -import javax.validation.Constraint; -import javax.validation.Payload; - import org.eclipse.esmf.metamodel.impl.BoundDefinition; +import jakarta.validation.Constraint; +import jakarta.validation.Payload; + @Target( { FIELD, TYPE_USE } ) @Retention( RUNTIME ) @Constraint( validatedBy = DurationMinValidator.class ) diff --git a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/DurationMinValidator.java b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/DurationMinValidator.java index aad68463a..4e14e7a3d 100644 --- a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/DurationMinValidator.java +++ b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/DurationMinValidator.java @@ -13,16 +13,16 @@ package org.eclipse.esmf.aspectmodel.java.customconstraint; -import javax.validation.ConstraintValidator; -import javax.validation.ConstraintValidatorContext; import javax.xml.datatype.DatatypeConfigurationException; import javax.xml.datatype.DatatypeFactory; import javax.xml.datatype.Duration; +import org.eclipse.esmf.metamodel.impl.BoundDefinition; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.eclipse.esmf.metamodel.impl.BoundDefinition; +import jakarta.validation.ConstraintValidator; +import jakarta.validation.ConstraintValidatorContext; /** * Validates assigned values of type {@link Duration}, which must be above or equal to this limit diff --git a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/FloatMax.java b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/FloatMax.java index e02c83194..c204b2953 100644 --- a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/FloatMax.java +++ b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/FloatMax.java @@ -20,11 +20,11 @@ import java.lang.annotation.Retention; import java.lang.annotation.Target; -import javax.validation.Constraint; -import javax.validation.Payload; - import org.eclipse.esmf.metamodel.impl.BoundDefinition; +import jakarta.validation.Constraint; +import jakarta.validation.Payload; + @Target( { FIELD, TYPE_USE } ) @Retention( RUNTIME ) @Constraint( validatedBy = FloatMaxValidator.class ) diff --git a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/FloatMaxValidator.java b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/FloatMaxValidator.java index 60856908d..1321a1db2 100644 --- a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/FloatMaxValidator.java +++ b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/FloatMaxValidator.java @@ -13,11 +13,11 @@ package org.eclipse.esmf.aspectmodel.java.customconstraint; -import javax.validation.ConstraintValidator; -import javax.validation.ConstraintValidatorContext; - import org.eclipse.esmf.metamodel.impl.BoundDefinition; +import jakarta.validation.ConstraintValidator; +import jakarta.validation.ConstraintValidatorContext; + /** * Validates assigned values of type {@link Float}, which must be below or equal to this limit depending on the * provided {@link BoundDefinition}. diff --git a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/FloatMin.java b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/FloatMin.java index 224068fa7..280ffa022 100644 --- a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/FloatMin.java +++ b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/FloatMin.java @@ -20,11 +20,11 @@ import java.lang.annotation.Retention; import java.lang.annotation.Target; -import javax.validation.Constraint; -import javax.validation.Payload; - import org.eclipse.esmf.metamodel.impl.BoundDefinition; +import jakarta.validation.Constraint; +import jakarta.validation.Payload; + @Target( { FIELD, TYPE_USE } ) @Retention( RUNTIME ) @Constraint( validatedBy = FloatMinValidator.class ) diff --git a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/FloatMinValidator.java b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/FloatMinValidator.java index 4227ab1e7..f76b98afd 100644 --- a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/FloatMinValidator.java +++ b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/FloatMinValidator.java @@ -13,11 +13,11 @@ package org.eclipse.esmf.aspectmodel.java.customconstraint; -import javax.validation.ConstraintValidator; -import javax.validation.ConstraintValidatorContext; - import org.eclipse.esmf.metamodel.impl.BoundDefinition; +import jakarta.validation.ConstraintValidator; +import jakarta.validation.ConstraintValidatorContext; + /** * Validates assigned values of type {@link Float}, which must be above or equal to this limit depending on the * provided {@link BoundDefinition}. diff --git a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/GregorianCalendarMax.java b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/GregorianCalendarMax.java index 2a8485495..57cd3143f 100644 --- a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/GregorianCalendarMax.java +++ b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/GregorianCalendarMax.java @@ -20,11 +20,11 @@ import java.lang.annotation.Retention; import java.lang.annotation.Target; -import javax.validation.Constraint; -import javax.validation.Payload; - import org.eclipse.esmf.metamodel.impl.BoundDefinition; +import jakarta.validation.Constraint; +import jakarta.validation.Payload; + @Target( { FIELD, TYPE_USE } ) @Retention( RUNTIME ) @Constraint( validatedBy = { GregorianCalendarMaxValidator.class } ) diff --git a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/GregorianCalendarMaxValidator.java b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/GregorianCalendarMaxValidator.java index a571cace3..aab80322e 100644 --- a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/GregorianCalendarMaxValidator.java +++ b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/GregorianCalendarMaxValidator.java @@ -13,16 +13,16 @@ package org.eclipse.esmf.aspectmodel.java.customconstraint; -import javax.validation.ConstraintValidator; -import javax.validation.ConstraintValidatorContext; import javax.xml.datatype.DatatypeConfigurationException; import javax.xml.datatype.DatatypeFactory; import javax.xml.datatype.XMLGregorianCalendar; +import org.eclipse.esmf.metamodel.impl.BoundDefinition; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.eclipse.esmf.metamodel.impl.BoundDefinition; +import jakarta.validation.ConstraintValidator; +import jakarta.validation.ConstraintValidatorContext; /** * Validates assigned values of type {@link XMLGregorianCalendar}, which must be below or equal to this limit depending diff --git a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/GregorianCalendarMin.java b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/GregorianCalendarMin.java index 1d88223f0..5a5882ba1 100644 --- a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/GregorianCalendarMin.java +++ b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/GregorianCalendarMin.java @@ -20,11 +20,11 @@ import java.lang.annotation.Retention; import java.lang.annotation.Target; -import javax.validation.Constraint; -import javax.validation.Payload; - import org.eclipse.esmf.metamodel.impl.BoundDefinition; +import jakarta.validation.Constraint; +import jakarta.validation.Payload; + @Target( { FIELD, TYPE_USE } ) @Retention( RUNTIME ) @Constraint( validatedBy = GregorianCalendarMinValidator.class ) diff --git a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/GregorianCalendarMinValidator.java b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/GregorianCalendarMinValidator.java index fb65167cc..92dcb8009 100644 --- a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/GregorianCalendarMinValidator.java +++ b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/GregorianCalendarMinValidator.java @@ -12,17 +12,16 @@ */ package org.eclipse.esmf.aspectmodel.java.customconstraint; - -import javax.validation.ConstraintValidator; -import javax.validation.ConstraintValidatorContext; import javax.xml.datatype.DatatypeConfigurationException; import javax.xml.datatype.DatatypeFactory; import javax.xml.datatype.XMLGregorianCalendar; +import org.eclipse.esmf.metamodel.impl.BoundDefinition; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.eclipse.esmf.metamodel.impl.BoundDefinition; +import jakarta.validation.ConstraintValidator; +import jakarta.validation.ConstraintValidatorContext; /** * Validates assigned values of type {@link XMLGregorianCalendar}, which must be above or equal to this limit diff --git a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/IntegerMax.java b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/IntegerMax.java index 8f3b4cfed..7cda91713 100644 --- a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/IntegerMax.java +++ b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/IntegerMax.java @@ -20,11 +20,11 @@ import java.lang.annotation.Retention; import java.lang.annotation.Target; -import javax.validation.Constraint; -import javax.validation.Payload; - import org.eclipse.esmf.metamodel.impl.BoundDefinition; +import jakarta.validation.Constraint; +import jakarta.validation.Payload; + @Target( { FIELD, TYPE_USE } ) @Retention( RUNTIME ) @Constraint( validatedBy = IntegerMaxValidator.class ) diff --git a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/IntegerMaxValidator.java b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/IntegerMaxValidator.java index 3fde0e802..2a9646ba9 100644 --- a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/IntegerMaxValidator.java +++ b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/IntegerMaxValidator.java @@ -13,11 +13,11 @@ package org.eclipse.esmf.aspectmodel.java.customconstraint; -import javax.validation.ConstraintValidator; -import javax.validation.ConstraintValidatorContext; - import org.eclipse.esmf.metamodel.impl.BoundDefinition; +import jakarta.validation.ConstraintValidator; +import jakarta.validation.ConstraintValidatorContext; + /** * Validates assigned values of type {@link Integer}, which must be below or equal to this limit depending on the * provided {@link BoundDefinition}. diff --git a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/IntegerMin.java b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/IntegerMin.java index c84697f95..173b03a57 100644 --- a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/IntegerMin.java +++ b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/IntegerMin.java @@ -20,11 +20,11 @@ import java.lang.annotation.Retention; import java.lang.annotation.Target; -import javax.validation.Constraint; -import javax.validation.Payload; - import org.eclipse.esmf.metamodel.impl.BoundDefinition; +import jakarta.validation.Constraint; +import jakarta.validation.Payload; + @Target( { FIELD, TYPE_USE } ) @Retention( RUNTIME ) @Constraint( validatedBy = IntegerMinValidator.class ) diff --git a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/IntegerMinValidator.java b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/IntegerMinValidator.java index a6b97655c..f1a051096 100644 --- a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/IntegerMinValidator.java +++ b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/IntegerMinValidator.java @@ -13,11 +13,11 @@ package org.eclipse.esmf.aspectmodel.java.customconstraint; -import javax.validation.ConstraintValidator; -import javax.validation.ConstraintValidatorContext; - import org.eclipse.esmf.metamodel.impl.BoundDefinition; +import jakarta.validation.ConstraintValidator; +import jakarta.validation.ConstraintValidatorContext; + /** * Validates assigned values of type {@link Integer}, which must be above or equal to this limit depending on the * provided {@link BoundDefinition}. diff --git a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/LongMax.java b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/LongMax.java index 13442a364..16be87bba 100644 --- a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/LongMax.java +++ b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/LongMax.java @@ -13,17 +13,18 @@ package org.eclipse.esmf.aspectmodel.java.customconstraint; -import static java.lang.annotation.ElementType.*; +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.TYPE_USE; import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.Retention; import java.lang.annotation.Target; -import javax.validation.Constraint; -import javax.validation.Payload; - import org.eclipse.esmf.metamodel.impl.BoundDefinition; +import jakarta.validation.Constraint; +import jakarta.validation.Payload; + @Target( { FIELD, TYPE_USE } ) @Retention( RUNTIME ) @Constraint( validatedBy = LongMaxValidator.class ) diff --git a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/LongMaxValidator.java b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/LongMaxValidator.java index 21dc67455..0931c01bf 100644 --- a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/LongMaxValidator.java +++ b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/LongMaxValidator.java @@ -13,11 +13,11 @@ package org.eclipse.esmf.aspectmodel.java.customconstraint; -import javax.validation.ConstraintValidator; -import javax.validation.ConstraintValidatorContext; - import org.eclipse.esmf.metamodel.impl.BoundDefinition; +import jakarta.validation.ConstraintValidator; +import jakarta.validation.ConstraintValidatorContext; + /** * Validates assigned values of type {@link Short}, which must be below or equal to this limit depending on the * provided {@link BoundDefinition}. diff --git a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/LongMin.java b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/LongMin.java index 03c8e51fb..408b79c8c 100644 --- a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/LongMin.java +++ b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/LongMin.java @@ -13,17 +13,18 @@ package org.eclipse.esmf.aspectmodel.java.customconstraint; -import static java.lang.annotation.ElementType.*; +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.TYPE_USE; import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.Retention; import java.lang.annotation.Target; -import javax.validation.Constraint; -import javax.validation.Payload; - import org.eclipse.esmf.metamodel.impl.BoundDefinition; +import jakarta.validation.Constraint; +import jakarta.validation.Payload; + @Target( { FIELD, TYPE_USE } ) @Retention( RUNTIME ) @Constraint( validatedBy = LongMinValidator.class ) diff --git a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/LongMinValidator.java b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/LongMinValidator.java index 18521e60b..f8f932537 100644 --- a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/LongMinValidator.java +++ b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/LongMinValidator.java @@ -13,11 +13,11 @@ package org.eclipse.esmf.aspectmodel.java.customconstraint; -import javax.validation.ConstraintValidator; -import javax.validation.ConstraintValidatorContext; - import org.eclipse.esmf.metamodel.impl.BoundDefinition; +import jakarta.validation.ConstraintValidator; +import jakarta.validation.ConstraintValidatorContext; + /** * Validates assigned values of type {@link Long}, which must be above or equal to this limit depending on the * provided {@link BoundDefinition}. diff --git a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/ShortMax.java b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/ShortMax.java index 825cdda81..d754b7a24 100644 --- a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/ShortMax.java +++ b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/ShortMax.java @@ -13,17 +13,18 @@ package org.eclipse.esmf.aspectmodel.java.customconstraint; -import static java.lang.annotation.ElementType.*; +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.TYPE_USE; import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.Retention; import java.lang.annotation.Target; -import javax.validation.Constraint; -import javax.validation.Payload; - import org.eclipse.esmf.metamodel.impl.BoundDefinition; +import jakarta.validation.Constraint; +import jakarta.validation.Payload; + @Target( { FIELD, TYPE_USE } ) @Retention( RUNTIME ) @Constraint( validatedBy = ShortMaxValidator.class ) diff --git a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/ShortMaxValidator.java b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/ShortMaxValidator.java index 4d6145984..51bb6c094 100644 --- a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/ShortMaxValidator.java +++ b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/ShortMaxValidator.java @@ -13,11 +13,11 @@ package org.eclipse.esmf.aspectmodel.java.customconstraint; -import javax.validation.ConstraintValidator; -import javax.validation.ConstraintValidatorContext; - import org.eclipse.esmf.metamodel.impl.BoundDefinition; +import jakarta.validation.ConstraintValidator; +import jakarta.validation.ConstraintValidatorContext; + /** * Validates assigned values of type {@link Short}, which must be below or equal to this limit depending on the * provided {@link BoundDefinition}. diff --git a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/ShortMin.java b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/ShortMin.java index 639c2451f..66895e2bc 100644 --- a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/ShortMin.java +++ b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/ShortMin.java @@ -13,17 +13,18 @@ package org.eclipse.esmf.aspectmodel.java.customconstraint; -import static java.lang.annotation.ElementType.*; +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.TYPE_USE; import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.Retention; import java.lang.annotation.Target; -import javax.validation.Constraint; -import javax.validation.Payload; - import org.eclipse.esmf.metamodel.impl.BoundDefinition; +import jakarta.validation.Constraint; +import jakarta.validation.Payload; + @Target( { FIELD, TYPE_USE } ) @Retention( RUNTIME ) @Constraint( validatedBy = ShortMinValidator.class ) diff --git a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/ShortMinValidator.java b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/ShortMinValidator.java index bf057a120..548e18df9 100644 --- a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/ShortMinValidator.java +++ b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/customconstraint/ShortMinValidator.java @@ -13,11 +13,11 @@ package org.eclipse.esmf.aspectmodel.java.customconstraint; -import javax.validation.ConstraintValidator; -import javax.validation.ConstraintValidatorContext; - import org.eclipse.esmf.metamodel.impl.BoundDefinition; +import jakarta.validation.ConstraintValidator; +import jakarta.validation.ConstraintValidatorContext; + /** * Validates assigned values of type {@link Short}, which must be above or equal to this limit depending on the * provided {@link BoundDefinition}. diff --git a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/pojo/StructureElementJavaArtifactGenerator.java b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/pojo/StructureElementJavaArtifactGenerator.java index 27aeb406a..557ae1f32 100644 --- a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/pojo/StructureElementJavaArtifactGenerator.java +++ b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/pojo/StructureElementJavaArtifactGenerator.java @@ -22,7 +22,6 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; -import javax.validation.constraints.NotNull; import javax.xml.datatype.DatatypeConfigurationException; import javax.xml.datatype.DatatypeConstants; import javax.xml.datatype.DatatypeFactory; @@ -39,16 +38,6 @@ import org.eclipse.esmf.aspectmodel.java.JavaCodeGenerationConfig; import org.eclipse.esmf.aspectmodel.java.StructuredValuePropertiesDeconstructor; import org.eclipse.esmf.aspectmodel.java.ValueInitializer; -import org.jboss.forge.roaster.Roaster; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.fasterxml.jackson.databind.annotation.JsonSerialize; -import com.google.common.collect.ImmutableMap; - -import org.eclipse.esmf.samm.KnownVersion; - import org.eclipse.esmf.aspectmodel.java.exception.CodeGenerationException; import org.eclipse.esmf.aspectmodel.resolver.services.DataType; @@ -60,6 +49,17 @@ import org.eclipse.esmf.metamodel.impl.DefaultScalar; import org.eclipse.esmf.metamodel.impl.DefaultScalarValue; +import org.eclipse.esmf.samm.KnownVersion; +import org.jboss.forge.roaster.Roaster; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.google.common.collect.ImmutableMap; + +import jakarta.validation.constraints.NotNull; + /** * A {@link ArtifactGenerator} that generates Java Pojo code * for {@link StructureElement}s diff --git a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/rangeconstraint/AnnotationTypeMapping.java b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/rangeconstraint/AnnotationTypeMapping.java index c4b1e4e68..10811f4a2 100644 --- a/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/rangeconstraint/AnnotationTypeMapping.java +++ b/core/esmf-aspect-model-java-generator/src/main/java/org/eclipse/esmf/aspectmodel/java/rangeconstraint/AnnotationTypeMapping.java @@ -17,18 +17,13 @@ import java.math.BigInteger; import java.util.Map; -import javax.validation.constraints.DecimalMax; -import javax.validation.constraints.DecimalMin; import javax.xml.datatype.Duration; import javax.xml.datatype.XMLGregorianCalendar; import org.eclipse.esmf.aspectmodel.java.customconstraint.DoubleMax; -import org.eclipse.esmf.aspectmodel.java.customconstraint.DurationMax; -import org.eclipse.esmf.aspectmodel.java.customconstraint.LongMax; - -import com.google.common.collect.ImmutableMap; import org.eclipse.esmf.aspectmodel.java.customconstraint.DoubleMin; +import org.eclipse.esmf.aspectmodel.java.customconstraint.DurationMax; import org.eclipse.esmf.aspectmodel.java.customconstraint.DurationMin; import org.eclipse.esmf.aspectmodel.java.customconstraint.FloatMax; import org.eclipse.esmf.aspectmodel.java.customconstraint.FloatMin; @@ -36,10 +31,16 @@ import org.eclipse.esmf.aspectmodel.java.customconstraint.GregorianCalendarMin; import org.eclipse.esmf.aspectmodel.java.customconstraint.IntegerMax; import org.eclipse.esmf.aspectmodel.java.customconstraint.IntegerMin; +import org.eclipse.esmf.aspectmodel.java.customconstraint.LongMax; import org.eclipse.esmf.aspectmodel.java.customconstraint.LongMin; import org.eclipse.esmf.aspectmodel.java.customconstraint.ShortMax; import org.eclipse.esmf.aspectmodel.java.customconstraint.ShortMin; +import com.google.common.collect.ImmutableMap; + +import jakarta.validation.constraints.DecimalMax; +import jakarta.validation.constraints.DecimalMin; + /** * Serves to map used data types to the respective annotation class. */ diff --git a/core/esmf-aspect-model-java-generator/src/main/java/velocity_implicit.vm b/core/esmf-aspect-model-java-generator/src/main/java/velocity_implicit.vm index 12461f074..c4f6a30e2 100644 --- a/core/esmf-aspect-model-java-generator/src/main/java/velocity_implicit.vm +++ b/core/esmf-aspect-model-java-generator/src/main/java/velocity_implicit.vm @@ -76,7 +76,7 @@ #* @vtlvariable name="modelUrnPrefix" type="java.lang.String" *# #* @vtlvariable name="modelVisitor" type="org.eclipse.esmf.aspectmodel.java.metamodel.StaticMetaModelVisitor" *# #* @vtlvariable name="nonNegativeInteger" type="org.eclipse.esmf.metamodel.Scalar" *# -#* @vtlvariable name="NotNull" type="java.lang.Class" *# +#* @vtlvariable name="NotNull" type="java.lang.Class" *# #* @vtlvariable name="Object" type="java.lang.Class" *# #* @vtlvariable name="Optional" type="java.lang.Class" *# #* @vtlvariable name="Pattern" type="java.lang.Class" *# diff --git a/core/esmf-aspect-model-java-generator/src/test/java/org/eclipse/esmf/aspectmodel/java/customconstraint/CustomConstraintTest.java b/core/esmf-aspect-model-java-generator/src/test/java/org/eclipse/esmf/aspectmodel/java/customconstraint/CustomConstraintTest.java index 504c70381..120e1f8c0 100644 --- a/core/esmf-aspect-model-java-generator/src/test/java/org/eclipse/esmf/aspectmodel/java/customconstraint/CustomConstraintTest.java +++ b/core/esmf-aspect-model-java-generator/src/test/java/org/eclipse/esmf/aspectmodel/java/customconstraint/CustomConstraintTest.java @@ -15,15 +15,15 @@ import static org.assertj.core.api.Assertions.assertThat; -import javax.validation.ConstraintViolation; -import javax.validation.Validation; -import javax.validation.Validator; -import javax.validation.ValidatorFactory; +import java.util.Set; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; -import java.util.Set; +import jakarta.validation.ConstraintViolation; +import jakarta.validation.Validation; +import jakarta.validation.Validator; +import jakarta.validation.ValidatorFactory; public class CustomConstraintTest { diff --git a/pom.xml b/pom.xml index 8278336a3..cbb0f13f4 100644 --- a/pom.xml +++ b/pom.xml @@ -76,7 +76,6 @@ 8.0.0.Final - 4.1.2 5.2.3 1.1.5 @@ -203,11 +202,6 @@ hibernate-validator ${hibernate-validator-version} - - org.glassfish - jakarta.el - ${jakarta-el-version} - org.apache.poi poi