Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EFD2B988E for ; Mon, 23 Apr 2012 21:49:01 +0000 (UTC) Received: (qmail 89872 invoked by uid 500); 23 Apr 2012 21:49:01 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 89805 invoked by uid 500); 23 Apr 2012 21:49:01 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 89757 invoked by uid 99); 23 Apr 2012 21:49:01 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Apr 2012 21:49:01 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Apr 2012 21:48:55 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 61D7B238897D for ; Mon, 23 Apr 2012 21:48:33 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r814149 - in /websites/production/cxf/content: cache/docs.pageCache docs/jax-rs-advanced-features.html docs/jax-rs-basics.html docs/jax-rs.html Date: Mon, 23 Apr 2012 21:48:33 -0000 To: commits@cxf.apache.org From: buildbot@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120423214833.61D7B238897D@eris.apache.org> Author: buildbot Date: Mon Apr 23 21:48:32 2012 New Revision: 814149 Log: Production update by buildbot for cxf Modified: websites/production/cxf/content/cache/docs.pageCache websites/production/cxf/content/docs/jax-rs-advanced-features.html websites/production/cxf/content/docs/jax-rs-basics.html websites/production/cxf/content/docs/jax-rs.html Modified: websites/production/cxf/content/cache/docs.pageCache ============================================================================== Binary files - no diff available. Modified: websites/production/cxf/content/docs/jax-rs-advanced-features.html ============================================================================== --- websites/production/cxf/content/docs/jax-rs-advanced-features.html (original) +++ websites/production/cxf/content/docs/jax-rs-advanced-features.html Mon Apr 23 21:48:32 2012 @@ -124,7 +124,7 @@ Apache CXF -- JAX-RS Advanced Features

JMS Support

@@ -158,6 +158,8 @@ jaxrs:server/@address is set to "/bar" t

FIQL search queries

+

Introduction

+

CXF JAXRS (since 2.3.0) lets users do the advanced search queries based on the Feed Item Query Language(FIQL). FIQL lets users express complex search expressions using an intuitive and URI friendly language.

For example, a query such as

@@ -175,6 +177,22 @@ An expression such as "name==CXF*" can b

Note that either '_search' or '_s' query has to be used to pass the FIQL expression.

+

Dependencies and Configuration

+ +

The following dependency is required starting from CXF 2.6.0:

+ +
+
+   <dependency>
+      <groupId>org.apache.cxf</groupId>
+      <artifactId>cxf-rt-rs-extension-search</artifactId>
+      <version>2.5.0</version>
+   </dependency>
+
+
+ +

Additionally, in CXF 2.6.0, SearchContextProvider needs to be registered as jaxrs:provider.

+

Consuming FIQL queries

To work with FIQL queries, a SearchContext needs be injected into an application code and used to retrieve a SearchCondition representing the current FIQL query. This SearchCondition can be used in a number of ways for finding the matching data.

Modified: websites/production/cxf/content/docs/jax-rs-basics.html ============================================================================== --- websites/production/cxf/content/docs/jax-rs-basics.html (original) +++ websites/production/cxf/content/docs/jax-rs-basics.html Mon Apr 23 21:48:32 2012 @@ -124,7 +124,7 @@ Apache CXF -- JAX-RS Basics

Resource class

@@ -737,6 +737,40 @@ UriInfo, SecurityContext, HttpHeaders, P

Note that Providers and ContextResolver are likely to be of interest to message body providers rather than to the actual application code. You can also inject all the context types into @Resource annotated fields.

+

Custom Contexts

+ +

Registering a custom ContextProvider implementation such as SearchContextProvider lets attach Context annotations to arbitrary classes which can be helpful when some of the information representing the current request needs to be optimized or specialized, example:

+ +
+
+package resources;
+import org.apache.cxf.jaxrs.ext.search.SearchContext;
+@Path("/")
+public class RootResource {
+    @Context
+    private  SearchContext sc;
+    // the rest of the code
+}
+
+
+ +

