incubator-connectors-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1026818 - /incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java
Date Sun, 24 Oct 2010 15:14:31 GMT
Author: kwright
Date: Sun Oct 24 15:14:31 2010
New Revision: 1026818

URL: http://svn.apache.org/viewvc?rev=1026818&view=rev
Log:
API job fetch did not properly fill out 'infinite' interval fields

Modified:
    incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java

Modified: incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java?rev=1026818&r1=1026817&r2=1026818&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java
(original)
+++ incubator/lcf/trunk/modules/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java
Sun Oct 24 15:14:31 2010
@@ -2242,29 +2242,18 @@ public class ManifoldCF extends org.apac
     jobNode.addChild(jobNode.getChildCount(),child);
 
     // Recrawl interval
-    if (job.getInterval() != null)
-    {
-      child = new ConfigurationNode(JOBNODE_RECRAWLINTERVAL);
-      child.setValue(job.getInterval().toString());
-      jobNode.addChild(jobNode.getChildCount(),child);
-    }
-    
-    // Expiration interval
-    if (job.getExpiration() != null)
-    {
-      child = new ConfigurationNode(JOBNODE_EXPIRATIONINTERVAL);
-      child.setValue(job.getExpiration().toString());
-      jobNode.addChild(jobNode.getChildCount(),child);
-    }
-    
-    // Reseed interval
-    if (job.getReseedInterval() != null)
-    {
-      child = new ConfigurationNode(JOBNODE_RESEEDINTERVAL);
-      child.setValue(job.getReseedInterval().toString());
-      jobNode.addChild(jobNode.getChildCount(),child);
-    }
-    
+    child = new ConfigurationNode(JOBNODE_RECRAWLINTERVAL);
+    child.setValue((job.getInterval()==null)?"infinite":job.getInterval().toString());
+    jobNode.addChild(jobNode.getChildCount(),child);
+
+    child = new ConfigurationNode(JOBNODE_EXPIRATIONINTERVAL);
+    child.setValue((job.getExpiration()==null)?"infinite":job.getExpiration().toString());
+    jobNode.addChild(jobNode.getChildCount(),child);
+
+    child = new ConfigurationNode(JOBNODE_RESEEDINTERVAL);
+    child.setValue((job.getReseedInterval()==null)?"infinite":job.getReseedInterval().toString());
+    jobNode.addChild(jobNode.getChildCount(),child);
+
     // Hopcount records
     Map filters = job.getHopCountFilters();
     Iterator iter = filters.keySet().iterator();



Mime
View raw message