You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by lr...@apache.org on 2010/04/30 22:44:32 UTC

svn commit: r939812 - /tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/TestBindingCacheImpl.java

Author: lresende
Date: Fri Apr 30 20:44:31 2010
New Revision: 939812

URL: http://svn.apache.org/viewvc?rev=939812&view=rev
Log:
Minor update on REST cache control test case to accomodate refactoring to use common-http cache context class

Modified:
    tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/TestBindingCacheImpl.java

Modified: tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/TestBindingCacheImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/TestBindingCacheImpl.java?rev=939812&r1=939811&r2=939812&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/TestBindingCacheImpl.java (original)
+++ tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/TestBindingCacheImpl.java Fri Apr 30 20:44:31 2010
@@ -23,6 +23,8 @@ import java.io.ByteArrayInputStream;
 import java.io.InputStream;
 import java.util.Date;
 
+import org.apache.tuscany.sca.common.http.HTTPCacheContext;
+
 /**
  * Test service implementation that implements a various conditional HTTP
  * methods. For testing, the id==0 items are very old (Date(0)), not modified,
@@ -49,7 +51,7 @@ public class TestBindingCacheImpl {
 	 * @param id
 	 * @return
 	 */
-	public InputStream conditionalGet(String id, RESTCacheContext cacheContext)
+	public InputStream conditionalGet(String id, HTTPCacheContext cacheContext)
 			throws NotModifiedException, PreconditionFailedException {
 
 		if (cacheContext != null) {
@@ -99,7 +101,7 @@ public class TestBindingCacheImpl {
 	 * @param id
 	 * @return
 	 */
-	public InputStream conditionalDelete(String id, RESTCacheContext cacheContext)
+	public InputStream conditionalDelete(String id, HTTPCacheContext cacheContext)
 			throws NotModifiedException, PreconditionFailedException {
 
 		if (cacheContext != null) {
@@ -151,7 +153,7 @@ public class TestBindingCacheImpl {
 	 * @param id
 	 * @return
 	 */
-	public RESTCacheContext conditionalPost(RESTCacheContext cacheContext)
+	public HTTPCacheContext conditionalPost(HTTPCacheContext cacheContext)
 			throws NotModifiedException, PreconditionFailedException {
 		String id = "" + (new java.util.Random()).nextInt(Integer.MAX_VALUE);
 
@@ -180,7 +182,7 @@ public class TestBindingCacheImpl {
 		}
 
 		// Return the ETag and LastModfied fields by serialize to a byte array
-		RESTCacheContext returnContext = new RESTCacheContext();
+		HTTPCacheContext returnContext = new HTTPCacheContext();
 		returnContext.setETag( "ETag" + (new java.util.Random()).nextInt(Integer.MAX_VALUE) );
 		returnContext.setLastModified( new Date() );
 		return returnContext;
@@ -202,7 +204,7 @@ public class TestBindingCacheImpl {
 	 * @param id
 	 * @return
 	 */
-	public InputStream conditionalPut(String id, RESTCacheContext cacheContext)
+	public InputStream conditionalPut(String id, HTTPCacheContext cacheContext)
 			throws NotModifiedException, PreconditionFailedException {
 
 		if (cacheContext != null) {



Re: svn commit: r939812 - /tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/TestBindingCacheImpl.java

Posted by Luciano Resende <lu...@gmail.com>.
On Sat, May 1, 2010 at 12:05 AM, ant elder <an...@gmail.com> wrote:
> On Fri, Apr 30, 2010 at 9:44 PM,  <lr...@apache.org> wrote:
>> Author: lresende
>> Date: Fri Apr 30 20:44:31 2010
>> New Revision: 939812
>>
>> URL: http://svn.apache.org/viewvc?rev=939812&view=rev
>> Log:
>> Minor update on REST cache control test case to accomodate refactoring to use common-http cache context class
>>
>
> Could you tell the dev list about this binding, what are you planning
> for it to support etc?
>
>   ...ant
>

I was planning to create a wiki page and send a summary to the dev
list now that I'm starting to have some of this in a work stage, but
some info is available at [1] and [2]. I'll get something more
elaborated/detailed early next week.

[1] http://www.mail-archive.com/dev@tuscany.apache.org/msg12029.html
[2] http://www.mail-archive.com/dev@tuscany.apache.org/msg12045.html


-- 
Luciano Resende
http://people.apache.org/~lresende
http://twitter.com/lresende1975
http://lresende.blogspot.com/

Re: svn commit: r939812 - /tuscany/sca-java-2.x/trunk/modules/binding-rest-runtime/src/test/java/org/apache/tuscany/sca/binding/rest/TestBindingCacheImpl.java

Posted by ant elder <an...@gmail.com>.
On Fri, Apr 30, 2010 at 9:44 PM,  <lr...@apache.org> wrote:
> Author: lresende
> Date: Fri Apr 30 20:44:31 2010
> New Revision: 939812
>
> URL: http://svn.apache.org/viewvc?rev=939812&view=rev
> Log:
> Minor update on REST cache control test case to accomodate refactoring to use common-http cache context class
>

Could you tell the dev list about this binding, what are you planning
for it to support etc?

   ...ant