diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 9e3c28b33..2b38ac50d 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -8,16 +8,10 @@ on: jobs: build_and_tests: - runs-on: ubuntu-20.04 - continue-on-error: ${{ matrix.experimental }} + runs-on: ubuntu-22.04 strategy: - fail-fast: false matrix: - include: - - version: 8 - experimental: false - - version: 11 - experimental: true + java_version: [11, 17] steps: # Setup Java & Python @@ -25,12 +19,10 @@ jobs: uses: actions/setup-java@v2 with: distribution: 'temurin' - java-version: ${{ matrix.version }} - - name: Setup Python - uses: actions/setup-python@v2 - with: - python-version: "3.9.7" - architecture: x64 + java-version: ${{ matrix.java_version }} + + - name: Run apt-get update + run: sudo apt-get update # ICAT Ansible clone and install dependencies - name: Checkout icat-ansible @@ -38,7 +30,7 @@ jobs: with: repository: icatproject-contrib/icat-ansible path: icat-ansible - ref: master + ref: payara6 - name: Install Ansible run: pip install -r icat-ansible/requirements.txt diff --git a/README.md b/README.md index a5a74588a..b6d09178e 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,6 @@ General installation instructions are at https://icatproject.org/installation/component -Specific installation instructions are at https://repo.icatproject.org/site/icat/server/5.0.0/installation.html +Specific installation instructions are at https://repo.icatproject.org/site/icat/server/6.0.0/installation.html -All documentation on the icat.server may be found at https://repo.icatproject.org/site/icat/server/5.0.0 +All documentation on the icat.server may be found at https://repo.icatproject.org/site/icat/server/6.0.0 diff --git a/pom.xml b/pom.xml index dc2e84ac7..c46c4a68b 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ org.icatproject icat.server - 5.0.2-SNAPSHOT + 6.0.1-SNAPSHOT war ICAT Server A metadata catalogue to support Large Facility experimental data, @@ -71,16 +71,16 @@ - javax - javaee-api - 7.0 + jakarta.platform + jakarta.jakartaee-api + 10.0.0 provided org.icatproject icat.authentication - 4.6.0 + 5.0.0 @@ -96,18 +96,18 @@ test - - org.glassfish - jakarta.json - 1.1.5 + com.sun.xml.ws + jaxws-rt + 4.0.0 test - commons-fileupload - commons-fileupload - 1.4 + org.eclipse.parsson + parsson + 1.1.0 + test @@ -119,7 +119,7 @@ org.icatproject icat.client - 5.0.0 + 6.0.0 test @@ -159,7 +159,7 @@ com.qmino miredot-plugin - 1.6.2 + 2.4.1-Java11 miredot @@ -260,21 +260,16 @@ org.apache.maven.plugins maven-war-plugin - 2.4 - - false - false - + 3.4.0 org.apache.maven.plugins maven-compiler-plugin - 3.3 + 3.10.1 ${project.build.sourceEncoding} - 1.8 - 1.8 + 11 diff --git a/src/main/java/org/icatproject/core/entity/Affiliation.java b/src/main/java/org/icatproject/core/entity/Affiliation.java index a9ba21549..57dc3cc72 100644 --- a/src/main/java/org/icatproject/core/entity/Affiliation.java +++ b/src/main/java/org/icatproject/core/entity/Affiliation.java @@ -2,13 +2,13 @@ import java.io.Serializable; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; @Comment("The home institute or other affiliation of a user in the context of a data publication") @SuppressWarnings("serial") diff --git a/src/main/java/org/icatproject/core/entity/Application.java b/src/main/java/org/icatproject/core/entity/Application.java index 61cde4b3e..88b20d95b 100644 --- a/src/main/java/org/icatproject/core/entity/Application.java +++ b/src/main/java/org/icatproject/core/entity/Application.java @@ -4,15 +4,15 @@ import java.util.ArrayList; import java.util.List; -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.OneToMany; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.OneToMany; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; @Comment("Some piece of software") @SuppressWarnings("serial") diff --git a/src/main/java/org/icatproject/core/entity/DataCollection.java b/src/main/java/org/icatproject/core/entity/DataCollection.java index 20732b18d..d1158cb3d 100644 --- a/src/main/java/org/icatproject/core/entity/DataCollection.java +++ b/src/main/java/org/icatproject/core/entity/DataCollection.java @@ -4,9 +4,9 @@ import java.util.ArrayList; import java.util.List; -import javax.persistence.CascadeType; -import javax.persistence.Entity; -import javax.persistence.OneToMany; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Entity; +import jakarta.persistence.OneToMany; @Comment("A set of Investigations, Datasets and Datafiles which can span Facilities. " + "Note that it has no constraint fields. " diff --git a/src/main/java/org/icatproject/core/entity/DataCollectionDatafile.java b/src/main/java/org/icatproject/core/entity/DataCollectionDatafile.java index 3b5770323..a763f8399 100644 --- a/src/main/java/org/icatproject/core/entity/DataCollectionDatafile.java +++ b/src/main/java/org/icatproject/core/entity/DataCollectionDatafile.java @@ -2,12 +2,12 @@ import java.io.Serializable; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; @Comment("Represents a many-to-many relationship between a DataCollection and its Datafiles.") @SuppressWarnings("serial") diff --git a/src/main/java/org/icatproject/core/entity/DataCollectionDataset.java b/src/main/java/org/icatproject/core/entity/DataCollectionDataset.java index 6ac6e9341..17a28d547 100644 --- a/src/main/java/org/icatproject/core/entity/DataCollectionDataset.java +++ b/src/main/java/org/icatproject/core/entity/DataCollectionDataset.java @@ -2,12 +2,12 @@ import java.io.Serializable; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; @Comment("Represents a many-to-many relationship between a DataCollection and its datasets.") @SuppressWarnings("serial") diff --git a/src/main/java/org/icatproject/core/entity/DataCollectionInvestigation.java b/src/main/java/org/icatproject/core/entity/DataCollectionInvestigation.java index 729714560..08e763bb9 100644 --- a/src/main/java/org/icatproject/core/entity/DataCollectionInvestigation.java +++ b/src/main/java/org/icatproject/core/entity/DataCollectionInvestigation.java @@ -2,12 +2,12 @@ import java.io.Serializable; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; @Comment("Represents a many-to-many relationship between a DataCollection and its Investigations.") @SuppressWarnings("serial") diff --git a/src/main/java/org/icatproject/core/entity/DataCollectionParameter.java b/src/main/java/org/icatproject/core/entity/DataCollectionParameter.java index baa264bf9..c5de6b21e 100644 --- a/src/main/java/org/icatproject/core/entity/DataCollectionParameter.java +++ b/src/main/java/org/icatproject/core/entity/DataCollectionParameter.java @@ -2,12 +2,12 @@ import java.io.Serializable; -import javax.persistence.Entity; -import javax.persistence.EntityManager; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; +import jakarta.persistence.Entity; +import jakarta.persistence.EntityManager; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; import org.icatproject.core.IcatException; import org.icatproject.core.manager.EntityBeanManager.PersistMode; diff --git a/src/main/java/org/icatproject/core/entity/DataPublication.java b/src/main/java/org/icatproject/core/entity/DataPublication.java index 9cc0607af..5d92b99c6 100644 --- a/src/main/java/org/icatproject/core/entity/DataPublication.java +++ b/src/main/java/org/icatproject/core/entity/DataPublication.java @@ -5,17 +5,17 @@ import java.util.Date; import java.util.List; -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.OneToMany; -import javax.persistence.Table; -import javax.persistence.Temporal; -import javax.persistence.TemporalType; -import javax.persistence.UniqueConstraint; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.OneToMany; +import jakarta.persistence.Table; +import jakarta.persistence.Temporal; +import jakarta.persistence.TemporalType; +import jakarta.persistence.UniqueConstraint; @Comment("A curated data publication") @SuppressWarnings("serial") diff --git a/src/main/java/org/icatproject/core/entity/DataPublicationDate.java b/src/main/java/org/icatproject/core/entity/DataPublicationDate.java index f76e2dab8..75f6e8342 100644 --- a/src/main/java/org/icatproject/core/entity/DataPublicationDate.java +++ b/src/main/java/org/icatproject/core/entity/DataPublicationDate.java @@ -2,13 +2,13 @@ import java.io.Serializable; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; @Comment("A date relevant for the publication") @SuppressWarnings("serial") diff --git a/src/main/java/org/icatproject/core/entity/DataPublicationFunding.java b/src/main/java/org/icatproject/core/entity/DataPublicationFunding.java index 54b1873d4..bd0a2cfc4 100644 --- a/src/main/java/org/icatproject/core/entity/DataPublicationFunding.java +++ b/src/main/java/org/icatproject/core/entity/DataPublicationFunding.java @@ -2,12 +2,12 @@ import java.io.Serializable; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; @Comment("Represents a many-to-many relationship between a data publication and a funding reference") @SuppressWarnings("serial") diff --git a/src/main/java/org/icatproject/core/entity/DataPublicationType.java b/src/main/java/org/icatproject/core/entity/DataPublicationType.java index 4b8dd94cc..bc8be0f5d 100644 --- a/src/main/java/org/icatproject/core/entity/DataPublicationType.java +++ b/src/main/java/org/icatproject/core/entity/DataPublicationType.java @@ -4,15 +4,15 @@ import java.util.ArrayList; import java.util.List; -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.OneToMany; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.OneToMany; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; @Comment("A type of data publication, for example, whole investigation, user-selected datasets/files. " + "This is likely to be for facility internal purposes following their own classification " diff --git a/src/main/java/org/icatproject/core/entity/DataPublicationUser.java b/src/main/java/org/icatproject/core/entity/DataPublicationUser.java index a505e592d..762b4c1ae 100644 --- a/src/main/java/org/icatproject/core/entity/DataPublicationUser.java +++ b/src/main/java/org/icatproject/core/entity/DataPublicationUser.java @@ -4,15 +4,15 @@ import java.util.ArrayList; import java.util.List; -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.OneToMany; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.OneToMany; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; @Comment("Author, e.g. creator of or contributor to a data publication") @SuppressWarnings("serial") diff --git a/src/main/java/org/icatproject/core/entity/Datafile.java b/src/main/java/org/icatproject/core/entity/Datafile.java index dd9ffb92c..a9755ded1 100644 --- a/src/main/java/org/icatproject/core/entity/Datafile.java +++ b/src/main/java/org/icatproject/core/entity/Datafile.java @@ -5,20 +5,20 @@ import java.util.Date; import java.util.List; -import javax.json.stream.JsonGenerator; -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.Index; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.OneToMany; -import javax.persistence.Table; -import javax.persistence.Temporal; -import javax.persistence.TemporalType; -import javax.persistence.UniqueConstraint; -import javax.xml.bind.annotation.XmlRootElement; +import jakarta.json.stream.JsonGenerator; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.Index; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.OneToMany; +import jakarta.persistence.Table; +import jakarta.persistence.Temporal; +import jakarta.persistence.TemporalType; +import jakarta.persistence.UniqueConstraint; +import jakarta.xml.bind.annotation.XmlRootElement; import org.icatproject.core.manager.LuceneApi; diff --git a/src/main/java/org/icatproject/core/entity/DatafileFormat.java b/src/main/java/org/icatproject/core/entity/DatafileFormat.java index 715326784..2c38b891f 100644 --- a/src/main/java/org/icatproject/core/entity/DatafileFormat.java +++ b/src/main/java/org/icatproject/core/entity/DatafileFormat.java @@ -4,15 +4,15 @@ import java.util.ArrayList; import java.util.List; -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.OneToMany; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.OneToMany; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; @Comment("A data file format") @SuppressWarnings("serial") diff --git a/src/main/java/org/icatproject/core/entity/DatafileParameter.java b/src/main/java/org/icatproject/core/entity/DatafileParameter.java index c781e4df4..8b30ffa3e 100644 --- a/src/main/java/org/icatproject/core/entity/DatafileParameter.java +++ b/src/main/java/org/icatproject/core/entity/DatafileParameter.java @@ -2,14 +2,14 @@ import java.io.Serializable; -import javax.json.stream.JsonGenerator; -import javax.persistence.Entity; -import javax.persistence.EntityManager; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; -import javax.xml.bind.annotation.XmlRootElement; +import jakarta.json.stream.JsonGenerator; +import jakarta.persistence.Entity; +import jakarta.persistence.EntityManager; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; +import jakarta.xml.bind.annotation.XmlRootElement; import org.icatproject.core.IcatException; import org.icatproject.core.manager.EntityBeanManager.PersistMode; diff --git a/src/main/java/org/icatproject/core/entity/Dataset.java b/src/main/java/org/icatproject/core/entity/Dataset.java index d1f9493b9..0f0dae57d 100644 --- a/src/main/java/org/icatproject/core/entity/Dataset.java +++ b/src/main/java/org/icatproject/core/entity/Dataset.java @@ -5,19 +5,19 @@ import java.util.Date; import java.util.List; -import javax.json.stream.JsonGenerator; -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.OneToMany; -import javax.persistence.Table; -import javax.persistence.Temporal; -import javax.persistence.TemporalType; -import javax.persistence.UniqueConstraint; -import javax.xml.bind.annotation.XmlRootElement; +import jakarta.json.stream.JsonGenerator; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.OneToMany; +import jakarta.persistence.Table; +import jakarta.persistence.Temporal; +import jakarta.persistence.TemporalType; +import jakarta.persistence.UniqueConstraint; +import jakarta.xml.bind.annotation.XmlRootElement; import org.icatproject.core.manager.LuceneApi; diff --git a/src/main/java/org/icatproject/core/entity/DatasetInstrument.java b/src/main/java/org/icatproject/core/entity/DatasetInstrument.java index 4d35cc81e..5e138ea64 100644 --- a/src/main/java/org/icatproject/core/entity/DatasetInstrument.java +++ b/src/main/java/org/icatproject/core/entity/DatasetInstrument.java @@ -2,12 +2,12 @@ import java.io.Serializable; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; @Comment("Represents a many-to-many relationship between an instrument and a dataset with data collected at that instrument") @SuppressWarnings("serial") diff --git a/src/main/java/org/icatproject/core/entity/DatasetParameter.java b/src/main/java/org/icatproject/core/entity/DatasetParameter.java index 656bf8af0..69f9cc1b9 100644 --- a/src/main/java/org/icatproject/core/entity/DatasetParameter.java +++ b/src/main/java/org/icatproject/core/entity/DatasetParameter.java @@ -2,14 +2,14 @@ import java.io.Serializable; -import javax.json.stream.JsonGenerator; -import javax.persistence.Entity; -import javax.persistence.EntityManager; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; -import javax.xml.bind.annotation.XmlRootElement; +import jakarta.json.stream.JsonGenerator; +import jakarta.persistence.Entity; +import jakarta.persistence.EntityManager; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; +import jakarta.xml.bind.annotation.XmlRootElement; import org.icatproject.core.IcatException; import org.icatproject.core.manager.EntityBeanManager.PersistMode; diff --git a/src/main/java/org/icatproject/core/entity/DatasetTechnique.java b/src/main/java/org/icatproject/core/entity/DatasetTechnique.java index 1b371414a..2c5e0c308 100644 --- a/src/main/java/org/icatproject/core/entity/DatasetTechnique.java +++ b/src/main/java/org/icatproject/core/entity/DatasetTechnique.java @@ -2,12 +2,12 @@ import java.io.Serializable; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; @Comment("Represents a many-to-many relationship between a dataset and the experimental technique being used to create that Dataset") @SuppressWarnings("serial") diff --git a/src/main/java/org/icatproject/core/entity/DatasetType.java b/src/main/java/org/icatproject/core/entity/DatasetType.java index 192d0a76b..7e85c4d44 100644 --- a/src/main/java/org/icatproject/core/entity/DatasetType.java +++ b/src/main/java/org/icatproject/core/entity/DatasetType.java @@ -4,15 +4,15 @@ import java.util.ArrayList; import java.util.List; -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.OneToMany; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.OneToMany; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; @Comment("A type of data set") @SuppressWarnings("serial") diff --git a/src/main/java/org/icatproject/core/entity/EntityBaseBean.java b/src/main/java/org/icatproject/core/entity/EntityBaseBean.java index afcc54e0a..bb3c8a2cf 100644 --- a/src/main/java/org/icatproject/core/entity/EntityBaseBean.java +++ b/src/main/java/org/icatproject/core/entity/EntityBaseBean.java @@ -12,17 +12,17 @@ import java.util.Map; import java.util.Set; -import javax.json.stream.JsonGenerator; -import javax.persistence.Column; -import javax.persistence.EntityManager; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.MappedSuperclass; -import javax.persistence.Temporal; -import javax.persistence.TemporalType; -import javax.persistence.Transient; -import javax.xml.bind.annotation.XmlTransient; +import jakarta.json.stream.JsonGenerator; +import jakarta.persistence.Column; +import jakarta.persistence.EntityManager; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.MappedSuperclass; +import jakarta.persistence.Temporal; +import jakarta.persistence.TemporalType; +import jakarta.persistence.Transient; +import jakarta.xml.bind.annotation.XmlTransient; import org.icatproject.core.IcatException; import org.icatproject.core.IcatException.IcatExceptionType; diff --git a/src/main/java/org/icatproject/core/entity/Facility.java b/src/main/java/org/icatproject/core/entity/Facility.java index 7261146a6..e5ebaa4bf 100644 --- a/src/main/java/org/icatproject/core/entity/Facility.java +++ b/src/main/java/org/icatproject/core/entity/Facility.java @@ -4,12 +4,12 @@ import java.util.ArrayList; import java.util.List; -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.OneToMany; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.OneToMany; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; @Comment("An experimental facility") @SuppressWarnings("serial") diff --git a/src/main/java/org/icatproject/core/entity/FacilityCycle.java b/src/main/java/org/icatproject/core/entity/FacilityCycle.java index 05034132c..6789f3bea 100644 --- a/src/main/java/org/icatproject/core/entity/FacilityCycle.java +++ b/src/main/java/org/icatproject/core/entity/FacilityCycle.java @@ -5,17 +5,17 @@ import java.util.Date; import java.util.List; -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.OneToMany; -import javax.persistence.Table; -import javax.persistence.Temporal; -import javax.persistence.TemporalType; -import javax.persistence.UniqueConstraint; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.OneToMany; +import jakarta.persistence.Table; +import jakarta.persistence.Temporal; +import jakarta.persistence.TemporalType; +import jakarta.persistence.UniqueConstraint; @Comment("An operating cycle within a facility") @SuppressWarnings("serial") diff --git a/src/main/java/org/icatproject/core/entity/FieldSet.java b/src/main/java/org/icatproject/core/entity/FieldSet.java index fe18954c9..690307f56 100644 --- a/src/main/java/org/icatproject/core/entity/FieldSet.java +++ b/src/main/java/org/icatproject/core/entity/FieldSet.java @@ -1,7 +1,7 @@ package org.icatproject.core.entity; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlElement; import java.io.Serializable; @XmlRootElement diff --git a/src/main/java/org/icatproject/core/entity/FundingReference.java b/src/main/java/org/icatproject/core/entity/FundingReference.java index 0e42714aa..1f18f23bc 100644 --- a/src/main/java/org/icatproject/core/entity/FundingReference.java +++ b/src/main/java/org/icatproject/core/entity/FundingReference.java @@ -4,12 +4,12 @@ import java.util.ArrayList; import java.util.List; -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.OneToMany; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.OneToMany; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; @Comment("Information about financial support") @SuppressWarnings("serial") diff --git a/src/main/java/org/icatproject/core/entity/Grouping.java b/src/main/java/org/icatproject/core/entity/Grouping.java index 7af88e428..ce8a2cc48 100644 --- a/src/main/java/org/icatproject/core/entity/Grouping.java +++ b/src/main/java/org/icatproject/core/entity/Grouping.java @@ -4,12 +4,12 @@ import java.util.ArrayList; import java.util.List; -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.OneToMany; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.OneToMany; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; @Comment("A group of users") @SuppressWarnings("serial") diff --git a/src/main/java/org/icatproject/core/entity/Instrument.java b/src/main/java/org/icatproject/core/entity/Instrument.java index 623bbea78..9f5ea40d9 100644 --- a/src/main/java/org/icatproject/core/entity/Instrument.java +++ b/src/main/java/org/icatproject/core/entity/Instrument.java @@ -4,15 +4,15 @@ import java.util.ArrayList; import java.util.List; -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.OneToMany; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.OneToMany; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; @Comment("Used by a user within an investigation") @SuppressWarnings("serial") diff --git a/src/main/java/org/icatproject/core/entity/InstrumentScientist.java b/src/main/java/org/icatproject/core/entity/InstrumentScientist.java index 0cc5c794b..c7e727164 100644 --- a/src/main/java/org/icatproject/core/entity/InstrumentScientist.java +++ b/src/main/java/org/icatproject/core/entity/InstrumentScientist.java @@ -2,12 +2,12 @@ import java.io.Serializable; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; @Comment("Relationship between an ICAT user as an instrument scientist and the instrument") @SuppressWarnings("serial") diff --git a/src/main/java/org/icatproject/core/entity/Investigation.java b/src/main/java/org/icatproject/core/entity/Investigation.java index f1be3aa7c..adcc63406 100644 --- a/src/main/java/org/icatproject/core/entity/Investigation.java +++ b/src/main/java/org/icatproject/core/entity/Investigation.java @@ -5,18 +5,18 @@ import java.util.Date; import java.util.List; -import javax.json.stream.JsonGenerator; -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.OneToMany; -import javax.persistence.Table; -import javax.persistence.Temporal; -import javax.persistence.TemporalType; -import javax.persistence.UniqueConstraint; +import jakarta.json.stream.JsonGenerator; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.OneToMany; +import jakarta.persistence.Table; +import jakarta.persistence.Temporal; +import jakarta.persistence.TemporalType; +import jakarta.persistence.UniqueConstraint; import org.icatproject.core.manager.LuceneApi; diff --git a/src/main/java/org/icatproject/core/entity/InvestigationFacilityCycle.java b/src/main/java/org/icatproject/core/entity/InvestigationFacilityCycle.java index edc75c943..f74cbbaad 100644 --- a/src/main/java/org/icatproject/core/entity/InvestigationFacilityCycle.java +++ b/src/main/java/org/icatproject/core/entity/InvestigationFacilityCycle.java @@ -2,11 +2,11 @@ import java.io.Serializable; -import javax.persistence.Entity; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; +import jakarta.persistence.Entity; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; @Comment("Many to many relationship between investigation and facilityCycle. " + "Allows investigations to belong to multiple cycles at once.") diff --git a/src/main/java/org/icatproject/core/entity/InvestigationFunding.java b/src/main/java/org/icatproject/core/entity/InvestigationFunding.java index c8e908fd1..071c9fb4b 100644 --- a/src/main/java/org/icatproject/core/entity/InvestigationFunding.java +++ b/src/main/java/org/icatproject/core/entity/InvestigationFunding.java @@ -2,12 +2,12 @@ import java.io.Serializable; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; @Comment("Represents a many-to-many relationship between an investigation and a funding reference") @SuppressWarnings("serial") diff --git a/src/main/java/org/icatproject/core/entity/InvestigationGroup.java b/src/main/java/org/icatproject/core/entity/InvestigationGroup.java index b4b9872ab..d248a12d2 100644 --- a/src/main/java/org/icatproject/core/entity/InvestigationGroup.java +++ b/src/main/java/org/icatproject/core/entity/InvestigationGroup.java @@ -2,12 +2,12 @@ import java.io.Serializable; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; @Comment("Many to many relationship between investigation and group which might be used within authorization rules. " + "Please see InvestigationUser") diff --git a/src/main/java/org/icatproject/core/entity/InvestigationInstrument.java b/src/main/java/org/icatproject/core/entity/InvestigationInstrument.java index b8f751f48..5eb4356fd 100644 --- a/src/main/java/org/icatproject/core/entity/InvestigationInstrument.java +++ b/src/main/java/org/icatproject/core/entity/InvestigationInstrument.java @@ -2,12 +2,12 @@ import java.io.Serializable; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; @Comment("Represents a many-to-many relationship between an investigation and the instruments assigned") @SuppressWarnings("serial") diff --git a/src/main/java/org/icatproject/core/entity/InvestigationParameter.java b/src/main/java/org/icatproject/core/entity/InvestigationParameter.java index 9f5fe2e44..f5d0c0a16 100644 --- a/src/main/java/org/icatproject/core/entity/InvestigationParameter.java +++ b/src/main/java/org/icatproject/core/entity/InvestigationParameter.java @@ -2,14 +2,14 @@ import java.io.Serializable; -import javax.json.stream.JsonGenerator; -import javax.persistence.Entity; -import javax.persistence.EntityManager; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; -import javax.xml.bind.annotation.XmlRootElement; +import jakarta.json.stream.JsonGenerator; +import jakarta.persistence.Entity; +import jakarta.persistence.EntityManager; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; +import jakarta.xml.bind.annotation.XmlRootElement; import org.icatproject.core.IcatException; import org.icatproject.core.manager.EntityBeanManager.PersistMode; diff --git a/src/main/java/org/icatproject/core/entity/InvestigationType.java b/src/main/java/org/icatproject/core/entity/InvestigationType.java index afaee4640..502449043 100644 --- a/src/main/java/org/icatproject/core/entity/InvestigationType.java +++ b/src/main/java/org/icatproject/core/entity/InvestigationType.java @@ -4,15 +4,15 @@ import java.util.ArrayList; import java.util.List; -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.OneToMany; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.OneToMany; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; @Comment("A type of investigation") @SuppressWarnings("serial") diff --git a/src/main/java/org/icatproject/core/entity/InvestigationUser.java b/src/main/java/org/icatproject/core/entity/InvestigationUser.java index 8d07901bb..faa432ab5 100644 --- a/src/main/java/org/icatproject/core/entity/InvestigationUser.java +++ b/src/main/java/org/icatproject/core/entity/InvestigationUser.java @@ -2,13 +2,13 @@ import java.io.Serializable; -import javax.json.stream.JsonGenerator; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; +import jakarta.json.stream.JsonGenerator; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; import org.icatproject.core.manager.LuceneApi; diff --git a/src/main/java/org/icatproject/core/entity/Job.java b/src/main/java/org/icatproject/core/entity/Job.java index 00def5923..8a28ddaf8 100644 --- a/src/main/java/org/icatproject/core/entity/Job.java +++ b/src/main/java/org/icatproject/core/entity/Job.java @@ -2,10 +2,10 @@ import java.io.Serializable; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; @Comment("A run of an application with its related inputs and outputs") @SuppressWarnings("serial") diff --git a/src/main/java/org/icatproject/core/entity/Keyword.java b/src/main/java/org/icatproject/core/entity/Keyword.java index ad661e7e3..c813d4d19 100644 --- a/src/main/java/org/icatproject/core/entity/Keyword.java +++ b/src/main/java/org/icatproject/core/entity/Keyword.java @@ -2,12 +2,12 @@ import java.io.Serializable; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; @Comment("Must be related to an investigation") @SuppressWarnings("serial") diff --git a/src/main/java/org/icatproject/core/entity/Parameter.java b/src/main/java/org/icatproject/core/entity/Parameter.java index e043da966..ef6c53070 100644 --- a/src/main/java/org/icatproject/core/entity/Parameter.java +++ b/src/main/java/org/icatproject/core/entity/Parameter.java @@ -4,15 +4,15 @@ import java.util.Date; import java.util.List; -import javax.json.stream.JsonGenerator; -import javax.persistence.Column; -import javax.persistence.EntityManager; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.MappedSuperclass; -import javax.persistence.NamedQuery; -import javax.persistence.Temporal; -import javax.persistence.TemporalType; +import jakarta.json.stream.JsonGenerator; +import jakarta.persistence.Column; +import jakarta.persistence.EntityManager; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.MappedSuperclass; +import jakarta.persistence.NamedQuery; +import jakarta.persistence.Temporal; +import jakarta.persistence.TemporalType; import org.icatproject.core.IcatException; import org.icatproject.core.manager.EntityBeanManager.PersistMode; diff --git a/src/main/java/org/icatproject/core/entity/ParameterType.java b/src/main/java/org/icatproject/core/entity/ParameterType.java index bd67a1a3d..cbd5f36d8 100644 --- a/src/main/java/org/icatproject/core/entity/ParameterType.java +++ b/src/main/java/org/icatproject/core/entity/ParameterType.java @@ -4,15 +4,15 @@ import java.util.ArrayList; import java.util.List; -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.OneToMany; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.OneToMany; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; @Comment("A parameter type with unique name and units") @SuppressWarnings("serial") diff --git a/src/main/java/org/icatproject/core/entity/PermissibleStringValue.java b/src/main/java/org/icatproject/core/entity/PermissibleStringValue.java index d640c35d0..7bf17a151 100644 --- a/src/main/java/org/icatproject/core/entity/PermissibleStringValue.java +++ b/src/main/java/org/icatproject/core/entity/PermissibleStringValue.java @@ -2,13 +2,13 @@ import java.io.Serializable; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; @Comment("Permissible value for string parameter types") @SuppressWarnings("serial") diff --git a/src/main/java/org/icatproject/core/entity/PublicStep.java b/src/main/java/org/icatproject/core/entity/PublicStep.java index ad3e89bee..581f11aea 100644 --- a/src/main/java/org/icatproject/core/entity/PublicStep.java +++ b/src/main/java/org/icatproject/core/entity/PublicStep.java @@ -3,14 +3,14 @@ import java.io.Serializable; import java.util.Set; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.EntityManager; -import javax.persistence.NamedQuery; -import javax.persistence.PostPersist; -import javax.persistence.PostRemove; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.EntityManager; +import jakarta.persistence.NamedQuery; +import jakarta.persistence.PostPersist; +import jakarta.persistence.PostRemove; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; import org.icatproject.core.IcatException; import org.icatproject.core.manager.EntityInfoHandler; diff --git a/src/main/java/org/icatproject/core/entity/Publication.java b/src/main/java/org/icatproject/core/entity/Publication.java index 913b7f002..e29c52a37 100644 --- a/src/main/java/org/icatproject/core/entity/Publication.java +++ b/src/main/java/org/icatproject/core/entity/Publication.java @@ -2,11 +2,11 @@ import java.io.Serializable; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; @Comment("A publication") @SuppressWarnings("serial") diff --git a/src/main/java/org/icatproject/core/entity/RelatedDatafile.java b/src/main/java/org/icatproject/core/entity/RelatedDatafile.java index d60f01f1c..90aaa7ea6 100644 --- a/src/main/java/org/icatproject/core/entity/RelatedDatafile.java +++ b/src/main/java/org/icatproject/core/entity/RelatedDatafile.java @@ -2,13 +2,13 @@ import java.io.Serializable; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; @Comment("Used to represent an arbitrary relationship between data files") @SuppressWarnings("serial") diff --git a/src/main/java/org/icatproject/core/entity/RelatedItem.java b/src/main/java/org/icatproject/core/entity/RelatedItem.java index bfc14c50d..3ceb0b68b 100644 --- a/src/main/java/org/icatproject/core/entity/RelatedItem.java +++ b/src/main/java/org/icatproject/core/entity/RelatedItem.java @@ -2,13 +2,13 @@ import java.io.Serializable; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; @Comment("A reference to an external resource or item that is related to a data publication, " + "such as a scientific article that is based on the data or the instrument " diff --git a/src/main/java/org/icatproject/core/entity/Rule.java b/src/main/java/org/icatproject/core/entity/Rule.java index 6e4853c36..8ccfa42ab 100644 --- a/src/main/java/org/icatproject/core/entity/Rule.java +++ b/src/main/java/org/icatproject/core/entity/Rule.java @@ -2,19 +2,19 @@ import java.io.Serializable; -import javax.ejb.EJB; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.EntityManager; -import javax.persistence.FetchType; -import javax.persistence.ManyToOne; -import javax.persistence.NamedQueries; -import javax.persistence.NamedQuery; -import javax.persistence.PostPersist; -import javax.persistence.PostRemove; -import javax.persistence.Table; -import javax.persistence.Transient; -import javax.xml.bind.annotation.XmlTransient; +import jakarta.ejb.EJB; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.EntityManager; +import jakarta.persistence.FetchType; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.NamedQueries; +import jakarta.persistence.NamedQuery; +import jakarta.persistence.PostPersist; +import jakarta.persistence.PostRemove; +import jakarta.persistence.Table; +import jakarta.persistence.Transient; +import jakarta.xml.bind.annotation.XmlTransient; import org.icatproject.core.IcatException; import org.icatproject.core.manager.EntityBeanManager.PersistMode; diff --git a/src/main/java/org/icatproject/core/entity/Sample.java b/src/main/java/org/icatproject/core/entity/Sample.java index 9a36843e7..06d792249 100644 --- a/src/main/java/org/icatproject/core/entity/Sample.java +++ b/src/main/java/org/icatproject/core/entity/Sample.java @@ -4,16 +4,16 @@ import java.util.ArrayList; import java.util.List; -import javax.json.stream.JsonGenerator; -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.OneToMany; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; +import jakarta.json.stream.JsonGenerator; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.OneToMany; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; import org.icatproject.core.manager.LuceneApi; diff --git a/src/main/java/org/icatproject/core/entity/SampleParameter.java b/src/main/java/org/icatproject/core/entity/SampleParameter.java index 2af4d254e..376123ac1 100644 --- a/src/main/java/org/icatproject/core/entity/SampleParameter.java +++ b/src/main/java/org/icatproject/core/entity/SampleParameter.java @@ -2,13 +2,13 @@ import java.io.Serializable; -import javax.persistence.Entity; -import javax.persistence.EntityManager; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; -import javax.xml.bind.annotation.XmlRootElement; +import jakarta.persistence.Entity; +import jakarta.persistence.EntityManager; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; +import jakarta.xml.bind.annotation.XmlRootElement; import org.icatproject.core.IcatException; import org.icatproject.core.manager.EntityBeanManager.PersistMode; diff --git a/src/main/java/org/icatproject/core/entity/SampleType.java b/src/main/java/org/icatproject/core/entity/SampleType.java index fa402d7ab..dabab31fc 100644 --- a/src/main/java/org/icatproject/core/entity/SampleType.java +++ b/src/main/java/org/icatproject/core/entity/SampleType.java @@ -4,15 +4,15 @@ import java.util.ArrayList; import java.util.List; -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.OneToMany; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.OneToMany; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; @Comment("A sample to be used in an investigation") @SuppressWarnings("serial") diff --git a/src/main/java/org/icatproject/core/entity/Session.java b/src/main/java/org/icatproject/core/entity/Session.java index ab4da825f..078275e0c 100644 --- a/src/main/java/org/icatproject/core/entity/Session.java +++ b/src/main/java/org/icatproject/core/entity/Session.java @@ -5,13 +5,13 @@ import java.util.Date; import java.util.UUID; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.NamedQueries; -import javax.persistence.NamedQuery; -import javax.persistence.Table; -import javax.persistence.Temporal; -import javax.persistence.TemporalType; +import jakarta.persistence.Entity; +import jakarta.persistence.Id; +import jakarta.persistence.NamedQueries; +import jakarta.persistence.NamedQuery; +import jakarta.persistence.Table; +import jakarta.persistence.Temporal; +import jakarta.persistence.TemporalType; import org.icatproject.core.IcatException; diff --git a/src/main/java/org/icatproject/core/entity/Shift.java b/src/main/java/org/icatproject/core/entity/Shift.java index ac8126658..9f84d65c0 100644 --- a/src/main/java/org/icatproject/core/entity/Shift.java +++ b/src/main/java/org/icatproject/core/entity/Shift.java @@ -3,15 +3,15 @@ import java.io.Serializable; import java.util.Date; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.Table; -import javax.persistence.Temporal; -import javax.persistence.TemporalType; -import javax.persistence.UniqueConstraint; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; +import jakarta.persistence.Temporal; +import jakarta.persistence.TemporalType; +import jakarta.persistence.UniqueConstraint; @Comment("A period of time related to an investigation") @SuppressWarnings("serial") diff --git a/src/main/java/org/icatproject/core/entity/Study.java b/src/main/java/org/icatproject/core/entity/Study.java index ab6c54863..cb8bb9b71 100644 --- a/src/main/java/org/icatproject/core/entity/Study.java +++ b/src/main/java/org/icatproject/core/entity/Study.java @@ -5,14 +5,14 @@ import java.util.Date; import java.util.List; -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.ManyToOne; -import javax.persistence.OneToMany; -import javax.persistence.Temporal; -import javax.persistence.TemporalType; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.OneToMany; +import jakarta.persistence.Temporal; +import jakarta.persistence.TemporalType; @Comment("A study which may be related to an investigation") @SuppressWarnings("serial") diff --git a/src/main/java/org/icatproject/core/entity/StudyInvestigation.java b/src/main/java/org/icatproject/core/entity/StudyInvestigation.java index 403109db7..836909e5c 100644 --- a/src/main/java/org/icatproject/core/entity/StudyInvestigation.java +++ b/src/main/java/org/icatproject/core/entity/StudyInvestigation.java @@ -2,11 +2,11 @@ import java.io.Serializable; -import javax.persistence.Entity; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; +import jakarta.persistence.Entity; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; @Comment("Many to many relationship between study and investigation") @SuppressWarnings("serial") diff --git a/src/main/java/org/icatproject/core/entity/Technique.java b/src/main/java/org/icatproject/core/entity/Technique.java index 98a8a11cd..3444b1afe 100644 --- a/src/main/java/org/icatproject/core/entity/Technique.java +++ b/src/main/java/org/icatproject/core/entity/Technique.java @@ -4,12 +4,12 @@ import java.util.ArrayList; import java.util.List; -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.OneToMany; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.OneToMany; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; @Comment("Represents an experimental technique") @SuppressWarnings("serial") diff --git a/src/main/java/org/icatproject/core/entity/User.java b/src/main/java/org/icatproject/core/entity/User.java index f3e360e77..521b29df3 100644 --- a/src/main/java/org/icatproject/core/entity/User.java +++ b/src/main/java/org/icatproject/core/entity/User.java @@ -4,12 +4,12 @@ import java.util.ArrayList; import java.util.List; -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.OneToMany; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.OneToMany; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; @Comment("A user of the facility") @SuppressWarnings("serial") diff --git a/src/main/java/org/icatproject/core/entity/UserGroup.java b/src/main/java/org/icatproject/core/entity/UserGroup.java index 1da3f96f4..80952c2f4 100644 --- a/src/main/java/org/icatproject/core/entity/UserGroup.java +++ b/src/main/java/org/icatproject/core/entity/UserGroup.java @@ -2,12 +2,12 @@ import java.io.Serializable; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; +import jakarta.persistence.Entity; +import jakarta.persistence.FetchType; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; @Comment("Many to many relationship between user and group") @SuppressWarnings("serial") diff --git a/src/main/java/org/icatproject/core/manager/AuthenticatorInfo.java b/src/main/java/org/icatproject/core/manager/AuthenticatorInfo.java index d0c9af457..d54e9bc5a 100644 --- a/src/main/java/org/icatproject/core/manager/AuthenticatorInfo.java +++ b/src/main/java/org/icatproject/core/manager/AuthenticatorInfo.java @@ -4,10 +4,10 @@ import java.util.ArrayList; import java.util.List; -import javax.json.Json; -import javax.json.JsonArray; -import javax.json.JsonObject; -import javax.json.JsonReader; +import jakarta.json.Json; +import jakarta.json.JsonArray; +import jakarta.json.JsonObject; +import jakarta.json.JsonReader; import org.icatproject.core.IcatException; import org.icatproject.core.manager.PropertyHandler.ExtendedAuthenticator; diff --git a/src/main/java/org/icatproject/core/manager/EntityBeanManager.java b/src/main/java/org/icatproject/core/manager/EntityBeanManager.java index 4654d6811..1145be30e 100644 --- a/src/main/java/org/icatproject/core/manager/EntityBeanManager.java +++ b/src/main/java/org/icatproject/core/manager/EntityBeanManager.java @@ -26,36 +26,36 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; -import javax.annotation.PostConstruct; -import javax.ejb.EJB; -import javax.ejb.Stateless; -import javax.ejb.TransactionManagement; -import javax.ejb.TransactionManagementType; -import javax.jms.JMSException; -import javax.json.Json; -import javax.json.JsonArray; -import javax.json.JsonException; -import javax.json.JsonNumber; -import javax.json.JsonObject; -import javax.json.JsonReader; -import javax.json.JsonString; -import javax.json.JsonStructure; -import javax.json.JsonValue; -import javax.json.JsonValue.ValueType; -import javax.json.stream.JsonGenerator; -import javax.persistence.EntityExistsException; -import javax.persistence.EntityManager; -import javax.persistence.Query; -import javax.persistence.TypedQuery; -import javax.transaction.HeuristicMixedException; -import javax.transaction.HeuristicRollbackException; -import javax.transaction.NotSupportedException; -import javax.transaction.RollbackException; -import javax.transaction.Status; -import javax.transaction.SystemException; -import javax.transaction.UserTransaction; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.StreamingOutput; +import jakarta.annotation.PostConstruct; +import jakarta.ejb.EJB; +import jakarta.ejb.Stateless; +import jakarta.ejb.TransactionManagement; +import jakarta.ejb.TransactionManagementType; +import jakarta.jms.JMSException; +import jakarta.json.Json; +import jakarta.json.JsonArray; +import jakarta.json.JsonException; +import jakarta.json.JsonNumber; +import jakarta.json.JsonObject; +import jakarta.json.JsonReader; +import jakarta.json.JsonString; +import jakarta.json.JsonStructure; +import jakarta.json.JsonValue; +import jakarta.json.JsonValue.ValueType; +import jakarta.json.stream.JsonGenerator; +import jakarta.persistence.EntityExistsException; +import jakarta.persistence.EntityManager; +import jakarta.persistence.Query; +import jakarta.persistence.TypedQuery; +import jakarta.transaction.HeuristicMixedException; +import jakarta.transaction.HeuristicRollbackException; +import jakarta.transaction.NotSupportedException; +import jakarta.transaction.RollbackException; +import jakarta.transaction.Status; +import jakarta.transaction.SystemException; +import jakarta.transaction.UserTransaction; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.StreamingOutput; import org.icatproject.core.Constants; import org.icatproject.core.IcatException; @@ -963,7 +963,7 @@ private EntitySetResult getEntitySet(String userId, String query, EntityManager } /* Create query - which may go wrong */ - javax.persistence.Query jpqlQuery; + Query jpqlQuery; try { jpqlQuery = manager.createQuery(jpql); } catch (IllegalArgumentException e) { diff --git a/src/main/java/org/icatproject/core/manager/EntityInfoHandler.java b/src/main/java/org/icatproject/core/manager/EntityInfoHandler.java index 1321db3f2..0a44ed6dc 100644 --- a/src/main/java/org/icatproject/core/manager/EntityInfoHandler.java +++ b/src/main/java/org/icatproject/core/manager/EntityInfoHandler.java @@ -19,17 +19,17 @@ import java.util.Map.Entry; import java.util.Set; -import javax.json.stream.JsonGenerator; -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.OneToMany; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; -import javax.xml.bind.annotation.XmlTransient; +import jakarta.json.stream.JsonGenerator; +import jakarta.persistence.CascadeType; +import jakarta.persistence.Column; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.OneToMany; +import jakarta.persistence.Table; +import jakarta.persistence.UniqueConstraint; +import jakarta.xml.bind.annotation.XmlTransient; import org.icatproject.core.Constants; import org.icatproject.core.IcatException; diff --git a/src/main/java/org/icatproject/core/manager/GateKeeper.java b/src/main/java/org/icatproject/core/manager/GateKeeper.java index d01470f85..5629fa532 100644 --- a/src/main/java/org/icatproject/core/manager/GateKeeper.java +++ b/src/main/java/org/icatproject/core/manager/GateKeeper.java @@ -20,17 +20,17 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; -import javax.annotation.PostConstruct; -import javax.annotation.PreDestroy; -import javax.ejb.EJB; -import javax.ejb.Singleton; -import javax.ejb.Startup; -import javax.jms.JMSException; -import javax.json.JsonObject; -import javax.json.JsonValue; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; -import javax.persistence.TypedQuery; +import jakarta.annotation.PostConstruct; +import jakarta.annotation.PreDestroy; +import jakarta.ejb.EJB; +import jakarta.ejb.Singleton; +import jakarta.ejb.Startup; +import jakarta.jms.JMSException; +import jakarta.json.JsonObject; +import jakarta.json.JsonValue; +import jakarta.persistence.EntityManager; +import jakarta.persistence.PersistenceContext; +import jakarta.persistence.TypedQuery; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpPost; diff --git a/src/main/java/org/icatproject/core/manager/LuceneApi.java b/src/main/java/org/icatproject/core/manager/LuceneApi.java index 5f1b0d0d8..6d8ca753c 100644 --- a/src/main/java/org/icatproject/core/manager/LuceneApi.java +++ b/src/main/java/org/icatproject/core/manager/LuceneApi.java @@ -9,11 +9,11 @@ import java.util.List; import java.util.TimeZone; -import javax.json.Json; -import javax.json.stream.JsonGenerator; -import javax.json.stream.JsonParser; -import javax.json.stream.JsonParser.Event; -import javax.ws.rs.core.MediaType; +import jakarta.json.Json; +import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; +import jakarta.json.stream.JsonParser.Event; +import jakarta.ws.rs.core.MediaType; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpDelete; diff --git a/src/main/java/org/icatproject/core/manager/LuceneManager.java b/src/main/java/org/icatproject/core/manager/LuceneManager.java index 7c7998825..adad614fb 100644 --- a/src/main/java/org/icatproject/core/manager/LuceneManager.java +++ b/src/main/java/org/icatproject/core/manager/LuceneManager.java @@ -29,16 +29,16 @@ import java.util.concurrent.Executors; import java.util.concurrent.Future; -import javax.annotation.PostConstruct; -import javax.annotation.PreDestroy; -import javax.ejb.EJB; -import javax.ejb.Singleton; -import javax.ejb.Startup; -import javax.json.Json; -import javax.json.stream.JsonGenerator; -import javax.persistence.EntityManager; -import javax.persistence.EntityManagerFactory; -import javax.persistence.PersistenceUnit; +import jakarta.annotation.PostConstruct; +import jakarta.annotation.PreDestroy; +import jakarta.ejb.EJB; +import jakarta.ejb.Singleton; +import jakarta.ejb.Startup; +import jakarta.json.Json; +import jakarta.json.stream.JsonGenerator; +import jakarta.persistence.EntityManager; +import jakarta.persistence.EntityManagerFactory; +import jakarta.persistence.PersistenceUnit; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpPost; diff --git a/src/main/java/org/icatproject/core/manager/NotificationMessage.java b/src/main/java/org/icatproject/core/manager/NotificationMessage.java index 95b9f10cf..6f48f916d 100644 --- a/src/main/java/org/icatproject/core/manager/NotificationMessage.java +++ b/src/main/java/org/icatproject/core/manager/NotificationMessage.java @@ -2,7 +2,7 @@ import java.util.Map; -import javax.persistence.EntityManager; +import jakarta.persistence.EntityManager; import org.icatproject.core.IcatException; import org.icatproject.core.entity.EntityBaseBean; diff --git a/src/main/java/org/icatproject/core/manager/NotificationTransmitter.java b/src/main/java/org/icatproject/core/manager/NotificationTransmitter.java index 8d46f124a..f4b6b4e4f 100644 --- a/src/main/java/org/icatproject/core/manager/NotificationTransmitter.java +++ b/src/main/java/org/icatproject/core/manager/NotificationTransmitter.java @@ -1,16 +1,16 @@ package org.icatproject.core.manager; -import javax.annotation.PostConstruct; -import javax.annotation.PreDestroy; -import javax.ejb.EJB; -import javax.ejb.Singleton; -import javax.jms.JMSException; -import javax.jms.MessageProducer; -import javax.jms.ObjectMessage; -import javax.jms.Session; -import javax.jms.Topic; -import javax.jms.TopicConnection; -import javax.jms.TopicConnectionFactory; +import jakarta.annotation.PostConstruct; +import jakarta.annotation.PreDestroy; +import jakarta.ejb.EJB; +import jakarta.ejb.Singleton; +import jakarta.jms.JMSException; +import jakarta.jms.MessageProducer; +import jakarta.jms.ObjectMessage; +import jakarta.jms.Session; +import jakarta.jms.Topic; +import jakarta.jms.TopicConnection; +import jakarta.jms.TopicConnectionFactory; import javax.naming.InitialContext; import javax.naming.NamingException; diff --git a/src/main/java/org/icatproject/core/manager/Porter.java b/src/main/java/org/icatproject/core/manager/Porter.java index 226121a2e..55de82560 100644 --- a/src/main/java/org/icatproject/core/manager/Porter.java +++ b/src/main/java/org/icatproject/core/manager/Porter.java @@ -21,20 +21,20 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; -import javax.annotation.PostConstruct; -import javax.ejb.EJB; -import javax.ejb.Stateless; -import javax.ejb.TransactionManagement; -import javax.ejb.TransactionManagementType; -import javax.json.Json; -import javax.json.stream.JsonParser; -import javax.json.stream.JsonParser.Event; -import javax.persistence.EntityManager; -import javax.persistence.NoResultException; -import javax.persistence.NonUniqueResultException; -import javax.persistence.TypedQuery; -import javax.transaction.UserTransaction; -import javax.ws.rs.core.Response; +import jakarta.annotation.PostConstruct; +import jakarta.ejb.EJB; +import jakarta.ejb.Stateless; +import jakarta.ejb.TransactionManagement; +import jakarta.ejb.TransactionManagementType; +import jakarta.json.Json; +import jakarta.json.stream.JsonParser; +import jakarta.json.stream.JsonParser.Event; +import jakarta.persistence.EntityManager; +import jakarta.persistence.NoResultException; +import jakarta.persistence.NonUniqueResultException; +import jakarta.persistence.TypedQuery; +import jakarta.transaction.UserTransaction; +import jakarta.ws.rs.core.Response; import org.icatproject.core.IcatException; import org.icatproject.core.IcatException.IcatExceptionType; diff --git a/src/main/java/org/icatproject/core/manager/PropertyHandler.java b/src/main/java/org/icatproject/core/manager/PropertyHandler.java index f316bb647..884b0092c 100644 --- a/src/main/java/org/icatproject/core/manager/PropertyHandler.java +++ b/src/main/java/org/icatproject/core/manager/PropertyHandler.java @@ -22,15 +22,15 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; -import javax.annotation.PostConstruct; -import javax.ejb.Singleton; -import javax.json.Json; -import javax.json.JsonObject; -import javax.json.JsonReader; -import javax.json.stream.JsonGenerator; -import javax.json.stream.JsonParser; -import javax.json.stream.JsonParser.Event; -import javax.json.stream.JsonParsingException; +import jakarta.annotation.PostConstruct; +import jakarta.ejb.Singleton; +import jakarta.json.Json; +import jakarta.json.JsonObject; +import jakarta.json.JsonReader; +import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; +import jakarta.json.stream.JsonParser.Event; +import jakarta.json.stream.JsonParsingException; import javax.naming.InitialContext; import org.apache.http.HttpEntity; diff --git a/src/main/java/org/icatproject/core/manager/Rest.java b/src/main/java/org/icatproject/core/manager/Rest.java index c3b0fcfee..dbf757327 100644 --- a/src/main/java/org/icatproject/core/manager/Rest.java +++ b/src/main/java/org/icatproject/core/manager/Rest.java @@ -3,10 +3,10 @@ import java.io.ByteArrayInputStream; import java.io.IOException; -import javax.json.Json; -import javax.json.stream.JsonParser; -import javax.json.stream.JsonParsingException; -import javax.json.stream.JsonParser.Event; +import jakarta.json.Json; +import jakarta.json.stream.JsonParser; +import jakarta.json.stream.JsonParsingException; +import jakarta.json.stream.JsonParser.Event; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; diff --git a/src/main/java/org/icatproject/core/manager/SessionManager.java b/src/main/java/org/icatproject/core/manager/SessionManager.java index 521b0cb25..714dac817 100644 --- a/src/main/java/org/icatproject/core/manager/SessionManager.java +++ b/src/main/java/org/icatproject/core/manager/SessionManager.java @@ -1,9 +1,9 @@ package org.icatproject.core.manager; -import javax.ejb.Schedule; -import javax.ejb.Singleton; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; +import jakarta.ejb.Schedule; +import jakarta.ejb.Singleton; +import jakarta.persistence.EntityManager; +import jakarta.persistence.PersistenceContext; import org.icatproject.core.entity.Session; import org.slf4j.Logger; diff --git a/src/main/java/org/icatproject/core/manager/Transmitter.java b/src/main/java/org/icatproject/core/manager/Transmitter.java index 62744ce8b..3537d830d 100644 --- a/src/main/java/org/icatproject/core/manager/Transmitter.java +++ b/src/main/java/org/icatproject/core/manager/Transmitter.java @@ -1,16 +1,16 @@ package org.icatproject.core.manager; -import javax.annotation.PostConstruct; -import javax.annotation.PreDestroy; -import javax.ejb.EJB; -import javax.ejb.Singleton; -import javax.jms.JMSException; -import javax.jms.MessageProducer; -import javax.jms.Session; -import javax.jms.TextMessage; -import javax.jms.Topic; -import javax.jms.TopicConnection; -import javax.jms.TopicConnectionFactory; +import jakarta.annotation.PostConstruct; +import jakarta.annotation.PreDestroy; +import jakarta.ejb.EJB; +import jakarta.ejb.Singleton; +import jakarta.jms.JMSException; +import jakarta.jms.MessageProducer; +import jakarta.jms.Session; +import jakarta.jms.TextMessage; +import jakarta.jms.Topic; +import jakarta.jms.TopicConnection; +import jakarta.jms.TopicConnectionFactory; import javax.naming.InitialContext; import javax.naming.NamingException; diff --git a/src/main/java/org/icatproject/core/parser/SearchQuery.java b/src/main/java/org/icatproject/core/parser/SearchQuery.java index 426fd3482..73e6af357 100644 --- a/src/main/java/org/icatproject/core/parser/SearchQuery.java +++ b/src/main/java/org/icatproject/core/parser/SearchQuery.java @@ -5,8 +5,8 @@ import java.util.Map.Entry; import java.util.regex.Pattern; -import javax.persistence.EntityManager; -import javax.persistence.TypedQuery; +import jakarta.persistence.EntityManager; +import jakarta.persistence.TypedQuery; import org.icatproject.core.IcatException; import org.icatproject.core.entity.EntityBaseBean; diff --git a/src/main/java/org/icatproject/exposed/CORSResponseFilter.java b/src/main/java/org/icatproject/exposed/CORSResponseFilter.java index 8088188f6..7138a56e4 100644 --- a/src/main/java/org/icatproject/exposed/CORSResponseFilter.java +++ b/src/main/java/org/icatproject/exposed/CORSResponseFilter.java @@ -2,11 +2,11 @@ import java.io.IOException; -import javax.ws.rs.container.ContainerRequestContext; -import javax.ws.rs.container.ContainerResponseContext; -import javax.ws.rs.container.ContainerResponseFilter; -import javax.ws.rs.core.MultivaluedMap; -import javax.ws.rs.ext.Provider; +import jakarta.ws.rs.container.ContainerRequestContext; +import jakarta.ws.rs.container.ContainerResponseContext; +import jakarta.ws.rs.container.ContainerResponseFilter; +import jakarta.ws.rs.core.MultivaluedMap; +import jakarta.ws.rs.ext.Provider; @Provider public class CORSResponseFilter implements ContainerResponseFilter { diff --git a/src/main/java/org/icatproject/exposed/ContentTypeFilter.java b/src/main/java/org/icatproject/exposed/ContentTypeFilter.java index 3eda4273c..44595719a 100644 --- a/src/main/java/org/icatproject/exposed/ContentTypeFilter.java +++ b/src/main/java/org/icatproject/exposed/ContentTypeFilter.java @@ -3,12 +3,12 @@ import java.io.IOException; import java.util.List; -import javax.ws.rs.container.ContainerRequestContext; -import javax.ws.rs.container.ContainerRequestFilter; -import javax.ws.rs.container.PreMatching; -import javax.ws.rs.core.HttpHeaders; -import javax.ws.rs.core.MultivaluedMap; -import javax.ws.rs.ext.Provider; +import jakarta.ws.rs.container.ContainerRequestContext; +import jakarta.ws.rs.container.ContainerRequestFilter; +import jakarta.ws.rs.container.PreMatching; +import jakarta.ws.rs.core.HttpHeaders; +import jakarta.ws.rs.core.MultivaluedMap; +import jakarta.ws.rs.ext.Provider; /** * diff --git a/src/main/java/org/icatproject/exposed/ICAT.java b/src/main/java/org/icatproject/exposed/ICAT.java index bbffa7dd5..3605d8057 100644 --- a/src/main/java/org/icatproject/exposed/ICAT.java +++ b/src/main/java/org/icatproject/exposed/ICAT.java @@ -9,23 +9,23 @@ import java.util.Map.Entry; import java.util.Set; -import javax.annotation.PostConstruct; -import javax.annotation.Resource; -import javax.ejb.EJB; -import javax.ejb.Stateless; -import javax.ejb.TransactionManagement; -import javax.ejb.TransactionManagementType; -import javax.interceptor.AroundInvoke; -import javax.interceptor.InvocationContext; -import javax.jws.WebMethod; -import javax.jws.WebParam; -import javax.jws.WebService; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; -import javax.servlet.http.HttpServletRequest; -import javax.transaction.UserTransaction; -import javax.xml.ws.WebServiceContext; -import javax.xml.ws.handler.MessageContext; +import jakarta.annotation.PostConstruct; +import jakarta.annotation.Resource; +import jakarta.ejb.EJB; +import jakarta.ejb.Stateless; +import jakarta.ejb.TransactionManagement; +import jakarta.ejb.TransactionManagementType; +import jakarta.interceptor.AroundInvoke; +import jakarta.interceptor.InvocationContext; +import jakarta.jws.WebMethod; +import jakarta.jws.WebParam; +import jakarta.jws.WebService; +import jakarta.persistence.EntityManager; +import jakarta.persistence.PersistenceContext; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.transaction.UserTransaction; +import jakarta.xml.ws.WebServiceContext; +import jakarta.xml.ws.handler.MessageContext; import org.icatproject.authentication.Authenticator; import org.icatproject.core.Constants; diff --git a/src/main/java/org/icatproject/exposed/ICATRest.java b/src/main/java/org/icatproject/exposed/ICATRest.java index bd1a2b4aa..1852ef2b3 100644 --- a/src/main/java/org/icatproject/exposed/ICATRest.java +++ b/src/main/java/org/icatproject/exposed/ICATRest.java @@ -10,6 +10,7 @@ import java.lang.reflect.Method; import java.math.BigDecimal; import java.math.BigInteger; +import java.nio.charset.StandardCharsets; import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; @@ -22,51 +23,48 @@ import java.util.Set; import java.util.TimeZone; -import javax.annotation.PostConstruct; -import javax.annotation.Resource; -import javax.ejb.EJB; -import javax.ejb.Stateless; -import javax.ejb.TransactionManagement; -import javax.ejb.TransactionManagementType; -import javax.json.Json; -import javax.json.JsonArray; -import javax.json.JsonArrayBuilder; -import javax.json.JsonException; -import javax.json.JsonNumber; -import javax.json.JsonObject; -import javax.json.JsonObjectBuilder; -import javax.json.JsonReader; -import javax.json.JsonString; -import javax.json.JsonStructure; -import javax.json.JsonValue; -import javax.json.JsonValue.ValueType; -import javax.json.JsonWriter; -import javax.json.stream.JsonGenerator; -import javax.json.stream.JsonParser; -import javax.json.stream.JsonParser.Event; -import javax.persistence.EntityManager; -import javax.persistence.PersistenceContext; -import javax.servlet.http.HttpServletRequest; -import javax.transaction.UserTransaction; -import javax.ws.rs.Consumes; -import javax.ws.rs.DELETE; -import javax.ws.rs.FormParam; -import javax.ws.rs.GET; -import javax.ws.rs.POST; -import javax.ws.rs.PUT; -import javax.ws.rs.Path; -import javax.ws.rs.PathParam; -import javax.ws.rs.Produces; -import javax.ws.rs.QueryParam; -import javax.ws.rs.core.Context; -import javax.ws.rs.core.MediaType; -import javax.ws.rs.core.Response; - -import org.apache.commons.fileupload.FileItemIterator; -import org.apache.commons.fileupload.FileItemStream; -import org.apache.commons.fileupload.FileUploadException; -import org.apache.commons.fileupload.servlet.ServletFileUpload; -import org.apache.commons.fileupload.util.Streams; +import jakarta.annotation.PostConstruct; +import jakarta.annotation.Resource; +import jakarta.ejb.EJB; +import jakarta.ejb.Stateless; +import jakarta.ejb.TransactionManagement; +import jakarta.ejb.TransactionManagementType; +import jakarta.json.Json; +import jakarta.json.JsonArray; +import jakarta.json.JsonArrayBuilder; +import jakarta.json.JsonException; +import jakarta.json.JsonNumber; +import jakarta.json.JsonObject; +import jakarta.json.JsonObjectBuilder; +import jakarta.json.JsonReader; +import jakarta.json.JsonString; +import jakarta.json.JsonStructure; +import jakarta.json.JsonValue; +import jakarta.json.JsonValue.ValueType; +import jakarta.json.JsonWriter; +import jakarta.json.stream.JsonGenerator; +import jakarta.json.stream.JsonParser; +import jakarta.json.stream.JsonParser.Event; +import jakarta.persistence.EntityManager; +import jakarta.persistence.PersistenceContext; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.Part; +import jakarta.transaction.UserTransaction; +import jakarta.ws.rs.Consumes; +import jakarta.ws.rs.DELETE; +import jakarta.ws.rs.FormParam; +import jakarta.ws.rs.GET; +import jakarta.ws.rs.POST; +import jakarta.ws.rs.PUT; +import jakarta.ws.rs.Path; +import jakarta.ws.rs.PathParam; +import jakarta.ws.rs.Produces; +import jakarta.ws.rs.QueryParam; +import jakarta.ws.rs.core.Context; +import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.core.Response; + import org.icatproject.authentication.Authenticator; import org.icatproject.core.Constants; import org.icatproject.core.IcatException; @@ -664,23 +662,17 @@ public String getVersion() { @Path("port") @Consumes(MediaType.MULTIPART_FORM_DATA) public void importData(@Context HttpServletRequest request) throws IcatException { - if (!ServletFileUpload.isMultipartContent(request)) { - throw new IcatException(IcatExceptionType.BAD_PARAMETER, "Multipart content expected"); - } - ServletFileUpload upload = new ServletFileUpload(); String jsonString = null; String name = null; // Parse the request try { - FileItemIterator iter = upload.getItemIterator(request); - while (iter.hasNext()) { - FileItemStream item = iter.next(); - String fieldName = item.getFieldName(); - InputStream stream = item.openStream(); - if (item.isFormField()) { - String value = Streams.asString(stream); + for (Part part : request.getParts()) { + String fieldName = part.getName(); + InputStream stream = part.getInputStream(); + if (part.getSubmittedFileName() == null) { + String value = new String(stream.readAllBytes(), StandardCharsets.UTF_8); if (fieldName.equals("json")) { jsonString = value; } else { @@ -689,13 +681,15 @@ public void importData(@Context HttpServletRequest request) throws IcatException } } else { if (name == null) { - name = item.getName(); + name = part.getSubmittedFileName(); } porter.importData(jsonString, stream, manager, userTransaction, request.getRemoteAddr()); } } - } catch (FileUploadException | IOException e) { + } catch (IOException e) { throw new IcatException(IcatExceptionType.INTERNAL, e.getClass() + " " + e.getMessage()); + } catch (ServletException e) { + throw new IcatException(IcatExceptionType.BAD_PARAMETER, "Multipart content expected"); } } diff --git a/src/main/java/org/icatproject/exposed/IcatExceptionMapper.java b/src/main/java/org/icatproject/exposed/IcatExceptionMapper.java index 775181d0c..198310cda 100644 --- a/src/main/java/org/icatproject/exposed/IcatExceptionMapper.java +++ b/src/main/java/org/icatproject/exposed/IcatExceptionMapper.java @@ -2,11 +2,11 @@ import java.io.ByteArrayOutputStream; -import javax.json.Json; -import javax.json.stream.JsonGenerator; -import javax.ws.rs.core.Response; -import javax.ws.rs.ext.ExceptionMapper; -import javax.ws.rs.ext.Provider; +import jakarta.json.Json; +import jakarta.json.stream.JsonGenerator; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.ext.ExceptionMapper; +import jakarta.ws.rs.ext.Provider; import org.icatproject.core.IcatException; import org.icatproject.core.IcatException.IcatExceptionType; diff --git a/src/main/java/org/icatproject/exposed/NotFoundExceptionMapper.java b/src/main/java/org/icatproject/exposed/NotFoundExceptionMapper.java index 2640548c3..f5d6e1824 100644 --- a/src/main/java/org/icatproject/exposed/NotFoundExceptionMapper.java +++ b/src/main/java/org/icatproject/exposed/NotFoundExceptionMapper.java @@ -2,12 +2,12 @@ import java.io.ByteArrayOutputStream; -import javax.json.Json; -import javax.json.stream.JsonGenerator; -import javax.ws.rs.NotFoundException; -import javax.ws.rs.core.Response; -import javax.ws.rs.ext.ExceptionMapper; -import javax.ws.rs.ext.Provider; +import jakarta.json.Json; +import jakarta.json.stream.JsonGenerator; +import jakarta.ws.rs.NotFoundException; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.ext.ExceptionMapper; +import jakarta.ws.rs.ext.Provider; import org.icatproject.core.IcatException.IcatExceptionType; import org.slf4j.Logger; diff --git a/src/main/java/org/icatproject/exposed/ThrowableExceptionMapper.java b/src/main/java/org/icatproject/exposed/ThrowableExceptionMapper.java index 2ff6fc46f..548ea613e 100644 --- a/src/main/java/org/icatproject/exposed/ThrowableExceptionMapper.java +++ b/src/main/java/org/icatproject/exposed/ThrowableExceptionMapper.java @@ -2,12 +2,12 @@ import java.io.ByteArrayOutputStream; -import javax.json.Json; -import javax.json.stream.JsonGenerator; -import javax.ws.rs.core.Response; -import javax.ws.rs.core.Response.Status; -import javax.ws.rs.ext.ExceptionMapper; -import javax.ws.rs.ext.Provider; +import jakarta.json.Json; +import jakarta.json.stream.JsonGenerator; +import jakarta.ws.rs.core.Response; +import jakarta.ws.rs.core.Response.Status; +import jakarta.ws.rs.ext.ExceptionMapper; +import jakarta.ws.rs.ext.Provider; import org.icatproject.core.IcatException.IcatExceptionType; import org.slf4j.Logger; diff --git a/src/main/resources/META-INF/persistence.xml b/src/main/resources/META-INF/persistence.xml index bcdadd3c8..e4e65274d 100755 --- a/src/main/resources/META-INF/persistence.xml +++ b/src/main/resources/META-INF/persistence.xml @@ -1,8 +1,9 @@ - + xsi:schemaLocation="https://jakarta.ee/xml/ns/persistence https://jakarta.ee/xml/ns/persistence/persistence_3_0.xsd" + version="3.0"> org.eclipse.persistence.jpa.PersistenceProvider diff --git a/src/main/scripts/setup b/src/main/scripts/setup index 35e822cfa..38bff31e5 100755 --- a/src/main/scripts/setup +++ b/src/main/scripts/setup @@ -41,8 +41,8 @@ if arg == "INSTALL": try: uninstall() actions.registerDB("icat", props["db.driver"], props["db.url"], props["db.username"], props["db.password"]) - actions.createJMSResource("javax.jms.Topic", "jms/ICAT/Topic") - actions.createJMSResource("javax.jms.Topic", "jms/ICAT/log") + actions.createJMSResource("jakarta.jms.Topic", "jms/ICAT/Topic") + actions.createJMSResource("jakarta.jms.Topic", "jms/ICAT/log") ovfiles = [[prop_name, "WEB-INF/classes"]] if os.path.exists("logback.xml"): ovfiles.append(["logback.xml", "WEB-INF/classes"]) diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index 3440631ed..03291af95 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -1,7 +1,9 @@ - + xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd" + version="6.0"> ServletAdaptor @@ -12,6 +14,8 @@ 1 + + diff --git a/src/site/xhtml/installation.xhtml.vm b/src/site/xhtml/installation.xhtml.vm index 358562ceb..70912e5f9 100644 --- a/src/site/xhtml/installation.xhtml.vm +++ b/src/site/xhtml/installation.xhtml.vm @@ -19,21 +19,16 @@
  • The icat distribution: icat.server-${project.version}-distro.zip
  • -
  • Java 8
  • -
  • A suitable deployed container. The installation scripts - support Glassfish/Payara and to a lesser extent WildFly. Testing has - been carried out with Payara 5.Glassfish/Payara - installation instructions are available. -
  • +
  • Java 11+
  • +
  • A suitable deployed application server that supports JakartaEE 10+. Testing has been carried out with Payara Server Community 6. Other applications servers such as GlassFish and WildFly may work but have not been tested. + Glassfish/Payara installation instructions are available.
  • A database as described in Database installation instructions installed on the server
  • Deployed ICAT authenticators.
  • -
  • A deployed icat.lucene server it you plan to use TopCAT
  • -
  • Python (version 2.4 to 2.7) and the python-suds package - installed on the server.
  • +
  • A deployed icat.lucene server it you plan to use free-text search.
  • +
  • Python 3.6+ and the suds-community package installed on the server.
  • Summary of steps

    diff --git a/src/site/xhtml/release-notes.xhtml b/src/site/xhtml/release-notes.xhtml index 21f524d31..b0113ef32 100644 --- a/src/site/xhtml/release-notes.xhtml +++ b/src/site/xhtml/release-notes.xhtml @@ -6,6 +6,9 @@

    ICAT Server Release Notes

    +

    6.0.0

    +

    Upgrade from JavaEE to JakartaEE 10. Requires Java 11+ and an application server that supports JakartaEE 10 such as Payara 6.

    +

    5.0.1

    Fix authorization of lists of ICAT entities and use Python3 for scripts

    diff --git a/src/test/java/org/icatproject/core/manager/TestLucene.java b/src/test/java/org/icatproject/core/manager/TestLucene.java index a02425260..2d48db6cc 100644 --- a/src/test/java/org/icatproject/core/manager/TestLucene.java +++ b/src/test/java/org/icatproject/core/manager/TestLucene.java @@ -18,9 +18,9 @@ import java.util.Set; import java.util.concurrent.ConcurrentLinkedQueue; -import javax.json.Json; -import javax.json.stream.JsonGenerator; -import javax.ws.rs.core.MediaType; +import jakarta.json.Json; +import jakarta.json.stream.JsonGenerator; +import jakarta.ws.rs.core.MediaType; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpPost; diff --git a/src/test/java/org/icatproject/exposed/TestICATRest.java b/src/test/java/org/icatproject/exposed/TestICATRest.java index bb642d272..6ab58e413 100644 --- a/src/test/java/org/icatproject/exposed/TestICATRest.java +++ b/src/test/java/org/icatproject/exposed/TestICATRest.java @@ -15,8 +15,8 @@ import java.math.BigDecimal; import java.math.BigInteger; -import javax.json.Json; -import javax.json.stream.JsonGenerator; +import jakarta.json.Json; +import jakarta.json.stream.JsonGenerator; import org.icatproject.exposed.ICATRest; import org.icatproject.core.entity.ParameterValueType; diff --git a/src/test/java/org/icatproject/integration/TestRS.java b/src/test/java/org/icatproject/integration/TestRS.java index c5fd4b7ab..53e4875c2 100644 --- a/src/test/java/org/icatproject/integration/TestRS.java +++ b/src/test/java/org/icatproject/integration/TestRS.java @@ -39,12 +39,12 @@ import java.util.Set; import java.util.regex.Pattern; -import javax.json.Json; -import javax.json.JsonArray; -import javax.json.JsonNumber; -import javax.json.JsonObject; -import javax.json.JsonValue; -import javax.json.stream.JsonGenerator; +import jakarta.json.Json; +import jakarta.json.JsonArray; +import jakarta.json.JsonNumber; +import jakarta.json.JsonObject; +import jakarta.json.JsonValue; +import jakarta.json.stream.JsonGenerator; import org.icatproject.core.manager.LuceneApi; import org.icatproject.icat.client.ICAT; @@ -500,7 +500,7 @@ private JsonArray searchDatafiles(Session session, String user, String text, Dat @Test public void testVersion() throws Exception { ICAT icat = new ICAT(System.getProperty("serverUrl")); - assertTrue(icat.getVersion().startsWith("5.")); + assertTrue(icat.getVersion().startsWith("6.")); } @Test diff --git a/src/test/java/org/icatproject/integration/TestWS.java b/src/test/java/org/icatproject/integration/TestWS.java index 97cc73691..dde35597b 100644 --- a/src/test/java/org/icatproject/integration/TestWS.java +++ b/src/test/java/org/icatproject/integration/TestWS.java @@ -71,7 +71,7 @@ */ public class TestWS { - private static final String version = "5.0."; + private static final String version = "6.0."; private static Random random; private static WSession session; diff --git a/src/test/java/org/icatproject/integration/WSession.java b/src/test/java/org/icatproject/integration/WSession.java index 6483c46bd..196fc1126 100644 --- a/src/test/java/org/icatproject/integration/WSession.java +++ b/src/test/java/org/icatproject/integration/WSession.java @@ -6,11 +6,11 @@ import java.util.Arrays; import java.util.List; -import javax.json.Json; -import javax.json.JsonString; +import jakarta.json.Json; +import jakarta.json.JsonString; import javax.xml.datatype.XMLGregorianCalendar; import javax.xml.namespace.QName; -import javax.xml.ws.WebServiceException; +import jakarta.xml.ws.WebServiceException; import org.icatproject.AccessType; import org.icatproject.Application;