You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by js...@apache.org on 2007/10/25 21:38:35 UTC

svn commit: r588321 - in /incubator/tuscany/java/sca/tutorial: store-catalog/src/main/java/launch/ store-domain/src/main/java/launch/ store/src/main/java/services/merger/ store/src/main/resources/ store/src/main/resources/uiservices/

Author: jsdelfino
Date: Thu Oct 25 12:38:34 2007
New Revision: 588321

URL: http://svn.apache.org/viewvc?rev=588321&view=rev
Log:
Minor cleanup of the tutorial composite. Renamed some of the classes to make things clearer.

Added:
    incubator/tuscany/java/sca/tutorial/store-catalog/src/main/java/launch/LaunchVegetablesCatalog.java
      - copied, changed from r588314, incubator/tuscany/java/sca/tutorial/store-catalog/src/main/java/launch/LaunchCatalog.java
    incubator/tuscany/java/sca/tutorial/store-domain/src/main/java/launch/LaunchDomainController.java
      - copied, changed from r588297, incubator/tuscany/java/sca/tutorial/store-domain/src/main/java/launch/LaunchDomain.java
    incubator/tuscany/java/sca/tutorial/store/src/main/java/services/merger/MergedCatalogImpl.java
      - copied, changed from r588309, incubator/tuscany/java/sca/tutorial/store/src/main/java/services/merger/NewCatalogImpl.java
Removed:
    incubator/tuscany/java/sca/tutorial/store-catalog/src/main/java/launch/LaunchCatalog.java
    incubator/tuscany/java/sca/tutorial/store-domain/src/main/java/launch/LaunchDomain.java
    incubator/tuscany/java/sca/tutorial/store/src/main/java/services/merger/NewCatalogImpl.java
Modified:
    incubator/tuscany/java/sca/tutorial/store/src/main/resources/store.composite
    incubator/tuscany/java/sca/tutorial/store/src/main/resources/uiservices/store.html

Copied: incubator/tuscany/java/sca/tutorial/store-catalog/src/main/java/launch/LaunchVegetablesCatalog.java (from r588314, incubator/tuscany/java/sca/tutorial/store-catalog/src/main/java/launch/LaunchCatalog.java)
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/store-catalog/src/main/java/launch/LaunchVegetablesCatalog.java?p2=incubator/tuscany/java/sca/tutorial/store-catalog/src/main/java/launch/LaunchVegetablesCatalog.java&p1=incubator/tuscany/java/sca/tutorial/store-catalog/src/main/java/launch/LaunchCatalog.java&r1=588314&r2=588321&rev=588321&view=diff
==============================================================================
--- incubator/tuscany/java/sca/tutorial/store-catalog/src/main/java/launch/LaunchCatalog.java (original)
+++ incubator/tuscany/java/sca/tutorial/store-catalog/src/main/java/launch/LaunchVegetablesCatalog.java Thu Oct 25 12:38:34 2007
@@ -27,13 +27,13 @@
 import org.apache.tuscany.sca.node.SCANodeFactory;
 import org.apache.tuscany.sca.node.util.SCAContributionUtil;
 
