From ac7666484ac29694f92994a9be2e0307de331d32 Mon Sep 17 00:00:00 2001 From: Lyn Elisa Goltz Date: Wed, 5 Jun 2024 16:55:45 +0200 Subject: [PATCH 1/2] #1654 - fix scanning beans, implement serializable --- .../client/core/debug/DebugPhaseListener.java | 14 ++++++-- .../src/main/resources/META-INF/beans.xml | 6 ++++ .../remoteows/CreateRemoteOwsBean.java | 4 ++- .../connection/sql/ConnectionTester.java | 13 +++---- .../sql/CreateSqlConnectionBean.java | 4 ++- .../coverage/CreateCoverageBean.java | 4 ++- .../feature/CreateFeatureStoreBean.java | 4 ++- .../datastore/feature/MappingWizardSQL.java | 36 +++++++++---------- .../metadata/CreateMetadataStoreBean.java | 4 ++- .../datastore/tile/CreateTileStoreBean.java | 4 ++- .../console/layer/layer/CreateLayerBean.java | 4 ++- .../console/layer/style/CreateStyleBean.java | 4 ++- .../console/layer/theme/CreateThemeBean.java | 4 ++- .../console/process/CreateProcessBean.java | 4 ++- .../org/deegree/console/proxy/ProxyBean.java | 7 ++-- .../webservices/CreateServiceBean.java | 4 ++- .../wps/ProcessExecutionsBean.java | 9 ++--- .../console/webservices/wps/WPSBean.java | 9 ++--- .../workspace/CreateWorkspaceBean.java | 7 ++-- .../src/main/resources/META-INF/beans.xml | 6 ++++ 20 files changed, 99 insertions(+), 52 deletions(-) create mode 100644 deegree-client/deegree-jsf-core/src/main/resources/META-INF/beans.xml create mode 100644 deegree-services/deegree-webservices/src/main/resources/META-INF/beans.xml diff --git a/deegree-client/deegree-jsf-core/src/main/java/org/deegree/client/core/debug/DebugPhaseListener.java b/deegree-client/deegree-jsf-core/src/main/java/org/deegree/client/core/debug/DebugPhaseListener.java index 8bea25c6f7..fd5f1a7ab7 100644 --- a/deegree-client/deegree-jsf-core/src/main/java/org/deegree/client/core/debug/DebugPhaseListener.java +++ b/deegree-client/deegree-jsf-core/src/main/java/org/deegree/client/core/debug/DebugPhaseListener.java @@ -35,14 +35,16 @@ package org.deegree.client.core.debug; -import static org.slf4j.LoggerFactory.getLogger; - import jakarta.faces.event.PhaseEvent; import jakarta.faces.event.PhaseId; import jakarta.faces.event.PhaseListener; - import org.slf4j.Logger; +import java.util.Map; +import java.util.Map.Entry; + +import static org.slf4j.LoggerFactory.getLogger; + /** * TODO add class documentation here * @@ -60,6 +62,12 @@ public void afterPhase(PhaseEvent event) { public void beforePhase(PhaseEvent event) { LOG.debug("Before phase: {}", event.getPhaseId()); + Map sessionMap = event.getFacesContext().getExternalContext().getSessionMap(); + for (Entry beanEntry : sessionMap.entrySet()) { + String beanName = beanEntry.getKey(); + Object bean = beanEntry.getValue(); + LOG.debug(" - {}: {}", beanName, bean); + } } public PhaseId getPhaseId() { diff --git a/deegree-client/deegree-jsf-core/src/main/resources/META-INF/beans.xml b/deegree-client/deegree-jsf-core/src/main/resources/META-INF/beans.xml new file mode 100644 index 0000000000..5c440bfd36 --- /dev/null +++ b/deegree-client/deegree-jsf-core/src/main/resources/META-INF/beans.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/deegree-services/deegree-webservices/src/main/java/org/deegree/console/connection/remoteows/CreateRemoteOwsBean.java b/deegree-services/deegree-webservices/src/main/java/org/deegree/console/connection/remoteows/CreateRemoteOwsBean.java index 5ece2d6e2c..ae2d5057ed 100644 --- a/deegree-services/deegree-webservices/src/main/java/org/deegree/console/connection/remoteows/CreateRemoteOwsBean.java +++ b/deegree-services/deegree-webservices/src/main/java/org/deegree/console/connection/remoteows/CreateRemoteOwsBean.java @@ -32,6 +32,8 @@ import org.deegree.console.AbstractCreateResourceBean; import org.deegree.remoteows.RemoteOWSManager; +import java.io.Serializable; + /** * JSF backing bean for "Create new remote OWS connection" view. * @@ -40,7 +42,7 @@ */ @Named @ViewScoped -public class CreateRemoteOwsBean extends AbstractCreateResourceBean { +public class CreateRemoteOwsBean extends AbstractCreateResourceBean implements Serializable { public CreateRemoteOwsBean() { super(RemoteOWSManager.class); diff --git a/deegree-services/deegree-webservices/src/main/java/org/deegree/console/connection/sql/ConnectionTester.java b/deegree-services/deegree-webservices/src/main/java/org/deegree/console/connection/sql/ConnectionTester.java index 033fad29da..71206e5466 100644 --- a/deegree-services/deegree-webservices/src/main/java/org/deegree/console/connection/sql/ConnectionTester.java +++ b/deegree-services/deegree-webservices/src/main/java/org/deegree/console/connection/sql/ConnectionTester.java @@ -34,21 +34,22 @@ ----------------------------------------------------------------------------*/ package org.deegree.console.connection.sql; -import static jakarta.faces.application.FacesMessage.SEVERITY_ERROR; -import static jakarta.faces.application.FacesMessage.SEVERITY_INFO; -import static org.deegree.client.core.utils.ActionParams.getParam1; - import jakarta.enterprise.context.SessionScoped; import jakarta.faces.application.FacesMessage; import jakarta.faces.context.ExternalContext; import jakarta.faces.context.FacesContext; - import jakarta.inject.Named; import org.deegree.console.workspace.WorkspaceBean; import org.deegree.db.ConnectionProvider; import org.deegree.db.ConnectionProviderProvider; import org.deegree.workspace.Workspace; +import java.io.Serializable; + +import static jakarta.faces.application.FacesMessage.SEVERITY_ERROR; +import static jakarta.faces.application.FacesMessage.SEVERITY_INFO; +import static org.deegree.client.core.utils.ActionParams.getParam1; + /** * JSF Bean for testing the availability of connections offered by * {@link ConnectionProvider}s. @@ -58,7 +59,7 @@ */ @Named @SessionScoped -public class ConnectionTester { +public class ConnectionTester implements Serializable { private Workspace getWorkspace() { ExternalContext ctx = FacesContext.getCurrentInstance().getExternalContext(); diff --git a/deegree-services/deegree-webservices/src/main/java/org/deegree/console/connection/sql/CreateSqlConnectionBean.java b/deegree-services/deegree-webservices/src/main/java/org/deegree/console/connection/sql/CreateSqlConnectionBean.java index 3b2cf105a4..6172ea5183 100644 --- a/deegree-services/deegree-webservices/src/main/java/org/deegree/console/connection/sql/CreateSqlConnectionBean.java +++ b/deegree-services/deegree-webservices/src/main/java/org/deegree/console/connection/sql/CreateSqlConnectionBean.java @@ -32,6 +32,8 @@ import org.deegree.console.AbstractCreateResourceBean; import org.deegree.db.ConnectionProviderManager; +import java.io.Serializable; + /** * JSF backing bean for "Create new database connection" view. * @@ -40,7 +42,7 @@ */ @Named @ViewScoped -public class CreateSqlConnectionBean extends AbstractCreateResourceBean { +public class CreateSqlConnectionBean extends AbstractCreateResourceBean implements Serializable { public CreateSqlConnectionBean() { super(ConnectionProviderManager.class); diff --git a/deegree-services/deegree-webservices/src/main/java/org/deegree/console/datastore/coverage/CreateCoverageBean.java b/deegree-services/deegree-webservices/src/main/java/org/deegree/console/datastore/coverage/CreateCoverageBean.java index 9ad8161785..8f5519ddc7 100644 --- a/deegree-services/deegree-webservices/src/main/java/org/deegree/console/datastore/coverage/CreateCoverageBean.java +++ b/deegree-services/deegree-webservices/src/main/java/org/deegree/console/datastore/coverage/CreateCoverageBean.java @@ -32,6 +32,8 @@ import org.deegree.console.AbstractCreateResourceBean; import org.deegree.coverage.persistence.CoverageManager; +import java.io.Serializable; + /** * JSF backing bean for "Create new coverage" view. * @@ -40,7 +42,7 @@ */ @Named @ViewScoped -public class CreateCoverageBean extends AbstractCreateResourceBean { +public class CreateCoverageBean extends AbstractCreateResourceBean implements Serializable { public CreateCoverageBean() { super(CoverageManager.class); diff --git a/deegree-services/deegree-webservices/src/main/java/org/deegree/console/datastore/feature/CreateFeatureStoreBean.java b/deegree-services/deegree-webservices/src/main/java/org/deegree/console/datastore/feature/CreateFeatureStoreBean.java index f948f72487..4f68b60eb9 100644 --- a/deegree-services/deegree-webservices/src/main/java/org/deegree/console/datastore/feature/CreateFeatureStoreBean.java +++ b/deegree-services/deegree-webservices/src/main/java/org/deegree/console/datastore/feature/CreateFeatureStoreBean.java @@ -32,6 +32,8 @@ import org.deegree.console.AbstractCreateResourceBean; import org.deegree.feature.persistence.FeatureStoreManager; +import java.io.Serializable; + /** * JSF backing bean for "Create new feature store" view. * @@ -40,7 +42,7 @@ */ @Named @ViewScoped -public class CreateFeatureStoreBean extends AbstractCreateResourceBean { +public class CreateFeatureStoreBean extends AbstractCreateResourceBean implements Serializable { public CreateFeatureStoreBean() { super(FeatureStoreManager.class); diff --git a/deegree-services/deegree-webservices/src/main/java/org/deegree/console/datastore/feature/MappingWizardSQL.java b/deegree-services/deegree-webservices/src/main/java/org/deegree/console/datastore/feature/MappingWizardSQL.java index d3e5884784..77fa969986 100644 --- a/deegree-services/deegree-webservices/src/main/java/org/deegree/console/datastore/feature/MappingWizardSQL.java +++ b/deegree-services/deegree-webservices/src/main/java/org/deegree/console/datastore/feature/MappingWizardSQL.java @@ -34,27 +34,10 @@ ----------------------------------------------------------------------------*/ package org.deegree.console.datastore.feature; -import static jakarta.faces.application.FacesMessage.SEVERITY_ERROR; -import static org.apache.commons.io.FileUtils.readFileToByteArray; -import static org.deegree.feature.types.property.GeometryPropertyType.CoordinateDimension.DIM_2; - -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.lang.reflect.InvocationTargetException; -import java.net.URL; -import java.util.ArrayList; -import java.util.List; -import java.util.SortedSet; -import java.util.TreeSet; - import jakarta.enterprise.context.SessionScoped; import jakarta.faces.application.FacesMessage; import jakarta.faces.context.ExternalContext; import jakarta.faces.context.FacesContext; -import javax.xml.stream.XMLOutputFactory; -import javax.xml.stream.XMLStreamWriter; - import jakarta.inject.Named; import org.apache.commons.io.IOUtils; import org.deegree.client.core.utils.SQLExecution; @@ -91,6 +74,23 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import javax.xml.stream.XMLOutputFactory; +import javax.xml.stream.XMLStreamWriter; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.Serializable; +import java.lang.reflect.InvocationTargetException; +import java.net.URL; +import java.util.ArrayList; +import java.util.List; +import java.util.SortedSet; +import java.util.TreeSet; + +import static jakarta.faces.application.FacesMessage.SEVERITY_ERROR; +import static org.apache.commons.io.FileUtils.readFileToByteArray; +import static org.deegree.feature.types.property.GeometryPropertyType.CoordinateDimension.DIM_2; + /** * JSF bean that helps with creating configurations for the {@link SQLFeatureStore}. * @@ -98,7 +98,7 @@ */ @Named @SessionScoped -public class MappingWizardSQL { +public class MappingWizardSQL implements Serializable { private static transient Logger LOG = LoggerFactory.getLogger(MappingWizardSQL.class); diff --git a/deegree-services/deegree-webservices/src/main/java/org/deegree/console/datastore/metadata/CreateMetadataStoreBean.java b/deegree-services/deegree-webservices/src/main/java/org/deegree/console/datastore/metadata/CreateMetadataStoreBean.java index 567e999cb5..ee5df4a9e7 100644 --- a/deegree-services/deegree-webservices/src/main/java/org/deegree/console/datastore/metadata/CreateMetadataStoreBean.java +++ b/deegree-services/deegree-webservices/src/main/java/org/deegree/console/datastore/metadata/CreateMetadataStoreBean.java @@ -32,6 +32,8 @@ import org.deegree.console.AbstractCreateResourceBean; import org.deegree.metadata.persistence.MetadataStoreManager; +import java.io.Serializable; + /** * JSF backing bean for "Create new metadata store" view. * @@ -40,7 +42,7 @@ */ @Named @ViewScoped -public class CreateMetadataStoreBean extends AbstractCreateResourceBean { +public class CreateMetadataStoreBean extends AbstractCreateResourceBean implements Serializable { public CreateMetadataStoreBean() { super(MetadataStoreManager.class); diff --git a/deegree-services/deegree-webservices/src/main/java/org/deegree/console/datastore/tile/CreateTileStoreBean.java b/deegree-services/deegree-webservices/src/main/java/org/deegree/console/datastore/tile/CreateTileStoreBean.java index f6bba53f5d..77c8ca2f40 100644 --- a/deegree-services/deegree-webservices/src/main/java/org/deegree/console/datastore/tile/CreateTileStoreBean.java +++ b/deegree-services/deegree-webservices/src/main/java/org/deegree/console/datastore/tile/CreateTileStoreBean.java @@ -32,6 +32,8 @@ import org.deegree.console.AbstractCreateResourceBean; import org.deegree.tile.persistence.TileStoreManager; +import java.io.Serializable; + /** * JSF backing bean for "Create new tile store" view. * @@ -40,7 +42,7 @@ */ @Named @ViewScoped -public class CreateTileStoreBean extends AbstractCreateResourceBean { +public class CreateTileStoreBean extends AbstractCreateResourceBean implements Serializable { public CreateTileStoreBean() { super(TileStoreManager.class); diff --git a/deegree-services/deegree-webservices/src/main/java/org/deegree/console/layer/layer/CreateLayerBean.java b/deegree-services/deegree-webservices/src/main/java/org/deegree/console/layer/layer/CreateLayerBean.java index 185ca93ef5..4ed0e604ce 100644 --- a/deegree-services/deegree-webservices/src/main/java/org/deegree/console/layer/layer/CreateLayerBean.java +++ b/deegree-services/deegree-webservices/src/main/java/org/deegree/console/layer/layer/CreateLayerBean.java @@ -32,6 +32,8 @@ import org.deegree.console.AbstractCreateResourceBean; import org.deegree.layer.persistence.LayerStoreManager; +import java.io.Serializable; + /** * JSF backing bean for "Create new layer" view. * @@ -40,7 +42,7 @@ */ @Named @ViewScoped -public class CreateLayerBean extends AbstractCreateResourceBean { +public class CreateLayerBean extends AbstractCreateResourceBean implements Serializable { public CreateLayerBean() { super(LayerStoreManager.class); diff --git a/deegree-services/deegree-webservices/src/main/java/org/deegree/console/layer/style/CreateStyleBean.java b/deegree-services/deegree-webservices/src/main/java/org/deegree/console/layer/style/CreateStyleBean.java index aa33043a7b..0fac4a7b81 100644 --- a/deegree-services/deegree-webservices/src/main/java/org/deegree/console/layer/style/CreateStyleBean.java +++ b/deegree-services/deegree-webservices/src/main/java/org/deegree/console/layer/style/CreateStyleBean.java @@ -32,6 +32,8 @@ import org.deegree.console.AbstractCreateResourceBean; import org.deegree.style.persistence.StyleStoreManager; +import java.io.Serializable; + /** * JSF backing bean for "Create new style" view. * @@ -40,7 +42,7 @@ */ @Named @ViewScoped -public class CreateStyleBean extends AbstractCreateResourceBean { +public class CreateStyleBean extends AbstractCreateResourceBean implements Serializable { public CreateStyleBean() { super(StyleStoreManager.class); diff --git a/deegree-services/deegree-webservices/src/main/java/org/deegree/console/layer/theme/CreateThemeBean.java b/deegree-services/deegree-webservices/src/main/java/org/deegree/console/layer/theme/CreateThemeBean.java index b50775fd48..bafb549600 100644 --- a/deegree-services/deegree-webservices/src/main/java/org/deegree/console/layer/theme/CreateThemeBean.java +++ b/deegree-services/deegree-webservices/src/main/java/org/deegree/console/layer/theme/CreateThemeBean.java @@ -32,6 +32,8 @@ import org.deegree.console.AbstractCreateResourceBean; import org.deegree.theme.persistence.ThemeManager; +import java.io.Serializable; + /** * JSF backing bean for "Create new theme" view. * @@ -40,7 +42,7 @@ */ @Named @ViewScoped -public class CreateThemeBean extends AbstractCreateResourceBean { +public class CreateThemeBean extends AbstractCreateResourceBean implements Serializable { public CreateThemeBean() { super(ThemeManager.class); diff --git a/deegree-services/deegree-webservices/src/main/java/org/deegree/console/process/CreateProcessBean.java b/deegree-services/deegree-webservices/src/main/java/org/deegree/console/process/CreateProcessBean.java index 1443361036..ea7ce41f34 100644 --- a/deegree-services/deegree-webservices/src/main/java/org/deegree/console/process/CreateProcessBean.java +++ b/deegree-services/deegree-webservices/src/main/java/org/deegree/console/process/CreateProcessBean.java @@ -32,6 +32,8 @@ import org.deegree.console.AbstractCreateResourceBean; import org.deegree.services.wps.ProcessManager; +import java.io.Serializable; + /** * JSF backing bean for "Create new process" view. * @@ -40,7 +42,7 @@ */ @Named @ViewScoped -public class CreateProcessBean extends AbstractCreateResourceBean { +public class CreateProcessBean extends AbstractCreateResourceBean implements Serializable { public CreateProcessBean() { super(ProcessManager.class); diff --git a/deegree-services/deegree-webservices/src/main/java/org/deegree/console/proxy/ProxyBean.java b/deegree-services/deegree-webservices/src/main/java/org/deegree/console/proxy/ProxyBean.java index dd1f23aa7b..4fecb76161 100644 --- a/deegree-services/deegree-webservices/src/main/java/org/deegree/console/proxy/ProxyBean.java +++ b/deegree-services/deegree-webservices/src/main/java/org/deegree/console/proxy/ProxyBean.java @@ -27,18 +27,19 @@ ----------------------------------------------------------------------------*/ package org.deegree.console.proxy; -import java.io.IOException; - import jakarta.enterprise.context.RequestScoped; import jakarta.inject.Named; import org.deegree.commons.proxy.ProxySettings; +import java.io.IOException; +import java.io.Serializable; + /** * @author Andreas Schmitz */ @Named @RequestScoped -public class ProxyBean { +public class ProxyBean implements Serializable { public ProxyConfig getProxyConfig() throws IOException { return new ProxyConfig(); diff --git a/deegree-services/deegree-webservices/src/main/java/org/deegree/console/webservices/CreateServiceBean.java b/deegree-services/deegree-webservices/src/main/java/org/deegree/console/webservices/CreateServiceBean.java index 1106d41679..aeaf6ecf52 100644 --- a/deegree-services/deegree-webservices/src/main/java/org/deegree/console/webservices/CreateServiceBean.java +++ b/deegree-services/deegree-webservices/src/main/java/org/deegree/console/webservices/CreateServiceBean.java @@ -32,6 +32,8 @@ import org.deegree.console.AbstractCreateResourceBean; import org.deegree.services.OwsManager; +import java.io.Serializable; + /** * JSF backing bean for "Create new webservice" view. * @@ -40,7 +42,7 @@ */ @Named @ViewScoped -public class CreateServiceBean extends AbstractCreateResourceBean { +public class CreateServiceBean extends AbstractCreateResourceBean implements Serializable { public CreateServiceBean() { super(OwsManager.class); diff --git a/deegree-services/deegree-webservices/src/main/java/org/deegree/console/webservices/wps/ProcessExecutionsBean.java b/deegree-services/deegree-webservices/src/main/java/org/deegree/console/webservices/wps/ProcessExecutionsBean.java index 38f2a4c7da..4cfbd46a29 100644 --- a/deegree-services/deegree-webservices/src/main/java/org/deegree/console/webservices/wps/ProcessExecutionsBean.java +++ b/deegree-services/deegree-webservices/src/main/java/org/deegree/console/webservices/wps/ProcessExecutionsBean.java @@ -34,14 +34,15 @@ ----------------------------------------------------------------------------*/ package org.deegree.console.webservices.wps; -import java.util.ArrayList; -import java.util.List; - import jakarta.enterprise.context.RequestScoped; import jakarta.inject.Named; import org.deegree.services.controller.OGCFrontController; import org.deegree.services.wps.WPService; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + /** * JSF-Bean for the processes execution info page. * @@ -49,7 +50,7 @@ */ @Named @RequestScoped -public class ProcessExecutionsBean { +public class ProcessExecutionsBean implements Serializable { private final List executions = new ArrayList(); diff --git a/deegree-services/deegree-webservices/src/main/java/org/deegree/console/webservices/wps/WPSBean.java b/deegree-services/deegree-webservices/src/main/java/org/deegree/console/webservices/wps/WPSBean.java index 266d091963..eea9c2f4ac 100644 --- a/deegree-services/deegree-webservices/src/main/java/org/deegree/console/webservices/wps/WPSBean.java +++ b/deegree-services/deegree-webservices/src/main/java/org/deegree/console/webservices/wps/WPSBean.java @@ -34,15 +34,16 @@ ----------------------------------------------------------------------------*/ package org.deegree.console.webservices.wps; -import java.util.ArrayList; -import java.util.List; - import jakarta.enterprise.context.RequestScoped; import jakarta.inject.Named; import org.deegree.services.controller.OGCFrontController; import org.deegree.services.wps.WPSProcess; import org.deegree.services.wps.WPService; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + /** * JSF-Bean for the WPS main info page. * @@ -50,7 +51,7 @@ */ @Named @RequestScoped -public class WPSBean { +public class WPSBean implements Serializable { private final String version; diff --git a/deegree-services/deegree-webservices/src/main/java/org/deegree/console/workspace/CreateWorkspaceBean.java b/deegree-services/deegree-webservices/src/main/java/org/deegree/console/workspace/CreateWorkspaceBean.java index 0c456af9fc..5dddb60748 100644 --- a/deegree-services/deegree-webservices/src/main/java/org/deegree/console/workspace/CreateWorkspaceBean.java +++ b/deegree-services/deegree-webservices/src/main/java/org/deegree/console/workspace/CreateWorkspaceBean.java @@ -27,13 +27,14 @@ ----------------------------------------------------------------------------*/ package org.deegree.console.workspace; -import java.io.File; - import jakarta.enterprise.context.RequestScoped; import jakarta.inject.Named; import org.deegree.commons.config.DeegreeWorkspace; import org.deegree.console.JsfUtils; +import java.io.File; +import java.io.Serializable; + /** * JSF backing bean for creating a new workspace folder. * @@ -42,7 +43,7 @@ */ @Named @RequestScoped -public class CreateWorkspaceBean { +public class CreateWorkspaceBean implements Serializable { private String workspaceName; diff --git a/deegree-services/deegree-webservices/src/main/resources/META-INF/beans.xml b/deegree-services/deegree-webservices/src/main/resources/META-INF/beans.xml new file mode 100644 index 0000000000..8e212a4788 --- /dev/null +++ b/deegree-services/deegree-webservices/src/main/resources/META-INF/beans.xml @@ -0,0 +1,6 @@ + + + + From 9e9e1907d2c4dd613d2ab1d4e9a914013523a153 Mon Sep 17 00:00:00 2001 From: Lyn Elisa Goltz Date: Wed, 5 Jun 2024 18:37:16 +0200 Subject: [PATCH 2/2] #1654 - fixed imports, added isDebugEnabled --- .../client/core/debug/DebugPhaseListener.java | 16 +++++----- .../connection/sql/ConnectionTester.java | 8 ++--- .../datastore/feature/MappingWizardSQL.java | 31 ++++++++++--------- .../org/deegree/console/proxy/ProxyBean.java | 6 ++-- .../wps/ProcessExecutionsBean.java | 8 ++--- .../console/webservices/wps/WPSBean.java | 8 ++--- .../workspace/CreateWorkspaceBean.java | 6 ++-- 7 files changed, 43 insertions(+), 40 deletions(-) diff --git a/deegree-client/deegree-jsf-core/src/main/java/org/deegree/client/core/debug/DebugPhaseListener.java b/deegree-client/deegree-jsf-core/src/main/java/org/deegree/client/core/debug/DebugPhaseListener.java index fd5f1a7ab7..3b0024eeb6 100644 --- a/deegree-client/deegree-jsf-core/src/main/java/org/deegree/client/core/debug/DebugPhaseListener.java +++ b/deegree-client/deegree-jsf-core/src/main/java/org/deegree/client/core/debug/DebugPhaseListener.java @@ -35,6 +35,8 @@ package org.deegree.client.core.debug; +import static org.slf4j.LoggerFactory.getLogger; + import jakarta.faces.event.PhaseEvent; import jakarta.faces.event.PhaseId; import jakarta.faces.event.PhaseListener; @@ -43,8 +45,6 @@ import java.util.Map; import java.util.Map.Entry; -import static org.slf4j.LoggerFactory.getLogger; - /** * TODO add class documentation here * @@ -62,11 +62,13 @@ public void afterPhase(PhaseEvent event) { public void beforePhase(PhaseEvent event) { LOG.debug("Before phase: {}", event.getPhaseId()); - Map sessionMap = event.getFacesContext().getExternalContext().getSessionMap(); - for (Entry beanEntry : sessionMap.entrySet()) { - String beanName = beanEntry.getKey(); - Object bean = beanEntry.getValue(); - LOG.debug(" - {}: {}", beanName, bean); + if (LOG.isDebugEnabled()) { + Map sessionMap = event.getFacesContext().getExternalContext().getSessionMap(); + for (Entry beanEntry : sessionMap.entrySet()) { + String beanName = beanEntry.getKey(); + Object bean = beanEntry.getValue(); + LOG.debug(" - {}: {}", beanName, bean); + } } } diff --git a/deegree-services/deegree-webservices/src/main/java/org/deegree/console/connection/sql/ConnectionTester.java b/deegree-services/deegree-webservices/src/main/java/org/deegree/console/connection/sql/ConnectionTester.java index 71206e5466..01ee0bceb4 100644 --- a/deegree-services/deegree-webservices/src/main/java/org/deegree/console/connection/sql/ConnectionTester.java +++ b/deegree-services/deegree-webservices/src/main/java/org/deegree/console/connection/sql/ConnectionTester.java @@ -34,6 +34,10 @@ ----------------------------------------------------------------------------*/ package org.deegree.console.connection.sql; +import static jakarta.faces.application.FacesMessage.SEVERITY_ERROR; +import static jakarta.faces.application.FacesMessage.SEVERITY_INFO; +import static org.deegree.client.core.utils.ActionParams.getParam1; + import jakarta.enterprise.context.SessionScoped; import jakarta.faces.application.FacesMessage; import jakarta.faces.context.ExternalContext; @@ -46,10 +50,6 @@ import java.io.Serializable; -import static jakarta.faces.application.FacesMessage.SEVERITY_ERROR; -import static jakarta.faces.application.FacesMessage.SEVERITY_INFO; -import static org.deegree.client.core.utils.ActionParams.getParam1; - /** * JSF Bean for testing the availability of connections offered by * {@link ConnectionProvider}s. diff --git a/deegree-services/deegree-webservices/src/main/java/org/deegree/console/datastore/feature/MappingWizardSQL.java b/deegree-services/deegree-webservices/src/main/java/org/deegree/console/datastore/feature/MappingWizardSQL.java index 77fa969986..dc0939bd09 100644 --- a/deegree-services/deegree-webservices/src/main/java/org/deegree/console/datastore/feature/MappingWizardSQL.java +++ b/deegree-services/deegree-webservices/src/main/java/org/deegree/console/datastore/feature/MappingWizardSQL.java @@ -33,11 +33,27 @@ e-mail: info@deegree.org ----------------------------------------------------------------------------*/ package org.deegree.console.datastore.feature; +import static jakarta.faces.application.FacesMessage.SEVERITY_ERROR; +import static org.apache.commons.io.FileUtils.readFileToByteArray; +import static org.deegree.feature.types.property.GeometryPropertyType.CoordinateDimension.DIM_2; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.lang.reflect.InvocationTargetException; +import java.net.URL; +import java.util.ArrayList; +import java.util.List; +import java.util.SortedSet; +import java.util.TreeSet; import jakarta.enterprise.context.SessionScoped; import jakarta.faces.application.FacesMessage; import jakarta.faces.context.ExternalContext; import jakarta.faces.context.FacesContext; +import javax.xml.stream.XMLOutputFactory; +import javax.xml.stream.XMLStreamWriter; + import jakarta.inject.Named; import org.apache.commons.io.IOUtils; import org.deegree.client.core.utils.SQLExecution; @@ -74,22 +90,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import javax.xml.stream.XMLOutputFactory; -import javax.xml.stream.XMLStreamWriter; -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; import java.io.Serializable; -import java.lang.reflect.InvocationTargetException; -import java.net.URL; -import java.util.ArrayList; -import java.util.List; -import java.util.SortedSet; -import java.util.TreeSet; - -import static jakarta.faces.application.FacesMessage.SEVERITY_ERROR; -import static org.apache.commons.io.FileUtils.readFileToByteArray; -import static org.deegree.feature.types.property.GeometryPropertyType.CoordinateDimension.DIM_2; /** * JSF bean that helps with creating configurations for the {@link SQLFeatureStore}. diff --git a/deegree-services/deegree-webservices/src/main/java/org/deegree/console/proxy/ProxyBean.java b/deegree-services/deegree-webservices/src/main/java/org/deegree/console/proxy/ProxyBean.java index 4fecb76161..0b697182ed 100644 --- a/deegree-services/deegree-webservices/src/main/java/org/deegree/console/proxy/ProxyBean.java +++ b/deegree-services/deegree-webservices/src/main/java/org/deegree/console/proxy/ProxyBean.java @@ -27,13 +27,13 @@ ----------------------------------------------------------------------------*/ package org.deegree.console.proxy; +import java.io.IOException; +import java.io.Serializable; + import jakarta.enterprise.context.RequestScoped; import jakarta.inject.Named; import org.deegree.commons.proxy.ProxySettings; -import java.io.IOException; -import java.io.Serializable; - /** * @author Andreas Schmitz */ diff --git a/deegree-services/deegree-webservices/src/main/java/org/deegree/console/webservices/wps/ProcessExecutionsBean.java b/deegree-services/deegree-webservices/src/main/java/org/deegree/console/webservices/wps/ProcessExecutionsBean.java index 4cfbd46a29..90b753b1a2 100644 --- a/deegree-services/deegree-webservices/src/main/java/org/deegree/console/webservices/wps/ProcessExecutionsBean.java +++ b/deegree-services/deegree-webservices/src/main/java/org/deegree/console/webservices/wps/ProcessExecutionsBean.java @@ -34,15 +34,15 @@ ----------------------------------------------------------------------------*/ package org.deegree.console.webservices.wps; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + import jakarta.enterprise.context.RequestScoped; import jakarta.inject.Named; import org.deegree.services.controller.OGCFrontController; import org.deegree.services.wps.WPService; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.List; - /** * JSF-Bean for the processes execution info page. * diff --git a/deegree-services/deegree-webservices/src/main/java/org/deegree/console/webservices/wps/WPSBean.java b/deegree-services/deegree-webservices/src/main/java/org/deegree/console/webservices/wps/WPSBean.java index eea9c2f4ac..6a22b6caac 100644 --- a/deegree-services/deegree-webservices/src/main/java/org/deegree/console/webservices/wps/WPSBean.java +++ b/deegree-services/deegree-webservices/src/main/java/org/deegree/console/webservices/wps/WPSBean.java @@ -34,16 +34,16 @@ ----------------------------------------------------------------------------*/ package org.deegree.console.webservices.wps; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.List; + import jakarta.enterprise.context.RequestScoped; import jakarta.inject.Named; import org.deegree.services.controller.OGCFrontController; import org.deegree.services.wps.WPSProcess; import org.deegree.services.wps.WPService; -import java.io.Serializable; -import java.util.ArrayList; -import java.util.List; - /** * JSF-Bean for the WPS main info page. * diff --git a/deegree-services/deegree-webservices/src/main/java/org/deegree/console/workspace/CreateWorkspaceBean.java b/deegree-services/deegree-webservices/src/main/java/org/deegree/console/workspace/CreateWorkspaceBean.java index 5dddb60748..9d58b215f7 100644 --- a/deegree-services/deegree-webservices/src/main/java/org/deegree/console/workspace/CreateWorkspaceBean.java +++ b/deegree-services/deegree-webservices/src/main/java/org/deegree/console/workspace/CreateWorkspaceBean.java @@ -27,14 +27,14 @@ ----------------------------------------------------------------------------*/ package org.deegree.console.workspace; +import java.io.File; +import java.io.Serializable; + import jakarta.enterprise.context.RequestScoped; import jakarta.inject.Named; import org.deegree.commons.config.DeegreeWorkspace; import org.deegree.console.JsfUtils; -import java.io.File; -import java.io.Serializable; - /** * JSF backing bean for creating a new workspace folder. *