cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: Minor update to the BigQuery demo
Date Wed, 16 Dec 2015 14:45:59 GMT
Repository: cxf
Updated Branches:
  refs/heads/master ef57932bc -> 36fad24cc


Minor update to the BigQuery demo


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/36fad24c
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/36fad24c
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/36fad24c

Branch: refs/heads/master
Commit: 36fad24cc72a2252f5a77ec61a67791397ca6bb1
Parents: ef57932
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Wed Dec 16 14:45:41 2015 +0000
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Wed Dec 16 14:45:41 2015 +0000

----------------------------------------------------------------------
 .../main/java/demo/jaxrs/server/BigQueryService.java    | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/36fad24c/distribution/src/main/release/samples/jax_rs/big_query/src/main/java/demo/jaxrs/server/BigQueryService.java
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/big_query/src/main/java/demo/jaxrs/server/BigQueryService.java
b/distribution/src/main/release/samples/jax_rs/big_query/src/main/java/demo/jaxrs/server/BigQueryService.java
index e14c892..10a51e2 100644
--- a/distribution/src/main/release/samples/jax_rs/big_query/src/main/java/demo/jaxrs/server/BigQueryService.java
+++ b/distribution/src/main/release/samples/jax_rs/big_query/src/main/java/demo/jaxrs/server/BigQueryService.java
@@ -23,11 +23,12 @@ import java.util.List;
 import java.util.Map;
 
 import javax.ws.rs.GET;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.FormParam;
 import javax.ws.rs.POST;
 import javax.ws.rs.Path;
 import javax.ws.rs.Produces;
 import javax.ws.rs.core.Context;
-import javax.ws.rs.core.MultivaluedMap;
 
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.jaxrs.client.WebClient;
@@ -59,16 +60,13 @@ public class BigQueryService {
     
     @POST
     @Path("/complete")
+    @Consumes("application/x-www-form-urlencoded")
     @Produces("text/html")
-    public BigQueryResponse completeBigQuerySearch() {
+    public BigQueryResponse completeBigQuerySearch(@FormParam("word") String searchWord,

+                                                   @FormParam("maxResults") String maxResults)
{
         
         ClientAccessToken accessToken = oidcContext.getToken();
         
-        MultivaluedMap<String, String> state = oidcContext.getState();
-        
-        String searchWord = state.getFirst("word");
-        String maxResults = state.getFirst("maxResults");
-        
         BigQueryResponse bigQueryResponse = new BigQueryResponse(getUserInfo(), searchWord);
         bigQueryResponse.setTexts(getMatchingTexts(bigQueryClient, accessToken, searchWord,
maxResults));
         return bigQueryResponse;


Mime
View raw message