Made the track serializable.
[utils] / crawler / basic / src / org / wamblee / crawler / impl / ConfigurationParser.java
index 792d0d34ad0f7ac1281e1c56a0afe24975420a83..7e15d4a3ae90c151a371f98214f48c3a78caf2ca 100644 (file)
@@ -30,6 +30,7 @@ import org.wamblee.crawler.Configuration;
 import org.wamblee.crawler.GetPageRequest;
 import org.wamblee.crawler.PageRequest;
 import org.wamblee.crawler.PostPageRequest;
+import org.wamblee.xml.XslTransformer;
 
 /**
  * Parsing of the configuration from an XML file.
@@ -59,12 +60,14 @@ public class ConfigurationParser {
     private static final int MAX_TRIES = 3;
 
     private static final int MAX_DELAY = 100;
+    
+    private XslTransformer _transformer;
 
     /**
      * Constructs the configuration parser. 
      */
-    public ConfigurationParser() {
-        // Empty
+    public ConfigurationParser(XslTransformer aTransformer) {
+        _transformer = aTransformer; 
     }
 
     /**
@@ -157,10 +160,10 @@ public class ConfigurationParser {
         PageRequest request;
         if (METHOD_POST.equals(method)) {
             request = new PostPageRequest(MAX_TRIES, MAX_DELAY, paramsArray,
-                    xslt);
+                    xslt, _transformer);
         } else if (METHOD_GET.equals(method) || method == null) {
             request = new GetPageRequest(MAX_TRIES, MAX_DELAY, paramsArray,
-                    xslt);
+                    xslt, _transformer);
         } else {
             throw new RuntimeException("Unknown request method '" + method
                     + "'. Only " + METHOD_GET + " and " + METHOD_POST