You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@manifoldcf.apache.org by kw...@apache.org on 2011/08/31 21:04:21 UTC

svn commit: r1163744 - in /incubator/lcf/trunk: CHANGES.txt framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java framework/script-example/file-crawl-example.mcf

Author: kwright
Date: Wed Aug 31 19:04:21 2011
New Revision: 1163744

URL: http://svn.apache.org/viewvc?rev=1163744&view=rev
Log:
Fix for CONNECTORS-245. Fix JSON output for job inspection for API.

Modified:
    incubator/lcf/trunk/CHANGES.txt
    incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java
    incubator/lcf/trunk/framework/script-example/file-crawl-example.mcf

Modified: incubator/lcf/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/CHANGES.txt?rev=1163744&r1=1163743&r2=1163744&view=diff
==============================================================================
--- incubator/lcf/trunk/CHANGES.txt (original)
+++ incubator/lcf/trunk/CHANGES.txt Wed Aug 31 19:04:21 2011
@@ -3,6 +3,10 @@ $Id$
 
 ======================= 0.3-dev =========================
 
+CONNECTORS-245: Fix API bug where schedule JSON was incorrect when fetching
+job description.
+(Karl Wright)
+
 CONNECTORS-229: CMIS connector needs to be documented in "how to build and deploy"
 (Piergiorgio Lucidi)
 

Modified: incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java?rev=1163744&r1=1163743&r2=1163744&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java (original)
+++ incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java Wed Aug 31 19:04:21 2011
@@ -2382,11 +2382,11 @@ public class ManifoldCF extends org.apac
     }
     
     // Schedule records
-    child = new ConfigurationNode(JOBNODE_SCHEDULE);
     j = 0;
     while (j < job.getScheduleRecordCount())
     {
       ScheduleRecord sr = job.getScheduleRecord(j++);
+      child = new ConfigurationNode(JOBNODE_SCHEDULE);
       ConfigurationNode recordChild;
       
       // timezone
@@ -2420,8 +2420,9 @@ public class ManifoldCF extends org.apac
         formatEnumeratedValues(child,JOBNODE_HOUROFDAY,sr.getHourOfDay());
       if (sr.getMinutesOfHour() != null)
         formatEnumeratedValues(child,JOBNODE_MINUTESOFHOUR,sr.getMinutesOfHour());
+      
+      jobNode.addChild(jobNode.getChildCount(),child);
     }
-    jobNode.addChild(jobNode.getChildCount(),child);
   }
 
   protected static void formatEnumeratedValues(ConfigurationNode recordNode, String childType, EnumeratedValues value)

Modified: incubator/lcf/trunk/framework/script-example/file-crawl-example.mcf
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/script-example/file-crawl-example.mcf?rev=1163744&r1=1163743&r2=1163744&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/script-example/file-crawl-example.mcf (original)
+++ incubator/lcf/trunk/framework/script-example/file-crawl-example.mcf Wed Aug 31 19:04:21 2011
@@ -70,7 +70,6 @@ POST result = {
   << "job" : "" :  : 
     << "start_mode" : "manual" :  :  >>,
     << "reseed_interval" : "3600000" :  :  >>,
-    << "schedule" : "" :  :  >>,
     << "recrawl_interval" : "86400000" :  :  >>,
     << "run_mode" : "scan once" :  :  >>,
     << "hopcount_mode" : "never delete" :  :  >>,