# HG changeset patch # User Sascha L. Teichmann # Date 1409915962 -7200 # Node ID 238fc722f87a80fcb4eba12d932f5653e01361fd # Parent e4606eae8ea50ac0cf5e197ad0ecece5092deaaa sed 's/logger/log/g' src/**/*.java diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/AddArtifactServiceImpl.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/AddArtifactServiceImpl.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/AddArtifactServiceImpl.java Fri Sep 05 13:19:22 2014 +0200 @@ -23,7 +23,7 @@ extends DescribeCollectionServiceImpl implements AddArtifactService { - private static final Logger logger = + private static final Logger log = Logger.getLogger(AddArtifactService.class); @@ -33,7 +33,7 @@ String locale) throws ServerException { - logger.info("AddArtifactServiceImpl.add"); + log.info("AddArtifactServiceImpl.add"); String url = getServletContext().getInitParameter("server-url"); return CollectionHelper.addArtifact(collection, artifact, url, locale); diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/AdvanceServiceImpl.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/AdvanceServiceImpl.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/AdvanceServiceImpl.java Fri Sep 05 13:19:22 2014 +0200 @@ -37,7 +37,7 @@ extends RemoteServiceServlet implements AdvanceService { - private static final Logger logger = Logger.getLogger(AdvanceService.class); + private static final Logger log = Logger.getLogger(AdvanceService.class); public static final String XPATH_RESULT = "/art:result/text()"; @@ -52,7 +52,7 @@ String target) throws ServerException { - logger.info("AdvanceServiceImpl.advance"); + log.info("AdvanceServiceImpl.advance"); String url = getServletContext().getInitParameter("server-url"); @@ -85,7 +85,7 @@ } } catch (ConnectionException ce) { - logger.error(ce, ce); + log.error(ce, ce); } throw new ServerException(ERROR_ADVANCE_ARTIFACT); diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/ArtifactDescriptionFactory.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/ArtifactDescriptionFactory.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/ArtifactDescriptionFactory.java Fri Sep 05 13:19:22 2014 +0200 @@ -52,7 +52,7 @@ */ public class ArtifactDescriptionFactory { - private static final Logger logger = + private static final Logger log = Logger.getLogger(ArtifactDescriptionFactory.class); @@ -82,7 +82,7 @@ * @return the {@link ArtifactDescription}. */ public static ArtifactDescription createArtifactDescription(Document doc) { - logger.debug("ArtifactDescriptionFactory.createArtifactDescription"); + log.debug("ArtifactDescriptionFactory.createArtifactDescription"); Node currentState = ClientProtocolUtils.getCurrentState(doc); Node staticNode = ClientProtocolUtils.getStaticUI(doc); @@ -96,7 +96,7 @@ XPathConstants.STRING, ArtifactNamespaceContext.INSTANCE); - logger.debug("Current state name: " + state); + log.debug("Current state name: " + state); DataList currentData = extractCurrentData(dynamicNode, state); DataList[] old = extractOldData(staticNode); @@ -126,7 +126,7 @@ * entered. */ protected static DataList extractCurrentData(Node dynamicNode, String state) { - logger.debug("ArtifactDescriptionFactory.extractCurrentData"); + log.debug("ArtifactDescriptionFactory.extractCurrentData"); NodeList data = ClientProtocolUtils.getSelectNode(dynamicNode); String help = extractHelpText(dynamicNode); @@ -147,8 +147,8 @@ String type = XMLUtils.xpathString( d, "@art:type", ArtifactNamespaceContext.INSTANCE); - logger.debug("Create new IntegerRangeData object for: " + name); - logger.debug("New Data is from type: " + type); + log.debug("Create new IntegerRangeData object for: " + name); + log.debug("New Data is from type: " + type); // TODO replace with DataFactory. @@ -183,7 +183,7 @@ } } catch (NumberFormatException nfe) { - logger.warn("NumberFormatException: ", nfe); + log.warn("NumberFormatException: ", nfe); } } else if (type.equals("longrange")) { @@ -206,7 +206,7 @@ } } catch (NumberFormatException nfe) { - logger.warn("NumberFormatException: ", nfe); + log.warn("NumberFormatException: ", nfe); } } else if (type.equals("intarray")) { @@ -231,7 +231,7 @@ list.add(DataFactory.createMultiAttributeData(d, name, label)); } else { - logger.warn("Unrecognized Dynamic data type."); + log.warn("Unrecognized Dynamic data type."); NodeList choices = ClientProtocolUtils.getItemNodes(d); DataItem[] dataItems = extractCurrentDataItems(choices); DataItem def = extractDefaultDataItem(d); @@ -262,7 +262,7 @@ * @return the default DataItem. */ protected static DataItem extractDefaultDataItem(Node data) { - logger.debug("ArtifactDescriptionFactory.extractDefaultDataItem"); + log.debug("ArtifactDescriptionFactory.extractDefaultDataItem"); String value = XMLUtils.xpathString( data, "@art:defaultValue", ArtifactNamespaceContext.INSTANCE); @@ -286,10 +286,10 @@ * @return the {@link DataItem}s. */ protected static DataItem[] extractCurrentDataItems(NodeList items) { - logger.debug("ArtifactDescriptionFactory.extractCurrentDataItems"); + log.debug("ArtifactDescriptionFactory.extractCurrentDataItems"); if (items == null || items.getLength() == 0) { - logger.debug("No data items found."); + log.debug("No data items found."); return null; } @@ -318,10 +318,10 @@ protected static double[] extractMinMaxQValues(Node item) { - logger.debug("ArtifactDescriptionFactory.extractMinMaxQValues"); + log.debug("ArtifactDescriptionFactory.extractMinMaxQValues"); if (item == null) { - logger.debug("This node is empty - no min/max Q values."); + log.debug("This node is empty - no min/max Q values."); return null; } @@ -332,7 +332,7 @@ ArtifactNamespaceContext.INSTANCE); if (node == null) { - logger.debug("No min/max Q values found."); + log.debug("No min/max Q values found."); return null; } @@ -341,10 +341,10 @@ protected static double[] extractMinMaxWValues(Node item) { - logger.debug("ArtifactDescriptionFactory.extractMinMaxWValues"); + log.debug("ArtifactDescriptionFactory.extractMinMaxWValues"); if (item == null) { - logger.debug("This node is empty - no min/max W values."); + log.debug("This node is empty - no min/max W values."); return null; } @@ -355,7 +355,7 @@ ArtifactNamespaceContext.INSTANCE); if (node == null) { - logger.debug("No min/max W values found."); + log.debug("No min/max W values found."); return null; } @@ -364,7 +364,7 @@ protected static double[] extractMinMaxValues(Node node) { - logger.debug("ArtifactDescriptionFactory.extractMinMaxValues"); + log.debug("ArtifactDescriptionFactory.extractMinMaxValues"); String minStr = XMLUtils.xpathString( node, "art:min/text()", ArtifactNamespaceContext.INSTANCE); @@ -373,7 +373,7 @@ node, "art:max/text()", ArtifactNamespaceContext.INSTANCE); if (maxStr == null || minStr == null) { - logger.debug("No min/max values found."); + log.debug("No min/max values found."); return null; } @@ -384,7 +384,7 @@ return new double[] { min, max }; } catch (NumberFormatException nfe) { - logger.debug("Error while parsing min/max values."); + log.debug("Error while parsing min/max values."); } return null; @@ -400,7 +400,7 @@ * @return the DataList objects. */ protected static DataList[] extractOldData(Node staticNode) { - logger.debug("ArtifactDescriptionFactory.extractOldData()"); + log.debug("ArtifactDescriptionFactory.extractOldData()"); NodeList stateNodes = (NodeList) XMLUtils.xpath( staticNode, @@ -409,7 +409,7 @@ ArtifactNamespaceContext.INSTANCE); if (stateNodes == null || stateNodes.getLength() == 0) { - logger.debug("No old items found."); + log.debug("No old items found."); return null; } @@ -494,7 +494,7 @@ * @return an array with identifiers of reachable states. */ protected static String[] extractReachableStates(Node reachable) { - logger.debug("ArtifactDescriptionFactory.extractReachableStates()"); + log.debug("ArtifactDescriptionFactory.extractReachableStates()"); NodeList list = (NodeList) XMLUtils.xpath( reachable, @@ -532,7 +532,7 @@ * @return an array of Output modes. */ protected static OutputMode[] extractOutputModes(NodeList outputs) { - logger.debug("ArtifactDescriptionFactory.extractOutputModes"); + log.debug("ArtifactDescriptionFactory.extractOutputModes"); if (outputs == null || outputs.getLength() == 0) { return null; @@ -556,7 +556,7 @@ outs.add(new DefaultOutputMode(name, desc, mimeType)); } else { - logger.debug("Found an invalid output mode."); + log.debug("Found an invalid output mode."); } } @@ -565,7 +565,7 @@ protected static Recommendation[] extractRecommendedArtifacts(Document doc){ - logger.debug("ArtifactDescriptionFactory.extractRecommendedArtifacts."); + log.debug("ArtifactDescriptionFactory.extractRecommendedArtifacts."); NodeList list = (NodeList) XMLUtils.xpath( doc, @@ -584,7 +584,7 @@ String targetOut = e.getAttribute("target_out"); if (factory != null && factory.length() > 0) { - logger.debug("Adding Recommendation. Factory: " + factory + + log.debug("Adding Recommendation. Factory: " + factory + " IDs: " + index + " target out " + targetOut); rec[i] = new Recommendation(factory, index, null, null, targetOut); } diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/ArtifactHelper.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/ArtifactHelper.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/ArtifactHelper.java Fri Sep 05 13:19:22 2014 +0200 @@ -38,7 +38,7 @@ public class ArtifactHelper { /** Private logging instance. */ - private static final Logger logger = Logger.getLogger(ArtifactHelper.class); + private static final Logger log = Logger.getLogger(ArtifactHelper.class); /** The error message key that is thrown if an error occured while artifact @@ -73,7 +73,7 @@ Recommendation recommendation) throws ServerException { - logger.debug("ArtifactHelper.create"); + log.debug("ArtifactHelper.create"); String uuid; String ids; @@ -189,7 +189,7 @@ return (Artifact) client.create(doc, new FLYSArtifactCreator()); } catch (ConnectionException ce) { - logger.error(ce, ce); + log.error(ce, ce); } throw new ServerException(ERROR_CREATE_ARTIFACT); diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/ArtifactServiceImpl.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/ArtifactServiceImpl.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/ArtifactServiceImpl.java Fri Sep 05 13:19:22 2014 +0200 @@ -29,8 +29,8 @@ extends RemoteServiceServlet implements ArtifactService { - /** Private logger. */ - private static final Logger logger = + /** Private log. */ + private static final Logger log = Logger.getLogger(ArtifactServiceImpl.class); @@ -51,7 +51,7 @@ ) throws ServerException { - logger.info("ArtifactServiceImpl.create"); + log.info("ArtifactServiceImpl.create"); String url = getServletContext().getInitParameter("server-url"); @@ -73,7 +73,7 @@ Long gaugeRef) throws ServerException { - logger.info("ArtifactServiceImpl.createGaugeDischargeCurveView"); + log.info("ArtifactServiceImpl.createGaugeDischargeCurveView"); String url = getServletContext().getInitParameter("server-url"); Artifact artifact = ArtifactHelper.createGaugeDischargeCurveArtifact(url, @@ -81,13 +81,13 @@ if (artifact == null) { return null; } - logger.info("GaugeDischargeCurveArtifact created successfully"); + log.info("GaugeDischargeCurveArtifact created successfully"); CollectionHelper.addArtifact(collection, artifact, url, locale); Artifact mainVArtifact = ArtifactHelper.createMainvalueArtifact(url, locale, river, gaugeRef); if (mainVArtifact == null) { - logger.info("Failed to create MainValueArtifact"); + log.info("Failed to create MainValueArtifact"); return null; } CollectionHelper.addArtifact(collection, mainVArtifact, url, locale); @@ -108,7 +108,7 @@ Long gaugeref) throws ServerException { - logger.info("ArtifactServiceImpl.createGaugeDischargeCurveArtifact"); + log.info("ArtifactServiceImpl.createGaugeDischargeCurveArtifact"); String url = getServletContext().getInitParameter("server-url"); Artifact artifact = ArtifactHelper.createGaugeDischargeCurveArtifact(url, @@ -116,7 +116,7 @@ if (artifact == null) { return null; } - logger.info("GaugeDischargeCurveArtifact created successfully"); + log.info("GaugeDischargeCurveArtifact created successfully"); CollectionHelper.addArtifact(collection, artifact, url, locale); @@ -131,7 +131,7 @@ int measurementStation) throws ServerException { - logger.info("ArtifactServiceImpl.createSQRelationArtifact"); + log.info("ArtifactServiceImpl.createSQRelationArtifact"); String url = getServletContext().getInitParameter("server-url"); Artifact artifact = ArtifactHelper.createSQRelationArtifact(url, @@ -139,7 +139,7 @@ if (artifact == null) { return null; } - logger.info("SQRelationArtifact created successfully"); + log.info("SQRelationArtifact created successfully"); CollectionHelper.addArtifact(collection, artifact, url, locale); diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/AuthenticationServlet.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/AuthenticationServlet.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/AuthenticationServlet.java Fri Sep 05 13:19:22 2014 +0200 @@ -26,7 +26,7 @@ */ public class AuthenticationServlet extends HttpServlet { - private static Logger logger = Logger.getLogger(AuthenticationServlet.class); + private static Logger log = Logger.getLogger(AuthenticationServlet.class); private static final String FLYS_PAGE = "FLYS.html"; private static final String LOGIN_PAGE = "login.jsp"; @@ -61,7 +61,7 @@ @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { - logger.debug("Processing get request"); + log.debug("Processing get request"); this.redirectFailure(resp, req.getContextPath()); } @@ -71,7 +71,7 @@ String url = getServletContext().getInitParameter("server-url"); UserClient client = new UserClient(url); if (!client.userExists(user)) { - logger.debug("Creating db user"); + log.debug("Creating db user"); if (!client.createUser(user)) { this.redirectFailure(resp, req.getContextPath(), "Could not create new user"); diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/BaseServletContextListener.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/BaseServletContextListener.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/BaseServletContextListener.java Fri Sep 05 13:19:22 2014 +0200 @@ -27,7 +27,7 @@ public static final String LOG4J_PROPERTIES = "FLYS_CLIENT_LOG4J_PROPERIES"; - public static final Logger logger = Logger.getLogger(BaseServletContextListener.class); + public static final Logger log = Logger.getLogger(BaseServletContextListener.class); @Override public void contextInitialized(ServletContextEvent sce) { @@ -37,12 +37,12 @@ String filename = sc.getInitParameter("features-file"); - logger.debug("Initializing ServletContext"); + log.debug("Initializing ServletContext"); try { XMLFileFeatures features = new XMLFileFeatures(sc.getRealPath(filename)); sc.setAttribute(Features.CONTEXT_ATTRIBUTE, features); } catch(IOException e) { - logger.error(e); + log.error(e); } } diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/CSVExportServiceImpl.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/CSVExportServiceImpl.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/CSVExportServiceImpl.java Fri Sep 05 13:19:22 2014 +0200 @@ -42,7 +42,7 @@ extends RemoteServiceServlet implements CSVExportService { - private static final Logger logger = + private static final Logger log = Logger.getLogger(CSVExportServiceImpl.class); @@ -55,7 +55,7 @@ String name) throws ServerException { - logger.info("CSVExportServiceImpl.getCSV"); + log.info("CSVExportServiceImpl.getCSV"); String url = getServletContext().getInitParameter("server-url"); @@ -95,7 +95,7 @@ return lines; } catch (IOException ce) { - logger.error(ce.getLocalizedMessage()); + log.error(ce.getLocalizedMessage()); } throw new ServerException(ERROR_NO_EXPORT_FOUND); diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/CapabilitiesParser.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/CapabilitiesParser.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/CapabilitiesParser.java Fri Sep 05 13:19:22 2014 +0200 @@ -37,7 +37,7 @@ */ public class CapabilitiesParser { - private static final Logger logger = + private static final Logger log = Logger.getLogger(CapabilitiesParser.class); @@ -110,7 +110,7 @@ public static void main(String[] args) { - logger.info("Do static Capabilities request/parsing."); + log.info("Do static Capabilities request/parsing."); String log4jProperties = System.getenv(BaseServletContextListener.LOG4J_PROPERTIES); LoggingConfigurator.init(log4jProperties); @@ -122,14 +122,14 @@ } Capabilities caps = getCapabilities(wmsURL); - logger.debug(caps.toString()); + log.debug(caps.toString()); System.out.println(caps.toString()); } catch (ServerException se) { se.printStackTrace(); } - logger.info("Finished fetching capabiltiies."); + log.info("Finished fetching capabiltiies."); } @@ -139,7 +139,7 @@ try { URL url = new URL(urlStr); - logger.debug("Open connection to url: " + urlStr); + log.debug("Open connection to url: " + urlStr); URLConnection conn = url.openConnection(); conn.connect(); @@ -149,11 +149,11 @@ return parse(is); } catch (MalformedURLException mue) { - logger.warn(mue, mue); + log.warn(mue, mue); throw new ServerException(ERR_MALFORMED_URL); } catch (IOException ioe) { - logger.warn(ioe, ioe); + log.warn(ioe, ioe); } throw new ServerException(ERR_GC_REQUEST_FAILED); @@ -163,7 +163,7 @@ protected static Capabilities parse(InputStream is) throws ServerException { - logger.debug("GCServiceImpl.parseCapabilitiesResponse"); + log.debug("GCServiceImpl.parseCapabilitiesResponse"); Document doc = XMLUtils.parseDocument(is, false); @@ -207,8 +207,8 @@ ContactInformation ci = parseContactInformation(contactInformation); - logger.debug("Found fees: " + fees); - logger.debug("Found access constraints: " + accessConstraints); + log.debug("Found fees: " + fees); + log.debug("Found access constraints: " + accessConstraints); NodeList layerNodes = (NodeList) XMLUtils.xpath( capabilities, @@ -249,8 +249,8 @@ XPathConstants.NODE); if (capabilities == null) { - logger.info("No '/WMS_Capabilities' node found."); - logger.info("Try to find a '/WMT_MS_Capabilities' node."); + log.info("No '/WMS_Capabilities' node found."); + log.info("Try to find a '/WMT_MS_Capabilities' node."); capabilities = (Node) XMLUtils.xpath( doc, @@ -327,7 +327,7 @@ ) { int len = layersNode != null ? layersNode.getLength() : 0; - logger.debug("Node has " + len + " layers."); + log.debug("Node has " + len + " layers."); List layers = new ArrayList(len); @@ -350,7 +350,7 @@ "Name/text()", XPathConstants.STRING); - logger.debug("Found layer: " + title + "(" + name + ")"); + log.debug("Found layer: " + title + "(" + name + ")"); boolean queryable = true; Node queryableAttr = layerNode.getAttributes().getNamedItem("queryable"); @@ -378,7 +378,7 @@ srsNodes = ((Element) layerNode).getElementsByTagName("CRS"); if (srsNodes.getLength() == 0) { - logger.debug("No explicit SRS for this layer specified."); + log.debug("No explicit SRS for this layer specified."); return null; } } @@ -430,7 +430,7 @@ Matcher m = SRS_PATTERN.matcher(singleSrs); if (m.matches()) { - logger.debug("Found SRS '" + m.group(1) + "'"); + log.debug("Found SRS '" + m.group(1) + "'"); return m.group(1); } diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/ChartInfoServiceImpl.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/ChartInfoServiceImpl.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/ChartInfoServiceImpl.java Fri Sep 05 13:19:22 2014 +0200 @@ -53,7 +53,7 @@ extends RemoteServiceServlet implements ChartInfoService { - private static final Logger logger = + private static final Logger log = Logger.getLogger(ChartInfoServiceImpl.class); public static final String XPATH_TRANSFORM_MATRIX = @@ -75,7 +75,7 @@ Map attr) throws ServerException { - logger.info("ChartInfoServiceImpl.getChartInfo"); + log.info("ChartInfoServiceImpl.getChartInfo"); String url = getServletContext().getInitParameter("server-url"); @@ -103,7 +103,7 @@ e.printStackTrace(); } - logger.debug("Error while fetching chart info."); + log.debug("Error while fetching chart info."); throw new ServerException(EXCEPTION_STRING); } @@ -123,7 +123,7 @@ protected Axis[] parseXAxes(Document doc) { - logger.debug("ChartInfoServiceImpl.parseXAxes"); + log.debug("ChartInfoServiceImpl.parseXAxes"); NodeList axes = (NodeList) XMLUtils.xpath( doc, @@ -136,7 +136,7 @@ protected Axis[] parseYAxes(Document doc) { - logger.debug("ChartInfoServiceImpl.parseYAxes"); + log.debug("ChartInfoServiceImpl.parseYAxes"); NodeList axes = (NodeList) XMLUtils.xpath( doc, @@ -149,11 +149,11 @@ protected Axis[] parseAxes(NodeList axes) { - logger.debug("ChartInfoServiceImpl.parseAxes"); + log.debug("ChartInfoServiceImpl.parseAxes"); int count = axes != null ? axes.getLength() : 0; - logger.debug("Chart has " + count + " axes."); + log.debug("Chart has " + count + " axes."); if (count == 0) { return null; @@ -178,7 +178,7 @@ if (pos >= result.length) { // this should never happen - logger.debug("The axis is out of valid range: " + pos); + log.debug("The axis is out of valid range: " + pos); continue; } @@ -188,11 +188,11 @@ long min = Long.parseLong(minStr); long max = Long.parseLong(maxStr); - if (logger.isDebugEnabled()) { - logger.debug("date axis from: " + new Date(from)); - logger.debug("date axis to : " + new Date(to)); - logger.debug("date axis min : " + new Date(min)); - logger.debug("date axis max : " + new Date(max)); + if (log.isDebugEnabled()) { + log.debug("date axis from: " + new Date(from)); + log.debug("date axis to : " + new Date(to)); + log.debug("date axis min : " + new Date(min)); + log.debug("date axis max : " + new Date(max)); } result[pos] = new DateAxis(pos, from, to, min, max); @@ -211,7 +211,7 @@ } } - logger.debug("Parsed " + result.length + " axes"); + log.debug("Parsed " + result.length + " axes"); return result; } @@ -226,7 +226,7 @@ * coordinates. */ protected Transform2D[] parseTransformationMatrix(Document doc) { - logger.debug("ChartInfoServiceImpl.parseTransformationMatrix"); + log.debug("ChartInfoServiceImpl.parseTransformationMatrix"); NodeList matrix = (NodeList) XMLUtils.xpath( doc, @@ -242,7 +242,7 @@ Transform2D t = createTransformer((Element) matrix.item(i)); if (t == null) { - logger.warn("Broken transformation matrix at pos: " + i); + log.warn("Broken transformation matrix at pos: " + i); continue; } @@ -268,8 +268,8 @@ if (sx != null && sy != null && tx != null && ty != null) { try { - logger.debug("Create new Transform2D with x format: " + xType); - logger.debug("Create new Transform2D with y format: " + yType); + log.debug("Create new Transform2D with x format: " + xType); + log.debug("Create new Transform2D with y format: " + yType); return new Transform2D( Double.parseDouble(sx), @@ -279,11 +279,11 @@ xType, yType); } catch (NumberFormatException nfe) { - logger.warn("Error while parsing matrix values."); + log.warn("Error while parsing matrix values."); } } - logger.warn("No matrix values found."); + log.warn("No matrix values found."); return new Transform2D(1d, 1d, 0d, 0d); } diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/ChartOutputServiceImpl.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/ChartOutputServiceImpl.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/ChartOutputServiceImpl.java Fri Sep 05 13:19:22 2014 +0200 @@ -39,13 +39,13 @@ public class ChartOutputServiceImpl extends HttpServlet { - private static final Logger logger = + private static final Logger log = Logger.getLogger(ChartOutputServiceImpl.class); /** Handle a get, collectionOut. */ public void doGet(HttpServletRequest req, HttpServletResponse resp) { - logger.info("ChartOutputServiceImpl.doGet"); + log.info("ChartOutputServiceImpl.doGet"); try { OutputStream out = resp.getOutputStream(); @@ -70,10 +70,10 @@ out.flush(); } catch (IOException ioe) { - logger.error(ioe, ioe); + log.error(ioe, ioe); } catch (Exception e) { - logger.error(e, e); + log.error(e, e); } } @@ -92,12 +92,12 @@ attr.put("format", req.getParameter("format")); attr.put("km", req.getParameter("currentKm")); - if (logger.isDebugEnabled()) { - logger.debug("====== ZOOM VALUES ======="); - logger.debug(" min x: " + req.getParameter("minx")); - logger.debug(" max x: " + req.getParameter("maxx")); - logger.debug(" min y: " + req.getParameter("miny")); - logger.debug(" max y: " + req.getParameter("maxy")); + if (log.isDebugEnabled()) { + log.debug("====== ZOOM VALUES ======="); + log.debug(" min x: " + req.getParameter("minx")); + log.debug(" max x: " + req.getParameter("maxx")); + log.debug(" min y: " + req.getParameter("miny")); + log.debug(" max y: " + req.getParameter("maxy")); } return attr; diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/ChartServiceHelper.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/ChartServiceHelper.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/ChartServiceHelper.java Fri Sep 05 13:19:22 2014 +0200 @@ -25,7 +25,7 @@ */ public class ChartServiceHelper { - private static final Logger logger = + private static final Logger log = Logger.getLogger(ChartServiceHelper.class); @@ -49,7 +49,7 @@ * @return a document to adjust chart settings. */ protected static Document getChartAttributes(Map req) { - logger.debug("ChartServiceHelper.getChartAttributes"); + log.debug("ChartServiceHelper.getChartAttributes"); Document doc = XMLUtils.newDocument(); @@ -86,7 +86,7 @@ Element attributes, ElementCreator ec) { - logger.debug("ChartServiceHelper.appendChartSize"); + log.debug("ChartServiceHelper.appendChartSize"); Element size = ec.create("size"); @@ -119,7 +119,7 @@ Element attributes, ElementCreator ec) { - logger.debug("ChartServiceHelper.appendXRange"); + log.debug("ChartServiceHelper.appendXRange"); Element range = ec.create("xrange"); @@ -149,7 +149,7 @@ Element attributes, ElementCreator ec) { - logger.debug("ChartServiceHelper.appendYRange"); + log.debug("ChartServiceHelper.appendYRange"); Element range = ec.create("yrange"); @@ -180,7 +180,7 @@ ElementCreator ec ) { - logger.debug("ChartServiceHelper.appendFormat"); + log.debug("ChartServiceHelper.appendFormat"); String formatStr = req.get("format"); if (formatStr == null || formatStr.length() == 0) { @@ -208,7 +208,7 @@ Element attributes, ElementCreator ec) { - logger.debug("ChartServiceHelper.appendCurrentKm"); + log.debug("ChartServiceHelper.appendCurrentKm"); Element currentKm = ec.create("currentKm"); diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/CollectionAttributeServiceImpl.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/CollectionAttributeServiceImpl.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/CollectionAttributeServiceImpl.java Fri Sep 05 13:19:22 2014 +0200 @@ -32,7 +32,7 @@ extends DescribeCollectionServiceImpl implements CollectionAttributeService { - private static final Logger logger = + private static final Logger log = Logger.getLogger(CollectionAttributeServiceImpl.class); @@ -43,7 +43,7 @@ public Collection update(Collection collection, String locale) throws ServerException { - logger.info("CollectionAttributeServiceImpl.update"); + log.info("CollectionAttributeServiceImpl.update"); String url = getServletContext().getInitParameter("server-url"); @@ -59,12 +59,12 @@ collection.identifier(), new DocumentResponseHandler()); - logger.debug("Collection attribute successfully set."); + log.debug("Collection attribute successfully set."); return describe(collection.identifier(), locale); } catch (ConnectionException ce) { - logger.error(ce, ce); + log.error(ce, ce); } throw new ServerException(ERROR_UPDATING_COLLECTION_ATTRIBUTE); diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/CollectionHelper.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/CollectionHelper.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/CollectionHelper.java Fri Sep 05 13:19:22 2014 +0200 @@ -69,7 +69,7 @@ */ public class CollectionHelper { - private static final Logger logger = + private static final Logger log = Logger.getLogger(CollectionHelper.class); public static final String ERROR_ADD_ARTIFACT = "error_add_artifact"; @@ -83,7 +83,7 @@ public static Document createAttribute(Collection collection) { - logger.debug("CollectionHelper.createAttribute"); + log.debug("CollectionHelper.createAttribute"); Document doc = XMLUtils.newDocument(); @@ -127,14 +127,14 @@ Collection c, Map mmodes) { - logger.debug("CollectionHelper.createOutputElements"); + log.debug("CollectionHelper.createOutputElements"); java.util.Collection modes = mmodes != null ? mmodes.values() : null; if (modes == null || modes.size() == 0) { - logger.debug("Collection has no modes: " + c.identifier()); + log.debug("Collection has no modes: " + c.identifier()); return null; } @@ -166,7 +166,7 @@ Collection collection, OutputMode mode) { - logger.debug("CollectionHelper.createOutputElement"); + log.debug("CollectionHelper.createOutputElement"); Element out = cr.create("output"); cr.addAttr(out, "name", mode.getName(), false); @@ -175,7 +175,7 @@ List themes = themeList != null ? themeList.getThemes() : null; if (themes == null || themes.size() == 0) { - logger.debug("No themes for output mode: " + mode.getName()); + log.debug("No themes for output mode: " + mode.getName()); return null; } @@ -195,7 +195,7 @@ if (settings == null || settings.getCategories().size() == 0) { - logger.debug("No settings for output mode: " + mode.getName()); + log.debug("No settings for output mode: " + mode.getName()); } else { Element s = createSettingsElement(settingscr, collection, settings); @@ -203,7 +203,7 @@ out.appendChild(s); } } - logger.info(XMLUtils.toString(out)); + log.info(XMLUtils.toString(out)); return out; } @@ -262,12 +262,12 @@ ElementCreator cr, Collection c) { - logger.debug("CollectionHelper.createRecommendationsElements"); + log.debug("CollectionHelper.createRecommendationsElements"); List rs = c.getRecommendations(); if (rs == null || rs.size() == 0) { - logger.debug("Collection did not load recommendations: " + + log.debug("Collection did not load recommendations: " + c.identifier()); return null; } @@ -300,7 +300,7 @@ Collection c, Recommendation r) { - logger.debug("CollectionHelper.createRecommendationElement"); + log.debug("CollectionHelper.createRecommendationElement"); Element recommendation = cr.create("recommendation"); cr.addAttr(recommendation, "factory", r.getFactory(), true); @@ -318,7 +318,7 @@ Collection c, Settings s) { - logger.debug("CollectionHelper.createSettingsElement"); + log.debug("CollectionHelper.createSettingsElement"); Element settings = cr.create("settings"); List categories = s.getCategories(); @@ -401,14 +401,14 @@ * @return a Collection with CollectionItems. */ public static Collection parseCollection(Document description) { - logger.debug("CollectionHelper.parseCollection"); + log.debug("CollectionHelper.parseCollection"); - if (logger.isDebugEnabled()) { - logger.debug(XMLUtils.toString(description)); + if (log.isDebugEnabled()) { + log.debug(XMLUtils.toString(description)); } if (description == null) { - logger.warn("The DESCRIBE of the Collection is null!"); + log.warn("The DESCRIBE of the Collection is null!"); return null; } @@ -428,12 +428,12 @@ ArtifactNamespaceContext.INSTANCE); if (uuid.length() == 0) { - logger.warn("Found an invalid (zero length uuid) Collection!"); + log.warn("Found an invalid (zero length uuid) Collection!"); return null; } if (ttlStr.length() == 0) { - logger.warn("Found an invalid Collection (zero length ttl)!"); + log.warn("Found an invalid Collection (zero length ttl)!"); return null; } @@ -461,7 +461,7 @@ ArtifactNamespaceContext.INSTANCE); if (items == null || items.getLength() == 0) { - logger.debug("No collection item found for this collection."); + log.debug("No collection item found for this collection."); return c; } @@ -484,7 +484,7 @@ Map outSettings = parseSettings(description); c.setSettings(outSettings); - logger.debug( + log.debug( "Found " + c.getItemLength() + " collection items " + "for the Collection '" + c.identifier() + "'."); @@ -499,7 +499,7 @@ protected static Map parseThemeLists( Document desc, Map collectionItems ) { - logger.debug("CollectionHelper.parseThemeLists"); + log.debug("CollectionHelper.parseThemeLists"); NodeList lists = (NodeList) XMLUtils.xpath( desc, @@ -538,7 +538,7 @@ protected static ThemeList parseThemeList( Element node, Map collectionItems ) { - logger.debug("CollectionHelper.parseThemeList"); + log.debug("CollectionHelper.parseThemeList"); NodeList themes = node.getElementsByTagNameNS( ArtifactNamespaceContext.NAMESPACE_URI, @@ -562,7 +562,7 @@ protected static Theme parseTheme(Element ele) { - logger.debug("CollectionHelper.parseTheme"); + log.debug("CollectionHelper.parseTheme"); String uri = ArtifactNamespaceContext.NAMESPACE_URI; @@ -593,7 +593,7 @@ * @return Map containing the settings. */ protected static Map parseSettings(Document description) { - logger.info("parseSettings"); + log.info("parseSettings"); NodeList lists = (NodeList) XMLUtils.xpath( description, @@ -733,10 +733,10 @@ Element node, boolean outs ) { - logger.debug("CollectionHelper.parseCollectionItem"); + log.debug("CollectionHelper.parseCollectionItem"); if (node == null) { - logger.debug("The node for parsing CollectionItem is null!"); + log.debug("The node for parsing CollectionItem is null!"); return null; } @@ -746,7 +746,7 @@ String hash = node.getAttributeNS(uri, "hash"); if (uuid == null || uuid.length() == 0) { - logger.warn("Found an invalid CollectionItem!"); + log.warn("Found an invalid CollectionItem!"); return null; } @@ -786,10 +786,10 @@ * @return a list of OutputModes. */ protected static List parseOutputModes(Element node) { - logger.debug("CollectionHelper.parseOutputModes"); + log.debug("CollectionHelper.parseOutputModes"); if (node == null) { - logger.debug("The node for parsing OutputModes is null!"); + log.debug("The node for parsing OutputModes is null!"); return null; } @@ -800,7 +800,7 @@ int size = list.getLength(); if (size == 0) { - logger.debug("No outputmode nodes found!"); + log.debug("No outputmode nodes found!"); return null; } @@ -815,7 +815,7 @@ String type = tmp.getAttributeNS(uri, "type"); if (name.length() == 0) { - logger.warn("Found an invalid output mode."); + log.warn("Found an invalid output mode."); continue; } @@ -838,7 +838,7 @@ outmode = new OverviewMode(name, desc, mime, fs, type); } else { - logger.warn("Broken Output mode without type found."); + log.warn("Broken Output mode without type found."); continue; } @@ -853,10 +853,10 @@ * Create a Key/Value map for data nodes of artifact/collectionitem. */ protected static HashMap parseDataItems(Element node) { - logger.debug("CollectionHelper.parseDataItems"); + log.debug("CollectionHelper.parseDataItems"); if (node == null) { - logger.debug("The node for parsing DataItems is null!"); + log.debug("The node for parsing DataItems is null!"); return null; } @@ -867,7 +867,7 @@ int size = list.getLength(); if (size == 0) { - logger.debug("No static data-item nodes found!"); + log.debug("No static data-item nodes found!"); } HashMap data = new HashMap(size*2); @@ -878,7 +878,7 @@ String key = tmp.getAttributeNS(uri, "name"); if (key.length() == 0) { - logger.warn("Found an invalid data item mode."); + log.warn("Found an invalid data item mode."); continue; } @@ -887,7 +887,7 @@ Element item = (Element) valueNodes.item(0); String value = item.getAttributeNS(uri, "value"); - logger.debug("Found a data item " + key + " : " + value); + log.debug("Found a data item " + key + " : " + value); data.put(key, value); } @@ -899,7 +899,7 @@ size = list.getLength(); if (size == 0) { - logger.debug("No dynamic data-item nodes found!"); + log.debug("No dynamic data-item nodes found!"); } for (int i = 0; i < size; i++) { @@ -908,18 +908,18 @@ String key = tmp.getAttributeNS(uri, "name"); if (key.length() == 0) { - logger.warn("Found an invalid data item node (missing key)."); + log.warn("Found an invalid data item node (missing key)."); continue; } String value = tmp.getAttributeNS(uri, "defaultValue"); if (value.length() == 0) { - logger.warn("Found an invalid data item node (missing value)."); + log.warn("Found an invalid data item node (missing value)."); continue; } - logger.debug("Found a (dyn) data item " + key + " : " + value); + log.debug("Found a (dyn) data item " + key + " : " + value); data.put(key, value); } @@ -928,7 +928,7 @@ } protected static List extractFacets(Element outmode) { - logger.debug("CollectionHelper - extractFacets()"); + log.debug("CollectionHelper - extractFacets()"); NodeList facetList = (NodeList) XMLUtils.xpath( outmode, @@ -959,7 +959,7 @@ public static List parseRecommendations(Document doc) { - logger.debug("CollectionHelper.parseRecommendations"); + log.debug("CollectionHelper.parseRecommendations"); NodeList list = (NodeList) XMLUtils.xpath( doc, @@ -1000,10 +1000,10 @@ String locale) throws ServerException { - logger.debug("CollectionHelper.addArtifact"); + log.debug("CollectionHelper.addArtifact"); if (collection == null) { - logger.warn("The given Collection is null!"); + log.warn("The given Collection is null!"); return null; } @@ -1013,12 +1013,12 @@ HttpClient client = new HttpClientImpl(url, locale); try { - logger.debug("Do HTTP request now."); + log.debug("Do HTTP request now."); Document response = (Document) client.doCollectionAction( add, collection.identifier(), new DocumentResponseHandler()); - logger.debug( + log.debug( "Finished HTTP request successfully. Parse Collection now."); Collection c = CollectionHelper.parseCollection(response); @@ -1030,10 +1030,10 @@ return c; } catch (ConnectionException ce) { - logger.error(ce, ce); + log.error(ce, ce); } catch (Exception e) { - logger.error(e, e); + log.error(e, e); } throw new ServerException(ERROR_ADD_ARTIFACT); @@ -1052,10 +1052,10 @@ String locale) throws ServerException { - logger.debug("CollectionHelper.removeArtifact"); + log.debug("CollectionHelper.removeArtifact"); if (collection == null) { - logger.warn("The given Collection is null!"); + log.warn("The given Collection is null!"); return null; } @@ -1065,14 +1065,14 @@ HttpClient client = new HttpClientImpl(url, locale); try { - logger.debug("Do HTTP request now."); + log.debug("Do HTTP request now."); Document response = (Document) client.doCollectionAction( remove, collection.identifier(), new DocumentResponseHandler()); - logger.debug( + log.debug( "Finished HTTP request successfully. Parse Collection now."); - logger.debug(XMLUtils.toString(response)); + log.debug(XMLUtils.toString(response)); Collection c = CollectionHelper.parseCollection(response); @@ -1083,10 +1083,10 @@ return c; } catch (ConnectionException ce) { - logger.error(ce, ce); + log.error(ce, ce); } catch (Exception e) { - logger.error(e, e); + log.error(e, e); } throw new ServerException(ERROR_REMOVE_ARTIFACT); } diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/CollectionItemAttributeServiceImpl.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/CollectionItemAttributeServiceImpl.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/CollectionItemAttributeServiceImpl.java Fri Sep 05 13:19:22 2014 +0200 @@ -40,7 +40,7 @@ extends RemoteServiceServlet implements CollectionItemAttributeService { - private static final Logger logger = + private static final Logger log = Logger.getLogger(CollectionItemAttributeServiceImpl.class); @@ -58,7 +58,7 @@ String locale) throws ServerException { - logger.info( + log.info( "CollectionItemAttributeServiceImpl.getCollectionItemAttribute"); String url = getServletContext().getInitParameter("server-url"); @@ -91,7 +91,7 @@ return readXML (res, artifact); } catch (ConnectionException ce) { - logger.error(ce, ce); + log.error(ce, ce); } throw new ServerException(ERROR_NO_STYLES_FOUND); @@ -105,7 +105,7 @@ CollectionItemAttribute attributes) throws ServerException { - logger.info( + log.info( "CollectionItemAttributeServiceImpl.setCollectionItemAttribute"); String url = getServletContext().getInitParameter("server-url"); @@ -122,7 +122,7 @@ return; } catch (ConnectionException ce) { - logger.error(ce, ce); + log.error(ce, ce); throw new ServerException(ce.getLocalizedMessage()); } } diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/CreateCollectionServiceImpl.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/CreateCollectionServiceImpl.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/CreateCollectionServiceImpl.java Fri Sep 05 13:19:22 2014 +0200 @@ -39,8 +39,8 @@ extends RemoteServiceServlet implements CreateCollectionService { - /** Private logger. */ - private static final Logger logger = + /** Private log. */ + private static final Logger log = Logger.getLogger(CreateCollectionServiceImpl.class); /** XPath to figure out the uuid of the created collection.*/ @@ -61,7 +61,7 @@ public Collection create(String locale, String ownerId) throws ServerException { - logger.info("Start creating a new collection."); + log.info("Start creating a new collection."); String url = getServletContext().getInitParameter("server-url"); @@ -86,7 +86,7 @@ return new DefaultCollection(uuid, Long.valueOf(ttlStr), uuid); } catch (ConnectionException ce) { - logger.error(ce, ce); + log.error(ce, ce); } throw new ServerException(ERROR_CREATE_COLLECTION); diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/CrossSectionKMServiceImpl.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/CrossSectionKMServiceImpl.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/CrossSectionKMServiceImpl.java Fri Sep 05 13:19:22 2014 +0200 @@ -39,7 +39,7 @@ extends RemoteServiceServlet implements CrossSectionKMService { - private static final Logger logger = + private static final Logger log = Logger.getLogger(CrossSectionKMServiceImpl.class); /** XPath that points to the found cross section measurements. */ @@ -65,7 +65,7 @@ int nNeighbours) throws ServerException { - logger.info("CrossSectionKMService.getCrossSectionKMs"); + log.info("CrossSectionKMService.getCrossSectionKMs"); String url = getServletContext().getInitParameter("server-url"); @@ -88,7 +88,7 @@ } HttpClient client = new HttpClientImpl(url, locale); - logger.debug("Created httpclient"); + log.debug("Created httpclient"); try { // Document should contain: @@ -126,16 +126,16 @@ } } catch(NumberFormatException nfe) { - logger.error("Response was not parsable"); + log.error("Response was not parsable"); } return result; } catch (ConnectionException ce) { - logger.error("ConnectionExsp", ce); + log.error("ConnectionExsp", ce); } - logger.warn("CrossSectionKMService.getCrossSectionKMS() - FAILED"); + log.warn("CrossSectionKMService.getCrossSectionKMS() - FAILED"); throw new ServerException(ERROR_GET_CROSS_SECTION); } } diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/DataFactory.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/DataFactory.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/DataFactory.java Fri Sep 05 13:19:22 2014 +0200 @@ -43,7 +43,7 @@ */ public class DataFactory { - private static final Logger logger = Logger.getLogger(DataFactory.class); + private static final Logger log = Logger.getLogger(DataFactory.class); public static final String NS_URI = ArtifactNamespaceContext.NAMESPACE_URI; @@ -64,7 +64,7 @@ label = label != null && label.length() > 0 ? label : name; try { - logger.debug("Create Data instance for: " + name + " | " + type); + log.debug("Create Data instance for: " + name + " | " + type); if (type == null || type.length() == 0) { return createDefaultData(element, name, label); @@ -104,7 +104,7 @@ } } catch (Exception e) { - logger.error("Error while data creation for: " + name); + log.error("Error while data creation for: " + name); } return null; @@ -127,7 +127,7 @@ NodeList nl = element.getElementsByTagName("meta"); int N = nl.getLength(); if (N < 1) { - logger.debug("No meta data found for multi attribute data"); + log.debug("No meta data found for multi attribute data"); return Collections.>emptyMap(); } Map> map = @@ -156,7 +156,7 @@ ArtifactNamespaceContext.INSTANCE); if (itemList == null || itemList.getLength() == 0) { - logger.debug("No old data items found."); + log.debug("No old data items found."); return null; } @@ -193,7 +193,7 @@ * @return an instance of DefaultData. */ protected static Data createDefaultData(Element ele, String name, String label) { - logger.debug("Create new DefaultData"); + log.debug("Create new DefaultData"); return new DefaultData(name, label, "default", extractDataItems(ele)); } @@ -313,7 +313,7 @@ doubles[i] = Double.valueOf(values[i]); } catch (NumberFormatException nfe) { - logger.warn("Error while parsing DoubleArrayData: " + nfe); + log.warn("Error while parsing DoubleArrayData: " + nfe); } } @@ -336,7 +336,7 @@ ArtifactNamespaceContext.INSTANCE); if (itemList == null || itemList.getLength() == 0) { - logger.debug("No data items found."); + log.debug("No data items found."); return null; } @@ -344,7 +344,7 @@ DataItem[] items = new DataItem[count]; - logger.debug("There are " + count + " data items in element."); + log.debug("There are " + count + " data items in element."); for (int i = 0; i < count; i++) { Element tmp = (Element) itemList.item(i); @@ -352,9 +352,9 @@ String value = tmp.getAttributeNS(NS_URI, "value"); String label = tmp.getAttributeNS(NS_URI, "label"); - logger.debug("Found data item:"); - logger.debug(" label: " + label); - logger.debug(" value: " + value); + log.debug("Found data item:"); + log.debug(" label: " + label); + log.debug(" value: " + value); items[i] = new DefaultDataItem(label, label, value); } @@ -378,7 +378,7 @@ ArtifactNamespaceContext.INSTANCE); if (itemList == null || itemList.getLength() == 0) { - logger.debug("No old data items found."); + log.debug("No old data items found."); return null; } @@ -397,7 +397,7 @@ items[i] = new IntDataItem(label, label, data); } catch(NumberFormatException nfe) { - logger.debug(nfe, nfe); + log.debug(nfe, nfe); } } return items; diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/DeleteCollectionServiceImpl.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/DeleteCollectionServiceImpl.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/DeleteCollectionServiceImpl.java Fri Sep 05 13:19:22 2014 +0200 @@ -26,7 +26,7 @@ extends DoCollectionAction implements DeleteCollectionService { - private static final Logger logger = + private static final Logger log = Logger.getLogger(DeleteCollectionServiceImpl.class); @@ -36,7 +36,7 @@ public void delete(Collection c) throws ServerException { - logger.info("Delete collection: " + c.identifier()); + log.info("Delete collection: " + c.identifier()); String url = getServletContext().getInitParameter("server-url"); diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/DescribeArtifactServiceImpl.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/DescribeArtifactServiceImpl.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/DescribeArtifactServiceImpl.java Fri Sep 05 13:19:22 2014 +0200 @@ -35,7 +35,7 @@ extends RemoteServiceServlet implements DescribeArtifactService { - private static final Logger logger = + private static final Logger log = Logger.getLogger(DescribeArtifactServiceImpl.class); @@ -46,7 +46,7 @@ public Artifact describe(String locale, Artifact artifact) throws ServerException { - logger.info("DescribeArtifactServiceImpl.describe"); + log.info("DescribeArtifactServiceImpl.describe"); String url = getServletContext().getInitParameter("server-url"); @@ -58,7 +58,7 @@ HttpClient client = new HttpClientImpl(url, locale); try { - logger.debug("Start Http request now."); + log.debug("Start Http request now."); Document description = (Document) client.describe( new org.dive4elements.artifacts.httpclient.objects.Artifact( @@ -68,7 +68,7 @@ new DocumentResponseHandler()); if (description != null) { - logger.debug("Finished Http request sucessfully!"); + log.debug("Finished Http request sucessfully!"); return (Artifact) new FLYSArtifactCreator().create(description); } diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/DescribeCollectionServiceImpl.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/DescribeCollectionServiceImpl.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/DescribeCollectionServiceImpl.java Fri Sep 05 13:19:22 2014 +0200 @@ -38,7 +38,7 @@ extends RemoteServiceServlet implements DescribeCollectionService { - private static final Logger logger = + private static final Logger log = Logger.getLogger(DescribeCollectionServiceImpl.class); @@ -51,7 +51,7 @@ public Collection describe(String uuid, String locale) throws ServerException { - logger.info("DescribeCollectionServiceImpl.describe"); + log.info("DescribeCollectionServiceImpl.describe"); String url = getServletContext().getInitParameter("server-url"); @@ -70,12 +70,12 @@ throw new ServerException(ERROR_DESCRIBE_COLLECTION); } - logger.debug("Collection successfully parsed."); + log.debug("Collection successfully parsed."); return c; } catch (ConnectionException ce) { - logger.error(ce, ce); + log.error(ce, ce); } throw new ServerException(ERROR_DESCRIBE_COLLECTION); diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/DischargeInfoServiceImpl.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/DischargeInfoServiceImpl.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/DischargeInfoServiceImpl.java Fri Sep 05 13:19:22 2014 +0200 @@ -39,7 +39,7 @@ extends RemoteServiceServlet implements DischargeInfoService { - private static final Logger logger = + private static final Logger log = Logger.getLogger(DischargeInfoServiceImpl.class); public static final String ERROR_NO_DISCHARGEINFO_FOUND = @@ -55,7 +55,7 @@ String river) throws ServerException { - logger.info("DichargeInfoServiceImpl.getDischargeInfo"); + log.info("DichargeInfoServiceImpl.getDischargeInfo"); String url = getServletContext().getInitParameter("server-url"); @@ -80,7 +80,7 @@ try { Document result = client.callService(url, "dischargeinfo", doc); - logger.debug("Extract discharge info objects now."); + log.debug("Extract discharge info objects now."); DischargeInfoObject[] objects = extractDischargeInfoObjects(result); if (objects != null && objects.length > 0) { @@ -88,7 +88,7 @@ } } catch (ConnectionException ce) { - logger.error(ce, ce); + log.error(ce, ce); } throw new ServerException(ERROR_NO_DISCHARGEINFO_FOUND); @@ -101,12 +101,12 @@ NodeList list = result.getElementsByTagName("discharge"); if (list == null || list.getLength() == 0) { - logger.warn("No discharge info found."); + log.warn("No discharge info found."); throw new ServerException(ERROR_NO_DISCHARGEINFO_FOUND); } int num = list.getLength(); - logger.debug("Response contains " + num + " objects."); + log.debug("Response contains " + num + " objects."); List objects = new ArrayList(num); @@ -120,7 +120,7 @@ } } - logger.debug("Retrieved " + objects.size() + " discharges."); + log.debug("Retrieved " + objects.size() + " discharges."); return (DischargeInfoObject[]) objects.toArray(new DischargeInfoObject[num]); @@ -142,11 +142,11 @@ desc, startYear, endYear, bfgId); } catch (NumberFormatException nfe) { - logger.warn(nfe.getLocalizedMessage()); + log.warn(nfe.getLocalizedMessage()); } } - logger.warn("Invalid distance info object found."); + log.warn("Invalid distance info object found."); return null; } diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/DischargeInfoXML.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/DischargeInfoXML.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/DischargeInfoXML.java Fri Sep 05 13:19:22 2014 +0200 @@ -36,7 +36,7 @@ public class DischargeInfoXML extends HttpServlet { - private static final Logger logger = Logger.getLogger(DischargeInfoXML.class); + private static final Logger log = Logger.getLogger(DischargeInfoXML.class); public static final String ERROR_NO_DISTANCEINFO_FOUND = @@ -44,7 +44,7 @@ public void doGet(HttpServletRequest req, HttpServletResponse resp) { - logger.info("DischargeInfoXML.doGet"); + log.info("DischargeInfoXML.doGet"); String url = getServletContext().getInitParameter("server-url"); @@ -88,10 +88,10 @@ out.close(); } catch (ConnectionException ce) { - logger.error(ce, ce); + log.error(ce, ce); } catch (IOException ioe) { - logger.error(ioe, ioe); + log.error(ioe, ioe); } } } diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/DischargeTablesServiceImpl.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/DischargeTablesServiceImpl.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/DischargeTablesServiceImpl.java Fri Sep 05 13:19:22 2014 +0200 @@ -31,14 +31,14 @@ public class DischargeTablesServiceImpl extends HttpServlet { - private static final Logger logger = Logger + private static final Logger log = Logger .getLogger(DischargeInfoServiceImpl.class); private static final DateFormat DATE_FORMAT = DateFormat.getDateInstance( DateFormat.MEDIUM, Locale.GERMANY); public void doGet(HttpServletRequest req, HttpServletResponse resp) { - logger.info("ChartOutputServiceImpl.doGet"); + log.info("ChartOutputServiceImpl.doGet"); String url = getServletContext().getInitParameter("server-url"); String locale = req.getParameter("locale"); @@ -67,7 +67,7 @@ } } catch (IOException ioe) { - logger.error("Error while fetching discharge tables chart!", ioe); + log.error("Error while fetching discharge tables chart!", ioe); } } @@ -128,7 +128,7 @@ return DATE_FORMAT.format(lower); } catch (NumberFormatException nfe) { - logger.warn("Cannot parse time millies.", nfe); + log.warn("Cannot parse time millies.", nfe); } return null; @@ -143,7 +143,7 @@ return DATE_FORMAT.format(upper); } catch (NumberFormatException nfe) { - logger.warn("Cannot parse time millies.", nfe); + log.warn("Cannot parse time millies.", nfe); } return null; diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/DistanceInfoServiceImpl.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/DistanceInfoServiceImpl.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/DistanceInfoServiceImpl.java Fri Sep 05 13:19:22 2014 +0200 @@ -39,7 +39,7 @@ extends RemoteServiceServlet implements DistanceInfoService { - private static final Logger logger = + private static final Logger log = Logger.getLogger(DistanceInfoServiceImpl.class); public static final String ERROR_NO_DISTANCEINFO_FOUND = @@ -53,7 +53,7 @@ String river) throws ServerException { - logger.info("DistanceInfoServiceImpl.getDistanceInfo"); + log.info("DistanceInfoServiceImpl.getDistanceInfo"); String url = getServletContext().getInitParameter("server-url"); @@ -75,7 +75,7 @@ try { Document result = client.callService(url, "distanceinfo", doc); - logger.debug("Extract distance info objects now."); + log.debug("Extract distance info objects now."); DistanceInfoObject[] objects = extractDistanceInfoObjects(result); if (objects != null && objects.length > 0) { @@ -83,7 +83,7 @@ } } catch (ConnectionException ce) { - logger.error(ce, ce); + log.error(ce, ce); } throw new ServerException(ERROR_NO_DISTANCEINFO_FOUND); @@ -103,12 +103,12 @@ NodeList list = result.getElementsByTagName("distance"); if (list == null || list.getLength() == 0) { - logger.warn("No distance info found."); + log.warn("No distance info found."); throw new ServerException(ERROR_NO_DISTANCEINFO_FOUND); } int num = list.getLength(); - logger.debug("Response contains " + num + " objects."); + log.debug("Response contains " + num + " objects."); List objects = new ArrayList(num); @@ -122,7 +122,7 @@ } } - logger.debug("Retrieved " + objects.size() + " distances."); + log.debug("Retrieved " + objects.size() + " distances."); return (DistanceInfoObject[]) objects.toArray(new DistanceInfoObject[num]); @@ -156,11 +156,11 @@ return new DistanceInfoObjectImpl(desc, f, t, riverside, b, tp); } catch (NumberFormatException nfe) { - logger.warn(nfe.getLocalizedMessage()); + log.warn(nfe.getLocalizedMessage()); } } - logger.warn("Invalid distance info object found."); + log.warn("Invalid distance info object found."); return null; } diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/DistanceInfoXML.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/DistanceInfoXML.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/DistanceInfoXML.java Fri Sep 05 13:19:22 2014 +0200 @@ -36,7 +36,7 @@ public class DistanceInfoXML extends HttpServlet { - private static final Logger logger = Logger.getLogger(DistanceInfoXML.class); + private static final Logger log = Logger.getLogger(DistanceInfoXML.class); public static final String ERROR_NO_DISTANCEINFO_FOUND = @@ -44,7 +44,7 @@ public void doGet(HttpServletRequest req, HttpServletResponse resp) { - logger.info("DistanceInfoXML.doGet"); + log.info("DistanceInfoXML.doGet"); String url = getServletContext().getInitParameter("server-url"); @@ -88,10 +88,10 @@ out.close(); } catch (ConnectionException ce) { - logger.error(ce, ce); + log.error(ce, ce); } catch (IOException ioe) { - logger.error(ioe, ioe); + log.error(ioe, ioe); } } } diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/DoCollectionAction.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/DoCollectionAction.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/DoCollectionAction.java Fri Sep 05 13:19:22 2014 +0200 @@ -31,7 +31,7 @@ */ public class DoCollectionAction extends RemoteServiceServlet { - private static final Logger logger = + private static final Logger log = Logger.getLogger(DoCollectionAction.class); @@ -43,7 +43,7 @@ protected void doAction(Collection c, Document action, String url) throws ServerException { - logger.info("DoCollectionAction.doAction"); + log.info("DoCollectionAction.doAction"); HttpClient client = new HttpClientImpl(url); @@ -58,12 +58,12 @@ ArtifactNamespaceContext.INSTANCE); if (result == null || result.equals(OPERATION_FAILURE)) { - logger.error("Operation failed."); + log.error("Operation failed."); throw new ServerException(FAILURE_EXCEPTION); } } catch (ConnectionException ce) { - logger.error(ce, ce); + log.error(ce, ce); throw new ServerException(FAILURE_EXCEPTION); } } diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/ExportServiceImpl.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/ExportServiceImpl.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/ExportServiceImpl.java Fri Sep 05 13:19:22 2014 +0200 @@ -39,12 +39,12 @@ public class ExportServiceImpl extends HttpServlet { - private static final Logger logger = + private static final Logger log = Logger.getLogger(ExportServiceImpl.class); public void doGet(HttpServletRequest req, HttpServletResponse resp) { - logger.info("ExportServiceImpl.doGet"); + log.info("ExportServiceImpl.doGet"); try { final OutputStream out = resp.getOutputStream(); @@ -61,8 +61,8 @@ resp.setHeader("Content-Disposition", "attachment;filename=" + fn); - if (logger.isDebugEnabled()) { - logger.debug("Request " + type + " export."); + if (log.isDebugEnabled()) { + log.debug("Request " + type + " export."); } Document attr = null; @@ -101,7 +101,7 @@ } } catch (IOException ioe) { - logger.error(ioe, ioe); + log.error(ioe, ioe); } } } diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/FLYSArtifactCreator.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/FLYSArtifactCreator.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/FLYSArtifactCreator.java Fri Sep 05 13:19:22 2014 +0200 @@ -45,7 +45,7 @@ */ public class FLYSArtifactCreator implements ArtifactCreator { - private static final Logger logger = + private static final Logger log = Logger.getLogger(FLYSArtifactCreator.class); @@ -102,7 +102,7 @@ * @return an instance of an {@link Artifact}. */ protected Artifact extractArtifact(Document doc) { - logger.debug("FLYSArtifactCreator - extractArtifact()"); + log.debug("FLYSArtifactCreator - extractArtifact()"); String uuid = XMLUtils.xpathString( doc, XPATH_UUID, ArtifactNamespaceContext.INSTANCE); @@ -123,10 +123,10 @@ List msg = parseBackgroundMessages(doc); - logger.debug("NEW Artifact UUID: " + uuid); - logger.debug("NEW Artifact HASH: " + hash); - logger.debug("NEW Artifact NAME: " + name); - logger.debug("NEW Artifact IN BACKGROUND: " + background); + log.debug("NEW Artifact UUID: " + uuid); + log.debug("NEW Artifact HASH: " + hash); + log.debug("NEW Artifact NAME: " + name); + log.debug("NEW Artifact IN BACKGROUND: " + background); if (name == null) { return new DefaultArtifact(uuid, hash, background, msg); @@ -135,31 +135,31 @@ name = name.trim(); if (name.length() > 0 && name.equals("winfo")) { - logger.debug("+++++ NEW WINFO ARTIFACT."); + log.debug("+++++ NEW WINFO ARTIFACT."); return new WINFOArtifact(uuid, hash, background, msg); } else if (name.length() > 0 && name.equals("new_map")) { - logger.debug("+++++ NEW MAP ARTIFACT."); + log.debug("+++++ NEW MAP ARTIFACT."); return new MapArtifact(uuid, hash, background, msg); } else if (name.length() > 0 && name.equals("new_chart")) { - logger.debug("+++++ NEW CHART ARTIFACT."); + log.debug("+++++ NEW CHART ARTIFACT."); return new ChartArtifact(uuid, hash, background, msg); } else if (name.length() > 0 && name.equals("minfo")) { - logger.debug("+++++ NEW MINFO ARTIFACT."); + log.debug("+++++ NEW MINFO ARTIFACT."); return new MINFOArtifact(uuid, hash, background, msg); } else if (name.length() > 0 && name.equals("fixanalysis")) { - logger.debug("+++++ NEW FIXANALYSIS ARTIFACT."); + log.debug("+++++ NEW FIXANALYSIS ARTIFACT."); return new FixAnalysisArtifact(uuid, hash, background, msg); } else if (name.length() > 0 && name.equals("gaugedischargecurve")) { - logger.debug("+++++ NEW GAUGEDISCHARGECURVE ARTIFACT."); + log.debug("+++++ NEW GAUGEDISCHARGECURVE ARTIFACT."); return new GaugeDischargeCurveArtifact(uuid, hash, background, msg); } else if (name.length() > 0 && name.equals("staticsqrelation")) { - logger.debug("+++++ STATICSQRELATION ARTIFACT."); + log.debug("+++++ STATICSQRELATION ARTIFACT."); return new StaticSQRelationArtifact(uuid, hash, background, msg); } @@ -174,7 +174,7 @@ int len = list != null ? list.getLength() : 0; - logger.debug("Found " + len + " background messages."); + log.debug("Found " + len + " background messages."); List res = new ArrayList(len); diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/FeedServiceImpl.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/FeedServiceImpl.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/FeedServiceImpl.java Fri Sep 05 13:19:22 2014 +0200 @@ -40,7 +40,7 @@ extends RemoteServiceServlet implements FeedService { - private static final Logger logger = Logger.getLogger(FeedServiceImpl.class); + private static final Logger log = Logger.getLogger(FeedServiceImpl.class); /** XPath that points to the result type of a feed or advance operation.*/ @@ -72,7 +72,7 @@ Data[] data) throws ServerException { - logger.info("StepForwardServiceImpl.feed"); + log.info("StepForwardServiceImpl.feed"); String url = getServletContext().getInitParameter("server-url"); @@ -92,7 +92,7 @@ new DocumentResponseHandler()); if (description == null) { - logger.warn("StepForwardService.feed() - FAILED"); + log.warn("StepForwardService.feed() - FAILED"); throw new ServerException(ERROR_FEED_DATA); } @@ -102,7 +102,7 @@ ArtifactNamespaceContext.INSTANCE); if (result == null || !result.equals(OPERATION_FAILURE)) { - logger.debug("StepForwardService.feed() - SUCCESS"); + log.debug("StepForwardService.feed() - SUCCESS"); return (Artifact) new FLYSArtifactCreator().create(description); } else if (result != null && result.equals(OPERATION_FAILURE)) { @@ -114,10 +114,10 @@ } } catch (ConnectionException ce) { - logger.error(ce, ce); + log.error(ce, ce); } - logger.warn("StepForwardService.feed() - FAILED"); + log.warn("StepForwardService.feed() - FAILED"); throw new ServerException(ERROR_FEED_DATA); } @@ -137,14 +137,14 @@ Data[] data) throws ServerException { - logger.info("StepForwardServiceImpl.feedMany"); + log.info("StepForwardServiceImpl.feedMany"); String url = getServletContext().getInitParameter("server-url"); List resultArtifacts = new ArrayList(); for (Artifact artifact: artifacts) { - logger.info("feedMany: Relay to StepForwardServiceImpl.feed"); + log.info("feedMany: Relay to StepForwardServiceImpl.feed"); Artifact fedArtifact = feed(locale, artifact, data); resultArtifacts.add(fedArtifact); } diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/FileUploadServiceImpl.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/FileUploadServiceImpl.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/FileUploadServiceImpl.java Fri Sep 05 13:19:22 2014 +0200 @@ -34,11 +34,11 @@ public class FileUploadServiceImpl extends HttpServlet { - private static final Logger logger = Logger.getLogger(FileUploadServiceImpl.class); + private static final Logger log = Logger.getLogger(FileUploadServiceImpl.class); @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) { - logger.debug("handling post request."); + log.debug("handling post request."); String url = getServletContext().getInitParameter("server-url"); @@ -58,7 +58,7 @@ respWriter.write("
"); if (result == null) { - logger.warn("FileUpload service returned no result."); + log.warn("FileUpload service returned no result."); respWriter.write("FileUpload service returned no result"); } else { @@ -73,10 +73,10 @@ return; } catch (ConnectionException ce) { - logger.error(ce, ce); + log.error(ce, ce); } catch (IOException e) { - logger.error(e, e); + log.error(e, e); } } @@ -102,7 +102,7 @@ buffer = Base64.encodeBase64(out.toByteArray()); String b64File = new String(buffer); - logger.debug("FileUploadServiceImpl.createFileXML(): " + cnt + log.debug("FileUploadServiceImpl.createFileXML(): " + cnt + "/" + b64File.length() + " bytes (orig/base64) file to be uploaded"); @@ -124,8 +124,8 @@ } } catch(Exception e){ - logger.debug("Failed to create xml document containing the file."); - logger.debug(e, e); + log.debug("Failed to create xml document containing the file."); + log.debug(e, e); } return null; } diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/GCServiceImpl.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/GCServiceImpl.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/GCServiceImpl.java Fri Sep 05 13:19:22 2014 +0200 @@ -24,13 +24,13 @@ extends RemoteServiceServlet implements GCService { - private static Logger logger = Logger.getLogger(GCServiceImpl.class); + private static Logger log = Logger.getLogger(GCServiceImpl.class); public Capabilities query(String path) throws ServerException { - logger.info("GCServiceImpl.query"); + log.info("GCServiceImpl.query"); return CapabilitiesParser.getCapabilities(path); } diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/GFIServiceImpl.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/GFIServiceImpl.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/GFIServiceImpl.java Fri Sep 05 13:19:22 2014 +0200 @@ -55,7 +55,7 @@ "error_gfi_parsing_failed"; - private static final Logger logger = + private static final Logger log = Logger.getLogger(GFIServiceImpl.class); @@ -81,12 +81,12 @@ int y ) throws ServerException { - logger.info("GFIServiceImpl.query"); + log.info("GFIServiceImpl.query"); String path = createGetFeautureInfoURL( theme, format, bbox, projection, height, width, x, y); - logger.debug("URL=" + path); + log.debug("URL=" + path); try { URL url = new URL(path); @@ -100,7 +100,7 @@ } catch (IOException ioe) { - logger.warn(ioe, ioe); + log.warn(ioe, ioe); } throw new ServerException(ERR_GFI_REQUEST_FAILED); @@ -169,7 +169,7 @@ protected FeatureInfoResponse parseResponse(InputStream is) { - logger.debug("GFIServiceImpl.parseResponse"); + log.debug("GFIServiceImpl.parseResponse"); ByteArrayOutputStream baos = new ByteArrayOutputStream(); byte [] buf = new byte[1024]; @@ -180,7 +180,7 @@ baos.write(buf, 0, r); } } catch (IOException ex) { - logger.warn("GetFeatureInfo response could not be read: ", ex); + log.warn("GetFeatureInfo response could not be read: ", ex); return new FeatureInfoResponse(); } @@ -204,7 +204,7 @@ protected void parseFeatureInfos(Node node, List features) { - logger.debug("GFIServiceImpl.parseFeatureInfos"); + log.debug("GFIServiceImpl.parseFeatureInfos"); String name = node.getNodeName(); @@ -225,7 +225,7 @@ protected FeatureInfo parseFeature(Node node) { - logger.debug("GFIServiceImpl.parseFeature"); + log.debug("GFIServiceImpl.parseFeature"); String layername = node.getNodeName(); @@ -234,16 +234,16 @@ NodeList children = node.getChildNodes(); int numChildren = children != null ? children.getLength() : 0; - logger.debug("Feature '" + layername + "' has " + numChildren + " nodes."); + log.debug("Feature '" + layername + "' has " + numChildren + " nodes."); for (int i = 0; i < numChildren; i++) { Node tmp = children.item(i); String nodeName = tmp.getNodeName(); - logger.debug(" node name: '" + nodeName + "'"); + log.debug(" node name: '" + nodeName + "'"); if (nodeName.equals("gml:name")) { - logger.debug("NAME node has child: " + tmp.getFirstChild().getNodeValue()); + log.debug("NAME node has child: " + tmp.getFirstChild().getNodeValue()); f.setLayername(tmp.getFirstChild().getNodeValue()); } else if (nodeName.endsWith("_feature")) { @@ -256,18 +256,18 @@ protected void parseFeatureAttributes(Node node, FeatureInfo f) { - logger.debug("GFIServiceImpl.parseFeatureAttributes"); + log.debug("GFIServiceImpl.parseFeatureAttributes"); NodeList children = node.getChildNodes(); int numChildren = children != null ? children.getLength() : 0; - logger.debug("Has " + numChildren + " attributes."); + log.debug("Has " + numChildren + " attributes."); for (int i = 0; i < numChildren; i++) { Node tmp = children.item(i); String name = tmp.getNodeName(); - logger.debug(" tmp attribute name: '" + name + "'"); + log.debug(" tmp attribute name: '" + name + "'"); if (name.equals("gml:boundedBy")) { // TODO diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/GaugeInfoServiceImpl.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/GaugeInfoServiceImpl.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/GaugeInfoServiceImpl.java Fri Sep 05 13:19:22 2014 +0200 @@ -41,7 +41,7 @@ extends RemoteServiceServlet implements GaugeInfoService { - private static final Logger logger = + private static final Logger log = Logger.getLogger(GaugeInfoServiceImpl.class); @@ -54,7 +54,7 @@ public List getGaugeInfo(String rivername, String refnumber) throws ServerException { - logger.info("GaugeInfoServiceImpl.getGaugeInfo"); + log.info("GaugeInfoServiceImpl.getGaugeInfo"); String url = getServletContext().getInitParameter("server-url"); @@ -84,7 +84,7 @@ try { Document result = client.callService(url, "gaugeinfo", doc); - logger.debug("Extract gauge info now."); + log.debug("Extract gauge info now."); List gauges = extractGauges(result); if (gauges != null && gauges.size() > 0) { @@ -92,7 +92,7 @@ } } catch (ConnectionException ce) { - logger.error(ce, ce); + log.error(ce, ce); } throw new ServerException(ERROR_NO_GAUGES_FOUND); @@ -118,13 +118,13 @@ ArtifactNamespaceContext.INSTANCE); if (list == null || list.getLength() == 0) { - logger.warn("No gauges found."); + log.warn("No gauges found."); throw new ServerException(ERROR_NO_GAUGES_FOUND); } int num = list.getLength(); - logger.debug("Response contains " + num + " objects."); + log.debug("Response contains " + num + " objects."); for (int i = 0; i < num; i++) { Gauge obj = buildGauge((Element) list.item(i)); @@ -134,7 +134,7 @@ } } - logger.debug("Retrieved " + gauges.size() + " gauges."); + log.debug("Retrieved " + gauges.size() + " gauges."); return gauges; } @@ -153,7 +153,7 @@ Double.valueOf(upperStr)); } catch (NumberFormatException nfe) { - logger.warn("Error while Gauge creation: " + nfe.getMessage()); + log.warn("Error while Gauge creation: " + nfe.getMessage()); } } diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/GetArtifactServiceImpl.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/GetArtifactServiceImpl.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/GetArtifactServiceImpl.java Fri Sep 05 13:19:22 2014 +0200 @@ -38,7 +38,7 @@ extends RemoteServiceServlet implements GetArtifactService { - private static final Logger logger = + private static final Logger log = Logger.getLogger(GetArtifactServiceImpl.class); @@ -56,7 +56,7 @@ String hash) throws ServerException { - logger.info("GetArtifactServiceImpl.getArtifact"); + log.info("GetArtifactServiceImpl.getArtifact"); String url = getServletContext().getInitParameter("server-url"); @@ -86,7 +86,7 @@ } } catch (ConnectionException ce) { - logger.error(ce, ce); + log.error(ce, ce); } throw new ServerException(ERROR_DESCRIBE_ARTIFACT); diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/LoadArtifactServiceImpl.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/LoadArtifactServiceImpl.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/LoadArtifactServiceImpl.java Fri Sep 05 13:19:22 2014 +0200 @@ -30,7 +30,7 @@ extends ArtifactServiceImpl implements LoadArtifactService { - private static final Logger logger = + private static final Logger log = Logger.getLogger(LoadArtifactServiceImpl.class); /** Error. */ @@ -55,7 +55,7 @@ String locale ) throws ServerException { - logger.info( + log.info( "LoadArtifactServiceImpl.load: " + recom.getMasterArtifact()); String url = getServletContext().getInitParameter("server-url"); @@ -65,12 +65,12 @@ url, locale, factory, recom); if (clone != null) { - logger.debug("Successfully create Artifact Clone. Add now!"); + log.debug("Successfully create Artifact Clone. Add now!"); Collection c = CollectionHelper.addArtifact( parent, clone, url, locale); if (c != null) { - logger.debug("Successfully added Clone to Collection."); + log.debug("Successfully added Clone to Collection."); return clone; } @@ -101,7 +101,7 @@ String locale ) throws ServerException { - logger.debug("LoadArtifactServiceImpl.loadMany"); + log.debug("LoadArtifactServiceImpl.loadMany"); String url = getServletContext().getInitParameter("server-url"); @@ -117,7 +117,7 @@ Artifact prevClone = cloneMap.get(recom); if (prevClone != null) { // Already cloned a recommendation like this. - logger.debug("LoadArtifactServiceImpl: Avoid reclones, " + log.debug("LoadArtifactServiceImpl: Avoid reclones, " + "clone already exists."); artifacts.add(prevClone); } @@ -127,13 +127,13 @@ ? factory : recom.getFactory(); - logger.debug("One will be cloned with : " + realFactory); + log.debug("One will be cloned with : " + realFactory); Artifact clone = ArtifactHelper.createArtifact( url, locale, realFactory, recom); if (clone != null) { - logger.debug("LoadArtifactServiceImple: Successfully " + log.debug("LoadArtifactServiceImple: Successfully " + "loaded Artifact Clone."); Collection c = CollectionHelper.addArtifact( parent, clone, url, locale); diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/LoggingConfigurator.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/LoggingConfigurator.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/LoggingConfigurator.java Fri Sep 05 13:19:22 2014 +0200 @@ -14,7 +14,7 @@ public class LoggingConfigurator { - private static final Logger logger = + private static final Logger log = Logger.getLogger(LoggingConfigurator.class); @@ -24,7 +24,7 @@ public static void init(String log4jProperties) { if (log4jProperties != null && log4jProperties.length() > 0) { PropertyConfigurator.configure(log4jProperties); - logger.info("Log4J logging initialized."); + log.info("Log4J logging initialized."); } else { System.out.println("Error while setting up Log4J configuration."); diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/LoginServlet.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/LoginServlet.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/LoginServlet.java Fri Sep 05 13:19:22 2014 +0200 @@ -24,7 +24,7 @@ public class LoginServlet extends AuthenticationServlet { - private static Logger logger = Logger.getLogger(LoginServlet.class); + private static Logger log = Logger.getLogger(LoginServlet.class); @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) @@ -34,10 +34,10 @@ String username = req.getParameter("username"); String password = req.getParameter("password"); - logger.debug("Processing post request"); + log.debug("Processing post request"); if (username == null || password == null) { - logger.debug("No username or password provided"); + log.debug("No username or password provided"); this.redirectFailure(resp, req.getContextPath()); return; } @@ -45,14 +45,14 @@ try { Authentication aresp = this.auth(username, password, encoding); if (aresp == null || !aresp.isSuccess()) { - logger.debug("Authentication not successful"); + log.debug("Authentication not successful"); this.redirectFailure(resp, req.getContextPath()); return; } this.performLogin(req, resp, aresp.getUser()); } catch(AuthenticationException e) { - logger.error(e, e); + log.error(e, e); this.redirectFailure(resp, req.getContextPath(), e); } } diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/MapHelper.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/MapHelper.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/MapHelper.java Fri Sep 05 13:19:22 2014 +0200 @@ -20,7 +20,7 @@ public class MapHelper { - private static final Logger logger = Logger.getLogger(MapHelper.class); + private static final Logger log = Logger.getLogger(MapHelper.class); public static final String XPATH_SRID = @@ -38,10 +38,10 @@ public static MapConfig parseConfig(Document raw) { - logger.debug("MapHelper.parseConfig"); + log.debug("MapHelper.parseConfig"); - if (logger.isDebugEnabled()) { - logger.debug(XMLUtils.toString(raw)); + if (log.isDebugEnabled()) { + log.debug(XMLUtils.toString(raw)); } MapConfig config = new MapConfig(); @@ -60,10 +60,10 @@ XPATH_SRID, ArtifactNamespaceContext.INSTANCE); - logger.debug("Found srid: '" + srid + "'"); + log.debug("Found srid: '" + srid + "'"); if (srid != null && srid.length() > 0) { - logger.debug("Set srid: '" + srid + "'"); + log.debug("Set srid: '" + srid + "'"); config.setSrid(srid); } } @@ -75,10 +75,10 @@ XPATH_MAX_EXTENT, ArtifactNamespaceContext.INSTANCE); - logger.debug("Found max extent: '" + maxExtent + "'"); + log.debug("Found max extent: '" + maxExtent + "'"); if (maxExtent != null && maxExtent.length() > 0) { - logger.debug("Set max extent: '" + maxExtent + "'"); + log.debug("Set max extent: '" + maxExtent + "'"); config.setMaxExtent(maxExtent); } } @@ -91,7 +91,7 @@ ArtifactNamespaceContext.INSTANCE); if (initialExtent != null && initialExtent.length() > 0) { - logger.debug("Set initial extent: '" + initialExtent + "'"); + log.debug("Set initial extent: '" + initialExtent + "'"); config.setInitialExtent(initialExtent); } } diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/MapInfoServiceImpl.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/MapInfoServiceImpl.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/MapInfoServiceImpl.java Fri Sep 05 13:19:22 2014 +0200 @@ -36,7 +36,7 @@ extends RemoteServiceServlet implements MapInfoService { - private static final Logger logger = + private static final Logger log = Logger.getLogger(MapInfoServiceImpl.class); @@ -69,7 +69,7 @@ public MapInfo getMapInfo(String locale, String river) throws ServerException { - logger.info("MapInfoServiceImpl.getMapInfo"); + log.info("MapInfoServiceImpl.getMapInfo"); String url = getServletContext().getInitParameter("server-url"); @@ -78,18 +78,18 @@ HttpClient client = new HttpClientImpl(url, locale); try { - logger.debug("MapInfoServiceImpl.callService"); + log.debug("MapInfoServiceImpl.callService"); Document result = client.callService(url, "mapinfo", request); if (result == null) { - logger.warn("MapInfo service returned no result."); + log.warn("MapInfo service returned no result."); throw new ServerException(ERROR_NO_MAPINFO_FOUND); } return getMapInfo(result); } catch (ConnectionException ce) { - logger.error(ce, ce); + log.error(ce, ce); } throw new ServerException(ERROR_NO_MAPINFO_FOUND); @@ -97,7 +97,7 @@ public static Document getRequestDocument(String rivername, String maptypeStr) { - logger.debug("MapInfoServiceImpl.getRequestDocument"); + log.debug("MapInfoServiceImpl.getRequestDocument"); Document request = XMLUtils.newDocument(); ElementCreator cr = new ElementCreator(request, null, null); @@ -118,7 +118,7 @@ public static MapInfo getMapInfo(Document result) { - logger.debug("MapInfoServiceImpl.getMapInfo"); + log.debug("MapInfoServiceImpl.getMapInfo"); String river = XMLUtils.xpathString(result, XPATH_RIVER, null); String sridStr = XMLUtils.xpathString(result, XPATH_SRID, null); diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/MapOutputServiceImpl.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/MapOutputServiceImpl.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/MapOutputServiceImpl.java Fri Sep 05 13:19:22 2014 +0200 @@ -38,7 +38,7 @@ implements MapOutputService { - private static final Logger logger = + private static final Logger log = Logger.getLogger(MapOutputServiceImpl.class); @@ -49,7 +49,7 @@ public MapConfig doOut(Collection collection) throws ServerException { - logger.info("MapOutputServiceImpl.doOut"); + log.info("MapOutputServiceImpl.doOut"); String url = getServletContext().getInitParameter("server-url"); String uuid = collection.identifier(); @@ -78,10 +78,10 @@ return MapHelper.parseConfig(response); } catch (ConnectionException e) { - logger.error(e, e); + log.error(e, e); } catch (IOException ioe) { - logger.error(ioe, ioe); + log.error(ioe, ioe); } throw new ServerException(ERROR_NO_MAP_CONFIG); diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/MapUrlServiceImpl.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/MapUrlServiceImpl.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/MapUrlServiceImpl.java Fri Sep 05 13:19:22 2014 +0200 @@ -32,14 +32,14 @@ implements MapUrlService { - private static final Logger logger = + private static final Logger log = Logger.getLogger(MapUrlServiceImpl.class); public Map getUrls() throws ServerException { - logger.info("MapUrlServiceImpl.getUrls"); + log.info("MapUrlServiceImpl.getUrls"); Map urls = new HashMap(); InputStream in = getServletContext().getResourceAsStream("/WEB-INF/wms-services.xml"); diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/MetaDataServiceImpl.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/MetaDataServiceImpl.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/MetaDataServiceImpl.java Fri Sep 05 13:19:22 2014 +0200 @@ -42,8 +42,8 @@ extends RemoteServiceServlet implements MetaDataService, DataCageTree.Visitor { - /** Our very own logger. */ - private static final Logger logger = + /** Our very own log. */ + private static final Logger log = Logger.getLogger(MetaDataServiceImpl.class); public static final String ERROR_NO_META_DATA_FOUND = @@ -72,7 +72,7 @@ String parameters ) throws ServerException { - logger.info("MetaDataService.getMetaData"); + log.info("MetaDataService.getMetaData"); // Create the query document. String url = getServletContext().getInitParameter("server-url"); diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/ModuleServiceImpl.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/ModuleServiceImpl.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/ModuleServiceImpl.java Fri Sep 05 13:19:22 2014 +0200 @@ -33,7 +33,7 @@ extends RemoteServiceServlet implements ModuleService { - private static final Logger logger = + private static final Logger log = Logger.getLogger(ModuleServiceImpl.class); public static final String XPATH_MODULES = "/art:modules/art:module"; @@ -45,7 +45,7 @@ public Module[] list(String locale) throws ServerException { User user = this.getUser(); - logger.info("ModuleService.list"); + log.info("ModuleService.list"); String url = getServletContext().getInitParameter("server-url"); @@ -71,7 +71,7 @@ ArtifactNamespaceContext.INSTANCE); if (list == null) { - logger.warn("No modules found."); + log.warn("No modules found."); throw new ServerException(ERROR_NO_MODULES_FOUND); } @@ -95,7 +95,7 @@ Element re = (Element)rivers.item(j); riverUuids.add(re.getAttribute("uuid")); } - logger.debug("Found module " + name + " " + localname); + log.debug("Found module " + name + " " + localname); if (user == null || user.canUseFeature("module:" + name)) { modules.add(new DefaultModule(name, localname, selected, riverUuids)); } @@ -103,7 +103,7 @@ return modules.toArray(new Module[modules.size()]); } catch (ConnectionException ce) { - logger.error(ce, ce); + log.error(ce, ce); } throw new ServerException(ERROR_NO_MODULES_FOUND); diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/RemoveArtifactServiceImpl.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/RemoveArtifactServiceImpl.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/RemoveArtifactServiceImpl.java Fri Sep 05 13:19:22 2014 +0200 @@ -22,7 +22,7 @@ extends DescribeCollectionServiceImpl implements RemoveArtifactService { - private static final Logger logger = + private static final Logger log = Logger.getLogger(RemoveArtifactServiceImpl.class); @@ -32,7 +32,7 @@ String locale) throws ServerException { - logger.info("RemoveArtifactServiceImpl.remove"); + log.info("RemoveArtifactServiceImpl.remove"); String url = getServletContext().getInitParameter("server-url"); diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/ReportServiceImpl.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/ReportServiceImpl.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/ReportServiceImpl.java Fri Sep 05 13:19:22 2014 +0200 @@ -33,7 +33,7 @@ extends RemoteServiceServlet implements ReportService { - private static final Logger logger = + private static final Logger log = Logger.getLogger(ReportServiceImpl.class); @@ -43,7 +43,7 @@ String locale, String out ) { - logger.info("report: " + collectionId + " " + out); + log.info("report: " + collectionId + " " + out); String url = getServletContext().getInitParameter("server-url"); @@ -58,7 +58,7 @@ in = client.collectionOut(request, collectionId, out); if (in == null) { - logger.debug("report: no report"); + log.debug("report: no report"); return null; } diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/RiverInfoServiceImpl.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/RiverInfoServiceImpl.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/RiverInfoServiceImpl.java Fri Sep 05 13:19:22 2014 +0200 @@ -47,7 +47,7 @@ extends RemoteServiceServlet implements RiverInfoService { - private static final Logger logger = + private static final Logger log = Logger.getLogger(RiverInfoServiceImpl.class); public static final String ERROR_NO_RIVER_INFO_FOUND = @@ -65,7 +65,7 @@ DateFormat.SHORT, Locale.GERMANY); public RiverInfo getGauges(String river) throws ServerException { - logger.info("RiverInfoServiceImpl.getRiverInfo"); + log.info("RiverInfoServiceImpl.getRiverInfo"); String url = getServletContext().getInitParameter("server-url"); @@ -93,20 +93,20 @@ riverinfo.setGauges(gauges); - logger.debug("Finished RiverInfoService.getGauges."); + log.debug("Finished RiverInfoService.getGauges."); return riverinfo; } catch (ConnectionException ce) { - logger.error(ce, ce); + log.error(ce, ce); } - logger.warn("No gauge found"); + log.warn("No gauge found"); throw new ServerException(ERROR_NO_RIVER_INFO_FOUND); } public RiverInfo getMeasurementStations(String river) throws ServerException { - logger.info("RiverInfoServiceImpl.getMeasurementStations"); + log.info("RiverInfoServiceImpl.getMeasurementStations"); String url = getServletContext().getInitParameter("server-url"); @@ -133,15 +133,15 @@ riverinfo.setMeasurementStations(mstations); - logger.debug("Finished MeasurementStationInfoService."); + log.debug("Finished MeasurementStationInfoService."); return riverinfo; } catch (ConnectionException ce) { - logger.error(ce, ce); + log.error(ce, ce); } - logger.warn("No measurement station found"); + log.warn("No measurement station found"); throw new ServerException(ERROR_NO_RIVER_INFO_FOUND); } @@ -156,7 +156,7 @@ return Double.valueOf(value); } catch(NumberFormatException e) { - logger.error(e, e); + log.error(e, e); return null; } } @@ -169,7 +169,7 @@ return Long.valueOf(value); } catch(NumberFormatException e) { - logger.error(e, e); + log.error(e, e); return null; } } @@ -182,7 +182,7 @@ return Integer.valueOf(value); } catch(NumberFormatException e) { - logger.error(e, e); + log.error(e, e); return null; } } @@ -195,7 +195,7 @@ return DATE_FORMAT.parse(value); } catch(ParseException e) { - logger.error(e, e); + log.error(e, e); return null; } } @@ -214,10 +214,10 @@ ArrayList mstations = new ArrayList(num); if (num == 0) { - logger.warn("No measurement station found."); + log.warn("No measurement station found."); } else { - logger.debug("Found " + num + " measurement stations."); + log.debug("Found " + num + " measurement stations."); for (int i = 0; i < num; i++) { Element stationele = (Element)stationnodes.item(i); @@ -252,7 +252,7 @@ } - logger.debug("Found measurement station with name " + mname); + log.debug("Found measurement station with name " + mname); MeasurementStation station = new DefaultMeasurementStation( rivername, @@ -289,10 +289,10 @@ ArrayList gauges = new ArrayList(num); if (num == 0) { - logger.warn("No gauge info found."); + log.warn("No gauge info found."); } else { - logger.debug("Found " + num + " gauges."); + log.debug("Found " + num + " gauges."); for (int i = 0; i < num; i++) { Element gaugeele = (Element)gaugenodes.item(i); @@ -320,7 +320,7 @@ String gofficial = gaugeele.getAttributeNS( ArtifactNamespaceContext.NAMESPACE_URI, "official"); - logger.debug("Found gauge with name " + gname); + log.debug("Found gauge with name " + gname); GaugeInfo gaugeinfo = new DefaultGaugeInfo( rivername, @@ -371,7 +371,7 @@ String rmuuid = riverresp.getAttributeNS( ArtifactNamespaceContext.NAMESPACE_URI, "model-uuid"); - logger.debug("River is " + rname); + log.debug("River is " + rname); boolean kmup = rkmup.equalsIgnoreCase("true"); DefaultRiverInfo riverinfo = new DefaultRiverInfo( diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/RiverServiceImpl.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/RiverServiceImpl.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/RiverServiceImpl.java Fri Sep 05 13:19:22 2014 +0200 @@ -40,8 +40,8 @@ extends RemoteServiceServlet implements RiverService { - /** Private logger. */ - private static final Logger logger = + /** Private log. */ + private static final Logger log = Logger.getLogger(RiverServiceImpl.class); /** The XPath string that points to the rivers in the resulting document.*/ @@ -105,7 +105,7 @@ return theRivers.toArray(new River[theRivers.size()]); } catch (ConnectionException ce) { - logger.error(ce, ce); + log.error(ce, ce); } throw new ServerException(ERROR_NO_RIVERS_FOUND); diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/SamlServlet.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/SamlServlet.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/SamlServlet.java Fri Sep 05 13:19:22 2014 +0200 @@ -30,7 +30,7 @@ public class SamlServlet extends AuthenticationServlet { - private static Logger logger = Logger.getLogger(SamlServlet.class); + private static Logger log = Logger.getLogger(SamlServlet.class); @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) @@ -39,10 +39,10 @@ String encoding = req.getCharacterEncoding(); String samlTicketXML = req.getParameter("saml"); - logger.debug("Processing post request"); + log.debug("Processing post request"); if (samlTicketXML == null) { - logger.debug("No saml ticket provided"); + log.debug("No saml ticket provided"); this.redirectFailure(resp, req.getContextPath()); return; } @@ -50,14 +50,14 @@ try { User user = this.auth(samlTicketXML); if (user == null) { - logger.debug("Authentication not successful"); + log.debug("Authentication not successful"); this.redirectFailure(resp, req.getContextPath()); return; } this.performLogin(req, resp, user); } catch(AuthenticationException e) { - logger.error(e, e); + log.error(e, e); this.redirectFailure(resp, req.getContextPath(), e); } } @@ -78,7 +78,7 @@ assertion = validator.checkTicket(new Base64InputStream(in)); } catch (Exception e) { - logger.error(e.getLocalizedMessage(), e); + log.error(e.getLocalizedMessage(), e); } if (assertion == null) { throw new AuthenticationException("Login failed."); diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/SedimentLoadInfoServiceImpl.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/SedimentLoadInfoServiceImpl.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/SedimentLoadInfoServiceImpl.java Fri Sep 05 13:19:22 2014 +0200 @@ -34,7 +34,7 @@ extends RemoteServiceServlet implements SedimentLoadInfoService { - private static final Logger logger = + private static final Logger log = Logger.getLogger(SedimentLoadInfoServiceImpl.class); public static final String ERROR_NO_SEDIMENTLOADINFO_FOUND = @@ -49,7 +49,7 @@ double endKm) throws ServerException { - logger.info("SedimentLoadInfoServiceImpl.getSedimentLoadInfo"); + log.info("SedimentLoadInfoServiceImpl.getSedimentLoadInfo"); String url = getServletContext().getInitParameter("server-url"); @@ -81,7 +81,7 @@ try { Document result = client.callService(url, "sedimentloadinfo", doc); - logger.debug("Extract sedimentload info objects now."); + log.debug("Extract sedimentload info objects now."); SedimentLoadInfoObject[] objects = extractSedimentLoadInfoObjects(result); @@ -90,7 +90,7 @@ } } catch (ConnectionException ce) { - logger.error(ce, ce); + log.error(ce, ce); } throw new ServerException(ERROR_NO_SEDIMENTLOADINFO_FOUND); @@ -111,12 +111,12 @@ NodeList list = result.getElementsByTagName("sedimentload"); if (list == null || list.getLength() == 0) { - logger.warn("No sedimentload info found."); + log.warn("No sedimentload info found."); throw new ServerException(ERROR_NO_SEDIMENTLOADINFO_FOUND); } int num = list.getLength(); - logger.debug("Response contains " + num + " objects."); + log.debug("Response contains " + num + " objects."); List objects = new ArrayList(num); @@ -130,7 +130,7 @@ } } - logger.debug("Retrieved " + objects.size() + " sediment loads."); + log.debug("Retrieved " + objects.size() + " sediment loads."); return (SedimentLoadInfoObject[]) objects.toArray(new SedimentLoadInfoObject[num]); @@ -154,7 +154,7 @@ return new SedimentLoadInfoObjectImpl(desc, date); } - logger.warn("Invalid sediment load info object found."); + log.warn("Invalid sediment load info object found."); return null; } diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/ServerInfoServiceImpl.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/ServerInfoServiceImpl.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/ServerInfoServiceImpl.java Fri Sep 05 13:19:22 2014 +0200 @@ -21,7 +21,7 @@ // This works only because currently there is only one info transmitted private static final String XPATH_INFO = "/art:server/art:info"; - private final Logger logger = Logger.getLogger(ServerInfoServiceImpl.class); + private final Logger log = Logger.getLogger(ServerInfoServiceImpl.class); @Override public Map getConfig(String locale) { @@ -55,11 +55,11 @@ ArtifactNamespaceContext.NAMESPACE_URI, "value"); infoMap.put(key, val); - logger.debug("ServerInfoServiceImpl: " + key + "=" + val); + log.debug("ServerInfoServiceImpl: " + key + "=" + val); } } catch (Exception ex) { - logger.error(ex, ex); + log.error(ex, ex); } return infoMap; diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/SetCollectionNameServiceImpl.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/SetCollectionNameServiceImpl.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/SetCollectionNameServiceImpl.java Fri Sep 05 13:19:22 2014 +0200 @@ -26,14 +26,14 @@ extends DoCollectionAction implements SetCollectionNameService { - private static final Logger logger = + private static final Logger log = Logger.getLogger(SetCollectionNameServiceImpl.class); public void setName(Collection c) throws ServerException { - logger.info("Set name of collection: " + c.identifier()); + log.info("Set name of collection: " + c.identifier()); String url = getServletContext().getInitParameter("server-url"); diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/SetCollectionTTLServiceImpl.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/SetCollectionTTLServiceImpl.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/SetCollectionTTLServiceImpl.java Fri Sep 05 13:19:22 2014 +0200 @@ -26,7 +26,7 @@ extends DoCollectionAction implements SetCollectionTTLService { - private static final Logger logger = + private static final Logger log = Logger.getLogger(SetCollectionTTLServiceImpl.class); @@ -36,7 +36,7 @@ public void setTTL(Collection c) throws ServerException { - logger.info("Set ttl of collection: " + c.identifier()); + log.info("Set ttl of collection: " + c.identifier()); String url = getServletContext().getInitParameter("server-url"); diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/StepForwardServiceImpl.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/StepForwardServiceImpl.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/StepForwardServiceImpl.java Fri Sep 05 13:19:22 2014 +0200 @@ -39,7 +39,7 @@ extends AdvanceServiceImpl implements StepForwardService { - private static final Logger logger = + private static final Logger log = Logger.getLogger(StepForwardServiceImpl.class); @@ -70,14 +70,14 @@ public Artifact go(String locale, Artifact artifact, Data[] data) throws ServerException { - logger.info("StepForwardServiceImpl.go"); + log.info("StepForwardServiceImpl.go"); String url = getServletContext().getInitParameter("server-url"); Artifact afterFeed = feed(url, locale, artifact, data); if (afterFeed == null) { - logger.warn("StepForwardService.feed() - FAILED"); + log.warn("StepForwardService.feed() - FAILED"); throw new ServerException(ERROR_FEED_DATA); } @@ -85,7 +85,7 @@ String[] reachable = desc.getReachableStates(); if (reachable == null || reachable.length == 0) { - logger.debug("Did not find any reachable state."); + log.debug("Did not find any reachable state."); return afterFeed; } @@ -112,7 +112,7 @@ Data[] data) throws ServerException { - logger.info("StepForwardServiceImpl.feed"); + log.info("StepForwardServiceImpl.feed"); Document feed = ClientProtocolUtils.newFeedDocument( artifact.getUuid(), @@ -130,7 +130,7 @@ new DocumentResponseHandler()); if (description == null) { - logger.warn("StepForwardService.feed() - FAILED"); + log.warn("StepForwardService.feed() - FAILED"); throw new ServerException(ERROR_FEED_DATA); } @@ -140,7 +140,7 @@ ArtifactNamespaceContext.INSTANCE); if (result == null || !result.equals(OPERATION_FAILURE)) { - logger.debug("StepForwardService.feed() - SUCCESS"); + log.debug("StepForwardService.feed() - SUCCESS"); return (Artifact) new FLYSArtifactCreator().create(description); } else if (result != null && result.equals(OPERATION_FAILURE)) { @@ -152,10 +152,10 @@ } } catch (ConnectionException ce) { - logger.error(ce, ce); + log.error(ce, ce); } - logger.warn("StepForwardService.feed() - FAILED"); + log.warn("StepForwardService.feed() - FAILED"); throw new ServerException(ERROR_FEED_DATA); } diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/ThemeListingServiceImpl.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/ThemeListingServiceImpl.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/ThemeListingServiceImpl.java Fri Sep 05 13:19:22 2014 +0200 @@ -43,7 +43,7 @@ extends RemoteServiceServlet implements ThemeListingService { - private static final Logger logger = + private static final Logger log = Logger.getLogger(ThemeListingServiceImpl.class); @@ -106,7 +106,7 @@ return theStyles; } catch (ConnectionException ce) { - logger.error(ce, ce); + log.error(ce, ce); } throw new ServerException(ERROR_NO_GROUPS_FOUND); diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/UserCollectionsServiceImpl.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/UserCollectionsServiceImpl.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/UserCollectionsServiceImpl.java Fri Sep 05 13:19:22 2014 +0200 @@ -46,12 +46,12 @@ extends RemoteServiceServlet implements UserCollectionsService { - private static final Logger logger = Logger.getLogger( + private static final Logger log = Logger.getLogger( UserCollectionsServiceImpl.class); public Collection[] getUserCollections(String locale, String userid) { - logger.info("UserCollectionsServiceImpl.getUserCollections"); + log.info("UserCollectionsServiceImpl.getUserCollections"); String serverUrl = getServletContext().getInitParameter("server-url"); HttpClient client = new HttpClientImpl(serverUrl, locale); @@ -66,7 +66,7 @@ ArtifactNamespaceContext.INSTANCE); if (list == null || list.getLength() == 0) { - logger.debug("No collection found for user: " + userid); + log.debug("No collection found for user: " + userid); return null; } @@ -82,15 +82,15 @@ } } - logger.debug("User has " + all.size() + " collections."); + log.debug("User has " + all.size() + " collections."); return all.toArray(new Collection[all.size()]); } catch (ConnectionException ce) { - logger.error(ce, ce); + log.error(ce, ce); } - logger.debug("No user collections found."); + log.debug("No user collections found."); return null; } @@ -117,12 +117,12 @@ return new DefaultCollection(uuid, ttl, name, new Date(time)); } catch (NumberFormatException nfe) { - logger.warn("Error while parsing collection attributes."); + log.warn("Error while parsing collection attributes."); return null; } } - logger.warn("Found an invalid Collection."); + log.warn("Found an invalid Collection."); return null; } } diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/UserServiceImpl.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/UserServiceImpl.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/UserServiceImpl.java Fri Sep 05 13:19:22 2014 +0200 @@ -31,8 +31,8 @@ extends RemoteServiceServlet implements UserService { - /** Private logger. */ - private static final Logger logger = Logger.getLogger(UserServiceImpl.class); + /** Private log. */ + private static final Logger log = Logger.getLogger(UserServiceImpl.class); public static final String ERROR_NO_SUCH_USER = "error_no_such_user"; @@ -47,7 +47,7 @@ org.dive4elements.river.client.server.auth.User loginuser = getUser(); if (loginuser == null) { - logger.debug("no session user"); + log.debug("no session user"); throw new AuthenticationException(ERROR_NO_SUCH_USER); } @@ -65,10 +65,10 @@ } } catch (ConnectionException ce) { - logger.error(ce, ce); + log.error(ce, ce); } - logger.error("No users existing in the server."); + log.error("No users existing in the server."); throw new AuthenticationException(ERROR_NO_USERS); } diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/WQInfoServiceImpl.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/WQInfoServiceImpl.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/WQInfoServiceImpl.java Fri Sep 05 13:19:22 2014 +0200 @@ -46,7 +46,7 @@ extends RemoteServiceServlet implements WQInfoService { - private static final Logger logger = + private static final Logger log = Logger.getLogger(WQInfoServiceImpl.class); public static final String ERROR_NO_WQINFO_FOUND = @@ -62,7 +62,7 @@ double to) throws ServerException { - logger.info("WQInfoServiceImpl.getWQInfo"); + log.info("WQInfoServiceImpl.getWQInfo"); String url = getServletContext().getInitParameter("server-url"); @@ -93,7 +93,7 @@ try { Document result = client.callService(url, "mainvalues", doc); - logger.debug("Extract wq info objects now."); + log.debug("Extract wq info objects now."); WQInfoObject[] objects = extractWQInfoObjects(result); if (objects.length > 0) { @@ -101,7 +101,7 @@ } } catch (ConnectionException ce) { - logger.error(ce, ce); + log.error(ce, ce); } throw new ServerException(ERROR_NO_WQINFO_FOUND); @@ -125,16 +125,16 @@ ArtifactNamespaceContext.INSTANCE); if (list == null || list.getLength() == 0) { - logger.warn("No wq info found."); + log.warn("No wq info found."); throw new ServerException(ERROR_NO_WQINFO_FOUND); } - boolean debug = logger.isDebugEnabled(); + boolean debug = log.isDebugEnabled(); int num = list.getLength(); if (debug) { - logger.debug("Response contains " + num + " objects."); + log.debug("Response contains " + num + " objects."); } List objects = @@ -149,7 +149,7 @@ } if (debug) { - logger.debug("Retrieved " + objects.size() + " wq values"); + log.debug("Retrieved " + objects.size() + " wq values"); } WQInfoObject [] array = (WQInfoObject[]) @@ -228,11 +228,11 @@ stop); } catch (NumberFormatException nfe) { - logger.warn(nfe.getLocalizedMessage()); + log.warn(nfe.getLocalizedMessage()); } } - logger.warn("Invalid wq info object found."); + log.warn("Invalid wq info object found."); return null; } diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/auth/UserClient.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/auth/UserClient.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/auth/UserClient.java Fri Sep 05 13:19:22 2014 +0200 @@ -30,7 +30,7 @@ */ public class UserClient { - private static final Logger logger = Logger.getLogger(UserClient.class); + private static final Logger log = Logger.getLogger(UserClient.class); private String url; @@ -59,11 +59,11 @@ public boolean createUser(User user) throws ConnectionException { if(user == null) { - logger.warn("createUser: given user is null"); + log.warn("createUser: given user is null"); return false; } - logger.debug("Creating new user " + user.getName()); + log.debug("Creating new user " + user.getName()); HttpClient client = new HttpClientImpl(this.url); Document document = XMLUtils.newDocument(); @@ -89,11 +89,11 @@ action.appendChild(artuser); document.appendChild(action); - logger.debug("Create user request xml: " + XMLUtils.toString(document)); + log.debug("Create user request xml: " + XMLUtils.toString(document)); Document resp = client.createUser(document); - logger.debug("Create user response xml: " + XMLUtils.toString(resp)); + log.debug("Create user response xml: " + XMLUtils.toString(resp)); String XPATH_RESPONSE = "/art:result"; Node nresult = (Node) XMLUtils.xpath( @@ -145,17 +145,17 @@ action.appendChild(account); document.appendChild(action); - boolean debug = logger.isDebugEnabled(); + boolean debug = log.isDebugEnabled(); if (debug) { - logger.debug("Find user request xml: " + + log.debug("Find user request xml: " + XMLUtils.toString(document)); } Document resp = client.findUser(document); if (debug) { - logger.debug("Find user request response xml: " + + log.debug("Find user request response xml: " + XMLUtils.toString(resp)); } diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/auth/saml/Assertion.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/auth/saml/Assertion.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/auth/saml/Assertion.java Fri Sep 05 13:19:22 2014 +0200 @@ -28,7 +28,7 @@ */ public class Assertion { - private static Logger logger = Logger.getLogger(Assertion.class); + private static Logger log = Logger.getLogger(Assertion.class); private Element assertion; private LinkedList roles; @@ -60,17 +60,17 @@ Element conditions = (Element)XPathUtils.xpathNode(this.assertion, "saml:Conditions"); if (conditions == null) { - logger.error("Cannot find Assertion conditions element"); + log.error("Cannot find Assertion conditions element"); return; } this.notbefore = parseDateAttribute(conditions, "NotBefore"); if (this.notbefore == null) { - logger.warn("Could not extract NotBefore date."); + log.warn("Could not extract NotBefore date."); } this.notonorafter = parseDateAttribute(conditions, "NotOnOrAfter"); if (this.notonorafter == null) { - logger.warn("Could not extract NotOnOrAfter date."); + log.warn("Could not extract NotOnOrAfter date."); } } @@ -87,7 +87,7 @@ return toGMT(dateformat.parse(value)); } catch(ParseException e) { - logger.error("Cannot parse Condition attribute " + log.error("Cannot parse Condition attribute " + name + " with value " + value + " (" + e.getLocalizedMessage() + ")"); } @@ -106,7 +106,7 @@ Element attrstatement = (Element)XPathUtils.xpathNode(this.assertion, "saml:AttributeStatement"); if (attrstatement == null) { - logger.error("Cannot find Assertion AttributeStatement element"); + log.error("Cannot find Assertion AttributeStatement element"); return; } diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/auth/saml/TicketValidator.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/auth/saml/TicketValidator.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/auth/saml/TicketValidator.java Fri Sep 05 13:19:22 2014 +0200 @@ -38,9 +38,9 @@ public class TicketValidator { /** - * The logger used by the TicketValidator instances. + * The log used by the TicketValidator instances. */ - private static Logger logger = Logger.getLogger(TicketValidator.class); + private static Logger log = Logger.getLogger(TicketValidator.class); /** * The trusted Key for signature checks. @@ -96,19 +96,19 @@ XMLSignatureFactory factory = XMLSignatureFactory.getInstance("DOM"); XMLSignature signature = factory.unmarshalXMLSignature(context); if (!signature.validate(context)) { - logger.error("Signature of SAML ticket could not be validated."); + log.error("Signature of SAML ticket could not be validated."); return null; } Element assertionElement = extractAssertion(signature, context); if (assertionElement == null) { - logger.error("Could not extract assertion from signed content."); + log.error("Could not extract assertion from signed content."); return null; } Assertion assertion = new Assertion(assertionElement); if (!assertion.isValidNow()) { - logger.error("Ticket is not valid now" + log.error("Ticket is not valid now" + " (NotBefore: " + assertion.getFrom() + ", NotOnOrAfter: " + assertion.getUntil()); return null; diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/auth/was/Request.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/auth/was/Request.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/auth/was/Request.java Fri Sep 05 13:19:22 2014 +0200 @@ -22,7 +22,7 @@ private final static String METHOD_AUTH_PASSWORD = "urn:opengeospatial:authNMethod:OWS:1.0:password"; - private static Logger logger = Logger.getLogger(Request.class); + private static Logger log = Logger.getLogger(Request.class); public Request(String uri) { String request = uri + "?VERSION=" + VERSION + "&REQUEST=" + @@ -43,7 +43,7 @@ this.setURI(URI.create(request)); } catch(UnsupportedEncodingException e) { - logger.error(e); + log.error(e); } } @@ -56,7 +56,7 @@ return new String(Base64.encodeBase64(value.getBytes(encoding))); } catch(UnsupportedEncodingException e) { - logger.warn("Can't encode string with encoding " + encoding + + log.warn("Can't encode string with encoding " + encoding + ". Falling back to utf-8. " + e); return this.toBase64(value, "utf-8"); } diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/auth/was/Response.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/auth/was/Response.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/auth/was/Response.java Fri Sep 05 13:19:22 2014 +0200 @@ -36,7 +36,7 @@ public class Response implements Authentication { - private static Logger logger = Logger.getLogger(Response.class); + private static Logger log = Logger.getLogger(Response.class); private Element root; private String samlTicketXML; @@ -102,7 +102,7 @@ this.assertion = validator.checkTicket(this.root); } catch (Exception e) { - logger.error(e.getLocalizedMessage(), e); + log.error(e.getLocalizedMessage(), e); } } return this.assertion; @@ -116,7 +116,7 @@ } List features = this.features.getFeatures( this.assertion.getRoles()); - logger.debug("User " + this.username + " with features " + features + + log.debug("User " + this.username + " with features " + features + " successfully authenticated."); return new User(assertion, this.samlTicketXML, features, this.password); } diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/features/XMLFileFeatures.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/features/XMLFileFeatures.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/features/XMLFileFeatures.java Fri Sep 05 13:19:22 2014 +0200 @@ -29,7 +29,7 @@ public class XMLFileFeatures implements Features { - private static final Logger logger = + private static final Logger log = Logger.getLogger(XMLFileFeatures.class); private Map> featuremap = @@ -40,7 +40,7 @@ public XMLFileFeatures(String filename) throws IOException { FileInputStream finput = new FileInputStream(filename); - logger.debug("XMLFileFeatures: " + filename); + log.debug("XMLFileFeatures: " + filename); try { Document doc = XMLUtils.parseDocument(finput); @@ -55,7 +55,7 @@ String name = rolenode.getAttribute("name"); - logger.debug("Found role: " + name); + log.debug("Found role: " + name); NodeList features = (NodeList) XMLUtils.xpath( rolenode, @@ -75,14 +75,14 @@ Node featurenode = features.item(j); String featurename = featurenode.getNodeValue(); - logger.debug("Found feature: " + featurename); + log.debug("Found feature: " + featurename); allowed.add(featurename); } featuremap.put(name, allowed); } } - logger.debug("Loaded all features"); + log.debug("Loaded all features"); } finally { finput.close(); diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/filter/GGInAFilter.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/filter/GGInAFilter.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/filter/GGInAFilter.java Fri Sep 05 13:19:22 2014 +0200 @@ -36,8 +36,8 @@ /** ServletFilter used for GGInA authentification and certain authorisation. */ public class GGInAFilter implements Filter { - /** Private logger. */ - private static Logger logger = Logger.getLogger(GGInAFilter.class); + /** Private log. */ + private static Logger log = Logger.getLogger(GGInAFilter.class); private boolean deactivate = false; private String authmethod; @@ -61,7 +61,7 @@ { String deactivate = config.getInitParameter("deactivate"); this.sc = config.getServletContext(); - logger.debug("GGInAFilter context " + this.sc.getContextPath()); + log.debug("GGInAFilter context " + this.sc.getContextPath()); this.authmethod = sc.getInitParameter("authentication"); this.redirecturl = sc.getInitParameter("redirect-url"); if (deactivate != null && deactivate.equalsIgnoreCase("true")) { @@ -82,7 +82,7 @@ throws IOException, ServletException { if (this.deactivate) { - logger.debug("GGinAFilter is deactivated"); + log.debug("GGinAFilter is deactivated"); chain.doFilter(req, resp); return; } @@ -90,19 +90,19 @@ HttpServletRequest sreq = (HttpServletRequest) req; String requesturi = sreq.getRequestURI(); - if (logger.isDebugEnabled()) { + if (log.isDebugEnabled()) { for (Enumeration e = req.getAttributeNames() ; e.hasMoreElements() ;) { - logger.debug(e.nextElement()); + log.debug(e.nextElement()); } } - logger.debug("Request for: " + requesturi); + log.debug("Request for: " + requesturi); // Allow access to localhost if (isLocalAddress(req)) { String noAuth = sreq.getHeader("X_NO_GGINA_AUTH"); if (noAuth != null && noAuth.equals("TRUE")) { - logger.debug("Request to localhost"); + log.debug("Request to localhost"); chain.doFilter(req, resp); return; } @@ -114,7 +114,7 @@ || requesturi.equals(path + LOGIN_SERVLET) || requesturi.equals(path + SAML_SERVLET) || requesturi.equals(path + FLYS_CSS)) { - logger.debug("Request for login " + requesturi); + log.debug("Request for login " + requesturi); chain.doFilter(req, resp); return; } @@ -139,23 +139,23 @@ User user = (User)session.getAttribute("user"); if (user == null) { - logger.debug("No user in session: " + requesturi); + log.debug("No user in session: " + requesturi); this.handleResponse(resp, redirect); return; } if (user.hasExpired()) { // try to re-authenticate the user - logger.debug("User ticket has expired: " + requesturi); + log.debug("User ticket has expired: " + requesturi); String encoding = sreq.getCharacterEncoding(); try { Authentication auth = this.auth(user, encoding); if (auth == null || !auth.isSuccess()) { - logger.debug("Re-athentication not successful"); + log.debug("Re-athentication not successful"); this.handleResponse(resp, redirect); } } catch(AuthenticationException e) { - logger.error("Failure during re-authentication", e); + log.error("Failure during re-authentication", e); this.handleResponse(resp, redirect); return; } @@ -166,13 +166,13 @@ } private void redirect(ServletResponse resp) throws IOException { - logger.debug("Redirect to login"); + log.debug("Redirect to login"); ((HttpServletResponse) resp).sendRedirect(this.sc.getContextPath() + "/login.jsp"); } private void sendNotAuthenticated(ServletResponse resp) throws IOException { - logger.debug("Send not authenticated"); + log.debug("Send not authenticated"); ((HttpServletResponse)resp).sendError(HttpServletResponse.SC_FORBIDDEN, "User not authenticated"); } @@ -211,7 +211,7 @@ InetAddress addr = InetAddress.getByName(req.getRemoteAddr()); return addr.isAnyLocalAddress() || addr.isLoopbackAddress(); } catch (UnknownHostException e) { - logger.error(e, e); + log.error(e, e); return false; } } diff -r e4606eae8ea5 -r 238fc722f87a gwt-client/src/main/java/org/dive4elements/river/client/server/meta/Converter.java --- a/gwt-client/src/main/java/org/dive4elements/river/client/server/meta/Converter.java Fri Sep 05 12:58:17 2014 +0200 +++ b/gwt-client/src/main/java/org/dive4elements/river/client/server/meta/Converter.java Fri Sep 05 13:19:22 2014 +0200 @@ -33,7 +33,7 @@ */ public class Converter { - private static final Logger logger = Logger.getLogger(Converter.class); + private static final Logger log = Logger.getLogger(Converter.class); public interface NodeConverter @@ -89,10 +89,10 @@ public DataCageTree convert(Document document) { - logger.debug("convert called"); + log.debug("convert called"); - if (logger.isDebugEnabled()) { - logger.debug(XMLUtils.toString(document)); + if (log.isDebugEnabled()) { + log.debug(XMLUtils.toString(document)); } ArrayList roots = new ArrayList(); @@ -119,7 +119,7 @@ parent.addChild(convertElement(childele)); if (childele.hasAttribute("description")) - logger.debug("nwd: " + childele.getAttribute("description")); + log.debug("nwd: " + childele.getAttribute("description")); } } // for all children } @@ -127,7 +127,7 @@ private DataCageNode convertElement(Element element) { String name = element.getLocalName(); - logger.debug("search for name: " + name); + log.debug("search for name: " + name); NodeConverter converter = converters.get(name); if (converter == null) {