Mercurial > dive4elements > river
diff artifacts/src/main/java/org/dive4elements/river/themes/ThemeFactory.java @ 8202:e4606eae8ea5
sed src/**/*.java 's/logger/log/g'
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Fri, 05 Sep 2014 12:58:17 +0200 |
parents | af13ceeba52a |
children | f0ea2063b58e |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/themes/ThemeFactory.java Fri Sep 05 12:54:58 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/themes/ThemeFactory.java Fri Sep 05 12:58:17 2014 +0200 @@ -34,7 +34,7 @@ */ public class ThemeFactory { - private static Logger logger = Logger.getLogger(ThemeFactory.class); + private static Logger log = Logger.getLogger(ThemeFactory.class); /** Trivial, hidden constructor. */ private ThemeFactory() { @@ -54,7 +54,7 @@ String name = getName(config); String desc = getDescription(config); - logger.debug("Create new theme: " + name); + log.debug("Create new theme: " + name); Theme theme = new DefaultTheme(name, desc); @@ -82,13 +82,13 @@ String output, String groupName) { - if (logger.isDebugEnabled()) { - logger.debug( + if (log.isDebugEnabled()) { + log.debug( "Search theme for: " + name + " - pattern: " + pattern); } if (c == null || name == null) { - logger.warn("Cannot search for theme."); + log.warn("Cannot search for theme."); return null; } @@ -110,7 +110,7 @@ } if (group == null) { - logger.warn("No theme group found: '" + groupName + "'"); + log.warn("No theme group found: '" + groupName + "'"); return null; } @@ -119,14 +119,14 @@ D4EArtifact artifact = (D4EArtifact) c.get(RiverContext.ARTIFACT_KEY); if (map == null || map.isEmpty() || t == null || t.isEmpty()) { - logger.warn("No mappings or themes found. Cannot retrieve theme!"); + log.warn("No mappings or themes found. Cannot retrieve theme!"); return null; } List<ThemeMapping> mapping = map.get(name); if (mapping == null) { - logger.warn("No theme found for mapping: " + name); + log.warn("No theme found for mapping: " + name); return null; } @@ -139,7 +139,7 @@ { String target = tm.getTo(); - logger.debug("Found theme '" + target + "'"); + log.debug("Found theme '" + target + "'"); return t.get(target); } } @@ -148,7 +148,7 @@ "No theme found for '" + name + "' with pattern '" + pattern + "' and output " + output + "."; - logger.warn(msg); + log.warn(msg); return null; } @@ -197,18 +197,18 @@ Theme t, Map<String, Node> themes ) { - logger.debug("ThemeFactory.parseInherits"); + log.debug("ThemeFactory.parseInherits"); NodeList inherits = ((Element)cfg).getElementsByTagName("inherit"); int num = inherits.getLength(); if (num == 0) { - logger.debug("Theme does not inherit from other themes."); + log.debug("Theme does not inherit from other themes."); return; } - logger.debug("Theme inherits from " + num + " other themes."); + log.debug("Theme inherits from " + num + " other themes."); if (themes == null) { themes = buildThemeMap(themeCfg); @@ -245,7 +245,7 @@ protected static void parseFields(Node config, Theme theme) { if (config == null || theme == null) { - logger.warn("Parsing fields without node or theme is senseless!"); + log.warn("Parsing fields without node or theme is senseless!"); return; } @@ -253,10 +253,10 @@ int num = fields.getLength(); - logger.debug("Found " + num + " own fields in this theme."); + log.debug("Found " + num + " own fields in this theme."); if (num == 0) { - logger.debug("Theme has no own fields."); + log.debug("Theme has no own fields."); return; } @@ -271,14 +271,14 @@ protected static void addField(Theme theme, Node field) { String name = ((Element)field).getAttribute("name"); - logger.debug("Add field " + name + " to theme " + theme.getName()); + log.debug("Add field " + name + " to theme " + theme.getName()); NamedNodeMap attrs = field.getAttributes(); int num = attrs != null ? attrs.getLength() : 0; if (num == 0) { - logger.warn("This field has no attributes."); + log.warn("This field has no attributes."); return; } @@ -303,7 +303,7 @@ int num = attrs != null ? attrs.getLength() : 0; if (num == 0) { - logger.debug("Theme has no attributes set."); + log.debug("Theme has no attributes set."); return; }