cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r673167 [1/6] - in /cxf/trunk: parent/ rt/frontend/jaxrs/ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ rt/frontend...
Date Tue, 01 Jul 2008 18:41:29 GMT
Author: sergeyb
Date: Tue Jul  1 11:41:24 2008
New Revision: 673167

URL: http://svn.apache.org/viewvc?rev=673167&view=rev
Log:
Upgrading JAX-RS implementation to 0.8 api

Added:
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MappingsHandler.java   (with props)
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/RequestHandler.java   (with props)
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/ResponseHandler.java   (with props)
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/CacheControlHeaderProvider.java
      - copied, changed from r651969, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/CacheControlHeaderProvider.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/CookieHeaderProvider.java
      - copied, changed from r651969, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/CookieHeaderProvider.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/EntityTagHeaderProvider.java
      - copied, changed from r651969, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/EntityTagHeaderProvider.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/HttpHeadersImpl.java
      - copied, changed from r651969, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/HttpHeadersImpl.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/MediaTypeHeaderProvider.java
      - copied, changed from r651969, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/MediaTypeHeaderProvider.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/MessageBodyWorkersImpl.java   (with props)
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/MetadataMap.java
      - copied, changed from r651969, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/MetadataMap.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/NewCookieHeaderProvider.java
      - copied, changed from r651969, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/NewCookieHeaderProvider.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/PathSegmentImpl.java
      - copied, changed from r651969, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/PathSegmentImpl.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestImpl.java
      - copied, changed from r651969, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/RequestImpl.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestPreprocessor.java   (with props)
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResponseBuilderImpl.java
      - copied, changed from r651969, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ResponseBuilderImpl.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResponseImpl.java   (with props)
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RuntimeDelegateImpl.java
      - copied, changed from r651969, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/RuntimeDelegateImpl.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/SecurityContextImpl.java
      - copied, changed from r651969, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/SecurityContextImpl.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriBuilderImpl.java
      - copied, changed from r651969, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/UriBuilderImpl.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriInfoImpl.java   (with props)
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/VariantListBuilderImpl.java
      - copied, changed from r651969, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/VariantListBuilderImpl.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/AbstractThreadLocalProxy.java   (with props)
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalContextResolver.java   (with props)
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalHttpHeaders.java   (with props)
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalHttpServletRequest.java   (with props)
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalMessageBodyWorkers.java   (with props)
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalProxy.java   (with props)
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalRequest.java   (with props)
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalSecurityContext.java   (with props)
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/tl/ThreadLocalUriInfo.java   (with props)
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/AbstractResourceInfo.java   (with props)
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/OperationResourceInfoComparator.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/ProviderInfo.java   (with props)
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractJAXBProvider.java   (with props)
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/PrimitiveTextProvider.java   (with props)
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/AnnotationUtils.java   (with props)
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java   (with props)
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/JAXRSUtils.java
      - copied, changed from r651969, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSUtils.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/Messages.properties   (with props)
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/Customer.java   (with props)
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/JAXBContextProvider.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/SelectMethodCandidatesTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/CacheControlHeaderProviderTest.java
      - copied, changed from r651969, cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/CacheControlHeaderProviderTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/CookieHeaderProviderTest.java
      - copied, changed from r651969, cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/CookieHeaderProviderTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/EntityTagHeaderProviderTest.java
      - copied, changed from r651969, cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/EntityTagHeaderProviderTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/HttpHeadersImplTest.java
      - copied, changed from r651969, cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/HttpHeadersImplTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/MediaTypeHeaderProviderTest.java
      - copied, changed from r651969, cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/MediaTypeHeaderProviderTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/MetadataMapTest.java
      - copied, changed from r651969, cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/MetadataMapTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/NewCookieHeaderProviderTest.java
      - copied, changed from r651969, cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/NewCookieHeaderProviderTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/RequestImplTest.java
      - copied, changed from r651969, cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/RequestImplTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/ResponseBuilderImplTest.java
      - copied, changed from r651969, cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/ResponseBuilderImplTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/ResponseImplTest.java
      - copied, changed from r651969, cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/ResponseImplTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/RuntimeDelegateImplTest.java
      - copied, changed from r651969, cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/RuntimeDelegateImplTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/UriBuilderImplTest.java
      - copied, changed from r651969, cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/UriBuilderImplTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/UriInfoImplTest.java
      - copied, changed from r651969, cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/UriInfoImplTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/impl/VariantListBuilderImplTest.java
      - copied, changed from r651969, cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/VariantListBuilderImplTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/resources/TestResource.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/JAXRSUtilsTest.java
      - copied, changed from r651969, cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/JAXRSUtilsTest.java
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/BookExceptionMapper.java
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/BookSubresource.java   (with props)
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/BookSubresourceImpl.java   (with props)
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/expected_get_book_notfound_mapped.txt
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/expected_get_chapter1_utf.txt   (with props)
    cxf/trunk/systests/src/test/resources/jaxrs_atom/
Removed:
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSUtils.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/MetadataMap.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AcceptTypeQueryHandler.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/CacheControlHeaderProvider.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/CookieHeaderProvider.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/EntityTagHeaderProvider.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/HttpHeadersImpl.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/MediaTypeHeaderProvider.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/NewCookieHeaderProvider.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/PathSegmentImpl.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/RequestImpl.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ResponseBuilderImpl.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ResponseImpl.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/RuntimeDelegateImpl.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/SecurityContextImpl.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/SystemQueryHandler.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/UriBuilderImpl.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/UriInfoImpl.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/VariantListBuilderImpl.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/JAXRSUtilsTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/MetadataMapTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/CacheControlHeaderProviderTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/CookieHeaderProviderTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/EntityTagHeaderProviderTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/HttpHeadersImplTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/MediaTypeHeaderProviderTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/NewCookieHeaderProviderTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/RequestImplTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/ResponseBuilderImplTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/ResponseImplTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/RuntimeDelegateImplTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/UriBuilderImplTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/UriInfoImplTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/VariantListBuilderImplTest.java
Modified:
    cxf/trunk/parent/pom.xml
    cxf/trunk/rt/frontend/jaxrs/pom.xml
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSInvoker.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServerFactoryBean.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServiceFactoryBean.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/Messages.properties
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSInInterceptor.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSOutInterceptor.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/Messages.properties
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/ClassResourceInfo.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/OperationResourceInfo.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/URITemplate.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AtomEntryProvider.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AtomFeedProvider.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/BinaryDataProvider.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/FormEncodingReaderProvider.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/JAXBElementProvider.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/JSONProvider.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ProviderFactory.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/SourceProvider.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/StringProvider.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/XMLBeansElementProvider.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/XMLBeansJSONProvider.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/spring/JAXRSServerFactoryBeanDefinitionParser.java
    cxf/trunk/rt/frontend/jaxrs/src/main/resources/META-INF/services/javax.ws.rs.ext.RuntimeDelegate
    cxf/trunk/rt/frontend/jaxrs/src/main/resources/schemas/jaxrs.xsd
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/JAXRSServiceFactoryBeanTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/ClassResourceInfoTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/model/URITemplateTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/AtomEntryProviderTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/AtomFeedProviderTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/BinaryDataProviderTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/FormEncodingReaderProviderTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/ProviderFactoryTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/provider/SourceProviderTest.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/resources/BookInterface.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/resources/BookStore.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/resources/BookStoreNoSubResource.java
    cxf/trunk/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/resources/BookSuperClass.java
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/AtomBookServer.java
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/AtomBookStore.java
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/AtomClientBookTest.java
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/BadgerFishProvider.java
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/Book.java
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/BookInterface.java
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/BookStore.java
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/BookStoreWithInterface.java
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/Books.java
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerBookTest.java
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/JAXRSClientServerResourceCreatedSpringProviderTest.java
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/add_book.txt
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/expected_add_book.txt
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/expected_atom_book_json.txt
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/expected_atom_books_json.txt
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/expected_get_book123.txt
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/expected_get_book_notfound.txt
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/expected_get_books.txt
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/expected_get_cd.txt
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/expected_get_cds.txt
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/expected_get_chapter1.txt
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/expected_update_book.txt
    cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxrs/resources/update_book_not_exist.txt
    cxf/trunk/systests/src/test/resources/jaxrs_spring_providers/WEB-INF/beans.xml

