You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by bl...@apache.org on 2010/02/22 05:45:30 UTC
svn commit: r912479 - in
/cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs: core/ ext/
Author: bluk
Date: Mon Feb 22 04:45:30 2010
New Revision: 912479
URL: http://svn.apache.org/viewvc?rev=912479&view=rev
Log:
Add JAX-RS @Provider interfaces
Added:
cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/core/MediaType.java (with props)
cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/core/Response.java (with props)
cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/core/StreamingOutput.java (with props)
cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/ext/ContextResolver.java (with props)
cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/ext/ExceptionMapper.java (with props)
cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/ext/MessageBodyReader.java (with props)
cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/ext/MessageBodyWriter.java (with props)
cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/ext/Providers.java (with props)
Added: cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/core/MediaType.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/core/MediaType.java?rev=912479&view=auto
==============================================================================
--- cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/core/MediaType.java (added)
+++ cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/core/MediaType.java Mon Feb 22 04:45:30 2010
@@ -0,0 +1,24 @@
+/*
+ * 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 javax.ws.rs.core;
+
+public class MediaType {
+
+}
Propchange: cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/core/MediaType.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/core/Response.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/core/Response.java?rev=912479&view=auto
==============================================================================
--- cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/core/Response.java (added)
+++ cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/core/Response.java Mon Feb 22 04:45:30 2010
@@ -0,0 +1,24 @@
+/*
+ * 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 javax.ws.rs.core;
+
+public class Response {
+
+}
Propchange: cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/core/Response.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/core/StreamingOutput.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/core/StreamingOutput.java?rev=912479&view=auto
==============================================================================
--- cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/core/StreamingOutput.java (added)
+++ cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/core/StreamingOutput.java Mon Feb 22 04:45:30 2010
@@ -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 javax.ws.rs.core;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+public interface StreamingOutput {
+ public void write(OutputStream os) throws IOException;
+}
Propchange: cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/core/StreamingOutput.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/ext/ContextResolver.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/ext/ContextResolver.java?rev=912479&view=auto
==============================================================================
--- cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/ext/ContextResolver.java (added)
+++ cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/ext/ContextResolver.java Mon Feb 22 04:45:30 2010
@@ -0,0 +1,24 @@
+/*
+ * 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 javax.ws.rs.ext;
+
+public interface ContextResolver<T> {
+ public T getContext(Class<?> rawType);
+}
Propchange: cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/ext/ContextResolver.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/ext/ExceptionMapper.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/ext/ExceptionMapper.java?rev=912479&view=auto
==============================================================================
--- cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/ext/ExceptionMapper.java (added)
+++ cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/ext/ExceptionMapper.java Mon Feb 22 04:45:30 2010
@@ -0,0 +1,26 @@
+/*
+ * 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 javax.ws.rs.ext;
+
+import javax.ws.rs.core.Response;
+
+public interface ExceptionMapper<T extends Throwable> {
+ public Response toResponse(T throwable);
+}
Propchange: cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/ext/ExceptionMapper.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/ext/MessageBodyReader.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/ext/MessageBodyReader.java?rev=912479&view=auto
==============================================================================
--- cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/ext/MessageBodyReader.java (added)
+++ cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/ext/MessageBodyReader.java Mon Feb 22 04:45:30 2010
@@ -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 javax.ws.rs.ext;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.MultivaluedMap;
+
+public interface MessageBodyReader<T> {
+ public boolean isReadable(Class<?> rawType,
+ Type genericType,
+ Annotation[] annotations,
+ MediaType mediaType);
+
+ public T readFrom(Class<T> rawType,
+ Type genericType,
+ Annotation[] annotations,
+ MediaType mediaType,
+ MultivaluedMap<String, String> httpHeaders,
+ InputStream entityStream) throws IOException;
+}
Propchange: cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/ext/MessageBodyReader.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/ext/MessageBodyWriter.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/ext/MessageBodyWriter.java?rev=912479&view=auto
==============================================================================
--- cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/ext/MessageBodyWriter.java (added)
+++ cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/ext/MessageBodyWriter.java Mon Feb 22 04:45:30 2010
@@ -0,0 +1,50 @@
+/*
+ * 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 javax.ws.rs.ext;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.MultivaluedMap;
+
+public interface MessageBodyWriter<T> {
+
+ public long getSize(T t,
+ Class<?> rawType,
+ Type genericType,
+ Annotation[] annotations,
+ MediaType mediaType);
+
+ public boolean isWriteable(Class<?> rawType,
+ Type genericType,
+ Annotation[] annotations,
+ MediaType mediaType);
+
+ public void writeTo(T t,
+ Class<?> rawType,
+ Type genericType,
+ Annotation[] annotations,
+ MediaType mediaType,
+ MultivaluedMap<String, Object> httpHeaders,
+ OutputStream entityStream) throws IOException;
+}
Propchange: cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/ext/MessageBodyWriter.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/ext/Providers.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/ext/Providers.java?rev=912479&view=auto
==============================================================================
--- cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/ext/Providers.java (added)
+++ cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/ext/Providers.java Mon Feb 22 04:45:30 2010
@@ -0,0 +1,41 @@
+/*
+ * 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 javax.ws.rs.ext;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+
+import javax.ws.rs.core.MediaType;
+
+public interface Providers {
+ public <T> ContextResolver<T> getContextResolver(Class<T> rawType, MediaType mediaType);
+
+ public <T extends Throwable> ExceptionMapper<T> getExceptionMapper(Class<T> rawType);
+
+ public <T> MessageBodyReader<T> getMessageBodyReader(Class<T> rawType,
+ Type genericType,
+ Annotation[] annotations,
+ MediaType mediaType);
+
+ public <T> MessageBodyWriter<T> getMessageBodyWriter(Class<T> rawType,
+ Type genericType,
+ Annotation[] annotations,
+ MediaType mediaType);
+}
Propchange: cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/ext/Providers.java
------------------------------------------------------------------------------
svn:eol-style = native