[kepler-code] r28811 - in releases/release-branches/workflow-scheduler-gui-1.0: resources/configurations src/org/kepler/module/workflowschedulergui src/org/kepler/workflowscheduler/gui

tao at ecoinformatics.org tao at ecoinformatics.org
Tue Oct 18 16:38:54 PDT 2011


Author: tao
Date: 2011-10-18 16:38:53 -0700 (Tue, 18 Oct 2011)
New Revision: 28811

Modified:
   releases/release-branches/workflow-scheduler-gui-1.0/resources/configurations/configuration.xml
   releases/release-branches/workflow-scheduler-gui-1.0/src/org/kepler/module/workflowschedulergui/Initialize.java
   releases/release-branches/workflow-scheduler-gui-1.0/src/org/kepler/workflowscheduler/gui/SchedulerAbstractAction.java
   releases/release-branches/workflow-scheduler-gui-1.0/src/org/kepler/workflowscheduler/gui/SearchScheduleSwingWorker.java
Log:
merge to 1.0 branch.


Modified: releases/release-branches/workflow-scheduler-gui-1.0/resources/configurations/configuration.xml
===================================================================
--- releases/release-branches/workflow-scheduler-gui-1.0/resources/configurations/configuration.xml	2011-10-18 23:35:26 UTC (rev 28810)
+++ releases/release-branches/workflow-scheduler-gui-1.0/resources/configurations/configuration.xml	2011-10-18 23:38:53 UTC (rev 28811)
@@ -4,8 +4,6 @@
 	<!--specify the property of the workflow scheduler-->
 	<scheduler>
            <!--<url>http://chico1.dyndns.org/workflowscheduler/scheduler</url>-->
-           <!--<url>http://kepler-dev.nceas.ucsb.edu/workflowscheduler/scheduler</url>-->
-           <url>http://scheduler.kepler-project.org/workflowscheduler/scheduler</url>
 	</scheduler>
 	
 	<!--specify the list of workflow run engine -->
@@ -17,11 +15,11 @@
 		<workflowRunEngine>
 			<name>chicoWorkflowEngine</name>
 			<url>http://chico1.dyndns.org/workflowrunengine/services/KeplerWebService</url>
-		</workflowRunEngine>-->
+		</workflowRunEngine>
 		<workflowRunEngine>
       <name>keplerWorkflowEngine</name>
       <url>http://engine.kepler-project.org/workflowrunengine/services/KeplerWebService</url>
-    </workflowRunEngine>
+    </workflowRunEngine>-->
 	</workflowRunEngineList>
 	
 	<componentSearchFilter>

Modified: releases/release-branches/workflow-scheduler-gui-1.0/src/org/kepler/module/workflowschedulergui/Initialize.java
===================================================================
--- releases/release-branches/workflow-scheduler-gui-1.0/src/org/kepler/module/workflowschedulergui/Initialize.java	2011-10-18 23:35:26 UTC (rev 28810)
+++ releases/release-branches/workflow-scheduler-gui-1.0/src/org/kepler/module/workflowschedulergui/Initialize.java	2011-10-18 23:38:53 UTC (rev 28811)
@@ -45,9 +45,12 @@
  */
 public class Initialize implements ModuleInitializer
 {
+  private static final String SCHEDULER = "scheduler";
+  private static final String URL = "url";
 	private static String CURRENTMODULENAME = "workflow-scheduler-gui";
 	private static ConfigurationProperty workflowSchedulerGUIProperty = null;
 	private static ConfigurationManager cm = ConfigurationManager.getInstance();
+	private static String schedulerURL = null;
 
     /** Perform any module-specific initializations. */
     public void initializeModule() 
@@ -55,6 +58,7 @@
         //System.out.println("start of workflow-scheduler-gui module initializing");       
     	addLocalProperties("workflow-scheduler-gui", "uiMenuMappings", "gui");
         workflowSchedulerGUIProperty = cm.getProperty(ConfigurationManager.getModule(CURRENTMODULENAME));
+      schedulerURL = getSchedulerURLFromConfig();
     }
 
     
