airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From samin...@apache.org
Subject svn commit: r1413246 - in /airavata/trunk/modules: airavata-client/src/main/java/org/apache/airavata/client/ registry/registry-api/src/main/java/org/apache/airavata/registry/api/
Date Sat, 24 Nov 2012 19:12:51 GMT
Author: samindaw
Date: Sat Nov 24 19:12:50 2012
New Revision: 1413246

URL: http://svn.apache.org/viewvc?rev=1413246&view=rev
Log:
updating API

Modified:
    airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataClientUtils.java
    airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/AiravataRegistry2.java
    airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/AiravataRegistryFactory.java

Modified: airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataClientUtils.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataClientUtils.java?rev=1413246&r1=1413245&r2=1413246&view=diff
==============================================================================
--- airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataClientUtils.java
(original)
+++ airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/AiravataClientUtils.java
Sat Nov 24 19:12:50 2012
@@ -56,12 +56,12 @@ public class AiravataClientUtils {
 	
     @Deprecated
     public static AiravataAPI getAPI(URI registryURL, String username, PasswordCallback callback)
throws MalformedURLException, RepositoryException, RegistryException{
-        return getAPI(registryURL, username, username, callback);
+        return getAPI(registryURL, null, username, callback);
     }
 
     @Deprecated
 	public static AiravataAPI getAPI(URI registryURL, String username, String password, String
alternateUsername) throws MalformedURLException, RepositoryException, RegistryException{
-		return getAPI(registryURL, username, new PasswordCallBackImpl(username, password));
+		return getAPI(registryURL, null, username, alternateUsername, new PasswordCallBackImpl(username,
password));
 	}
 
     @Deprecated

Modified: airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/AiravataRegistry2.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/AiravataRegistry2.java?rev=1413246&r1=1413245&r2=1413246&view=diff
==============================================================================
--- airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/AiravataRegistry2.java
(original)
+++ airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/AiravataRegistry2.java
Sat Nov 24 19:12:50 2012
@@ -31,11 +31,6 @@ public abstract class AiravataRegistry2 
 	
 	protected static final int SERVICE_TTL=180;
 	
-	protected void preInitialize(Gateway gateway, AiravataUser user) {
-		setGateway(gateway);
-		setUser(user);
-	}
-	
 	protected void preInitialize(URI connectionURI, Gateway gateway, AiravataUser user, PasswordCallback
callback) {
 		setConnectionURI(connectionURI);
 		setGateway(gateway);

Modified: airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/AiravataRegistryFactory.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/AiravataRegistryFactory.java?rev=1413246&r1=1413245&r2=1413246&view=diff
==============================================================================
--- airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/AiravataRegistryFactory.java
(original)
+++ airavata/trunk/modules/registry/registry-api/src/main/java/org/apache/airavata/registry/api/AiravataRegistryFactory.java
Sat Nov 24 19:12:50 2012
@@ -41,7 +41,6 @@ public class AiravataRegistryFactory {
 	/***
 	 * Return a registry accessor object capable of handling all data in the
 	 * registry
-	 * @deprecated
 	 * @param gateway
 	 * @param user
 	 * @return
@@ -56,22 +55,16 @@ public class AiravataRegistryFactory {
 			RegistryAccessorUndefinedException,
 			RegistryAccessorInstantiateException,
 			AiravataConfigurationException, RegistryAccessorInvalidException {
-		Object registryObj = getRegistryClass(REGISTRY_ACCESSOR_CLASS);
-		if (registryObj instanceof AiravataRegistry2) {
-			AiravataRegistry2 registry = (AiravataRegistry2) registryObj;
-			registry.preInitialize(gateway, user);
-			registry.initialize();
-			return registry;
-		}
-		throw new RegistryAccessorInvalidException(registryObj.getClass()
-				.getName());
+		return getRegistry(null, gateway, user, null);
 	}
 	
 	/***
 	 * Return a registry accessor object capable of handling all data in the
 	 * registry
+	 * @param connectionURI
 	 * @param gateway
 	 * @param user
+	 * @param callback
 	 * @return
 	 * @throws RegistryAccessorNotFoundException
 	 * @throws RegistryAccessorUndefinedException
@@ -91,8 +84,7 @@ public class AiravataRegistryFactory {
 			registry.initialize();
 			return registry;
 		}
-		throw new RegistryAccessorInvalidException(registryObj.getClass()
-				.getName());
+		throw new RegistryAccessorInvalidException(registryObj.getClass().getName());
 	}
 
 	/***



Mime
View raw message