-public class LaunchCatalog {
+public class LaunchVegetablesCatalog {
     public static void main(String[] args) throws Exception {
         System.out.println("Starting ...");
         SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
         SCANode node = nodeFactory.createSCANode("http://localhost:8200/store", "http://localhost:9999");
         
-        URL contribution = SCAContributionUtil.findContributionFromClass(LaunchCatalog.class);
+        URL contribution = SCAContributionUtil.findContributionFromClass(LaunchVegetablesCatalog.class);
         node.addContribution("http://store-catalog", contribution);
         
         node.addToDomainLevelComposite(new QName("http://store", "store-catalog"));

Copied: incubator/tuscany/java/sca/tutorial/store-domain/src/main/java/launch/LaunchDomainController.java (from r588297, incubator/tuscany/java/sca/tutorial/store-domain/src/main/java/launch/LaunchDomain.java)
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/store-domain/src/main/java/launch/LaunchDomainController.java?p2=incubator/tuscany/java/sca/tutorial/store-domain/src/main/java/launch/LaunchDomainController.java&p1=incubator/tuscany/java/sca/tutorial/store-domain/src/main/java/launch/LaunchDomain.java&r1=588297&r2=588321&rev=588321&view=diff
==============================================================================
--- incubator/tuscany/java/sca/tutorial/store-domain/src/main/java/launch/LaunchDomain.java (original)
+++ incubator/tuscany/java/sca/tutorial/store-domain/src/main/java/launch/LaunchDomainController.java Thu Oct 25 12:38:34 2007
@@ -23,7 +23,7 @@
 import org.apache.tuscany.sca.domain.SCADomainFactory;
 
 
-public class LaunchDomain {
+public class LaunchDomainController {
     public static void main(String[] args) throws Exception {
 
         System.out.println("Starting ...");

Copied: incubator/tuscany/java/sca/tutorial/store/src/main/java/services/merger/MergedCatalogImpl.java (from r588309, incubator/tuscany/java/sca/tutorial/store/src/main/java/services/merger/NewCatalogImpl.java)
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/store/src/main/java/services/merger/MergedCatalogImpl.java?p2=incubator/tuscany/java/sca/tutorial/store/src/main/java/services/merger/MergedCatalogImpl.java&p1=incubator/tuscany/java/sca/tutorial/store/src/main/java/services/merger/NewCatalogImpl.java&r1=588309&r2=588321&rev=588321&view=diff
==============================================================================
--- incubator/tuscany/java/sca/tutorial/store/src/main/java/services/merger/NewCatalogImpl.java (original)
+++ incubator/tuscany/java/sca/tutorial/store/src/main/java/services/merger/MergedCatalogImpl.java Thu Oct 25 12:38:34 2007
@@ -23,7 +23,7 @@
 
 import services.Catalog;
 
-public class NewCatalogImpl implements Catalog {
+public class MergedCatalogImpl implements Catalog {
 
     @Reference
     public Catalog fruitsCatalog;

Modified: incubator/tuscany/java/sca/tutorial/store/src/main/resources/store.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/store/src/main/resources/store.composite?rev=588321&r1=588320&r2=588321&view=diff
==============================================================================
--- incubator/tuscany/java/sca/tutorial/store/src/main/resources/store.composite (original)
+++ incubator/tuscany/java/sca/tutorial/store/src/main/resources/store.composite Thu Oct 25 12:38:34 2007
@@ -29,17 +29,7 @@
 			<t:binding.http/>
 		</service> 	
 	</component>		
-  
-	<component name="NewCatalog">
-		<implementation.java class="services.merger.NewCatalogImpl"/> 
-		<service name="Catalog">
-			<t:binding.jsonrpc/>
-			<binding.ws uri="FruitsAndVegetables"/>
-   		</service>
-		<reference name="fruitsCatalog" target="Catalog"/>	
-		<reference name="vegetablesCatalog" target="VegetablesCatalog"/>	
-	</component> 
- 	
+
 	<component name="Catalog">
 		<implementation.java class="services.CatalogImpl"/> 
 		<property name="currencyCode">USD</property>
@@ -60,5 +50,17 @@
 	<component name="CurrencyConverter">
 		<implementation.java class="services.CurrencyConverterImpl"/>
 	</component>     
-
+
+	<!--
+	<component name="Catalog">
+		<implementation.java class="services.merger.MergedCatalogImpl"/> 
+		<service name="Catalog">
+			<t:binding.jsonrpc/>
+			<binding.ws uri="FruitsAndVegetables"/>
+   		</service>
+		<reference name="fruitsCatalog" target="FruitsCatalog"/>	
+		<reference name="vegetablesCatalog" target="VegetablesCatalog"/>	
+	</component>
+	-->
+ 	
 </composite>

Modified: incubator/tuscany/java/sca/tutorial/store/src/main/resources/uiservices/store.html
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/store/src/main/resources/uiservices/store.html?rev=588321&r1=588320&r2=588321&view=diff
==============================================================================
--- incubator/tuscany/java/sca/tutorial/store/src/main/resources/uiservices/store.html (original)
+++ incubator/tuscany/java/sca/tutorial/store/src/main/resources/uiservices/store.html Thu Oct 25 12:38:34 2007
@@ -25,17 +25,22 @@
 <script language="JavaScript">
 
 	//Reference
-	catalog = (new JSONRpcClient("../NewCatalog")).Catalog;
+	catalog = (new JSONRpcClient("../Catalog")).Catalog;
 	//Reference
 	shoppingCart = new AtomClient("../ShoppingCart");
 
 
 	function catalog_getResponse(items) {
-		var catalog = "";
-		for (var i=0; i<items.length; i++)
-			catalog += '<input name="items" type="checkbox" value="' + 
-						items[i] + '">' + items[i]+ ' <br>';
-		document.getElementById('catalog').innerHTML=catalog;
+		var catalog = "";
+		//fixme
+		items = items.String_collection.String;
+		for (var i=0; i<items.length; i++) {
+		    //fixme
+		    var item = items[i]["$"];
+			catalog += '<input name="items" type="checkbox" value="' + 
+						item + '">' + item + ' <br>';
+		}
+		document.getElementById('catalog').innerHTML=catalog;
 	}
 	
 	function shoppingCart_getResponse(feed) {
@@ -69,7 +74,7 @@
 		document.getElementById('store').innerHTML='<h2>' +
 				'Thanks for Shopping With Us!</h2>'+
 				'<h2>Your Order</h2>'+
-				'<form name="orderForm" action="/ufs/store.html">'+
+				'<form name="orderForm" action="/ui/store.html">'+
 					document.getElementById('shoppingCart').innerHTML+
 					'<br>'+
 					document.getElementById('total').innerHTML+



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