You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wink.apache.org by bl...@apache.org on 2009/07/16 22:02:01 UTC
svn commit: r794815 [1/4] - in
/incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting:
./ src/ src/main/ src/main/java/ src/main/java/org/
src/main/java/org/apache/ src/main/java/org/apache/wink/ src/main/ja...
Author: bluk
Date: Thu Jul 16 20:01:58 2009
New Revision: 794815
URL: http://svn.apache.org/viewvc?rev=794815&view=rev
Log:
Update for wink-targetting-tests
See [WINK-90]
Added:
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/pom.xml
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/addressbook/
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/addressbook/Address.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/addressbook/AddressApplication.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/addressbook/AddressBook.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/addressbook/AddressBookDatabase.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/cache/
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/cache/Application.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/cache/NewsResource.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/cache/NewsStory.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/cache/ObjectFactory.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/cache/StoryRecord.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/contentnegotiation/
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/contentnegotiation/Application.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/contentnegotiation/Customer.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/contentnegotiation/CustomerService.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/contentnegotiation/ObjectFactory.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/contentnegotiation/jaxb.index
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/exceptions/
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/exceptions/Application.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/exceptions/ApplicationOctetStreamMessageBodyReader.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/exceptions/ExistingResource.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/exceptions/NullResource.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/exceptions/ResourceWithConsumesAndProducesAndGET.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/exceptions/ResourceWithMethod.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/exceptions/ResourceWithOnlyConsumesAndGET.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/exceptions/ResourceWithOnlyProducesAndGET.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/headers/
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/headers/Application.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/headers/HeadersAllowResource.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/headers/HeadersAllowResource2.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/headers/HeadersResource.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/largeentity/
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/largeentity/Application.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/largeentity/JARInputStreamProvider.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/largeentity/LargeResource.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/lifecycles/
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/lifecycles/Application.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/lifecycles/MyMessageBodyReaderAndWriter.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/lifecycles/MyResource.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/methodannotations/
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/methodannotations/Application.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/methodannotations/CustomHttpMethodResource.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/methodannotations/HttpMethodResource.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/methodannotations/HttpMethodWarningResource.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/methodannotations/MyHttpGETAnnotation.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/methodannotations/MyHttpHEADAnnotation.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/methodannotations/MyHttpOPTIONSAnnotation.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/nofindmethods/
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/nofindmethods/Application.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/nofindmethods/CounterResource.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/nofindmethods/ResourceWithHTTPVerbMethodNames.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/nofindmethods/ResourceWithSublocatorHTTPVerbMethodNames.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/nofindmethods/SomeClassWithHTTPMethodVerbNames.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/returntype/
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/returntype/Application.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/returntype/ReturnTypeStatusResource.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/sequence/
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/sequence/Application.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/sequence/SequenceResource.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/sequence/SequenceSingletonResource.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/version/
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/version/Application.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/version/TaxForm.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/webapp/
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/webapp/WEB-INF/
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/webapp/WEB-INF/geronimo-web.xml
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/webapp/WEB-INF/web.xml
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/webapp/index.jsp
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/test/
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/test/java/
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/test/java/org/
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/test/java/org/apache/
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/test/java/org/apache/wink/
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/test/java/org/apache/wink/jaxrs/
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/test/java/org/apache/wink/jaxrs/test/
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/test/java/org/apache/wink/jaxrs/test/addressbook/
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/test/java/org/apache/wink/jaxrs/test/addressbook/StringTest.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/test/java/org/apache/wink/jaxrs/test/cachetest/
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/test/java/org/apache/wink/jaxrs/test/cachetest/ClientTest.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/test/java/org/apache/wink/jaxrs/test/cachetest/NewsHttpClient.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/test/java/org/apache/wink/jaxrs/test/cachetest/NewsResource.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/test/java/org/apache/wink/jaxrs/test/contentnegotiation/
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/test/java/org/apache/wink/jaxrs/test/contentnegotiation/ContentNegotiationClientTest.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/test/java/org/apache/wink/jaxrs/test/exceptions/
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/test/java/org/apache/wink/jaxrs/test/exceptions/ExceptionsWhileTargettingTest.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/test/java/org/apache/wink/jaxrs/test/exceptions/NullValuesDuringTargettingTest.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/test/java/org/apache/wink/jaxrs/test/exceptions/ValidationDuringTargettingTest.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/test/java/org/apache/wink/jaxrs/test/headers/
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/test/java/org/apache/wink/jaxrs/test/headers/HeadersTest.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/test/java/org/apache/wink/jaxrs/test/largeentity/
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/test/java/org/apache/wink/jaxrs/test/largeentity/LargeEntityTest.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/test/java/org/apache/wink/jaxrs/test/lifecycles/
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/test/java/org/apache/wink/jaxrs/test/lifecycles/LifeCycleTest.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/test/java/org/apache/wink/jaxrs/test/methodannotations/
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/test/java/org/apache/wink/jaxrs/test/methodannotations/HttpMethodTest.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/test/java/org/apache/wink/jaxrs/test/methodannotations/HttpMethodWarningsTest.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/test/java/org/apache/wink/jaxrs/test/nofindmethods/
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/test/java/org/apache/wink/jaxrs/test/nofindmethods/DoNotUseMethodNamesForHTTPVerbsTest.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/test/java/org/apache/wink/jaxrs/test/returntypes/
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/test/java/org/apache/wink/jaxrs/test/returntypes/ReturnTypeStatusTest.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/test/java/org/apache/wink/jaxrs/test/sequence/
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/test/java/org/apache/wink/jaxrs/test/sequence/SequenceTest.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/test/java/org/apache/wink/jaxrs/test/sequence/package-info.java
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/test/java/org/apache/wink/jaxrs/test/version/
incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/test/java/org/apache/wink/jaxrs/test/version/VersioningTests.java
Added: incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/pom.xml
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/pom.xml?rev=794815&view=auto
==============================================================================
--- incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/pom.xml (added)
+++ incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/pom.xml Thu Jul 16 20:01:58 2009
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+-->
+<project>
+ <parent>
+ <artifactId>wink-server-integration-test</artifactId>
+ <groupId>org.apache.wink</groupId>
+ <version>0.1-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.wink</groupId>
+ <artifactId>wink-jaxrs-test-targetting</artifactId>
+ <packaging>war</packaging>
+ <name>wink-jaxrs-test-targetting Maven Webapp</name>
+ <version>0.1-SNAPSHOT</version>
+</project>
Added: incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/addressbook/Address.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/addressbook/Address.java?rev=794815&view=auto
==============================================================================
--- incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/addressbook/Address.java (added)
+++ incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/addressbook/Address.java Thu Jul 16 20:01:58 2009
@@ -0,0 +1,127 @@
+/*
+ * 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.wink.jaxrs.test.addressbook;
+
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+
+public class Address {
+
+ private String entryName;
+
+ private String zipCode;
+
+ private String streetAddress;
+
+ private String city;
+
+ private String state;
+
+ private String country;
+
+ public Address(String entryName, String zipCode, String streetAddress, String city, String state, String country) {
+ this.entryName = entryName;
+ this.zipCode = zipCode;
+ this.streetAddress = streetAddress;
+ this.city = city;
+ this.state = state;
+ this.country = country;
+ }
+
+ @GET
+ @Produces(value = { "text/xml" })
+ public String get() {
+ return toString();
+ }
+
+ @DELETE
+ public void removeAddress(@PathParam(value = "entryName") String entryName) {
+ AddressBook.db.removeAddress(entryName);
+ }
+
+
+ public String getEntryName() {
+ return entryName;
+ }
+
+ public void setEntryName(String entryName) {
+ this.entryName = entryName;
+ }
+
+ public String getZipCode() {
+ return zipCode;
+ }
+
+ public void setZipCode(String zipCode) {
+ this.zipCode = zipCode;
+ }
+
+ public String getStreetAddress() {
+ return streetAddress;
+ }
+
+ public void setStreetAddress(String streetAddress) {
+ this.streetAddress = streetAddress;
+ }
+
+ public String getCity() {
+ return city;
+ }
+
+ public void setCity(String city) {
+ this.city = city;
+ }
+
+ public String getState() {
+ return state;
+ }
+
+ public void setState(String state) {
+ this.state = state;
+ }
+
+ public String getCountry() {
+ return country;
+ }
+
+ public void setCountry(String country) {
+ this.country = country;
+ }
+
+ public String toString() {
+ StringBuffer sb = new StringBuffer();
+ sb.append("Entry Name: " + entryName);
+ sb.append("\n");
+ sb.append("Street Address: " + streetAddress);
+ sb.append("\n");
+ sb.append("City: " + city);
+ sb.append("\n");
+ sb.append("Zip Code: " + zipCode);
+ sb.append("\n");
+ sb.append("State: " + state);
+ sb.append("\n");
+ sb.append("Country: " + country);
+ return sb.toString();
+ }
+
+}
Added: incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/addressbook/AddressApplication.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/addressbook/AddressApplication.java?rev=794815&view=auto
==============================================================================
--- incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/addressbook/AddressApplication.java (added)
+++ incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/addressbook/AddressApplication.java Thu Jul 16 20:01:58 2009
@@ -0,0 +1,35 @@
+/*
+ * 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.wink.jaxrs.test.addressbook;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.ws.rs.core.Application;
+
+public class AddressApplication extends Application {
+
+ public Set<Class<?>> getClasses() {
+ Set<Class<?>> set = new HashSet<Class<?>>();
+ set.add(AddressBook.class);
+ return set;
+ }
+
+}
Added: incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/addressbook/AddressBook.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/addressbook/AddressBook.java?rev=794815&view=auto
==============================================================================
--- incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/addressbook/AddressBook.java (added)
+++ incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/addressbook/AddressBook.java Thu Jul 16 20:01:58 2009
@@ -0,0 +1,130 @@
+/*
+ * 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.wink.jaxrs.test.addressbook;
+
+import java.util.Iterator;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.Response.ResponseBuilder;
+
+@Path(value = "/unittests/addresses")
+public class AddressBook {
+
+ public static AddressBookDatabase db = AddressBookDatabase.getInstance();
+
+ private @Context
+ HttpServletRequest request;
+
+ public static Address defaultAddress = new Address("defaultAddress",
+ "12345", "1 Mopac Loop", "Austin", "TX", "US");
+
+ public AddressBook() {
+ db.storeAddress(defaultAddress.getEntryName(), defaultAddress);
+ }
+
+ @Path("/{entryName}")
+ public Object getAddress(@PathParam(value = "entryName") String entryName) {
+ Address addr = db.getAddress(entryName);
+ return addr;
+ }
+
+ @GET
+ @Produces(value = { "text/xml" })
+ public Response getAddresses() {
+ Response resp = null;
+ if (request.getMethod().equalsIgnoreCase("HEAD")) {
+ ResponseBuilder builder = Response.ok();
+ resp = builder.build();
+ resp.getMetadata().putSingle("head-matched", "true");
+ } else {
+ StringBuffer sb = new StringBuffer();
+ Iterator<Address> addressIter = db.getAddresses();
+ while (addressIter.hasNext()) {
+ sb.append(addressIter.next().toString());
+ sb.append("\n");
+ }
+ ResponseBuilder builder = Response.ok(sb.toString());
+ resp = builder.build();
+ }
+ return resp;
+ }
+
+ @POST
+ public void createAddress(@QueryParam(value = "entryName") String entryName, @QueryParam(value = "zipCode") String zipCode, @QueryParam(value = "streetAddress") String streetAddress, @QueryParam(value = "city") String city, @QueryParam(value = "state") String state, @QueryParam(value = "country") String country) {
+ Address address = new Address(entryName, zipCode, streetAddress, city,
+ state, country);
+ db.storeAddress(entryName, address);
+ }
+
+ @POST
+ @Consumes(value = { "text/xml" })
+ @Path(value = "/fromBody")
+ public void createAddressFromBody(String input) {
+ String[] inputs = input.split("&");
+ String entryName = inputs[0];
+ String zipCode = inputs[1];
+ String streetAddress = inputs[2];
+ String city = inputs[3];
+ String state = inputs[4];
+ String country = inputs[5];
+ Address address = new Address(entryName, zipCode, streetAddress, city,
+ state, country);
+ db.storeAddress(entryName, address);
+ }
+
+ @PUT
+ public void updateAddress(@QueryParam(value = "entryName") String entryName, @QueryParam(value = "zipCode") String zipCode, @QueryParam(value = "streetAddress") String streetAddress, @QueryParam(value = "city") String city, @QueryParam(value = "state") String state, @QueryParam(value = "country") String country) {
+ Address address = db.getAddress(entryName);
+ if (address == null) {
+ address = new Address(entryName, zipCode, streetAddress, city,
+ state, country);
+ db.storeAddress(entryName, address);
+ } else {
+ address.setCity(city);
+ address.setCountry(country);
+ address.setState(state);
+ address.setStreetAddress(streetAddress);
+ address.setZipCode(zipCode);
+ }
+ }
+
+ @GET
+ @Path(value = "/invalidNonPublic")
+ void invalidNonPublic() {
+
+ }
+
+ @POST
+ @Path("/clear")
+ public void clearEntries() {
+ AddressBookDatabase.clearEntries();
+ }
+
+}
Added: incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/addressbook/AddressBookDatabase.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/addressbook/AddressBookDatabase.java?rev=794815&view=auto
==============================================================================
--- incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/addressbook/AddressBookDatabase.java (added)
+++ incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/addressbook/AddressBookDatabase.java Thu Jul 16 20:01:58 2009
@@ -0,0 +1,68 @@
+/*
+ * 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.wink.jaxrs.test.addressbook;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+/**
+ * Sample that will mock a database for the AddressBook resource
+ */
+public class AddressBookDatabase {
+
+ private static Map<String, Address> addressMap;
+
+ private static AddressBookDatabase instance;
+
+ private AddressBookDatabase() {
+ addressMap = new HashMap<String, Address>();
+ }
+
+ public static AddressBookDatabase getInstance() {
+ if (instance == null) {
+ instance = new AddressBookDatabase();
+ }
+ return instance;
+ }
+
+ public Address getAddress(String entryName) {
+ return addressMap.get(entryName);
+ }
+
+ public void storeAddress(String entryName, Address address) {
+ addressMap.put(entryName, address);
+ }
+
+ public Iterator<Address> getAddresses() {
+ return addressMap.values().iterator();
+ }
+
+ public void removeAddress(String entryName) {
+ addressMap.remove(entryName);
+ }
+
+ public static void clearEntries() {
+ if (addressMap != null) {
+ addressMap.clear();
+ }
+ }
+
+}
Added: incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/cache/Application.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/cache/Application.java?rev=794815&view=auto
==============================================================================
--- incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/cache/Application.java (added)
+++ incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/cache/Application.java Thu Jul 16 20:01:58 2009
@@ -0,0 +1,35 @@
+/*
+ * 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.wink.jaxrs.test.cache;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.apache.wink.jaxrs.test.cache.NewsResource;
+
+public class Application extends javax.ws.rs.core.Application {
+
+ public Set<Class<?>> getClasses() {
+ Set<Class<?>> set = new HashSet<Class<?>>();
+ set.add(NewsResource.class);
+ return set;
+ }
+
+}
Added: incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/cache/NewsResource.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/cache/NewsResource.java?rev=794815&view=auto
==============================================================================
--- incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/cache/NewsResource.java (added)
+++ incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/cache/NewsResource.java Thu Jul 16 20:01:58 2009
@@ -0,0 +1,149 @@
+/*
+ * 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.wink.jaxrs.test.cache;
+
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.Map;
+import java.util.TimeZone;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.EntityTag;
+import javax.ws.rs.core.Request;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.Response.ResponseBuilder;
+
+@Path("/news")
+public class NewsResource {
+
+ private static final DateFormat format =
+ new SimpleDateFormat(
+ "EEE, dd MMM yyyy HH:mm:ss zzz",
+ Locale.ENGLISH);
+ static {
+ format.setLenient(false);
+ format.setTimeZone(TimeZone.getTimeZone("GMT"));
+ }
+
+ @Context
+ private Request request;
+
+ private static Map<String, StoryRecord> stories = new HashMap<String, StoryRecord>();
+
+ @GET
+ @Produces(value = "text/xml")
+ @Path(value = "/{title}")
+ public Response getNewsStory(@PathParam(value = "title") String title) {
+ StoryRecord record = stories.get(title);
+
+ // if no record, return 404
+ if (record == null) {
+ return Response.status(404).build();
+ }
+ NewsStory story = record.getStory();
+
+ EntityTag recordETag =
+ EntityTag.valueOf("\"" + String.valueOf(record.getRevision().hashCode()) + "\"");
+
+ String lastModified = story.getUpdatedDate();
+ Date date = null;
+
+ try {
+ format.setTimeZone(TimeZone.getTimeZone("GMT"));
+ date = format.parse(lastModified);
+ } catch (ParseException e) {
+ e.printStackTrace();
+ }
+
+ ResponseBuilder builder = null;
+ if (date != null) {
+ builder = request.evaluatePreconditions(date, recordETag);
+ } else {
+ builder = request.evaluatePreconditions(recordETag);
+ }
+
+ if (builder != null) {
+ Response response = builder.build();
+ response.getMetadata().putSingle("Content-Length", 0);
+ return response;
+ }
+
+ // otherwise return the entity
+ builder = Response.ok();
+ builder.entity(story);
+ return builder.build();
+ }
+
+ @POST
+ public Response addNewsStory(NewsStory story) {
+ String date =
+ format.format(Calendar.getInstance(TimeZone.getTimeZone("America/Austin")).getTime());
+ story.setPostedDate(date);
+ story.setUpdatedDate(date);
+ StoryRecord record = new StoryRecord(story);
+ stories.put(record.getKey(), record);
+ ResponseBuilder builder = Response.ok();
+
+ // let's put an ETag in here so clients can send an 'If-Match'
+ EntityTag eTag =
+ EntityTag.valueOf("\"" + String.valueOf(record.getRevision().hashCode()) + "\"");
+ builder.tag(eTag);
+ Response resp = builder.build();
+ resp.getMetadata().putSingle("Location", "/" + story.getTitle());
+ resp.getMetadata().putSingle("Last-Modified", story.getUpdatedDate());
+ return resp;
+ }
+
+ @PUT
+ public Response updateNewsStory(NewsStory story) {
+ StoryRecord record = stories.get(story.getTitle());
+ if (record == null) {
+ record = new StoryRecord(story);
+ } else {
+ record.updateStory(story);
+ }
+ ResponseBuilder builder = Response.ok();
+
+ // let's put an ETag in here so clients can send an 'If-Match'
+ EntityTag eTag =
+ EntityTag.valueOf("\"" + String.valueOf(record.getRevision().hashCode()) + "\"");
+ builder.tag(eTag);
+ Response response = builder.build();
+ response.getMetadata().putSingle("Last-Modified", record.getStory().getUpdatedDate());
+ return response;
+ }
+
+ @POST
+ @Path("/clear")
+ public void clearRecords() {
+ stories.clear();
+ }
+}
Added: incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/cache/NewsStory.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/cache/NewsStory.java?rev=794815&view=auto
==============================================================================
--- incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/cache/NewsStory.java (added)
+++ incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/cache/NewsStory.java Thu Jul 16 20:01:58 2009
@@ -0,0 +1,67 @@
+/*
+ * 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.wink.jaxrs.test.cache;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement(name = "story", namespace = "http://com.ibm.jaxrs.sample.cache")
+public class NewsStory {
+
+ private String title;
+
+ private String content;
+
+ private String postedDate;
+
+ private String updatedDate;
+
+ public String getTitle() {
+ return title;
+ }
+
+ public void setTitle(String title) {
+ this.title = title;
+ }
+
+ public String getContent() {
+ return content;
+ }
+
+ public void setContent(String content) {
+ this.content = content;
+ }
+
+ public String getPostedDate() {
+ return postedDate;
+ }
+
+ public void setPostedDate(String postedDate) {
+ this.postedDate = postedDate;
+ }
+
+ public String getUpdatedDate() {
+ return updatedDate;
+ }
+
+ public void setUpdatedDate(String updatedDate) {
+ this.updatedDate = updatedDate;
+ }
+
+}
Added: incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/cache/ObjectFactory.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/cache/ObjectFactory.java?rev=794815&view=auto
==============================================================================
--- incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/cache/ObjectFactory.java (added)
+++ incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/cache/ObjectFactory.java Thu Jul 16 20:01:58 2009
@@ -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.wink.jaxrs.test.cache;
+
+import javax.xml.bind.annotation.XmlRegistry;
+
+@XmlRegistry
+public class ObjectFactory {
+
+ public NewsStory createNewsStory() {
+ return new NewsStory();
+ }
+
+}
Added: incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/cache/StoryRecord.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/cache/StoryRecord.java?rev=794815&view=auto
==============================================================================
--- incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/cache/StoryRecord.java (added)
+++ incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/cache/StoryRecord.java Thu Jul 16 20:01:58 2009
@@ -0,0 +1,74 @@
+/*
+ * 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.wink.jaxrs.test.cache;
+
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Locale;
+import java.util.TimeZone;
+
+public class StoryRecord {
+
+ private static final DateFormat formatter =
+ new SimpleDateFormat(
+ "EEE, dd MMM yyyy HH:mm:ss zzz",
+ Locale.ENGLISH);
+ static {
+ formatter.setLenient(false);
+ formatter.setTimeZone(TimeZone.getTimeZone("GMT"));
+ }
+
+ private NewsStory story;
+
+ private int revision;
+
+ public StoryRecord(NewsStory story) {
+ this.story = story;
+ revision = 100;
+ }
+
+ public NewsStory getStory() {
+ return story;
+ }
+
+ public Integer getRevision() {
+ return revision;
+ }
+
+ public void updateRevision() {
+ revision++;
+ }
+
+ public String getKey() {
+ return story.getTitle();
+ }
+
+ public void updateStory(NewsStory story) {
+ this.story.setContent(story.getContent());
+ this.story.setTitle(story.getTitle());
+ String date =
+ formatter
+ .format(Calendar.getInstance(TimeZone.getTimeZone("America/Austin")).getTime());
+ this.story.setUpdatedDate(date);
+ revision++;
+ }
+
+}
Added: incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/contentnegotiation/Application.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/contentnegotiation/Application.java?rev=794815&view=auto
==============================================================================
--- incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/contentnegotiation/Application.java (added)
+++ incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/contentnegotiation/Application.java Thu Jul 16 20:01:58 2009
@@ -0,0 +1,33 @@
+/*
+ * 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.wink.jaxrs.test.contentnegotiation;
+
+import java.util.HashSet;
+import java.util.Set;
+
+public class Application extends javax.ws.rs.core.Application {
+
+ public Set<Class<?>> getClasses() {
+ Set<Class<?>> set = new HashSet<Class<?>>();
+ set.add(CustomerService.class);
+ return set;
+ }
+
+}
Added: incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/contentnegotiation/Customer.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/contentnegotiation/Customer.java?rev=794815&view=auto
==============================================================================
--- incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/contentnegotiation/Customer.java (added)
+++ incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/contentnegotiation/Customer.java Thu Jul 16 20:01:58 2009
@@ -0,0 +1,62 @@
+/*
+ * 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.
+ */
+
+/**
+ * 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.wink.jaxrs.test.contentnegotiation;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement(name = "Customer")
+public class Customer {
+ private long id;
+ private String name;
+
+ public long getId() {
+ return id;
+ }
+
+ public void setId(long id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+}
Added: incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/contentnegotiation/CustomerService.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/contentnegotiation/CustomerService.java?rev=794815&view=auto
==============================================================================
--- incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/contentnegotiation/CustomerService.java (added)
+++ incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/contentnegotiation/CustomerService.java Thu Jul 16 20:01:58 2009
@@ -0,0 +1,88 @@
+/*
+ * 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.
+ */
+
+/**
+ * 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.wink.jaxrs.test.contentnegotiation;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+
+import org.json.JSONException;
+import org.json.JSONObject;
+
+@Path("/customerservice/")
+public class CustomerService {
+ long currentId = 123;
+ Map<Long, Customer> customers = new HashMap<Long, Customer>();
+
+ public CustomerService() {
+ init();
+ }
+
+ @GET
+ @Path("/customers/{id}/")
+ public Customer getCustomer(@PathParam("id") String id) {
+ System.out.println("----invoking getCustomer, Customer id is: " + id);
+ long idNumber = Long.parseLong(id);
+ Customer c = customers.get(idNumber);
+ return c;
+ }
+
+ @GET
+ @Produces("application/json")
+ @Path("/customers/{id}/")
+ public JSONObject getCustomerInJSON(@PathParam("id") String id) throws JSONException {
+ System.out.println("----invoking getCustomer, Customer id is: " + id);
+ JSONObject jObj = new JSONObject();
+ long idNumber = Long.parseLong(id);
+ jObj.put("id", customers.get(idNumber).getId());
+ jObj.put("name", customers.get(idNumber).getName());
+ return jObj;
+ }
+
+ final void init() {
+ Customer c = new Customer();
+ c.setName("John");
+ c.setId(123);
+ customers.put(c.getId(), c);
+ }
+
+}
Added: incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/contentnegotiation/ObjectFactory.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/contentnegotiation/ObjectFactory.java?rev=794815&view=auto
==============================================================================
--- incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/contentnegotiation/ObjectFactory.java (added)
+++ incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/contentnegotiation/ObjectFactory.java Thu Jul 16 20:01:58 2009
@@ -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.wink.jaxrs.test.contentnegotiation;
+
+import javax.xml.bind.annotation.XmlRegistry;
+
+@XmlRegistry
+public class ObjectFactory {
+
+ public Customer createCustomer() {
+ return new Customer();
+ }
+
+}
Added: incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/contentnegotiation/jaxb.index
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/contentnegotiation/jaxb.index?rev=794815&view=auto
==============================================================================
--- incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/contentnegotiation/jaxb.index (added)
+++ incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/contentnegotiation/jaxb.index Thu Jul 16 20:01:58 2009
@@ -0,0 +1 @@
+Customer
\ No newline at end of file
Added: incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/exceptions/Application.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/exceptions/Application.java?rev=794815&view=auto
==============================================================================
--- incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/exceptions/Application.java (added)
+++ incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/exceptions/Application.java Thu Jul 16 20:01:58 2009
@@ -0,0 +1,40 @@
+/*
+ * 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.wink.jaxrs.test.exceptions;
+
+import java.util.HashSet;
+import java.util.Set;
+
+public class Application extends javax.ws.rs.core.Application {
+
+ @Override
+ public Set<Class<?>> getClasses() {
+ Set<Class<?>> clazzes = new HashSet<Class<?>>();
+ clazzes.add(ExistingResource.class);
+ clazzes.add(ResourceWithMethod.class);
+ clazzes.add(ResourceWithOnlyConsumesAndGET.class);
+ clazzes.add(ResourceWithOnlyProducesAndGET.class);
+ clazzes.add(ResourceWithConsumesAndProducesAndGET.class);
+ clazzes.add(NullResource.class);
+ clazzes.add(ApplicationOctetStreamMessageBodyReader.class);
+ return clazzes;
+ }
+
+}
Added: incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/exceptions/ApplicationOctetStreamMessageBodyReader.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/exceptions/ApplicationOctetStreamMessageBodyReader.java?rev=794815&view=auto
==============================================================================
--- incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/exceptions/ApplicationOctetStreamMessageBodyReader.java (added)
+++ incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/exceptions/ApplicationOctetStreamMessageBodyReader.java Thu Jul 16 20:01:58 2009
@@ -0,0 +1,59 @@
+/*
+ * 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.wink.jaxrs.test.exceptions;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.MultivaluedMap;
+import javax.ws.rs.ext.MessageBodyReader;
+import javax.ws.rs.ext.Provider;
+import javax.ws.rs.ext.Providers;
+
+@Provider
+@Consumes("application/octet-stream")
+public class ApplicationOctetStreamMessageBodyReader implements MessageBodyReader<byte[]> {
+
+ @Context
+ private Providers providers;
+
+ public boolean isReadable(Class<?> arg0, Type arg1, Annotation[] arg2, MediaType arg3) {
+ return arg3.equals(MediaType.APPLICATION_OCTET_STREAM_TYPE) && byte[].class.equals(arg0);
+ }
+
+ public byte[] readFrom(Class<byte[]> arg0,
+ Type arg1,
+ Annotation[] arg2,
+ MediaType arg3,
+ MultivaluedMap<String, String> arg4,
+ InputStream arg5) throws IOException, WebApplicationException {
+ MessageBodyReader<String> reader =
+ providers.getMessageBodyReader(String.class, String.class, arg2, arg3);
+ String input = reader.readFrom(String.class, String.class, arg2, arg3, arg4, arg5);
+ return ("userReader" + input).getBytes();
+ }
+
+}
Added: incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/exceptions/ExistingResource.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/exceptions/ExistingResource.java?rev=794815&view=auto
==============================================================================
--- incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/exceptions/ExistingResource.java (added)
+++ incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/exceptions/ExistingResource.java Thu Jul 16 20:01:58 2009
@@ -0,0 +1,27 @@
+/*
+ * 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.wink.jaxrs.test.exceptions;
+
+import javax.ws.rs.Path;
+
+@Path("existingresource")
+public class ExistingResource {
+
+}
Added: incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/exceptions/NullResource.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/exceptions/NullResource.java?rev=794815&view=auto
==============================================================================
--- incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/exceptions/NullResource.java (added)
+++ incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/exceptions/NullResource.java Thu Jul 16 20:01:58 2009
@@ -0,0 +1,62 @@
+/*
+ * 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.wink.jaxrs.test.exceptions;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.Response;
+
+@Path("targeting/nullresource")
+public class NullResource {
+
+ @POST
+ @Path("withconsumes")
+ @Consumes("text/plain")
+ public Response returnTextWithConsumes(byte[] echo) {
+ if (echo != null) {
+ return Response.ok(echo).build();
+ }
+ return Response.ok("calledWithConsumes").build();
+ }
+
+ @POST
+ @Path("withoutconsumes")
+ public Response returnTextWithoutConsumes(byte[] echo) {
+ if (echo != null) {
+ return Response.ok(echo).build();
+ }
+ return Response.ok("calledWithoutConsumes").build();
+ }
+
+ @POST
+ @Path("withproduces")
+ @Produces("custom/type")
+ public Response returnTextWithProduces() {
+ return Response.ok("calledWithProduces").build();
+ }
+
+ @POST
+ @Path("withoutproduces")
+ public Response returnTextWithoutProduces() {
+ return Response.ok("calledWithoutProduces").build();
+ }
+}
Added: incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/exceptions/ResourceWithConsumesAndProducesAndGET.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/exceptions/ResourceWithConsumesAndProducesAndGET.java?rev=794815&view=auto
==============================================================================
--- incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/exceptions/ResourceWithConsumesAndProducesAndGET.java (added)
+++ incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/exceptions/ResourceWithConsumesAndProducesAndGET.java Thu Jul 16 20:01:58 2009
@@ -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.wink.jaxrs.test.exceptions;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+@Path("/targeting/resourceconsumesandproduces")
+public class ResourceWithConsumesAndProducesAndGET {
+
+ @GET
+ @Consumes(MediaType.APPLICATION_XML)
+ @Produces(MediaType.APPLICATION_XML)
+ public Response getXML() {
+ return Response.ok("Hello XML Consumes And Produces").build();
+ }
+
+ @GET
+ @Consumes(MediaType.APPLICATION_XML)
+ @Produces(MediaType.APPLICATION_JSON)
+ public Response requestXMLThenResponseJSON() {
+ return Response.ok("Hello XML Consumes And JSON Produces").build();
+ }
+
+ @GET
+ @Consumes(MediaType.APPLICATION_JSON)
+ @Produces(MediaType.APPLICATION_JSON)
+ public Response getJSON() {
+ return Response.ok("Hello JSON Consumes And Produces").build();
+ }
+}
Added: incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/exceptions/ResourceWithMethod.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/exceptions/ResourceWithMethod.java?rev=794815&view=auto
==============================================================================
--- incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/exceptions/ResourceWithMethod.java (added)
+++ incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/exceptions/ResourceWithMethod.java Thu Jul 16 20:01:58 2009
@@ -0,0 +1,42 @@
+/*
+ * 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.wink.jaxrs.test.exceptions;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.GET;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+
+@Path("/targeting/resourcewithmethod")
+public class ResourceWithMethod {
+
+ @GET
+ public String getSomething() {
+ return "Hello";
+ }
+
+ @PUT
+ @Consumes("text/plain")
+ @Produces("text/plain")
+ public String getSomething(String hello) {
+ return hello;
+ }
+}
Added: incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/exceptions/ResourceWithOnlyConsumesAndGET.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/exceptions/ResourceWithOnlyConsumesAndGET.java?rev=794815&view=auto
==============================================================================
--- incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/exceptions/ResourceWithOnlyConsumesAndGET.java (added)
+++ incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/exceptions/ResourceWithOnlyConsumesAndGET.java Thu Jul 16 20:01:58 2009
@@ -0,0 +1,42 @@
+/*
+ * 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.wink.jaxrs.test.exceptions;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+@Path("/targeting/resourceonlyconsumes")
+public class ResourceWithOnlyConsumesAndGET {
+
+ @GET
+ @Consumes(MediaType.APPLICATION_XML)
+ public Response getXML() {
+ return Response.ok("Hello XML Consumes").type("text/plain").build();
+ }
+
+ @GET
+ @Consumes(MediaType.APPLICATION_JSON)
+ public Response getJSON() {
+ return Response.ok("Hello JSON Consumes").type("text/plain").build();
+ }
+}
Added: incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/exceptions/ResourceWithOnlyProducesAndGET.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/exceptions/ResourceWithOnlyProducesAndGET.java?rev=794815&view=auto
==============================================================================
--- incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/exceptions/ResourceWithOnlyProducesAndGET.java (added)
+++ incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/exceptions/ResourceWithOnlyProducesAndGET.java Thu Jul 16 20:01:58 2009
@@ -0,0 +1,43 @@
+/*
+ * 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.wink.jaxrs.test.exceptions;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+@Path("/targeting/resourceonlyproduces")
+public class ResourceWithOnlyProducesAndGET {
+
+ @GET
+ @Produces(MediaType.APPLICATION_XML)
+ public Response getXML() {
+ return Response.ok("Hello XML Produces").build();
+ }
+
+ @GET
+ @Produces(MediaType.APPLICATION_JSON)
+ public String getJSON() {
+ return "Hello JSON Produces";
+ }
+
+}
Added: incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/headers/Application.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/headers/Application.java?rev=794815&view=auto
==============================================================================
--- incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/headers/Application.java (added)
+++ incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/headers/Application.java Thu Jul 16 20:01:58 2009
@@ -0,0 +1,35 @@
+/*
+ * 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.wink.jaxrs.test.headers;
+
+import java.util.HashSet;
+import java.util.Set;
+
+public class Application extends javax.ws.rs.core.Application {
+
+ public Set<Class<?>> getClasses() {
+ Set<Class<?>> classes = new HashSet<Class<?>>();
+ classes.add(HeadersResource.class);
+ classes.add(HeadersAllowResource.class);
+ classes.add(HeadersAllowResource2.class);
+ return classes;
+ }
+
+}
Added: incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/headers/HeadersAllowResource.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/headers/HeadersAllowResource.java?rev=794815&view=auto
==============================================================================
--- incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/headers/HeadersAllowResource.java (added)
+++ incubator/wink/trunk/wink-integration-test/wink-server-integration-test/wink-jaxrs-test-targetting/src/main/java/org/apache/wink/jaxrs/test/headers/HeadersAllowResource.java Thu Jul 16 20:01:58 2009
@@ -0,0 +1,34 @@
+/*
+ * 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.wink.jaxrs.test.headers;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.core.Response;
+
+@Path("/headersallow1")
+public class HeadersAllowResource {
+
+ @GET
+ @Path(value = "/allow1")
+ public Response getAllow1() {
+ return Response.ok().build();
+ }
+}