diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2011-09-30 22:07:31 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2011-09-30 22:07:31 +0000 |
commit | 9d3cbbfe0b8a62ed9e61bf32e72f6da27c73bba8 (patch) | |
tree | 8a85efd8e08b8b7ece9094c7d633b74c7b22c6af /sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services | |
parent | 00be9b54b4d44b7dbd0e62a0f760067fbbf58f50 (diff) |
Enhance Tuscany JAX-RS reader/writer to better handle JAXB
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1177856 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services')
2 files changed, 6 insertions, 3 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/store/Catalog.java b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/store/Catalog.java index 7e579c6aba..5fb29782f2 100644 --- a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/store/Catalog.java +++ b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/store/Catalog.java @@ -19,8 +19,11 @@ package services.store; +import java.util.Date; + import javax.ws.rs.DELETE; import javax.ws.rs.GET; +import javax.ws.rs.HeaderParam; import javax.ws.rs.POST; import javax.ws.rs.PUT; import javax.ws.rs.Path; @@ -37,7 +40,7 @@ public interface Catalog { @GET @Path("{id}") - Item getItemById(@PathParam("id") String itemId); + Item getItemById(@PathParam("id") String itemId, @HeaderParam("If-Modified-Since") Date date); @POST void addItem(Item item); diff --git a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/store/FruitsCatalogImpl.java b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/store/FruitsCatalogImpl.java index afe3d3863e..447e983aa7 100644 --- a/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/store/FruitsCatalogImpl.java +++ b/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/services/store/FruitsCatalogImpl.java @@ -20,8 +20,8 @@ package services.store; import java.util.ArrayList; +import java.util.Date; import java.util.HashMap; -import java.util.List; import java.util.Map; import org.oasisopen.sca.annotation.Init; @@ -54,7 +54,7 @@ public class FruitsCatalogImpl implements Catalog { return items; } - public Item getItemById(String itemId) { + public Item getItemById(String itemId, Date date) { return catalog.get(itemId); } |