usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject incubator-usergrid git commit: Added TODO's detailing what needs to be done with value resource and the woes that it current presents ( in relation to get Responses )
Date Thu, 04 Dec 2014 19:53:33 GMT
Repository: incubator-usergrid
Updated Branches:
  refs/heads/USERGRID-256-ApiResponseImplementation c7d8f8460 -> 7918c45a2


Added TODO's detailing what needs to be done with value resource and the woes that it current
presents ( in relation to get Responses )


Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/7918c45a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/7918c45a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/7918c45a

Branch: refs/heads/USERGRID-256-ApiResponseImplementation
Commit: 7918c45a2b0af32043bb03462c119a429858746b
Parents: c7d8f84
Author: grey <greyes@apigee.com>
Authored: Thu Dec 4 11:53:30 2014 -0800
Committer: grey <greyes@apigee.com>
Committed: Thu Dec 4 11:53:30 2014 -0800

----------------------------------------------------------------------
 .../apache/usergrid/rest/test/resource/ValueResource.java    | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/7918c45a/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource/ValueResource.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource/ValueResource.java
b/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource/ValueResource.java
index 74fcbc5..6f2f19a 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource/ValueResource.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource/ValueResource.java
@@ -31,6 +31,9 @@ import java.io.IOException;
 import static org.junit.Assert.assertEquals;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.springframework.http.ResponseEntity;
+
+import org.apache.usergrid.rest.test.resource.app.ResponseEntityIterator;
 
 
 /** @author tnine */
@@ -102,6 +105,7 @@ public abstract class ValueResource extends NamedResource {
     }
 
     //TODO: eventually we need to merge this and make it the offical postInternal. this was
not done to keep tests compiling.
+    //TODO: need to change this to a ResponseEntityIterator so that it can be used in conjunction
with With Clauses
     protected Response postInternalResponse( Map<String, ?> entity ) throws IOException
{
 
         return mapper.readValue( jsonMedia( withParams( withToken( resource() ) ) ).post(
String.class, entity ),
@@ -143,8 +147,10 @@ public abstract class ValueResource extends NamedResource {
     public Response getInternalResponse() {
         try {
 //TODO: I believe this code needs to be added here so that we can use the with Keywords and
still get the appropriate  apiResponsecollection Back
+            //TODO: the problem with changing the code here is we use this class in the ResponseEntityIterator
to get the Response. We can't change it here or there will be a circular dependency in classes
+            //TODO: which means we would have to make yet another method to detail how we
would get the response. This is probably not the ideal way to go about using the response.
 //            CollectionResource collectionResource = new CollectionResource( this.getName(),this.getParent()
);
-//            ApiResponseCollection collectionRevisedApiResponse = new ApiResponseCollection(collectionResource,this.getInternalResponse()
);
+//            ResponseEntityIterator collectionRevisedApiResponse = new ResponseEntityIterator(collectionResource,this.getInternalResponse()
);
 //            return collectionRevisedApiResponse;
             return getInternalApiResponse();
         }


Mime
View raw message