diff artifacts/src/main/java/org/dive4elements/river/themes/ThemeFactory.java @ 5866:9a6741ccf6d4

FLYS artifacts: Renamed FLYSContext(Factory) to RiverContext(Factory).
author Sascha L. Teichmann <teichmann@intevation.de>
date Sun, 28 Apr 2013 15:14:30 +0200
parents 4897a58c8746
children 59ff03ff48f1
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/themes/ThemeFactory.java	Sun Apr 28 15:09:31 2013 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/themes/ThemeFactory.java	Sun Apr 28 15:14:30 2013 +0200
@@ -10,7 +10,7 @@
 
 import org.dive4elements.artifacts.common.utils.XMLUtils;
 import org.dive4elements.river.artifacts.FLYSArtifact;
-import org.dive4elements.river.artifacts.context.FLYSContext;
+import org.dive4elements.river.artifacts.context.RiverContext;
 
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -76,7 +76,7 @@
      * @return First matching theme.
      */
     public static Theme getTheme(
-        FLYSContext c,
+        RiverContext c,
         String name,
         String pattern,
         String output,
@@ -95,11 +95,11 @@
         // Fetch mapping and themes.
         @SuppressWarnings("unchecked")
         Map<String, List<ThemeMapping>> map = (Map<String, List<ThemeMapping>>)
-            c.get(FLYSContext.THEME_MAPPING);
+            c.get(RiverContext.THEME_MAPPING);
 
         @SuppressWarnings("unchecked")
         List<ThemeGroup> tgs = (List<ThemeGroup>)
-            c.get(FLYSContext.THEMES);
+            c.get(RiverContext.THEMES);
 
         ThemeGroup group = null;
         for (ThemeGroup tg: tgs) {
@@ -116,7 +116,7 @@
 
         Map<String, Theme> t = group.getThemes();
 
-        FLYSArtifact artifact = (FLYSArtifact) c.get(FLYSContext.ARTIFACT_KEY);
+        FLYSArtifact artifact = (FLYSArtifact) c.get(RiverContext.ARTIFACT_KEY);
 
         if (map == null || map.isEmpty() || t == null || t.isEmpty()) {
             logger.warn("No mappings or themes found. Cannot retrieve theme!");
@@ -155,17 +155,17 @@
 
 
     @SuppressWarnings("unchecked")
-    public static List<ThemeGroup> getThemeGroups(FLYSContext c) {
+    public static List<ThemeGroup> getThemeGroups(RiverContext c) {
         List<ThemeGroup> tgs = (List<ThemeGroup>)
-            c.get(FLYSContext.THEMES);
+            c.get(RiverContext.THEMES);
         return tgs;
     }
 
 
     @SuppressWarnings("unchecked")
-    public static List<Theme> getThemes (FLYSContext c, String name) {
+    public static List<Theme> getThemes (RiverContext c, String name) {
         List<ThemeGroup> tgs = (List<ThemeGroup>)
-            c.get(FLYSContext.THEMES);
+            c.get(RiverContext.THEMES);
         if (tgs == null) {
             return null;
         }

http://dive4elements.wald.intevation.org