and

+ +
+
+<jaxrs:server>
+  <serviceBeans>
+    <bean class="resources.RootResource"/>
+  </serviceBeans>
+  <jaxrs:providers>
+    <bean class="org.apache.cxf.jaxrs.ext.search.SearchContextProvider"/>
+  </jaxrs:providers>
+</jaxrs:server>
+
+
+ +

Note registering SearchContextProvider is a temporarily requirement, it will be auto-discovered in future CXF versions.

+

URI calculation using UriInfo and UriBuilder

Mapping of a particular URI to a service that returns some resource is straightforward using the @Path annotation. However RESTful services are often connected: one service returns data that is used as the key in another service. Listing entities and accessing a particular entity is a typical example:

Modified: websites/production/cxf/content/docs/jax-rs.html ============================================================================== --- websites/production/cxf/content/docs/jax-rs.html (original) +++ websites/production/cxf/content/docs/jax-rs.html Mon Apr 23 21:48:32 2012 @@ -125,7 +125,7 @@ Apache CXF -- JAX-RS +

Introduction

@@ -133,7 +133,7 @@ Apache CXF -- JAX-RS

CXF supports JAX-RS (JSR-311), the Java API for RESTful Web Services. JAX-RS standardizes the way RESTful services can be developed in Java.

-

CXF 2.5.x, 2.4.x and 2.3.x supports JSR-311 API 1.1 and is JAX-RS TCK 1.1 compliant.
+

CXF 2.6.x, 2.5.x, 2.4.x and 2.3.x supports JSR-311 API 1.1 and is JAX-RS TCK 1.1 compliant.
The JAX-RS 1.1 specification may be found here

CXF 2.2.x supports JSR-311 API 1.0 and is JAX-RS TCK 1.0. compliant.
@@ -151,16 +151,16 @@ The JAX-RS 1.0 specification may be foun

Migration

-

Migrating from 1.0 to 1.1

+

Migrating from JAX-RS 1.0 to 1.1

-

Existing JAX-RS 1.0 applications should run in CXF 2.4.x without any problems.
+

Existing JAX-RS 1.0 applications should run in CXF starting from 2.3.x without any problems.
There have been just a few minor modifications at the JAX-RS API level:

  • The @ApplicationPath annotation has been added for JAX-RS Application subclasses
  • The Request interface has been updated with a new no-argument evaluatePreconditions method - existing applications which are already using the Request interface may need to be recompiled

Maven dependencies

-

To incorporate JAX-RS, you will need:

+

CXF 2.3.x - CXF 2.5.x

@@ -213,6 +213,46 @@ There have been just a few minor modific
 
 

Please check the pom.xml for the list of cxf components used by the JAX-RS implementation. Snapshots are available from http://repository.apache.org/snapshots/org/apache/cxf/apache-cxf/.

+

CXF 2.6.x

+ +

Please check the CXF 2.6 Migration Guide for the information about all the changes affecting the JAX-RS users. Typically the frontend dependency should be enough:

+ +
+
+   <dependency>
+      <groupId>org.apache.cxf</groupId>
+      <artifactId>cxf-rt-frontend-jaxrs</artifactId>
+      <version>2.5.0</version>
+   </dependency>
+
+
+ +

Optional providers (including the default JSONProvider) are located in this module:

+ +
+
+   <dependency>
+      <groupId>org.apache.cxf</groupId>
+      <artifactId>cxf-rt-rs-extension-providers</artifactId>
+      <version>2.5.0</version>
+   </dependency>
+
+
+ +

The Search extension is now located in

+ +
+
+   <dependency>
+      <groupId>org.apache.cxf</groupId>
+      <artifactId>cxf-rt-rs-extension-search</artifactId>
+      <version>2.5.0</version>
+   </dependency>
+
+
+ + +

Setting up the classpath

If Maven is not used then the following JARs will need to be available at the runtime classpath.