cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: [CXF-6165] Updating the demo to use the values entered in the form
Date Tue, 16 Jun 2015 14:59:54 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 2647813e1 -> beb4af748


[CXF-6165] Updating the demo to use the values entered in the form


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

Branch: refs/heads/master
Commit: beb4af748ff260ccbe2ac29a0a251ebcbe77ab8c
Parents: 2647813
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Tue Jun 16 15:59:40 2015 +0100
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Tue Jun 16 15:59:40 2015 +0100

----------------------------------------------------------------------
 .../src/main/java/demo/jaxrs/server/BigQueryService.java      | 7 +++++--
 .../big_query/src/main/webapp/WEB-INF/applicationContext.xml  | 3 ++-
 2 files changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/beb4af74/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 11662a9..b39c370 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
@@ -25,6 +25,7 @@ import javax.ws.rs.GET;
 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;
@@ -45,8 +46,10 @@ public class BigQueryService {
         ClientAccessToken accessToken = context.getToken();
         bigQueryClient.authorization(accessToken);
         
-        String searchWord = "brave";
-        String maxResults = "10";
+        MultivaluedMap<String, String> state = context.getState();
+        
+        String searchWord = state.getFirst("word");
+        String maxResults = state.getFirst("maxResults");
         String bigQuerySelect = "SELECT corpus,corpus_date FROM publicdata:samples.shakespeare
WHERE word=\\\"" 
             + searchWord + "\\\"";
         String bigQueryRequest = "{" +

http://git-wip-us.apache.org/repos/asf/cxf/blob/beb4af74/distribution/src/main/release/samples/jax_rs/big_query/src/main/webapp/WEB-INF/applicationContext.xml
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/big_query/src/main/webapp/WEB-INF/applicationContext.xml
b/distribution/src/main/release/samples/jax_rs/big_query/src/main/webapp/WEB-INF/applicationContext.xml
index 2dab000..cfc4aa0 100644
--- a/distribution/src/main/release/samples/jax_rs/big_query/src/main/webapp/WEB-INF/applicationContext.xml
+++ b/distribution/src/main/release/samples/jax_rs/big_query/src/main/webapp/WEB-INF/applicationContext.xml
@@ -98,8 +98,9 @@
          <property name="key" value="${client_id}"/> 
          <property name="secret" value="${client_secret}"/>
      </bean>
-     
+     <bean id="clientCodeStateManager" class="org.apache.cxf.rs.security.oauth2.client.MemoryClientCodeStateManager"/>
      <bean id="oidcRequestFilter" class="org.apache.cxf.rs.security.oidc.rp.OidcClientCodeRequestFilter">
+         <property name="clientCodeStateManager" ref="clientCodeStateManager"/>
          <property name="scopes" value="openid email profile https://www.googleapis.com/auth/bigquery.readonly"/>
          <property name="accessTokenServiceClient" ref="atServiceClient"/>
          <property name="userInfoClient" ref="userInfoClient"/>


Mime
View raw message