Modified: cxf/trunk/parent/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/parent/pom.xml?rev=673167&r1=673166&r2=673167&view=diff
==============================================================================
--- cxf/trunk/parent/pom.xml (original)
+++ cxf/trunk/parent/pom.xml Tue Jul  1 11:41:24 2008
@@ -481,7 +481,7 @@
             <dependency>
                 <groupId>org.codehaus.jettison</groupId>
                 <artifactId>jettison</artifactId>
-                <version>1.0</version>
+                <version>1.0.1</version>
                 <exclusions>
                     <exclusion>
                         <groupId>stax</groupId>

Modified: cxf/trunk/rt/frontend/jaxrs/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/pom.xml?rev=673167&r1=673166&r2=673167&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/pom.xml (original)
+++ cxf/trunk/rt/frontend/jaxrs/pom.xml Tue Jul  1 11:41:24 2008
@@ -65,7 +65,7 @@
         <dependency>
             <groupId>javax.ws.rs</groupId>
             <artifactId>jsr311-api</artifactId>
-            <version>0.6</version>
+            <version>0.8</version>
         </dependency>
         <dependency>
             <groupId>org.apache.cxf</groupId>
@@ -96,6 +96,14 @@
                     <artifactId>abdera-client</artifactId>
                 </exclusion>
                 <exclusion>
+                    <groupId>org.apache.abdera</groupId>
+                    <artifactId>abdera-server</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.abdera</groupId>
+                    <artifactId>abdera-extensions-html</artifactId>
+                </exclusion>
+                <exclusion>
                     <groupId>org.apache.geronimo.specs</groupId>
                     <artifactId>geronimo-activation_1.0.2_spec</artifactId>
                 </exclusion>
@@ -138,6 +146,11 @@
             <name>Apache Incubating Repository</name>
             <url>http://people.apache.org/repo/m2-incubating-repository</url>
         </repository>
+        <repository>
+            <id>java.net.2</id>
+            <name>Java Net 2 Repository</name>
+            <url>http://download.java.net/maven/2</url>
+        </repository>
     </repositories>
 
 </project>

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSInvoker.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSInvoker.java?rev=673167&r1=673166&r2=673167&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSInvoker.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSInvoker.java Tue Jul  1 11:41:24 2008
@@ -21,26 +21,36 @@
 
 
 import java.lang.reflect.Method;
-import java.lang.reflect.Proxy;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.ResourceBundle;
+import java.util.logging.Logger;
 
-import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.core.Response;
 
+import org.apache.cxf.common.i18n.BundleUtils;
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.interceptor.Fault;
+import org.apache.cxf.jaxrs.impl.MetadataMap;
 import org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor;
 import org.apache.cxf.jaxrs.model.ClassResourceInfo;
 import org.apache.cxf.jaxrs.model.OperationResourceInfo;
 import org.apache.cxf.jaxrs.model.URITemplate;
