Skip to content

Commit

Permalink
deegree#1654 - fixed imports, added isDebugEnabled
Browse files Browse the repository at this point in the history
  • Loading branch information
lgoltz committed Jun 5, 2024
1 parent ac76664 commit 9e9e190
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -43,8 +45,6 @@
import java.util.Map;
import java.util.Map.Entry;

import static org.slf4j.LoggerFactory.getLogger;

/**
* TODO add class documentation here
*
Expand All @@ -62,11 +62,13 @@ public void afterPhase(PhaseEvent event) {

public void beforePhase(PhaseEvent event) {
LOG.debug("Before phase: {}", event.getPhaseId());
Map<String, Object> sessionMap = event.getFacesContext().getExternalContext().getSessionMap();
for (Entry<String, Object> beanEntry : sessionMap.entrySet()) {
String beanName = beanEntry.getKey();
Object bean = beanEntry.getValue();
LOG.debug(" - {}: {}", beanName, bean);
if (LOG.isDebugEnabled()) {
Map<String, Object> sessionMap = event.getFacesContext().getExternalContext().getSessionMap();
for (Entry<String, Object> beanEntry : sessionMap.entrySet()) {
String beanName = beanEntry.getKey();
Object bean = beanEntry.getValue();
LOG.debug(" - {}: {}", beanName, bean);
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,27 @@
e-mail: [email protected]
----------------------------------------------------------------------------*/
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;
Expand Down Expand Up @@ -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}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 <a href="mailto:[email protected]">Andreas Schmitz</a>
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down

0 comments on commit 9e9e190

Please sign in to comment.