diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2010-03-16 18:08:46 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2010-03-16 18:08:46 +0000 |
commit | 3b191c283307dc68e2aaa6faea58f4b3b717e35c (patch) | |
tree | 9f5742cb5dd7be684c73a606077b106e8d23a700 /sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart | |
parent | f31b8fa6a3b9d9d356212670296c60beb468c8e5 (diff) |
Update the travelsample with 2.x namespace/api/dependency (not completed yet)
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@923913 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart')
8 files changed, 19 insertions, 25 deletions
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/pom.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/pom.xml index d7c97af652..4f91b07022 100644 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/pom.xml +++ b/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/pom.xml @@ -22,10 +22,10 @@ <parent>
<groupId>org.apache.tuscany.sca</groupId>
<artifactId>scatours</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <version>2.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
- <version>1.0-SNAPSHOT</version>
+ <version>2.0-SNAPSHOT</version>
<artifactId>scatours-contribution-shoppingcart</artifactId>
<name>Apache Tuscany SCA Tours Shopping Cart Contribution</name>
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/src/main/java/com/tuscanyscatours/shoppingcart/CartCheckout.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/src/main/java/com/tuscanyscatours/shoppingcart/CartCheckout.java index 929f9895c6..ff453d6a78 100644 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/src/main/java/com/tuscanyscatours/shoppingcart/CartCheckout.java +++ b/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/src/main/java/com/tuscanyscatours/shoppingcart/CartCheckout.java @@ -18,7 +18,7 @@ */ package com.tuscanyscatours.shoppingcart; -import org.osoa.sca.annotations.Remotable; +import org.oasisopen.sca.annotation.Remotable; @Remotable public interface CartCheckout { diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/src/main/java/com/tuscanyscatours/shoppingcart/CartInitialize.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/src/main/java/com/tuscanyscatours/shoppingcart/CartInitialize.java index 24affc4b23..0966c6b2b3 100644 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/src/main/java/com/tuscanyscatours/shoppingcart/CartInitialize.java +++ b/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/src/main/java/com/tuscanyscatours/shoppingcart/CartInitialize.java @@ -18,7 +18,7 @@ */ package com.tuscanyscatours.shoppingcart; -import org.osoa.sca.annotations.Remotable; +import org.oasisopen.sca.annotation.Remotable; import com.tuscanyscatours.common.TripItem; diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/src/main/java/com/tuscanyscatours/shoppingcart/CartStore.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/src/main/java/com/tuscanyscatours/shoppingcart/CartStore.java index c7d03d765b..836f06ed7f 100644 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/src/main/java/com/tuscanyscatours/shoppingcart/CartStore.java +++ b/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/src/main/java/com/tuscanyscatours/shoppingcart/CartStore.java @@ -18,9 +18,7 @@ */ package com.tuscanyscatours.shoppingcart; -import org.osoa.sca.annotations.Conversational; -import org.osoa.sca.annotations.EndsConversation; -import org.osoa.sca.annotations.Remotable; +import org.oasisopen.sca.annotation.Remotable; import com.tuscanyscatours.common.TripItem; @@ -28,7 +26,6 @@ import com.tuscanyscatours.common.TripItem; * The CartStore service interface */ @Remotable -@Conversational public interface CartStore { void addTrip(TripItem trip); @@ -36,6 +33,5 @@ public interface CartStore { TripItem[] getTrips(); - @EndsConversation void reset(); } diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/src/main/java/com/tuscanyscatours/shoppingcart/CartUpdates.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/src/main/java/com/tuscanyscatours/shoppingcart/CartUpdates.java index f9a1272695..a9729fb98b 100644 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/src/main/java/com/tuscanyscatours/shoppingcart/CartUpdates.java +++ b/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/src/main/java/com/tuscanyscatours/shoppingcart/CartUpdates.java @@ -18,7 +18,7 @@ */ package com.tuscanyscatours.shoppingcart; -import org.osoa.sca.annotations.Remotable; +import org.oasisopen.sca.annotation.Remotable; import com.tuscanyscatours.common.TripItem; diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/src/main/java/com/tuscanyscatours/shoppingcart/impl/CartStoreImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/src/main/java/com/tuscanyscatours/shoppingcart/impl/CartStoreImpl.java index 460b962526..ff83a7586a 100644 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/src/main/java/com/tuscanyscatours/shoppingcart/impl/CartStoreImpl.java +++ b/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/src/main/java/com/tuscanyscatours/shoppingcart/impl/CartStoreImpl.java @@ -21,11 +21,10 @@ package com.tuscanyscatours.shoppingcart.impl; import java.util.ArrayList; import java.util.List; -import org.osoa.sca.annotations.ConversationID; -import org.osoa.sca.annotations.Destroy; -import org.osoa.sca.annotations.Init; -import org.osoa.sca.annotations.Scope; -import org.osoa.sca.annotations.Service; +import org.oasisopen.sca.annotation.Destroy; +import org.oasisopen.sca.annotation.Init; +import org.oasisopen.sca.annotation.Scope; +import org.oasisopen.sca.annotation.Service; import com.tuscanyscatours.common.TripItem; import com.tuscanyscatours.shoppingcart.CartStore; @@ -34,10 +33,9 @@ import com.tuscanyscatours.shoppingcart.CartStore; * An implementation of the CartStore service */ @Scope("CONVERSATION") -@Service(interfaces = {CartStore.class}) +@Service({CartStore.class}) public class CartStoreImpl implements CartStore { - @ConversationID protected String cartId; private List<TripItem> trips = new ArrayList<TripItem>(); diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/src/main/java/com/tuscanyscatours/shoppingcart/impl/ShoppingCartImpl.java b/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/src/main/java/com/tuscanyscatours/shoppingcart/impl/ShoppingCartImpl.java index 41c58e5266..daaf187dbb 100644 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/src/main/java/com/tuscanyscatours/shoppingcart/impl/ShoppingCartImpl.java +++ b/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/src/main/java/com/tuscanyscatours/shoppingcart/impl/ShoppingCartImpl.java @@ -22,11 +22,11 @@ import java.util.HashMap; import java.util.Map;
import java.util.UUID;
-import org.osoa.sca.ComponentContext;
-import org.osoa.sca.ServiceReference;
-import org.osoa.sca.annotations.Context;
-import org.osoa.sca.annotations.Reference;
-import org.osoa.sca.annotations.Service;
+import org.oasisopen.sca.ComponentContext;
+import org.oasisopen.sca.ServiceReference;
+import org.oasisopen.sca.annotation.Context;
+import org.oasisopen.sca.annotation.Reference;
+import org.oasisopen.sca.annotation.Service;
import com.tuscanyscatours.common.TripItem;
import com.tuscanyscatours.payment.Payment;
@@ -38,7 +38,7 @@ import com.tuscanyscatours.shoppingcart.CartUpdates; /**
* An implementation of the ShoppingCart service
*/
-@Service(interfaces = {CartInitialize.class, CartUpdates.class, CartCheckout.class})
+@Service({CartInitialize.class, CartUpdates.class, CartCheckout.class})
public class ShoppingCartImpl implements CartInitialize, CartUpdates, CartCheckout {
@Reference
@@ -55,7 +55,7 @@ public class ShoppingCartImpl implements CartInitialize, CartUpdates, CartChecko public String newCart() {
String cartId = UUID.randomUUID().toString();
ServiceReference<CartStore> cartStore = componentContext.getServiceReference(CartStore.class, "cartStore");
- cartStore.setConversationID(cartId);
+ // cartStore.setConversationID(cartId);
cartStores.put(cartId, cartStore.getService());
return cartId;
diff --git a/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/src/main/resources/META-INF/sca-contribution.xml b/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/src/main/resources/META-INF/sca-contribution.xml index 176c031c4c..55165fd9c4 100644 --- a/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/src/main/resources/META-INF/sca-contribution.xml +++ b/sca-java-2.x/trunk/tutorials/travelsample/contributions/shoppingcart/src/main/resources/META-INF/sca-contribution.xml @@ -17,7 +17,7 @@ * specific language governing permissions and limitations
* under the License.
-->
-<contribution xmlns="http://www.osoa.org/xmlns/sca/1.0">
+<contribution xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912">
<import.java package="com.tuscanyscatours.common" />
<export.java package="com.tuscanyscatours.payment" />
<export.java package="com.tuscanyscatours.shoppingcart" />
|