oodt-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mattm...@apache.org
Subject svn commit: r1099455 - in /oodt/trunk: CHANGES.txt workflow/src/main/java/org/apache/oodt/cas/workflow/structs/WorkflowCondition.java workflow/src/main/java/org/apache/oodt/cas/workflow/structs/WorkflowConditionConfiguration.java
Date Wed, 04 May 2011 14:11:59 GMT
Author: mattmann
Date: Wed May  4 14:11:59 2011
New Revision: 1099455

URL: http://svn.apache.org/viewvc?rev=1099455&view=rev
Log:
- fix for OODT-189 Refactor and clean up WorkflowCondition Configuration

Modified:
    oodt/trunk/CHANGES.txt
    oodt/trunk/workflow/src/main/java/org/apache/oodt/cas/workflow/structs/WorkflowCondition.java
    oodt/trunk/workflow/src/main/java/org/apache/oodt/cas/workflow/structs/WorkflowConditionConfiguration.java

Modified: oodt/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/oodt/trunk/CHANGES.txt?rev=1099455&r1=1099454&r2=1099455&view=diff
==============================================================================
--- oodt/trunk/CHANGES.txt (original)
+++ oodt/trunk/CHANGES.txt Wed May  4 14:11:59 2011
@@ -4,6 +4,9 @@ Apache OODT Change Log
 Release 0.3-SNAPSHOT (in progress)
 --------------------------------------------
 
+* OODT-189 Refactor and clean up WorkflowCondition 
+  Configuration (mattmann)
+
 * OODT-188 Precondition Comparator to ignore files with 
   a particular extension (mattmann)
 

Modified: oodt/trunk/workflow/src/main/java/org/apache/oodt/cas/workflow/structs/WorkflowCondition.java
URL: http://svn.apache.org/viewvc/oodt/trunk/workflow/src/main/java/org/apache/oodt/cas/workflow/structs/WorkflowCondition.java?rev=1099455&r1=1099454&r2=1099455&view=diff
==============================================================================
--- oodt/trunk/workflow/src/main/java/org/apache/oodt/cas/workflow/structs/WorkflowCondition.java
(original)
+++ oodt/trunk/workflow/src/main/java/org/apache/oodt/cas/workflow/structs/WorkflowCondition.java
Wed May  4 14:11:59 2011
@@ -15,133 +15,153 @@
  * limitations under the License.
  */
 
-
 package org.apache.oodt.cas.workflow.structs;
 
 /**
- * @author mattmann
- * @version $Revision$
  * 
- * <p>
  * A WorkflowCondition is some pre-condition that must evaluate to true in order
  * for a particular {@link WorkflowTask} to be permitted to execute .
- * </p>
+ * 
+ * 
+ * @author mattmann
+ * @version $Revision$
  * 
  */
 public class WorkflowCondition {
 
-	/* the name of the condition */
-	private String conditionName = null;
+  /* the name of the condition */
+  private String conditionName = null;
+
+  /* the id for the condition */
+  private String conditionId = null;
 
-	/* the id for the condition */
-	private String conditionId = null;
+  /* the actual portion of the condition that performs the work */
+  protected String conditionInstanceClassName = null;
 
-	/* the actual portion of the condition that performs the work */
-	protected String conditionInstanceClassName = null;
-	
-	/* the order that this condition comes in */
-	protected int order = -1;
-	
-    /* the static configuration parameters for the condition */
-	protected WorkflowConditionConfiguration condConfig;
-	
-	/**
-	 * <p>Default Constructor</p>
-	 *
-	 */
-	public WorkflowCondition(){
-		
-	}
-		
-
-	/**
-	 * <p>Constructs a new WorkflowCondition with the specified parameters.</p>
-	 * 
-	 * @param conditionName The display name of the condition.
-	 * @param conditionId The ID for this condition.
-	 * @param instanceClass The particular instance class name attached to this WorkflowCondition.
-	 * @param order The order in which this condition should be checked for a particular WorkflowTask.
-	 */
-	public WorkflowCondition(String conditionName, String conditionId, String instanceClass,
int order) {
-		// TODO Auto-generated constructor stub
-		this.conditionName = conditionName;
-		this.conditionId = conditionId;
-		this.conditionInstanceClassName = instanceClass;
-		this.order = order;
-	}
-	
-    /**
-     * @return Returns the taskConfig.
-     */
-    public WorkflowConditionConfiguration getTaskConfig() {
-        return condConfig;
-    }
-
-    /**
-     * @param taskConfig
-     *            The taskConfig to set.
-     */
-    public void setCondConfig(WorkflowConditionConfiguration condConfig) {
-        this.condConfig = condConfig;
-    }
-
-	/**
-	 * @return Returns the conditionId.
-	 */
-	public String getConditionId() {
-		return conditionId;
-	}
-
-	/**
-	 * @param conditionId The conditionId to set.
-	 */
-	public void setConditionId(String conditionId) {
-		this.conditionId = conditionId;
-	}
-
-	/**
-	 * @return Returns the conditionName.
-	 */
-	public String getConditionName() {
-		return conditionName;
-	}
-
-	/**
-	 * @param conditionName The conditionName to set.
-	 */
-	public void setConditionName(String conditionName) {
-		this.conditionName = conditionName;
-	}
-
-
-	/**
-	 * @return Returns the conditionInstanceClassName.
-	 */
-	public String getConditionInstanceClassName() {
-		return conditionInstanceClassName;
-	}
-
-
-	/**
-	 * @param conditionInstanceClassName The conditionInstanceClassName to set.
-	 */
-	public void setConditionInstanceClassName(String conditionInstanceClassName) {
-		this.conditionInstanceClassName = conditionInstanceClassName;
-	}
-
-
-	/**
-	 * @return Returns the order.
-	 */
-	public int getOrder() {
-		return order;
-	}
-
-	/**
-	 * @param order The order to set.
-	 */
-	public void setOrder(int order) {
-		this.order = order;
-	}
+  /* the order that this condition comes in */
+  protected int order = -1;
+
+  /* the static configuration parameters for the condition */
+  protected WorkflowConditionConfiguration condConfig;
+
+  /**
+   * <p>
+   * Default Constructor
+   * </p>
+   * 
+   */
+  public WorkflowCondition() {
+    this(null, null, null, -1);
+  }
+
+  /**
+   * <p>
+   * Constructs a new WorkflowCondition with the specified parameters.
+   * </p>
+   * 
+   * @param conditionName
+   *          The display name of the condition.
+   * @param conditionId
+   *          The ID for this condition.
+   * @param instanceClass
+   *          The particular instance class name attached to this
+   *          WorkflowCondition.
+   * @param order
+   *          The order in which this condition should be checked for a
+   *          particular WorkflowTask.
+   */
+  public WorkflowCondition(String conditionName, String conditionId,
+      String instanceClass, int order) {
+    // TODO Auto-generated constructor stub
+    this.conditionName = conditionName;
+    this.conditionId = conditionId;
+    this.conditionInstanceClassName = instanceClass;
+    this.order = order;
+    this.condConfig = new WorkflowConditionConfiguration();
+  }
+
+  /**
+   * @return Returns the taskConfig.
+   */
+  @Deprecated
+  public WorkflowConditionConfiguration getTaskConfig() {
+    return condConfig;
+  }
+
+  /**
+   * @param taskConfig
+   *          The taskConfig to set.
+   */
+  public void setCondConfig(WorkflowConditionConfiguration condConfig) {
+    this.condConfig = condConfig;
+  }
+
+  /**
+   * 
+   * @return Returns the condConfig
+   */
+  public WorkflowConditionConfiguration getCondConfig() {
+    return this.condConfig;
+  }
+
+  /**
+   * @return Returns the conditionId.
+   */
+  public String getConditionId() {
+    return conditionId;
+  }
+
+  /**
+   * @param conditionId
+   *          The conditionId to set.
+   */
+  public void setConditionId(String conditionId) {
+    this.conditionId = conditionId;
+  }
+
+  /**
+   * @return Returns the conditionName.
+   */
+  public String getConditionName() {
+    return conditionName;
+  }
+
+  /**
+   * @param conditionName
+   *          The conditionName to set.
+   */
+  public void setConditionName(String conditionName) {
+    this.conditionName = conditionName;
+  }
+
+  /**
+   * @return Returns the conditionInstanceClassName.
+   */
+  public String getConditionInstanceClassName() {
+    return conditionInstanceClassName;
+  }
+
+  /**
+   * @param conditionInstanceClassName
+   *          The conditionInstanceClassName to set.
+   */
+  public void setConditionInstanceClassName(String conditionInstanceClassName) {
+    this.conditionInstanceClassName = conditionInstanceClassName;
+  }
+
+  /**
+   * @return Returns the order.
+   */
+  public int getOrder() {
+    return order;
+  }
+
+  /**
+   * @param order
+   *          The order to set.
+   */
+  public void setOrder(int order) {
+    this.order = order;
+  }
 
 }

