You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by la...@apache.org on 2011/10/18 17:14:47 UTC
svn commit: r1185715 - in
/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya:
XBaya.java registry/RegistryAccesser.java
Author: lahiru
Date: Tue Oct 18 15:14:46 2011
New Revision: 1185715
URL: http://svn.apache.org/viewvc?rev=1185715&view=rev
Log:
code cleanup in XBaya.
Modified:
incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/XBaya.java
incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/registry/RegistryAccesser.java
Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/XBaya.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/XBaya.java?rev=1185715&r1=1185714&r2=1185715&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/XBaya.java (original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/XBaya.java Tue Oct 18 15:14:46 2011
@@ -81,7 +81,7 @@ public class XBaya {
System.err.println("Usage: java " + XBaya.class.getName() + " [-help]" + "[-config file]" + " [-title title]"
+ " [-workflow workflow]" + " [-enableLocalRegistry]" + " [-localRegistry dir]"
+ " [-gpelEngineURL url]" + " [-templateID templateID]" + " [-instanceID instanceID]"
- + " [-xRegistryURL url]" + " [-gfacURL url]" + " [-dscURL url" + " [-startMonitor {true,false}]"
+ + " [-gfacURL url]" + " [-dscURL url" + " [-startMonitor {true,false}]"
+ " [-brokerURL url]" + " [-topic topic]" + " [-pullMode {true,false}]" + " [-myProxyServer host]"
+ " [-karmaURL url]" + " [-karmaWorkflowInstanceID]" + " [-myProxyPort port]"
+ " [-myProxyUsername username]" + " [-myProxyLifetime sec]" + " [-loadMyProxy {true,false}]"
@@ -119,16 +119,6 @@ public class XBaya {
} else if ("-workflow".equalsIgnoreCase(arg)) {
index++;
this.config.setWorkflow(args[index]);
-// } else if ("-RegistryCredentials".equalsIgnoreCase(arg)) {
-// index++;
-// String url = args[index];
-// try {
-// this.config.setXRegistryURL(parseURL(url));
-// } catch (URISyntaxException e) {
-// String message = "The XRegistry URL is in wrong format: " + url;
-// logger.warn(message, e);
-// this.config.addError(new XBayaException(message, e));
-// }
} else if ("-gfacURL".equalsIgnoreCase(arg)) {
index++;
String url = args[index];
@@ -222,54 +212,6 @@ public class XBaya {
index++;
this.config.setRegistryPassphrase(args[index]);
}
-// else if ("-myProxyServer".equalsIgnoreCase(arg)) {
-// index++;
-// String server = args[index];
-// if ("null".equalsIgnoreCase(server)) {
-// // This is a workaround that JNLP doesn't take empty
-// // string as an argument.
-// server = null;
-// }
-// this.config.setMyProxyServer(server);
-// } else if ("-myProxyPort".equalsIgnoreCase(arg)) {
-// index++;
-// String port = args[index];
-// try {
-// this.config.setMyProxyPort(Integer.parseInt(port));
-// } catch (NumberFormatException e) {
-// String message = "The myProxyPort must be an integer: " + port;
-// logger.warn(message, e);
-// this.config.addError(new XBayaException(message, e));
-// }
-// } else if ("-myProxyUsername".equalsIgnoreCase(arg)) {
-// index++;
-// this.config.setMyProxyUsername(args[index]);
-// } else if ("-myProxyPassphrase".equalsIgnoreCase(arg)) {
-// index++;
-// this.config.setMyProxyPassphrase(args[index]);
-// } else if ("-myProxyLifetime".equalsIgnoreCase(arg)) {
-// index++;
-// String lifetime = args[index];
-// try {
-// this.config.setMyProxyLifetime(Integer.parseInt(lifetime));
-// } catch (NumberFormatException e) {
-// String message = "The myProxyLifetime must be an integer: " + lifetime;
-// logger.warn(message, e);
-// this.config.addError(new XBayaException(message, e));
-// }
-// } else if ("-loadMyProxy".equalsIgnoreCase(arg)) {
-// index++;
-// String load = args[index];
-// if ("true".equalsIgnoreCase(load)) {
-// this.config.setLoadMyProxy(true);
-// } else if ("false".equalsIgnoreCase(load)) {
-// this.config.setLoadMyProxy(false);
-// } else {
-// String message = "-loadMyProxy has to be either true or false, not " + load;
-// logger.warn(message);
-// this.config.addError(new XBayaException(message));
-// }
-// }
else if ("-width".equalsIgnoreCase(arg)) {
index++;
String width = args[index];
Modified: incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/registry/RegistryAccesser.java
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/registry/RegistryAccesser.java?rev=1185715&r1=1185714&r2=1185715&view=diff
==============================================================================
--- incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/registry/RegistryAccesser.java (original)
+++ incubator/airavata/trunk/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/registry/RegistryAccesser.java Tue Oct 18 15:14:46 2011
@@ -71,12 +71,11 @@ public class RegistryAccesser {
JCRComponentRegistry jcrComponentRegistry = this.engine.getConfiguration().getJcrComponentRegistry();
return jcrComponentRegistry.getRegistry();
}
-
+
/**
- * Fetch all workflow templates from Registry
- *
- * @return workflow templates
- * @throws XregistryException
+ *
+ * @return
+ * @throws RepositoryException
*/
public Map<QName,Node> getOGCEWorkflowTemplateList() throws RepositoryException {
Registry registry = connectToRegistry();
@@ -85,12 +84,10 @@ public class RegistryAccesser {
/**
- * Retrieves workflow from xregistry.
- *
+ *
* @param workflowTemplateId
- * @return workflow
+ * @return
* @throws RepositoryException
- * @throws XregistryException
* @throws GraphException
* @throws ComponentException
* @throws Exception
@@ -105,7 +102,7 @@ public class RegistryAccesser {
}
/**
- * Save the current workflow to the XRegistry
+ * Save workflow in to Registry
*/
public void saveWorkflow() {
@@ -170,13 +167,9 @@ public class RegistryAccesser {
}
/**
- * Deletes a workflow from the XRegistry given the resource QName
- *
+ *
* @param workflowTemplateId
- * @param xRegistryURL
- * @param context
* @throws RepositoryException
- * @throws XregistryException
*/
public void deleteOGCEWorkflow(QName workflowTemplateId) throws RepositoryException {
Registry registry = connectToRegistry();
@@ -184,14 +177,9 @@ public class RegistryAccesser {
}
/**
- * Returns a Workflow object with the Template IDs properly set and ready to be loaded into XBaya
- *
- * @param xRegistryURI
- * @param gssCredential
- * Proxy credential
+ *
* @param qname
- * Qname of the Workflow that is used to store in XRegistry
- * @return Workflow
+ * @return
*/
public Workflow getWorkflow(QName qname) {
Registry registry = connectToRegistry();
@@ -211,11 +199,7 @@ public class RegistryAccesser {
}
/**
- * Returns the workflow object fetched from Xregistry.
- *
- * @param xRegistryURI
- * @param gssCredential
- * Proxy credential
+ *
* @param name
* @return
*/