ws-scout-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tcunn...@apache.org
Subject svn commit: r744965 - in /webservices/scout/trunk/scout/src/main/java/org/apache/ws/scout: registry/BusinessQueryManagerImpl.java util/ScoutJaxrUddiHelper.java
Date Mon, 16 Feb 2009 16:54:50 GMT
Author: tcunning
Date: Mon Feb 16 16:54:49 2009
New Revision: 744965

URL: http://svn.apache.org/viewvc?rev=744965&view=rev
Log:
SCOUT-72
Send a TModelBag into findBinding and transform specifications into
a TModelBag in ScoutJaxrUddiHelper as a helper function.

Modified:
    webservices/scout/trunk/scout/src/main/java/org/apache/ws/scout/registry/BusinessQueryManagerImpl.java
    webservices/scout/trunk/scout/src/main/java/org/apache/ws/scout/util/ScoutJaxrUddiHelper.java

Modified: webservices/scout/trunk/scout/src/main/java/org/apache/ws/scout/registry/BusinessQueryManagerImpl.java
URL: http://svn.apache.org/viewvc/webservices/scout/trunk/scout/src/main/java/org/apache/ws/scout/registry/BusinessQueryManagerImpl.java?rev=744965&r1=744964&r2=744965&view=diff
==============================================================================
--- webservices/scout/trunk/scout/src/main/java/org/apache/ws/scout/registry/BusinessQueryManagerImpl.java
(original)
+++ webservices/scout/trunk/scout/src/main/java/org/apache/ws/scout/registry/BusinessQueryManagerImpl.java
Mon Feb 16 16:54:49 2009
@@ -578,7 +578,7 @@
  
             BindingDetail l = iRegistry.findBinding(serviceKey.getId(),
                     ScoutJaxrUddiHelper.getCategoryBagFromClassifications(classifications),

-            		null,
+            		ScoutJaxrUddiHelper.getTModelBagFromSpecifications(specifications),
             		juddiFindQualifiers,registryService.getMaxRows());
 
             /*

Modified: webservices/scout/trunk/scout/src/main/java/org/apache/ws/scout/util/ScoutJaxrUddiHelper.java
URL: http://svn.apache.org/viewvc/webservices/scout/trunk/scout/src/main/java/org/apache/ws/scout/util/ScoutJaxrUddiHelper.java?rev=744965&r1=744964&r2=744965&view=diff
==============================================================================
--- webservices/scout/trunk/scout/src/main/java/org/apache/ws/scout/util/ScoutJaxrUddiHelper.java
(original)
+++ webservices/scout/trunk/scout/src/main/java/org/apache/ws/scout/util/ScoutJaxrUddiHelper.java
Mon Feb 16 16:54:49 2009
@@ -16,6 +16,7 @@
  */
 package org.apache.ws.scout.util;
 
+import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Iterator;
 import java.util.StringTokenizer;
@@ -68,6 +69,7 @@
 import org.apache.ws.scout.uddi.Phone;
 import org.apache.ws.scout.uddi.PublisherAssertion;
 import org.apache.ws.scout.uddi.TModel;
+import org.apache.ws.scout.uddi.TModelBag;
 import org.apache.ws.scout.uddi.TModelInstanceDetails;
 import org.apache.ws.scout.uddi.TModelInstanceInfo;
 import org.apache.ws.scout.uddi.URLType;
@@ -843,6 +845,31 @@
 			throw new JAXRException("Apache JAXR Impl:", ud);
 		}
     }
+
+	public static TModelBag getTModelBagFromSpecifications(Collection specifications) throws
JAXRException {
+    	try {
+			if (specifications == null || specifications.size()==0)
+				return null;
+    		
+    		// Classifications
+			TModelBag tbag = TModelBag.Factory.newInstance();
+			Iterator speciter = specifications.iterator();
+			while (speciter.hasNext()) {
+				SpecificationLink specification = (SpecificationLink) speciter.next();
+				if (specification.getSpecificationObject() != null) {
+					RegistryObject ro = specification.getSpecificationObject();
+					if (ro.getKey() != null) {
+						Key key = ro.getKey();
+						tbag.addTModelKey(key.toString());
+					}
+				}
+			}
+			return tbag;
+    	} catch (Exception ud) {
+			throw new JAXRException("Apache JAXR Impl:", ud);
+		}
+    }
+
 	
 	/**
      * Adds the objects identifiers from JAXR's external identifier collection



---------------------------------------------------------------------
To unsubscribe, e-mail: scout-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: scout-dev-help@ws.apache.org


Mime
View raw message