Modified: oodt/trunk/workflow/src/main/java/org/apache/oodt/cas/workflow/structs/WorkflowConditionConfiguration.java
URL: http://svn.apache.org/viewvc/oodt/trunk/workflow/src/main/java/org/apache/oodt/cas/workflow/structs/WorkflowConditionConfiguration.java?rev=1099455&r1=1099454&r2=1099455&view=diff
==============================================================================
--- oodt/trunk/workflow/src/main/java/org/apache/oodt/cas/workflow/structs/WorkflowConditionConfiguration.java
(original)
+++ oodt/trunk/workflow/src/main/java/org/apache/oodt/cas/workflow/structs/WorkflowConditionConfiguration.java
Wed May  4 14:11:59 2011
@@ -17,12 +17,18 @@
 
 package org.apache.oodt.cas.workflow.structs;
 
+//JDK imports
 import java.util.Properties;
 
+/**
+ * 
+ * Configuration for a {@link WorkflowCondition}.
+ *
+ */
 public class WorkflowConditionConfiguration {
    
-    /* the task configuration properties */
-    private Properties taskProperties = null;
+    /* the condition configuration properties */
+    private Properties condProperties = null;
     
     /**
      * <p>
@@ -30,7 +36,7 @@ public class WorkflowConditionConfigurat
      * </p>.
      */
     public WorkflowConditionConfiguration() {
-        taskProperties = new Properties();
+        condProperties = new Properties();
     }
 
     /**
@@ -42,7 +48,7 @@ public class WorkflowConditionConfigurat
      *            The task configuration properties.
      */
     public WorkflowConditionConfiguration(Properties properties) {
-        taskProperties = properties;
+        condProperties = properties;
     }
 
     /**
@@ -57,7 +63,7 @@ public class WorkflowConditionConfigurat
      *            The property value.
      */
     public void addConfigProperty(String name, String value) {
-        taskProperties.setProperty(name, value);
+        condProperties.setProperty(name, value);
     }
 
     /**
@@ -67,7 +73,7 @@ public class WorkflowConditionConfigurat
      * @return The String property value for the specified propName.
      */
     public String getProperty(String propName) {
-        return taskProperties.getProperty(propName);
+        return condProperties.getProperty(propName);
     }
 
     /**
@@ -75,7 +81,7 @@ public class WorkflowConditionConfigurat
      * @return The {@link Properties} for configuring this WorkflowTask.
      */
     public Properties getProperties() {
-        return taskProperties;
+        return condProperties;
     }
 
 }



Mime
View raw message