manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1607170 - in /manifoldcf/trunk/framework: core/src/main/java/org/apache/manifoldcf/core/interfaces/ crawler-ui/src/main/webapp/ pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/ pull-agent/src/main/java/org/apache/manifold...
Date Tue, 01 Jul 2014 19:20:50 GMT
Author: kwright
Date: Tue Jul  1 19:20:49 2014
New Revision: 1607170

URL: http://svn.apache.org/r1607170
Log:
Remove OutputSpecification from more interfaces

Modified:
    manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/Specification.java
    manifoldcf/trunk/framework/crawler-ui/src/main/webapp/editjob.jsp
    manifoldcf/trunk/framework/crawler-ui/src/main/webapp/viewjob.jsp
    manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/IJobDescription.java
    manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobDescription.java
    manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/PipelineManager.java
    manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java

Modified: manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/Specification.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/Specification.java?rev=1607170&r1=1607169&r2=1607170&view=diff
==============================================================================
--- manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/Specification.java
(original)
+++ manifoldcf/trunk/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/Specification.java
Tue Jul  1 19:20:49 2014
@@ -68,4 +68,22 @@ public class Specification extends Confi
     return (SpecificationNode)findChild(index);
   }
 
+  /** Duplicate.
+  *@return an exact duplicate
+  */
+  public Specification duplicate(boolean readOnly)
+  {
+    if (readOnly && this.readOnly)
+      return this;
+    Specification rval = new Specification();
+    int i = 0;
+    while (i < children.size())
+    {
+      SpecificationNode node = (SpecificationNode)children.get(i++);
+      rval.children.add(node.duplicate(readOnly));
+    }
+    rval.readOnly = readOnly;
+    return rval;
+  }
+
 }

Modified: manifoldcf/trunk/framework/crawler-ui/src/main/webapp/editjob.jsp
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/crawler-ui/src/main/webapp/editjob.jsp?rev=1607170&r1=1607169&r2=1607170&view=diff
==============================================================================
--- manifoldcf/trunk/framework/crawler-ui/src/main/webapp/editjob.jsp (original)
+++ manifoldcf/trunk/framework/crawler-ui/src/main/webapp/editjob.jsp Tue Jul  1 19:20:49
2014
@@ -87,7 +87,7 @@
 	String[] pipelineDescriptions = new String[0];
 	boolean[] pipelineIsOutputs = new boolean[0];
 	int[] pipelinePrerequisites = new int[0];
-	OutputSpecification[] pipelineSpecifications = new OutputSpecification[0];
+	Specification[] pipelineSpecifications = new Specification[0];
 	
 	ArrayList scheduleRecords = new ArrayList();
 
@@ -132,7 +132,7 @@
 		pipelineDescriptions = new String[job.countPipelineStages()];
 		pipelineIsOutputs = new boolean[job.countPipelineStages()];
 		pipelinePrerequisites = new int[job.countPipelineStages()];