@@ -104,5 +108,39 @@
 			}
 		}
 	}
+	
+	/**
+	 * Get the url of the scheduler.
+	 * @return the url of the scheduler
+	 */
+	public static String getSchedulerURL()
+	{
+	  return schedulerURL;
+	}
+  
+	/*
+   * Get scheduler url from configuration file
+   */
+  private static String getSchedulerURLFromConfig()
+  {
+    String url = null;
+    ConfigurationProperty sensorViewConfiguration = getCurrentModuleProperty();
+    if(sensorViewConfiguration != null)
+    {
+      ConfigurationProperty schedulerProperty = sensorViewConfiguration.getProperty(SCHEDULER);
+      if(schedulerProperty != null)
+      {
+        ConfigurationProperty urlProperty = schedulerProperty.getProperty(URL);
+        if(urlProperty != null)
+        {
+          url = urlProperty.getValue();
+        }
+        
+      }
+      
+    }
+    return url;
+  }
+  
 
 }

Modified: releases/release-branches/workflow-scheduler-gui-1.0/src/org/kepler/workflowscheduler/gui/SchedulerAbstractAction.java
===================================================================
--- releases/release-branches/workflow-scheduler-gui-1.0/src/org/kepler/workflowscheduler/gui/SchedulerAbstractAction.java	2011-10-18 23:35:26 UTC (rev 28810)
+++ releases/release-branches/workflow-scheduler-gui-1.0/src/org/kepler/workflowscheduler/gui/SchedulerAbstractAction.java	2011-10-18 23:38:53 UTC (rev 28811)
@@ -95,7 +95,7 @@
     this.parent = parent;
     this.schedulerParentPanel = schedulerParentPanel;
     this.scheduleChangeController = scheduleChangeController;
-    schedulerURL = getSchedulerURL();
+    schedulerURL = Initialize.getSchedulerURL();
     //this.authenDomainForSourceKar = authenDomainForSourceKar;
   }
   
@@ -279,30 +279,7 @@
     return success;
   }
   
-  /*
-   * Get scheduler url from configuration file
-   */
-  public static String getSchedulerURL()
-  {
-    String url = null;
-    ConfigurationProperty sensorViewConfiguration = Initialize.getCurrentModuleProperty();
-    if(sensorViewConfiguration != null)
-    {
-      ConfigurationProperty schedulerProperty = sensorViewConfiguration.getProperty(SCHEDULER);
-      if(schedulerProperty != null)
-      {
-        ConfigurationProperty urlProperty = schedulerProperty.getProperty(URL);
-        if(urlProperty != null)
-        {
-          url = urlProperty.getValue();
-        }
-        
-      }
-      
-    }
-    return url;
-  }
-  
+
   /**
    * Set the sourceRepositoryName associated with the action
    * @param name

Modified: releases/release-branches/workflow-scheduler-gui-1.0/src/org/kepler/workflowscheduler/gui/SearchScheduleSwingWorker.java
===================================================================
--- releases/release-branches/workflow-scheduler-gui-1.0/src/org/kepler/workflowscheduler/gui/SearchScheduleSwingWorker.java	2011-10-18 23:35:26 UTC (rev 28810)
+++ releases/release-branches/workflow-scheduler-gui-1.0/src/org/kepler/workflowscheduler/gui/SearchScheduleSwingWorker.java	2011-10-18 23:38:53 UTC (rev 28811)
@@ -36,6 +36,7 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.kepler.module.workflowschedulergui.Initialize;
 import org.xml.sax.ContentHandler;
 import org.xml.sax.ErrorHandler;
 import org.xml.sax.InputSource;
@@ -114,7 +115,7 @@
    */
   private void searchSchedules()
   {
-    String schedulerURL = SchedulerAbstractAction.getSchedulerURL();
+    String schedulerURL = Initialize.getSchedulerURL();
     String sessionID = "unknown"; 
     String authenticationServiceURL = null;
     try



More information about the Kepler-cvs mailing list