Author: kwright
Date: Thu Jun 12 07:46:19 2014
New Revision: 1602084

URL: http://svn.apache.org/r1602084
Log:
Add description strings to interface

Modified:
    
manifoldcf/branches/CONNECTORS-962/framework/agents/src/main/java/org/apache/manifoldcf/agents/interfaces/IPipelineSpecification.java
    
manifoldcf/branches/CONNECTORS-962/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/WorkerThread.java

Modified: 
manifoldcf/branches/CONNECTORS-962/framework/agents/src/main/java/org/apache/manifoldcf/agents/interfaces/IPipelineSpecification.java
URL: 
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-962/framework/agents/src/main/java/org/apache/manifoldcf/agents/interfaces/IPipelineSpecification.java?rev=1602084&r1=1602083&r2=1602084&view=diff
==============================================================================
--- 
manifoldcf/branches/CONNECTORS-962/framework/agents/src/main/java/org/apache/manifoldcf/agents/interfaces/IPipelineSpecification.java
 (original)
+++ 
manifoldcf/branches/CONNECTORS-962/framework/agents/src/main/java/org/apache/manifoldcf/agents/interfaces/IPipelineSpecification.java
 Thu Jun 12 07:46:19 2014
@@ -38,6 +38,12 @@ public interface IPipelineSpecification
   *@return the connection name for that stage.
   */
   public String getStageConnectionName(int stage);
+
+  /** Get the description string for a pipeline stage.
+  *@param stage is the stage to get the connection name for.
+  *@return the description string that stage.
+  */
+  public String getStageDescriptionString(int stage);
   
   /** Check if a stage is an output stage.
   *@param stage is the stage to check.

Modified: 
manifoldcf/branches/CONNECTORS-962/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/WorkerThread.java
URL: 
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-962/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/WorkerThread.java?rev=1602084&r1=1602083&r2=1602084&view=diff
==============================================================================
--- 
manifoldcf/branches/CONNECTORS-962/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/WorkerThread.java
 (original)
+++ 
manifoldcf/branches/CONNECTORS-962/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/WorkerThread.java
 Thu Jun 12 07:46:19 2014
@@ -2791,8 +2791,11 @@ public class WorkerThread extends Thread
   {
     protected final String[] transformationConnectionNames;
     protected final String outputConnectionName;
+    protected final String[] transformationDescriptionStrings;
+    protected final String outputDescriptionString;
     
-    public PipelineSpecification(IJobDescription job)
+    public PipelineSpecification(IJobDescription job, String[] 
transformationDescriptionStrings,
+      String outputDescriptionString)
     {
       transformationConnectionNames = new String[job.countPipelineStages()];
       outputConnectionName = job.getOutputConnectionName();
@@ -2800,6 +2803,8 @@ public class WorkerThread extends Thread
       {
         transformationConnectionNames[i] = 
job.getPipelineStageConnectionName(i);
       }
+      this.transformationDescriptionStrings = transformationDescriptionStrings;
+      this.outputDescriptionString = outputDescriptionString;
     }
     
     /** Find children of a given pipeline stage.  Pass -1 to find the children 
of the root stage.
@@ -2824,6 +2829,17 @@ public class WorkerThread extends Thread
       return outputConnectionName;
     }
     
+    /** Get the description string for a pipeline stage.
+    *@param stage is the stage to get the connection name for.
+    *@return the description string that stage.
+    */
+    public String getStageDescriptionString(int stage)
+    {
+      if (stage < transformationConnectionNames.length)
+        return transformationDescriptionStrings[stage];
+      return outputDescriptionString;
+    }
+
     /** Check if a stage is an output stage.
     *@param stage is the stage to check.
     *@return true if the stage represents an output connection.


Reply via email to