-		pipelineSpecifications = new OutputSpecification[job.countPipelineStages()];
+		pipelineSpecifications = new Specification[job.countPipelineStages()];
 		for (int j = 0; j < job.countPipelineStages(); j++)
 		{
 			pipelineConnectionNames[j] = job.getPipelineStageConnectionName(j);

Modified: manifoldcf/trunk/framework/crawler-ui/src/main/webapp/viewjob.jsp
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/crawler-ui/src/main/webapp/viewjob.jsp?rev=1607170&r1=1607169&r2=1607170&view=diff
==============================================================================
--- manifoldcf/trunk/framework/crawler-ui/src/main/webapp/viewjob.jsp (original)
+++ manifoldcf/trunk/framework/crawler-ui/src/main/webapp/viewjob.jsp Tue Jul  1 19:20:49
2014
@@ -719,7 +719,7 @@
 			<tr>
 				<td colspan="4">
 <%
-			OutputSpecification os = job.getPipelineStageSpecification(j);
+			Specification os = job.getPipelineStageSpecification(j);
 			if (job.getPipelineStageIsOutputConnection(j))
 			{
 				IOutputConnection thisConnection = outputManager.load(job.getPipelineStageConnectionName(j));

Modified: manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/IJobDescription.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/IJobDescription.java?rev=1607170&r1=1607169&r2=1607170&view=diff
==============================================================================
--- manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/IJobDescription.java
(original)
+++ manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/interfaces/IJobDescription.java
Tue Jul  1 19:20:49 2014
@@ -92,7 +92,7 @@ public interface IJobDescription
   *@param pipelineStageDescription is a description of the pipeline stage being added.
   *@return the empty output specification for this pipeline stage.
   */
-  public OutputSpecification addPipelineStage(int prerequisiteStage, boolean isOutput, String
pipelineStageConnectionName, String pipelineStageDescription);
+  public Specification addPipelineStage(int prerequisiteStage, boolean isOutput, String pipelineStageConnectionName,
String pipelineStageDescription);
   
   /** Get a count of pipeline connections.
   *@return the current number of pipeline connections.
@@ -127,7 +127,7 @@ public interface IJobDescription
   *@param index is the index of the pipeline stage whose specification is needed.
   *@return the specification for the connection.
   */
-  public OutputSpecification getPipelineStageSpecification(int index);
+  public Specification getPipelineStageSpecification(int index);
 
   /** Delete a pipeline stage.
   *@param index is the index of the pipeline stage to delete.
@@ -140,7 +140,7 @@ public interface IJobDescription
   *@param pipelineStageDescription is the description.
   *@return the newly-created output specification.
   */
-  public OutputSpecification insertPipelineStage(int index, boolean isOutput, String pipelineStageConnectionName,
String pipelineStageDescription);
+  public Specification insertPipelineStage(int index, boolean isOutput, String pipelineStageConnectionName,
String pipelineStageDescription);
   
   /** Set the job type.
   *@param type is the type (as an integer).

Modified: manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobDescription.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobDescription.java?rev=1607170&r1=1607169&r2=1607170&view=diff
==============================================================================
--- manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobDescription.java
(original)
+++ manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobDescription.java
Tue Jul  1 19:20:49 2014
@@ -101,7 +101,7 @@ public class JobDescription implements I
         pipelineStage.getIsOutput(),
         pipelineStage.getConnectionName(),
         pipelineStage.getDescription(),
-        pipelineStage.getSpecification().duplicate(readOnly)));
+        ((OutputSpecification)pipelineStage.getSpecification()).duplicate(readOnly)));
     }
     rval.description = description;
     rval.type = type;
@@ -244,7 +244,7 @@ public class JobDescription implements I
   *@return the empty output specification for this pipeline stage.
   */
   @Override
-  public OutputSpecification addPipelineStage(int prerequisiteStage, boolean isOutput, String
pipelineStageConnectionName, String pipelineStageDescription)
+  public Specification addPipelineStage(int prerequisiteStage, boolean isOutput, String pipelineStageConnectionName,
String pipelineStageDescription)
   {
     if (readOnly)
       throw new IllegalStateException("Attempt to change read-only object");
@@ -267,7 +267,7 @@ public class JobDescription implements I
   *@return the newly-created output specification.
   */
   @Override
-  public OutputSpecification insertPipelineStage(int index, boolean isOutput, String pipelineStageConnectionName,
String pipelineStageDescription)
+  public Specification insertPipelineStage(int index, boolean isOutput, String pipelineStageConnectionName,
String pipelineStageDescription)
   {
     if (readOnly)
       throw new IllegalStateException("Attempt to change read-only object");
@@ -333,7 +333,7 @@ public class JobDescription implements I
   *@return the specification for the connection.
   */
   @Override
-  public OutputSpecification getPipelineStageSpecification(int index)
+  public Specification getPipelineStageSpecification(int index)
   {
     return pipelineStages.get(index).getSpecification();
   }
@@ -652,7 +652,7 @@ public class JobDescription implements I
     protected final boolean isOutput;
     protected final String connectionName;
     protected final String description;
-    protected final OutputSpecification specification;
+    protected final Specification specification;
     
     public PipelineStage(int prerequisiteStage, boolean isOutput, String connectionName,
String description)
     {
@@ -663,7 +663,7 @@ public class JobDescription implements I
       this.specification = new OutputSpecification();
     }
 
-    public PipelineStage(int prerequisiteStage, boolean isOutput, String connectionName,
String description, OutputSpecification spec)
+    public PipelineStage(int prerequisiteStage, boolean isOutput, String connectionName,
String description, Specification spec)
     {
       this.prerequisiteStage = prerequisiteStage;
       this.isOutput = isOutput;
@@ -696,7 +696,7 @@ public class JobDescription implements I
         prerequisiteStage = prerequisite;
     }
     
-    public OutputSpecification getSpecification()
+    public Specification getSpecification()
     {
       return specification;
     }

Modified: manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/PipelineManager.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/PipelineManager.java?rev=1607170&r1=1607169&r2=1607170&view=diff
==============================================================================
--- manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/PipelineManager.java
(original)
+++ manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/PipelineManager.java
Tue Jul  1 19:20:49 2014
@@ -317,7 +317,7 @@ public class PipelineManager extends org
         int prerequisite = job.getPipelineStagePrerequisite(i);
         String pipelineConnectionName = job.getPipelineStageConnectionName(i);
         String pipelineStageDescription = job.getPipelineStageDescription(i);
-        OutputSpecification os = job.getPipelineStageSpecification(i);
+        Specification os = job.getPipelineStageSpecification(i);
         map.clear();
         map.put(ownerIDField,ownerID);
         map.put(ordinalField,new Long((long)i));

Modified: manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java?rev=1607170&r1=1607169&r2=1607170&view=diff
==============================================================================
--- manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java
(original)
+++ manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java
Tue Jul  1 19:20:49 2014
@@ -4119,7 +4119,7 @@ public class ManifoldCF extends org.apac
       PipelineStage ps = pipelineStages.get(stageName);
       ps.ordinal = k++;
       int prerequisite = (ps.prerequisite == null)?-1:pipelineStages.get(ps.prerequisite).ordinal;
-      OutputSpecification os = jobDescription.addPipelineStage(prerequisite,ps.isOutput,ps.connectionName,ps.description);
+      Specification os = jobDescription.addPipelineStage(prerequisite,ps.isOutput,ps.connectionName,ps.description);
       os.clearChildren();
       if (ps.specification != null)
       {
@@ -4238,7 +4238,7 @@ public class ManifoldCF extends org.apac
         stage.setValue(description);
         child.addChild(child.getChildCount(),stage);
       }
-      OutputSpecification spec = job.getPipelineStageSpecification(j);
+      Specification spec = job.getPipelineStageSpecification(j);
       stage = new ConfigurationNode(JOBNODE_STAGESPECIFICATION);
       for (int k = 0; k < spec.getChildCount(); k++)
       {



Mime
View raw message