Now using dependency injection for the XslTransformer instead of
[utils] / crawler / kiss / src / org / wamblee / crawler / kiss / main / ProgramConfigurationParser.java
index c16f4f93df34043fe9fde22297cff6cc81559944..c5fd56023e4fd971f3c7285b888493ad8214d89a 100644 (file)
@@ -33,6 +33,7 @@ import org.wamblee.crawler.kiss.guide.Program;
 import org.wamblee.crawler.kiss.notification.MailNotifier;
 import org.wamblee.crawler.kiss.notification.MailServer;
 import org.wamblee.crawler.kiss.notification.Notifier;
+import org.wamblee.xml.XslTransformer;
 
 /**
  * Parse the configuration of desired programs.
@@ -84,12 +85,15 @@ class ProgramConfigurationParser {
     private static final String ACTION_NOTIFY = "notify";
 
     private List<ProgramFilter> _filters;
+    
+    private XslTransformer _transformer;
 
     private Notifier _notifier;
 
-    ProgramConfigurationParser() {
+    ProgramConfigurationParser(XslTransformer aTransformer) {
         _filters = null;
         _notifier = null;
+        _transformer = aTransformer;
     }
 
     /**
@@ -173,7 +177,7 @@ class ProgramConfigurationParser {
         String htmlXslt = format.elementTextTrim(ELEM_HTML);
         String textXslt = format.elementTextTrim(ELEM_TEXT);
 
-        return new MailNotifier(from, to, subject, htmlXslt, textXslt, server);
+        return new MailNotifier(from, to, subject, htmlXslt, textXslt, server, _transformer);
     }
 
     /**