From 8f83cf1e15e3f2dbe506c35650cab0f626ad1bba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Meier?= Date: Wed, 23 Oct 2024 14:42:45 +0200 Subject: [PATCH] Move code to jakarta namespace and update dependencies to use Jakarta EE 9.1 --- .../metfragweb/container/AvailableParameters.java | 6 ++---- .../container/BeanSettingsContainer.java | 6 +++--- .../controller/CompareSpectraD3JSBean.java | 14 +++++++------- .../metfragweb/controller/MetFragLandingBean.java | 10 +++++----- .../metfragweb/datatype/AvailableScore.java | 2 +- .../metfragweb/datatype/CandidateStatistics.java | 2 +- .../metfragweb/datatype/DownloadResource.java | 4 ++-- .../metfragweb/validator/DoubleValueValidator.java | 10 +++++----- .../metfragweb/validator/ElementsValidator.java | 10 +++++----- .../metfragweb/validator/FormulaValidator.java | 10 +++++----- .../includes/dialogs/feedbackButtonDialog.xhtml | 6 +++--- 11 files changed, 39 insertions(+), 41 deletions(-) diff --git a/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/container/AvailableParameters.java b/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/container/AvailableParameters.java index 191f35ac..81d2d570 100644 --- a/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/container/AvailableParameters.java +++ b/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/container/AvailableParameters.java @@ -1,14 +1,12 @@ package de.ipbhalle.metfragweb.container; import java.io.File; -import java.nio.file.Files; -import java.nio.file.Paths; import java.util.Arrays; import java.util.Comparator; import java.util.Hashtable; -import javax.faces.model.SelectItem; -import javax.faces.model.SelectItemGroup; +import jakarta.faces.model.SelectItem; +import jakarta.faces.model.SelectItemGroup; import de.ipbhalle.metfraglib.parameter.ClassNames; import de.ipbhalle.metfraglib.parameter.Constants; diff --git a/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/container/BeanSettingsContainer.java b/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/container/BeanSettingsContainer.java index 151858de..0b87bf5c 100644 --- a/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/container/BeanSettingsContainer.java +++ b/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/container/BeanSettingsContainer.java @@ -6,9 +6,9 @@ import java.util.HashMap; import java.util.List; -import javax.faces.context.FacesContext; -import javax.faces.model.SelectItem; -import javax.servlet.ServletContext; +import jakarta.faces.context.FacesContext; +import jakarta.faces.model.SelectItem; +import jakarta.servlet.ServletContext; import org.apache.log4j.Level; import org.primefaces.model.chart.AxisType; diff --git a/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/controller/CompareSpectraD3JSBean.java b/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/controller/CompareSpectraD3JSBean.java index 546ff690..0f7af661 100644 --- a/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/controller/CompareSpectraD3JSBean.java +++ b/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/controller/CompareSpectraD3JSBean.java @@ -4,14 +4,14 @@ import java.io.IOException; import java.util.Random; -import javax.faces.bean.ManagedBean; -import javax.faces.bean.SessionScoped; -import javax.faces.context.FacesContext; -import javax.faces.event.ActionEvent; +import jakarta.faces.bean.ManagedBean; +import jakarta.faces.bean.SessionScoped; +import jakarta.faces.context.FacesContext; +import jakarta.faces.event.ActionEvent; import javax.imageio.ImageIO; -import javax.servlet.ServletContext; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpSession; +import jakarta.servlet.ServletContext; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpSession; import org.apache.commons.io.FileUtils; import org.openscience.cdk.exception.CDKException; diff --git a/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/controller/MetFragLandingBean.java b/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/controller/MetFragLandingBean.java index 6c5fced2..e68d3218 100644 --- a/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/controller/MetFragLandingBean.java +++ b/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/controller/MetFragLandingBean.java @@ -1,15 +1,15 @@ package de.ipbhalle.metfragweb.controller; -import javax.annotation.PostConstruct; -import javax.faces.bean.ManagedBean; -import javax.faces.bean.RequestScoped; -import javax.faces.context.FacesContext; +import jakarta.annotation.PostConstruct; +import jakarta.faces.bean.ManagedBean; +import jakarta.faces.bean.RequestScoped; +import jakarta.faces.context.FacesContext; import de.ipbhalle.metfraglib.parameter.Constants; import de.ipbhalle.metfraglib.parameter.VariableNames; import de.ipbhalle.metfragweb.datatype.Parameter; -import javax.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletRequest; import org.primefaces.PrimeFaces; diff --git a/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/datatype/AvailableScore.java b/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/datatype/AvailableScore.java index 66658b3e..59b79d11 100644 --- a/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/datatype/AvailableScore.java +++ b/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/datatype/AvailableScore.java @@ -2,7 +2,7 @@ import java.io.Serializable; -import javax.faces.model.SelectItem; +import jakarta.faces.model.SelectItem; public class AvailableScore extends SelectItem implements Serializable, Comparable { diff --git a/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/datatype/CandidateStatistics.java b/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/datatype/CandidateStatistics.java index b5b68622..82c5f398 100644 --- a/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/datatype/CandidateStatistics.java +++ b/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/datatype/CandidateStatistics.java @@ -2,7 +2,7 @@ import java.util.List; -import javax.faces.model.SelectItem; +import jakarta.faces.model.SelectItem; import org.primefaces.model.chart.AxisType; import org.primefaces.model.chart.LineChartModel; diff --git a/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/datatype/DownloadResource.java b/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/datatype/DownloadResource.java index ecded1e6..ddbd8ff2 100644 --- a/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/datatype/DownloadResource.java +++ b/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/datatype/DownloadResource.java @@ -7,8 +7,8 @@ import java.util.HashMap; import java.util.Map; -import javax.faces.application.Resource; -import javax.faces.context.FacesContext; +import jakarta.faces.application.Resource; +import jakarta.faces.context.FacesContext; public class DownloadResource extends Resource implements java.io.Serializable { diff --git a/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/validator/DoubleValueValidator.java b/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/validator/DoubleValueValidator.java index 3df362f8..1a18dabb 100644 --- a/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/validator/DoubleValueValidator.java +++ b/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/validator/DoubleValueValidator.java @@ -1,10 +1,10 @@ package de.ipbhalle.metfragweb.validator; -import javax.faces.application.FacesMessage; -import javax.faces.component.UIComponent; -import javax.faces.context.FacesContext; -import javax.faces.validator.Validator; -import javax.faces.validator.ValidatorException; +import jakarta.faces.application.FacesMessage; +import jakarta.faces.component.UIComponent; +import jakarta.faces.context.FacesContext; +import jakarta.faces.validator.Validator; +import jakarta.faces.validator.ValidatorException; public class DoubleValueValidator implements Validator { diff --git a/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/validator/ElementsValidator.java b/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/validator/ElementsValidator.java index 5994a7d5..5247554d 100644 --- a/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/validator/ElementsValidator.java +++ b/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/validator/ElementsValidator.java @@ -1,10 +1,10 @@ package de.ipbhalle.metfragweb.validator; -import javax.faces.application.FacesMessage; -import javax.faces.component.UIComponent; -import javax.faces.context.FacesContext; -import javax.faces.validator.Validator; -import javax.faces.validator.ValidatorException; +import jakarta.faces.application.FacesMessage; +import jakarta.faces.component.UIComponent; +import jakarta.faces.context.FacesContext; +import jakarta.faces.validator.Validator; +import jakarta.faces.validator.ValidatorException; import de.ipbhalle.metfraglib.parameter.Constants; diff --git a/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/validator/FormulaValidator.java b/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/validator/FormulaValidator.java index bd1912a0..ba5d134b 100644 --- a/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/validator/FormulaValidator.java +++ b/MetFragWeb/src/main/java/de/ipbhalle/metfragweb/validator/FormulaValidator.java @@ -1,10 +1,10 @@ package de.ipbhalle.metfragweb.validator; -import javax.faces.application.FacesMessage; -import javax.faces.component.UIComponent; -import javax.faces.context.FacesContext; -import javax.faces.validator.Validator; -import javax.faces.validator.ValidatorException; +import jakarta.faces.application.FacesMessage; +import jakarta.faces.component.UIComponent; +import jakarta.faces.context.FacesContext; +import jakarta.faces.validator.Validator; +import jakarta.faces.validator.ValidatorException; import de.ipbhalle.metfraglib.molecularformula.ByteMolecularFormula; diff --git a/MetFragWeb/src/main/webapp/includes/dialogs/feedbackButtonDialog.xhtml b/MetFragWeb/src/main/webapp/includes/dialogs/feedbackButtonDialog.xhtml index 8fe3327c..5fa4e7de 100644 --- a/MetFragWeb/src/main/webapp/includes/dialogs/feedbackButtonDialog.xhtml +++ b/MetFragWeb/src/main/webapp/includes/dialogs/feedbackButtonDialog.xhtml @@ -1,4 +1,4 @@ - - + - +