+import org.apache.cxf.jaxrs.provider.ProviderFactory;
+import org.apache.cxf.jaxrs.utils.InjectionUtils;
+import org.apache.cxf.jaxrs.utils.JAXRSUtils;
 import org.apache.cxf.message.Exchange;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.message.MessageContentsList;
 import org.apache.cxf.service.invoker.AbstractInvoker;
 
 public class JAXRSInvoker extends AbstractInvoker {
+    private static final Logger LOG = LogUtils.getL7dLogger(JAXRSServiceFactoryBean.class);
+    private static final ResourceBundle BUNDLE = BundleUtils.getBundle(JAXRSInvoker.class);
+    
     private List<Object> resourceObjects;
 
     public JAXRSInvoker() {
@@ -52,38 +62,39 @@
     public Object invoke(Exchange exchange, Object request) {
         return invoke(exchange, request, resourceObjects);
     }    
+    @SuppressWarnings("unchecked")
     public Object invoke(Exchange exchange, Object request, List<Object> resources) {
+        
+        Response response = exchange.get(Response.class);
+        if (response != null) {
+            // this means a blocking request filter provided a Response
+            // or earlier exception has been converted to Response
+            
+            //TODO: should we remove response from exchange ?
+            //      or should we rather ignore content list and have 
+            //      Response set here for all cases and extract it 
+            //      in the out interceptor instead of dealing with the contents list ?  
+            return new MessageContentsList(response);    
+        }
+        
         OperationResourceInfo ori = exchange.get(OperationResourceInfo.class);
 
         ClassResourceInfo cri = ori.getClassResourceInfo();
-        Method methodToInvoke = cri.getMethodDispatcher().getMethod(ori);
         Object resourceObject = getServiceObject(exchange, resources);
         
-        // TODO : update the method dispatcher
-        if (Proxy.class.isInstance(resourceObject)) {
-            
-            for (Class<?> c : resourceObject.getClass().getInterfaces()) {
-                try {
-                    Method m = c.getMethod(
-                        methodToInvoke.getName(), methodToInvoke.getParameterTypes());
-                    if (m != null) {
-                        methodToInvoke = m;
-                        break;
-                    }
-                } catch (NoSuchMethodException ex) {
-                    //ignore
-                }
-            }
-            
-        }
+        Method methodToInvoke = InjectionUtils.checkProxy(
+             cri.getMethodDispatcher().getMethod(ori), resourceObject);
         
         if (cri.isRoot()) {
-            JAXRSUtils.injectHttpContextValues(resourceObject, 
-                                               ori, 
-                                               exchange.getInMessage());
-            JAXRSUtils.injectServletResourceValues(resourceObject, 
-                                               ori, 
+            JAXRSUtils.handleSetters(cri, resourceObject, 
+                                     exchange.getInMessage());
+            
+            InjectionUtils.injectContextFields(resourceObject, 
+                                               ori.getClassResourceInfo(), 
                                                exchange.getInMessage());
+            InjectionUtils.injectResourceFields(resourceObject, 
+                                            ori.getClassResourceInfo(), 
+                                            exchange.getInMessage());
         }
 
         List<Object> params = null;
@@ -97,16 +108,17 @@
         try {
             result = invoke(exchange, resourceObject, methodToInvoke, params);
         } catch (Fault ex) {
-            if (ex.getCause() instanceof WebApplicationException) {
-                WebApplicationException wex = (WebApplicationException)ex.getCause();
-                if (wex.getResponse() != null) {
-                    result = wex.getResponse();
-                } else {
-                    result = Response.serverError().build();
+            Response excResponse = JAXRSUtils.convertFaultToResponse(ex.getCause());
+            if (excResponse == null) {
+                ProviderFactory.getInstance().cleatThreadLocalProxies();
+                ClassResourceInfo criRoot =
+                    (ClassResourceInfo)exchange.get(JAXRSInInterceptor.ROOT_RESOURCE_CLASS);
+                if (criRoot != null) {
+                    criRoot.clearThreadLocalProxies();
                 }
-                return new MessageContentsList(result);
+                throw ex;
             }
-            throw ex;
+            return new MessageContentsList(excResponse);
         }
         
         if (ori.isSubResourceLocator()) {
@@ -131,17 +143,35 @@
             if (contentType == null) {
                 contentType = "*/*";
             }
-            String acceptContentType = (String)msg.get(Message.ACCEPT_CONTENT_TYPE);
-            if (acceptContentType == null) {
-                acceptContentType = "*/*";
-            }
+            List<MediaType> acceptContentType = 
+                (List<MediaType>)msg.getExchange().get(Message.ACCEPT_CONTENT_TYPE);
             ClassResourceInfo subCri = JAXRSUtils.findSubResourceClass(cri, result.getClass());
+            
+            if (subCri == null) {
+                org.apache.cxf.common.i18n.Message errorM = 
+                    new org.apache.cxf.common.i18n.Message("NO_SUBRESOURCE_FOUND",  
+                                                           BUNDLE, 
+                                                           subResourcePath);
+                LOG.severe(errorM.toString());
+                throw new Fault(errorM);
+            }
+            
             OperationResourceInfo subOri = JAXRSUtils.findTargetMethod(subCri, 
                                                                        subResourcePath, 
                                                                        httpMethod, 
                                                                        values, 
                                                                        contentType, 
                                                                        acceptContentType);
+            
+            if (subCri == null) {
+                org.apache.cxf.common.i18n.Message errorM = 
+                    new org.apache.cxf.common.i18n.Message("NO_SUBRESOURCE_METHOD_FOUND",  
+                                                           BUNDLE, 
+                                                           subCri.getResourceClass().getSimpleName());
+                LOG.severe(errorM.toString());
+                throw new Fault(errorM);
+            }
+            
             exchange.put(OperationResourceInfo.class, subOri);
             msg.put(JAXRSInInterceptor.RELATIVE_PATH, values.getFirst(URITemplate.FINAL_MATCH_GROUP));
             msg.put(URITemplate.TEMPLATE_PARAMETERS, values);

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServerFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServerFactoryBean.java?rev=673167&r1=673166&r2=673167&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServerFactoryBean.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServerFactoryBean.java Tue Jul  1 11:41:24 2008
@@ -21,6 +21,7 @@
 import java.io.IOException;
 import java.util.Arrays;
 import java.util.List;
+import java.util.Map;
 
 import org.apache.cxf.BusException;
 import org.apache.cxf.binding.BindingConfiguration;
@@ -33,6 +34,7 @@
 import org.apache.cxf.endpoint.Server;
 import org.apache.cxf.endpoint.ServerImpl;
 import org.apache.cxf.feature.AbstractFeature;
+import org.apache.cxf.jaxrs.impl.RequestPreprocessor;
 import org.apache.cxf.jaxrs.lifecycle.ResourceProvider;
 import org.apache.cxf.jaxrs.provider.ProviderFactory;
 import org.apache.cxf.service.Service;
@@ -63,6 +65,8 @@
     private JAXRSServiceFactoryBean serviceFactory;
     private List<Object> serviceBeans;
     private List<?> entityProviders;
+    private Map<Object, Object> languageMappings;
+    private Map<Object, Object> extensionMappings;
 
     public JAXRSServerFactoryBean() {
         this(new JAXRSServiceFactoryBean());
@@ -89,8 +93,11 @@
                 ep.getService().setInvoker(invoker);
             }
             if (entityProviders != null) {
-                ProviderFactory.getInstance().setUserEntityProviders(entityProviders); 
+                ProviderFactory.getInstance().setUserProviders(entityProviders); 
             }
+            ProviderFactory.getInstance().setRequestPreporcessor(
+                new RequestPreprocessor(languageMappings, extensionMappings));
+            
             
             if (start) {
                 server.start();
@@ -216,6 +223,14 @@
         return null;
     }
 
+    public void setLanguageMappings(Map<Object, Object> lMaps) {
+        languageMappings = lMaps;
+    }
+    
+    public void setExtensionMappings(Map<Object, Object> extMaps) {
+        extensionMappings = extMaps;
+    }
+    
     public JAXRSServiceFactoryBean getServiceFactory() {
         return serviceFactory;
     }
@@ -258,14 +273,14 @@
     /**
      * @return the entityProviders
      */
-    public List<?> getEntityProviders() {
+    public List<?> getProviders() {
         return entityProviders;
     }
 
     /**
      * @param entityProviders the entityProviders to set
      */
-    public void setEntityProviders(List<? extends Object> entityProviders) {
-        this.entityProviders = entityProviders;
+    public void setProviders(List<? extends Object> providers) {
+        this.entityProviders = providers;
     }
 }

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServiceFactoryBean.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServiceFactoryBean.java?rev=673167&r1=673166&r2=673167&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServiceFactoryBean.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/JAXRSServiceFactoryBean.java Tue Jul  1 11:41:24 2008
@@ -22,20 +22,28 @@
 import java.lang.reflect.Method;
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.ResourceBundle;
 import java.util.concurrent.Executor;
+import java.util.logging.Logger;
 
 import javax.ws.rs.Path;
 
+import org.apache.cxf.common.i18n.BundleUtils;
+import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.util.ClassHelper;
 import org.apache.cxf.jaxrs.lifecycle.PerRequestResourceProvider;
 import org.apache.cxf.jaxrs.lifecycle.ResourceProvider;
+import org.apache.cxf.jaxrs.lifecycle.SingletonResourceProvider;
 import org.apache.cxf.jaxrs.model.ClassResourceInfo;
 import org.apache.cxf.jaxrs.model.MethodDispatcher;
 import org.apache.cxf.jaxrs.model.OperationResourceInfo;
 import org.apache.cxf.jaxrs.model.URITemplate;
+import org.apache.cxf.jaxrs.utils.AnnotationUtils;
+import org.apache.cxf.jaxrs.utils.InjectionUtils;
 import org.apache.cxf.service.Service;
 import org.apache.cxf.service.factory.AbstractServiceFactoryBean;
 import org.apache.cxf.service.invoker.Invoker;
@@ -46,8 +54,8 @@
  */
 public class JAXRSServiceFactoryBean extends AbstractServiceFactoryBean {
     
-    //private static final Logger LOG = Logger.getLogger(JAXRSServiceFactoryBean.class.getName());
-    //private static final ResourceBundle BUNDLE = BundleUtils.getBundle(JAXRSServiceFactoryBean.class);
+    private static final Logger LOG = LogUtils.getL7dLogger(JAXRSServiceFactoryBean.class);
+    private static final ResourceBundle BUNDLE = BundleUtils.getBundle(JAXRSServiceFactoryBean.class);
 
     protected List<ClassResourceInfo> classResourceInfos = 
         new ArrayList<ClassResourceInfo>();
@@ -106,12 +114,19 @@
         return resourceClasses;
     }
 
+    public List<ClassResourceInfo> getClassResourceInfo() {
+        return Collections.unmodifiableList(classResourceInfos);
+    }
+    
     public void setResourceClasses(List<Class> classes) {
         for (Class resourceClass : classes) {
             ClassResourceInfo classResourceInfo = 
                 createClassResourceInfo(resourceClass, resourceClass, true);
-            classResourceInfos.add(classResourceInfo);
+            if (classResourceInfo != null) {
+                classResourceInfos.add(classResourceInfo);
+            }
         }
+        injectContexts();
     }
 
     public void setResourceClasses(Class... classes) {
@@ -126,12 +141,22 @@
                                         ClassHelper.getRealClass(bean),
                                             true);
             classResourceInfos.add(classResourceInfo);
+            classResourceInfo.setResourceProvider(
+                               new SingletonResourceProvider(bean));
+        }
+    }
+    
+    private void injectContexts() {
+        for (ClassResourceInfo cri : classResourceInfos) {
+            if (cri.isSingleton()) {
+                InjectionUtils.injectContextProxies(cri, 
+                                                    cri.getResourceProvider().getInstance());
+            }
         }
     }
     
     public void setResourceProvider(Class c, ResourceProvider rp) {
         resourceProviders.put(c, rp);
-        updateClassResourceProviders();
     }
     
     protected void initializeServiceModel() {
@@ -149,7 +174,10 @@
 
     private void updateClassResourceProviders() {
         for (ClassResourceInfo cri : classResourceInfos) {
-            //TODO: Using information from annotation to determine which lifecycle provider to use
+            if (cri.getResourceProvider() != null) {
+                continue;
+            }
+            
             ResourceProvider rp = resourceProviders.get(cri.getResourceClass());
             if (rp != null) {
                 cri.setResourceProvider(rp);
@@ -159,6 +187,7 @@
                 cri.setResourceProvider(rp);  
             }
         }
+        injectContexts();
     }
     
     protected ClassResourceInfo createClassResourceInfo(
@@ -172,52 +201,56 @@
         
         MethodDispatcher md = createOperation(cri);
         cri.setMethodDispatcher(md);
-        return cri;
+        return checkMethodDispatcher(cri) ? cri : null;
     }
 
     protected MethodDispatcher createOperation(ClassResourceInfo cri) {
         MethodDispatcher md = new MethodDispatcher();
         for (Method m : cri.getServiceClass().getMethods()) {
             
-                       
-            String httpMethod = JAXRSUtils.getHttpMethodValue(m);
-            Path path = (Path)JAXRSUtils.getMethodAnnotation(m, Path.class);
-            if (httpMethod != null && path != null) {
-                /*
-                 * Sub-resource method, URI template created by concatenating
-                 * the URI template of the resource class with the URI template
-                 * of the method
-                 */
-                OperationResourceInfo ori = new OperationResourceInfo(m, cri);
-                URITemplate t = 
-                    URITemplate.createTemplate(cri, path);
-                ori.setURITemplate(t);
-                ori.setHttpMethod(httpMethod);
-                md.bind(ori, m);
-            } else if (path != null) {
-                // sub-resource locator
-                OperationResourceInfo ori = new OperationResourceInfo(m, cri);
-                URITemplate t = 
-                    URITemplate.createTemplate(cri, path);
-                ori.setURITemplate(t);
-                md.bind(ori, m);     
-                Class subResourceClass = m.getReturnType();
-                ClassResourceInfo subCri = createClassResourceInfo(
-                     subResourceClass, subResourceClass, false);
-                cri.addSubClassResourceInfo(subCri);
-            } else if (httpMethod != null) {
-                OperationResourceInfo ori = new OperationResourceInfo(m, cri);
-                URITemplate t = 
-                    URITemplate.createTemplate(cri, null);
-                ori.setURITemplate(t);
-                ori.setHttpMethod(httpMethod);
-                md.bind(ori, m);
+            Method annotatedMethod = AnnotationUtils.getAnnotatedMethod(m);
+            
+            String httpMethod = AnnotationUtils.getHttpMethodValue(annotatedMethod);
+            Path path = (Path)AnnotationUtils.getMethodAnnotation(annotatedMethod, Path.class);
+            
+            if (httpMethod != null || path != null) {
+                md.bind(createOperationInfo(m, annotatedMethod, cri, path, httpMethod), m);
+                if (httpMethod == null) {
+                    // subresource locator
+                    Class subResourceClass = m.getReturnType();
+                    ClassResourceInfo subCri = createClassResourceInfo(
+                         subResourceClass, subResourceClass, false);
+                    if (checkMethodDispatcher(subCri)) {
+                        cri.addSubClassResourceInfo(subCri);
+                    }
+                }
             }
         }
-
+        
         return md;
     }
     
+    private OperationResourceInfo createOperationInfo(Method m, Method annotatedMethod, 
+                                                      ClassResourceInfo cri, Path path, String httpMethod) {
+        OperationResourceInfo ori = new OperationResourceInfo(m, cri);
+        URITemplate t = 
+            URITemplate.createTemplate(cri, path);
+        ori.setURITemplate(t);
+        ori.setHttpMethod(httpMethod);
+        ori.setAnnotatedMethod(annotatedMethod);
+        return ori;
+    }
+    
+       
+    private boolean checkMethodDispatcher(ClassResourceInfo cr) {
+        if (cr.getMethodDispatcher().getOperationResourceInfos().isEmpty()) {
+            LOG.warning(new org.apache.cxf.common.i18n.Message("NO_RESOURCE_OP_EXC", 
+                                                               BUNDLE, 
+                                                               cr.getClass().getName()).toString());
+            return false;
+        }
+        return true;
+    }
     
     
     protected Invoker createInvoker() {

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/Messages.properties
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/Messages.properties?rev=673167&r1=673166&r2=673167&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/Messages.properties (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/Messages.properties Tue Jul  1 11:41:24 2008
@@ -18,4 +18,6 @@
 #    under the License.
 #
 #
-NO_CONTENT_TYPE_SPECIFIED=No Content-Type specified for HTTP {0}
+NO_RESOURCE_OP_EXC=No resource methods found for resource class {0}
+NO_SUBRESOURCE_FOUND=No subresource locator found for path {0}
+NO_SUBRESOURCE_METHOD_FOUND=No resource method found on a subresource locator {0}

Added: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MappingsHandler.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MappingsHandler.java?rev=673167&view=auto
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MappingsHandler.java (added)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MappingsHandler.java Tue Jul  1 11:41:24 2008
@@ -0,0 +1,71 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.jaxrs.ext;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.ws.rs.core.MultivaluedMap;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.UriInfo;
+
+import org.apache.cxf.jaxrs.impl.UriInfoImpl;
+import org.apache.cxf.jaxrs.model.ClassResourceInfo;
+import org.apache.cxf.message.Message;
+
+public class MappingsHandler implements RequestHandler {
+
+    private static final String CONTENT_QUERY = "_type";
+    private static final Map<String, String> SHORTCUTS;
+    static {
+        SHORTCUTS = new HashMap<String, String>();
+        SHORTCUTS.put("json", "application/json");
+        SHORTCUTS.put("text", "text/*");
+        SHORTCUTS.put("xml", "application/xml");
+        // more to come
+    }
+    
+    public Response handleRequest(Message m, ClassResourceInfo resourceClass) {
+        
+        UriInfo uriInfo = new UriInfoImpl(m, null);
+        handleTypeQuery(m, uriInfo.getQueryParameters());
+        
+        
+        return null;
+    }
+
+    private boolean handleTypeQuery(Message m, 
+                                    MultivaluedMap<String, String> queries) {
+        String type = queries.getFirst(CONTENT_QUERY);
+        if (type != null) {
+            if (SHORTCUTS.containsKey(type)) {
+                type = SHORTCUTS.get(type);
+            }
+            updateAcceptTypeHeader(m, type);
+            return true;
+        }
+        return false;
+    }
+    
+    private void updateAcceptTypeHeader(Message m, String anotherValue) {
+        m.put(Message.ACCEPT_CONTENT_TYPE, anotherValue);
+    }
+    
+}

Propchange: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MappingsHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/MappingsHandler.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/RequestHandler.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/RequestHandler.java?rev=673167&view=auto
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/RequestHandler.java (added)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/RequestHandler.java Tue Jul  1 11:41:24 2008
@@ -0,0 +1,38 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.jaxrs.ext;
+
+import javax.ws.rs.core.Response;
+
+import org.apache.cxf.jaxrs.model.ClassResourceInfo;
+import org.apache.cxf.message.Message;
+
+/**
+ * SystemHandler is capable of pre/post processing requests 
+ * ex., they can handle query extensions starting from _type
+ *
+ */
+    
+public interface RequestHandler {
+    
+    Response handleRequest(Message m, 
+                           ClassResourceInfo resourceClass);
+
+}

Propchange: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/RequestHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/RequestHandler.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/ResponseHandler.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/ResponseHandler.java?rev=673167&view=auto
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/ResponseHandler.java (added)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/ResponseHandler.java Tue Jul  1 11:41:24 2008
@@ -0,0 +1,31 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.jaxrs.ext;
+
+import javax.ws.rs.core.Response;
+
+import org.apache.cxf.jaxrs.model.OperationResourceInfo;
+import org.apache.cxf.message.Message;
+
+public interface ResponseHandler {
+    Response handleResponse(Message m,
+                            OperationResourceInfo ori,
+                            Response response);
+}

Propchange: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/ResponseHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/ext/ResponseHandler.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Copied: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/CacheControlHeaderProvider.java (from r651969, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/CacheControlHeaderProvider.java)
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/CacheControlHeaderProvider.java?p2=cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/CacheControlHeaderProvider.java&p1=cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/CacheControlHeaderProvider.java&r1=651969&r2=673167&rev=673167&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/CacheControlHeaderProvider.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/CacheControlHeaderProvider.java Tue Jul  1 11:41:24 2008
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.cxf.jaxrs.provider;
+package org.apache.cxf.jaxrs.impl;
 
 import java.util.ArrayList;
 import java.util.Iterator;

Copied: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/CookieHeaderProvider.java (from r651969, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/CookieHeaderProvider.java)
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/CookieHeaderProvider.java?p2=cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/CookieHeaderProvider.java&p1=cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/CookieHeaderProvider.java&r1=651969&r2=673167&rev=673167&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/CookieHeaderProvider.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/CookieHeaderProvider.java Tue Jul  1 11:41:24 2008
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.cxf.jaxrs.provider;
+package org.apache.cxf.jaxrs.impl;
 
 import javax.ws.rs.core.Cookie;
 import javax.ws.rs.ext.RuntimeDelegate.HeaderDelegate;

Copied: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/EntityTagHeaderProvider.java (from r651969, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/EntityTagHeaderProvider.java)
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/EntityTagHeaderProvider.java?p2=cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/EntityTagHeaderProvider.java&p1=cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/EntityTagHeaderProvider.java&r1=651969&r2=673167&rev=673167&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/EntityTagHeaderProvider.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/EntityTagHeaderProvider.java Tue Jul  1 11:41:24 2008
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.cxf.jaxrs.provider;
+package org.apache.cxf.jaxrs.impl;
 
 import javax.ws.rs.core.EntityTag;
 import javax.ws.rs.ext.RuntimeDelegate.HeaderDelegate;

Copied: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/HttpHeadersImpl.java (from r651969, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/HttpHeadersImpl.java)
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/HttpHeadersImpl.java?p2=cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/HttpHeadersImpl.java&p1=cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/HttpHeadersImpl.java&r1=651969&r2=673167&rev=673167&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/HttpHeadersImpl.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/HttpHeadersImpl.java Tue Jul  1 11:41:24 2008
@@ -17,9 +17,12 @@
  * under the License.
  */
 
-package org.apache.cxf.jaxrs.provider;
+package org.apache.cxf.jaxrs.impl;
 
 
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -29,8 +32,7 @@
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.MultivaluedMap;
 
-import org.apache.cxf.jaxrs.JAXRSUtils;
-import org.apache.cxf.jaxrs.MetadataMap;
+import org.apache.cxf.jaxrs.utils.JAXRSUtils;
 import org.apache.cxf.message.Message;
 
 public class HttpHeadersImpl implements HttpHeaders {
@@ -46,26 +48,26 @@
     }
     
     public List<MediaType> getAcceptableMediaTypes() {
-        return JAXRSUtils.parseMediaTypes((String)m.get(Message.ACCEPT_CONTENT_TYPE));
+        return JAXRSUtils.sortMediaTypes((String)m.get(Message.ACCEPT_CONTENT_TYPE)); 
     }
 
     public Map<String, Cookie> getCookies() {
-        List<String> cs = headers.get("Cookie");
+        List<String> cs = headers.get(HttpHeaders.COOKIE);
         Map<String, Cookie> cl = new HashMap<String, Cookie>(); 
         for (String c : cs) {
-            Cookie cookie = Cookie.parse(c);
+            Cookie cookie = Cookie.valueOf(c);
             cl.put(cookie.getName(), cookie);
         }
         return cl;
     }
 
     public String getLanguage() {
-        String l = headers.getFirst("Content-Language");
+        String l = headers.getFirst(HttpHeaders.CONTENT_LANGUAGE);
         return l == null ? "UTF-8" : l;
     }
 
     public MediaType getMediaType() {
-        return MediaType.parse((String)m.get(Message.CONTENT_TYPE));
+        return MediaType.valueOf((String)m.get(Message.CONTENT_TYPE));
     }
 
     public MultivaluedMap<String, String> getRequestHeaders() {
@@ -75,4 +77,52 @@
         return map;
     }
 
+    public List<String> getAcceptableLanguages() {
+        List<String> values = getRequestHeader(HttpHeaders.ACCEPT_LANGUAGE);
+        if (values == null || values.isEmpty()) {
+            return Collections.emptyList();
+        }
+        List<String> newLs = new ArrayList<String>(); 
+        String[] ls =  values.get(0).split(",");
+        Map<String, Float> prefs = new HashMap<String, Float>();
+        for (String l : ls) {
+            String[] pair = l.split(";"); 
+            newLs.add(pair[0]);
+            if (pair.length > 1) {
+                String[] pair2 = pair[1].split("=");
+                if (pair2.length > 1) {
+                    prefs.put(pair[0], JAXRSUtils.getMediaTypeQualityFactor(pair2[1]));
+                } else {
+                    prefs.put(pair[0], 1F);
+                }
+            } else {
+                prefs.put(pair[0], 1F);
+            }
+        }
+        if (newLs.size() == 1) {
+            return newLs;
+        }
+        Collections.sort(newLs, new AcceptLanguageComparator(prefs));
+        return newLs;
+        
+    }
+
+    public List<String> getRequestHeader(String name) {
+        return headers.get(name);
+    }
+
+    private static class AcceptLanguageComparator implements Comparator<String> {
+        private Map<String, Float> prefs;
+        
+        public AcceptLanguageComparator(Map<String, Float> prefs) {
+            this.prefs = prefs;
+        }
+
+        public int compare(String lang1, String lang2) {
+            float p1 = prefs.get(lang1);
+            float p2 = prefs.get(lang2);
+            int result = Float.compare(p1, p2);
+            return result == 0 ? result : ~result;
+        }
+    }
 }

Copied: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/MediaTypeHeaderProvider.java (from r651969, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/MediaTypeHeaderProvider.java)
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/MediaTypeHeaderProvider.java?p2=cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/MediaTypeHeaderProvider.java&p1=cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/MediaTypeHeaderProvider.java&r1=651969&r2=673167&rev=673167&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/MediaTypeHeaderProvider.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/MediaTypeHeaderProvider.java Tue Jul  1 11:41:24 2008
@@ -17,8 +17,9 @@
  * under the License.
  */
 
-package org.apache.cxf.jaxrs.provider;
+package org.apache.cxf.jaxrs.impl;
 
+import java.util.Collections;
 import java.util.Iterator;
 import java.util.LinkedHashMap;
 import java.util.Map;
@@ -46,7 +47,7 @@
         String type = mType.substring(0, i); 
         String subtype = mType.substring(i + 1, end);
         
-        Map<String, String> parameters = null;
+        Map<String, String> parameters = Collections.emptyMap();
         if (paramsStart != -1) {
             // Using Pattern.compile might be marginally faster ?
             // though it's rare when more than one parameter is provided
@@ -74,10 +75,13 @@
         StringBuilder sb = new StringBuilder();
         sb.append(type.getType()).append('/').append(type.getSubtype());
         
-        for (Iterator<Map.Entry<String, String>> iter = type.getParameters().entrySet().iterator();
-            iter.hasNext();) {
-            Map.Entry<String, String> entry = iter.next();
-            sb.append(';').append(entry.getKey()).append('=').append(entry.getValue());
+        Map<String, String> params = type.getParameters();
+        if (params != null) {
+            for (Iterator<Map.Entry<String, String>> iter = params.entrySet().iterator();
+                iter.hasNext();) {
+                Map.Entry<String, String> entry = iter.next();
+                sb.append(';').append(entry.getKey()).append('=').append(entry.getValue());
+            }
         }
         
         return sb.toString();

Added: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/MessageBodyWorkersImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/MessageBodyWorkersImpl.java?rev=673167&view=auto
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/MessageBodyWorkersImpl.java (added)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/MessageBodyWorkersImpl.java Tue Jul  1 11:41:24 2008
@@ -0,0 +1,52 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.jaxrs.impl;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.ext.MessageBodyReader;
+import javax.ws.rs.ext.MessageBodyWorkers;
+import javax.ws.rs.ext.MessageBodyWriter;
+
+import org.apache.cxf.jaxrs.provider.ProviderFactory;
+import org.apache.cxf.message.Message;
+
+public class MessageBodyWorkersImpl implements MessageBodyWorkers {
+
+    private Message m;
+    public MessageBodyWorkersImpl(Message m) {
+        this.m = m;
+    }
+    
+    public <T> MessageBodyReader<T> getMessageBodyReader(
+         Class<T> type, Type genericType, Annotation[] annotations, MediaType mediaType) {
+        return ProviderFactory.getInstance().createMessageBodyReader(
+            type, genericType, annotations, mediaType, m);
+    }
+
+    public <T> MessageBodyWriter<T> getMessageBodyWriter(
+        Class<T> type, Type genericType, Annotation[] annotations, MediaType mediaType) {
+        return ProviderFactory.getInstance().createMessageBodyWriter(
+                   type, genericType, annotations, mediaType, m);
+    }
+
+}

Propchange: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/MessageBodyWorkersImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/MessageBodyWorkersImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Copied: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/MetadataMap.java (from r651969, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/MetadataMap.java)
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/MetadataMap.java?p2=cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/MetadataMap.java&p1=cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/MetadataMap.java&r1=651969&r2=673167&rev=673167&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/MetadataMap.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/MetadataMap.java Tue Jul  1 11:41:24 2008
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.cxf.jaxrs;
+package org.apache.cxf.jaxrs.impl;
 
 import java.util.ArrayList;
 import java.util.Collection;

Copied: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/NewCookieHeaderProvider.java (from r651969, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/NewCookieHeaderProvider.java)
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/NewCookieHeaderProvider.java?p2=cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/NewCookieHeaderProvider.java&p1=cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/NewCookieHeaderProvider.java&r1=651969&r2=673167&rev=673167&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/NewCookieHeaderProvider.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/NewCookieHeaderProvider.java Tue Jul  1 11:41:24 2008
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.cxf.jaxrs.provider;
+package org.apache.cxf.jaxrs.impl;
 
 import javax.ws.rs.core.NewCookie;
 import javax.ws.rs.ext.RuntimeDelegate.HeaderDelegate;

Copied: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/PathSegmentImpl.java (from r651969, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/PathSegmentImpl.java)
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/PathSegmentImpl.java?p2=cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/PathSegmentImpl.java&p1=cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/PathSegmentImpl.java&r1=651969&r2=673167&rev=673167&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/PathSegmentImpl.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/PathSegmentImpl.java Tue Jul  1 11:41:24 2008
@@ -17,13 +17,13 @@
  * under the License.
  */
 
-package org.apache.cxf.jaxrs.provider;
+package org.apache.cxf.jaxrs.impl;
 
 import javax.ws.rs.core.MultivaluedMap;
 import javax.ws.rs.core.PathSegment;
 import javax.ws.rs.ext.Provider;
 
-import org.apache.cxf.jaxrs.JAXRSUtils;
+import org.apache.cxf.jaxrs.utils.JAXRSUtils;
 
 @Provider
 public class PathSegmentImpl implements PathSegment {

Copied: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestImpl.java (from r651969, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/RequestImpl.java)
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestImpl.java?p2=cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestImpl.java&p1=cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/RequestImpl.java&r1=651969&r2=673167&rev=673167&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/RequestImpl.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestImpl.java Tue Jul  1 11:41:24 2008
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.cxf.jaxrs.provider;
+package org.apache.cxf.jaxrs.impl;
 
 import java.util.Date;
 import java.util.List;
@@ -61,7 +61,7 @@
         }
         
         try {
-            EntityTag requestTag = EntityTag.parse(ifMatch);
+            EntityTag requestTag = EntityTag.valueOf(ifMatch);
             if (requestTag.equals(eTag) && !requestTag.isWeak()) {
                 return null;
             }

Added: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestPreprocessor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestPreprocessor.java?rev=673167&view=auto
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestPreprocessor.java (added)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestPreprocessor.java Tue Jul  1 11:41:24 2008
@@ -0,0 +1,95 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.jaxrs.impl;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+import javax.ws.rs.core.UriInfo;
+
+import org.apache.cxf.message.Message;
+
+public class RequestPreprocessor {
+    
+    private Map<Object, Object> languageMappings;
+    private Map<Object, Object> extensionMappings;
+    
+    @SuppressWarnings("unchecked")
+    public RequestPreprocessor(Map<Object, Object> languageMappings,
+                           Map<Object, Object> extensionMappings) {
+        this.languageMappings = 
+            languageMappings == null ? Collections.EMPTY_MAP : languageMappings;
+        this.extensionMappings = 
+            extensionMappings == null ? Collections.EMPTY_MAP : extensionMappings;
+    }
+
+    public String preprocess(Message m, UriInfo u) {
+        handleExtensionMappings(m, u);
+        handleLanguageMappings(m, u);
+        return new UriInfoImpl(m, null).getPath();
+    }
+    
+    private void handleLanguageMappings(Message m, UriInfo uriInfo) {
+        String path = uriInfo.getPath(false);
+        for (Map.Entry<?, ?> entry : languageMappings.entrySet()) {
+            if (path.endsWith("." + entry.getKey())) {
+                updateAcceptLanguageHeader(m, entry.getValue().toString());
+                updatePath(m, path, entry.getKey().toString());
+                break;
+            }    
+        }
+    }
+    
+    private void handleExtensionMappings(Message m, UriInfo uriInfo) {
+        String path = uriInfo.getPath(false);
+        for (Map.Entry<?, ?> entry : extensionMappings.entrySet()) {
+            if (path.endsWith("." + entry.getKey().toString())) {
+                updateAcceptTypeHeader(m, entry.getValue().toString());
+                updatePath(m, path, entry.getKey().toString());
+                break;
+            }
+        }
+        
+    }
+    
+    private void updateAcceptTypeHeader(Message m, String anotherValue) {
+        m.put(Message.ACCEPT_CONTENT_TYPE, anotherValue);
+    }
+    
+    @SuppressWarnings("unchecked")
+    private void updateAcceptLanguageHeader(Message m, String anotherValue) {
+        List<String> acceptLanguage =
+            ((Map<String, List<String>>)m.get(Message.PROTOCOL_HEADERS)).get("Accept-Language");
+        if (acceptLanguage == null) {
+            acceptLanguage = new ArrayList<String>(); 
+        }
+        
+        acceptLanguage.add(anotherValue);
+        ((Map<String, List<String>>)m.get(Message.PROTOCOL_HEADERS))
+            .put("Accept-Language", acceptLanguage);
+    }
+    
+    private void updatePath(Message m, String path, String suffix) {
+        String newPath = path.substring(0, path.length() - (suffix.length() + 1));
+        m.put(Message.PATH_INFO, newPath);
+    }
+    
+}

Propchange: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestPreprocessor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RequestPreprocessor.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Copied: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResponseBuilderImpl.java (from r651969, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ResponseBuilderImpl.java)
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResponseBuilderImpl.java?p2=cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResponseBuilderImpl.java&p1=cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ResponseBuilderImpl.java&r1=651969&r2=673167&rev=673167&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/ResponseBuilderImpl.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResponseBuilderImpl.java Tue Jul  1 11:41:24 2008
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.cxf.jaxrs.provider;
+package org.apache.cxf.jaxrs.impl;
 
 import java.net.URI;
 import java.util.Date;
@@ -32,7 +32,6 @@
 import javax.ws.rs.core.Response.ResponseBuilder;
 import javax.ws.rs.core.Variant;
 
-import org.apache.cxf.jaxrs.MetadataMap;
 
 public final class ResponseBuilderImpl extends ResponseBuilder {
     private int status = 200;

Added: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResponseImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResponseImpl.java?rev=673167&view=auto
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResponseImpl.java (added)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResponseImpl.java Tue Jul  1 11:41:24 2008
@@ -0,0 +1,53 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.jaxrs.impl;
+
+import javax.ws.rs.core.MultivaluedMap;
+import javax.ws.rs.core.Response;
+
+public final class ResponseImpl extends Response {
+    private final int status;
+    private final Object entity;
+    private MultivaluedMap<String, Object> metadata;
+    
+    
+    ResponseImpl(int s, Object e) {
+        this.status = s;
+        this.entity = e;
+    }
+
+    public Object getEntity() {
+        return entity;
+    }
+
+    public int getStatus() {
+        return status;
+    }
+
+    void addMetadata(MultivaluedMap<String, Object> meta) { 
+        this.metadata = meta;
+    }
+    
+    public MultivaluedMap<String, Object> getMetadata() {
+        // don't worry about cloning for now
+        return metadata;
+    }
+    
+}

Propchange: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResponseImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ResponseImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Copied: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RuntimeDelegateImpl.java (from r651969, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/RuntimeDelegateImpl.java)
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RuntimeDelegateImpl.java?p2=cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RuntimeDelegateImpl.java&p1=cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/RuntimeDelegateImpl.java&r1=651969&r2=673167&rev=673167&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/RuntimeDelegateImpl.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/RuntimeDelegateImpl.java Tue Jul  1 11:41:24 2008
@@ -17,11 +17,12 @@
  * under the License.
  */
 
-package org.apache.cxf.jaxrs.provider;
+package org.apache.cxf.jaxrs.impl;
 
 import java.util.HashMap;
 import java.util.Map;
 
+import javax.ws.rs.core.ApplicationConfig;
 import javax.ws.rs.core.CacheControl;
 import javax.ws.rs.core.Cookie;
 import javax.ws.rs.core.EntityTag;
@@ -33,6 +34,7 @@
 import javax.ws.rs.ext.RuntimeDelegate;
 
 
+
 public class RuntimeDelegateImpl extends RuntimeDelegate {
     protected Map<Class, HeaderDelegate> headerProviders 
         = new HashMap<Class, HeaderDelegate>();    
@@ -87,6 +89,14 @@
     public VariantListBuilder createVariantListBuilder() {
         return new VariantListBuilderImpl(); 
     }
+
+
+
+    @Override
+    public <T> T createEndpoint(ApplicationConfig applicationConfig, Class<T> endpointType) 
+        throws IllegalArgumentException, UnsupportedOperationException {
+        throw new UnsupportedOperationException();
+    }
     
 
 }

Copied: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/SecurityContextImpl.java (from r651969, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/SecurityContextImpl.java)
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/SecurityContextImpl.java?p2=cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/SecurityContextImpl.java&p1=cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/SecurityContextImpl.java&r1=651969&r2=673167&rev=673167&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/SecurityContextImpl.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/SecurityContextImpl.java Tue Jul  1 11:41:24 2008
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.cxf.jaxrs.provider;
+package org.apache.cxf.jaxrs.impl;
 
 import java.security.Principal;
 

Copied: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriBuilderImpl.java (from r651969, cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/UriBuilderImpl.java)
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriBuilderImpl.java?p2=cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriBuilderImpl.java&p1=cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/UriBuilderImpl.java&r1=651969&r2=673167&rev=673167&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/UriBuilderImpl.java (original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriBuilderImpl.java Tue Jul  1 11:41:24 2008
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.cxf.jaxrs.provider;
+package org.apache.cxf.jaxrs.impl;
 
 import java.lang.reflect.Method;
 import java.net.URI;
@@ -32,8 +32,7 @@
 import javax.ws.rs.core.UriBuilder;
 import javax.ws.rs.core.UriBuilderException;
 
-import org.apache.cxf.jaxrs.JAXRSUtils;
-import org.apache.cxf.jaxrs.MetadataMap;
+import org.apache.cxf.jaxrs.utils.JAXRSUtils;
 
 public class UriBuilderImpl extends UriBuilder {
     
@@ -72,13 +71,13 @@
     }
 
     @Override
-    public URI build(Map<String, String> parts) throws IllegalArgumentException, UriBuilderException {
+    public URI build(Map<String, Object> parts) throws IllegalArgumentException, UriBuilderException {
         // TODO Auto-generated method stub
         return null;
     }
 
     @Override
-    public URI build(String... values) throws IllegalArgumentException, UriBuilderException {
+    public URI build(Object... values) throws IllegalArgumentException, UriBuilderException {
         // TODO Auto-generated method stub
         return null;
     }
@@ -240,6 +239,12 @@
         // TODO Auto-generated method stub
         return null;
     }
+
+    @Override
+    public UriBuilder extension(String arg0) {
+        // TODO Auto-generated method stub
+        return null;
+    }
     
     
 }

Added: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriInfoImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriInfoImpl.java?rev=673167&view=auto
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriInfoImpl.java (added)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriInfoImpl.java Tue Jul  1 11:41:24 2008
@@ -0,0 +1,153 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.jaxrs.impl;
+
+import java.net.URI;
+import java.util.List;
+import java.util.Map;
+
+import javax.ws.rs.core.MultivaluedMap;
+import javax.ws.rs.core.PathSegment;
+import javax.ws.rs.core.UriBuilder;
+import javax.ws.rs.core.UriInfo;
+
+import org.apache.cxf.jaxrs.model.URITemplate;
+import org.apache.cxf.jaxrs.utils.JAXRSUtils;
+import org.apache.cxf.message.Message;
+
+public class UriInfoImpl implements UriInfo {
+
+    private MultivaluedMap<String, String> templateParams; 
+    private Message message;
+    
+    public UriInfoImpl(Message m, MultivaluedMap<String, String> templateParams) {
+        this.message = m;
+        this.templateParams = templateParams;
+    }
+    
+    public URI getAbsolutePath() {
+        String address = getEndpointAddress();
+        address = address.endsWith("/") ? address.substring(0, address.length() - 1)
+                                        : address; 
+        return URI.create(address + getPath());
+    }
+
+    public UriBuilder getAbsolutePathBuilder() {
+        return new UriBuilderImpl(getAbsolutePath());
+    }
+
+    public URI getBaseUri() {
+        return URI.create(getEndpointAddress());
+    }
+
+    public UriBuilder getBaseUriBuilder() {
+        return new UriBuilderImpl(getBaseUri());
+    }
+
+    public String getPath() {
+        return getPath(true);
+    }
+
+    public String getPath(boolean decode) {
+        
+        String path = (String)message.get(Message.PATH_INFO);
+        return decode ? JAXRSUtils.uriDecode(path) : path;
+    }
+
+    public List<PathSegment> getPathSegments() {
+        return getPathSegments(true);
+    }
+
+    public List<PathSegment> getPathSegments(boolean decode) {
+        return JAXRSUtils.getPathSegments(getPath(), decode);
+    }
+
+    public MultivaluedMap<String, String> getQueryParameters() {
+        return getQueryParameters(true);
+    }
+
+    public MultivaluedMap<String, String> getQueryParameters(boolean decode) {
+        return JAXRSUtils.getStructuredParams((String)message.get(Message.QUERY_STRING),
+                                              "&",
+                                              decode);
+    }
+
+    //TODO : check the fragment as well
+    public URI getRequestUri() {
+        String queries = (String)message.get(Message.QUERY_STRING);
+        return URI.create(getEndpointAddress() 
+                          + message.get(Message.PATH_INFO)
+                          + (queries == null ? "" : "?" + queries));
+    }
+
+    public UriBuilder getRequestUriBuilder() {
+        return new UriBuilderImpl(getRequestUri());
+    }
+
+    public MultivaluedMap<String, String> getPathParameters() {
+        return getPathParameters(true);
+    }
+
+    public MultivaluedMap<String, String> getPathParameters(boolean decode) {
+        // this needs to be changed
+        MetadataMap<String, String> values = new MetadataMap<String, String>();
+        for (Map.Entry<String, List<String>> entry : templateParams.entrySet()) {
+            if (entry.getKey().equals(URITemplate.FINAL_MATCH_GROUP)) {
+                continue;
+            }
+            values.add(entry.getKey(), 
+                       decode ? JAXRSUtils.uriDecode(entry.getValue().get(0)) 
+                              : entry.getValue().get(0));
+        }
+        return values;
+    }
+
+    protected String getEndpointAddress() {
+        String value = message.getExchange().getDestination().getAddress()
+               .getAddress().getValue();
+        
+        return value;
+    }
+
+    public List<String> getAncestorResourceURIs() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public List<Object> getAncestorResources() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public List<String> getAncestorResourceURIs(boolean arg0) {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public String getPathExtension() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    public UriBuilder getPlatonicRequestUriBuilder() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+}

Propchange: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriInfoImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriInfoImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date



Mime
View raw message