geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r932558 - in /geronimo/specs/trunk/geronimo-jaxrs_1.1_spec/src/main/java/javax/ws/rs: HttpMethod.java core/Application.java core/GenericEntity.java core/Response.java core/UriBuilder.java
Date Fri, 09 Apr 2010 19:29:57 GMT
Author: gawor
Date: Fri Apr  9 19:29:56 2010
New Revision: 932558

URL: http://svn.apache.org/viewvc?rev=932558&view=rev
Log:
GERONIMO-5095: jaxrs spec updates

Modified:
    geronimo/specs/trunk/geronimo-jaxrs_1.1_spec/src/main/java/javax/ws/rs/HttpMethod.java
    geronimo/specs/trunk/geronimo-jaxrs_1.1_spec/src/main/java/javax/ws/rs/core/Application.java
    geronimo/specs/trunk/geronimo-jaxrs_1.1_spec/src/main/java/javax/ws/rs/core/GenericEntity.java
    geronimo/specs/trunk/geronimo-jaxrs_1.1_spec/src/main/java/javax/ws/rs/core/Response.java
    geronimo/specs/trunk/geronimo-jaxrs_1.1_spec/src/main/java/javax/ws/rs/core/UriBuilder.java

Modified: geronimo/specs/trunk/geronimo-jaxrs_1.1_spec/src/main/java/javax/ws/rs/HttpMethod.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_1.1_spec/src/main/java/javax/ws/rs/HttpMethod.java?rev=932558&r1=932557&r2=932558&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_1.1_spec/src/main/java/javax/ws/rs/HttpMethod.java
(original)
+++ geronimo/specs/trunk/geronimo-jaxrs_1.1_spec/src/main/java/javax/ws/rs/HttpMethod.java
Fri Apr  9 19:29:56 2010
@@ -29,11 +29,12 @@ import java.lang.annotation.Target;
 @Retention(value = RetentionPolicy.RUNTIME)
 @Documented
 public @interface HttpMethod {
-    public static final String DELETE = "DELETE";
-    public static final String GET    = "GET";
-    public static final String HEAD   = "HEAD";
-    public static final String POST   = "POST";
-    public static final String PUT    = "PUT";
+    public static final String DELETE  = "DELETE";
+    public static final String GET     = "GET";
+    public static final String HEAD    = "HEAD";
+    public static final String POST    = "POST";
+    public static final String PUT     = "PUT";
+    public static final String OPTIONS = "OPTIONS";
 
     String value();
 }

Modified: geronimo/specs/trunk/geronimo-jaxrs_1.1_spec/src/main/java/javax/ws/rs/core/Application.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_1.1_spec/src/main/java/javax/ws/rs/core/Application.java?rev=932558&r1=932557&r2=932558&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_1.1_spec/src/main/java/javax/ws/rs/core/Application.java
(original)
+++ geronimo/specs/trunk/geronimo-jaxrs_1.1_spec/src/main/java/javax/ws/rs/core/Application.java
Fri Apr  9 19:29:56 2010
@@ -22,7 +22,7 @@ package javax.ws.rs.core;
 import java.util.Collections;
 import java.util.Set;
 
-public abstract class Application {
+public class Application {
 
     public Set<java.lang.Class<?>> getClasses() {
         return Collections.emptySet();

Modified: geronimo/specs/trunk/geronimo-jaxrs_1.1_spec/src/main/java/javax/ws/rs/core/GenericEntity.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_1.1_spec/src/main/java/javax/ws/rs/core/GenericEntity.java?rev=932558&r1=932557&r2=932558&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_1.1_spec/src/main/java/javax/ws/rs/core/GenericEntity.java
(original)
+++ geronimo/specs/trunk/geronimo-jaxrs_1.1_spec/src/main/java/javax/ws/rs/core/GenericEntity.java
Fri Apr  9 19:29:56 2010
@@ -70,15 +70,15 @@ public class GenericEntity<T> {
         }
     }
 
-    public T getEntity() {
+    public final T getEntity() {
         return entity;
     }
 
-    public Class<?> getRawType() {
+    public final Class<?> getRawType() {
         return entity.getClass();
     }
 
-    public Type getType() {
+    public final Type getType() {
         return genericType;
     }
 }

Modified: geronimo/specs/trunk/geronimo-jaxrs_1.1_spec/src/main/java/javax/ws/rs/core/Response.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_1.1_spec/src/main/java/javax/ws/rs/core/Response.java?rev=932558&r1=932557&r2=932558&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_1.1_spec/src/main/java/javax/ws/rs/core/Response.java
(original)
+++ geronimo/specs/trunk/geronimo-jaxrs_1.1_spec/src/main/java/javax/ws/rs/core/Response.java
Fri Apr  9 19:29:56 2010
@@ -71,6 +71,10 @@ public abstract class Response {
             return delegate.createResponseBuilder().status(value.getStatusCode());
         }
 
+        public Response.ResponseBuilder status(Response.StatusType status) {
+            return delegate.createResponseBuilder().status(status.getStatusCode());
+        }
+
         public abstract Response.ResponseBuilder tag(EntityTag value);
 
         public abstract Response.ResponseBuilder tag(String value);
@@ -83,10 +87,6 @@ public abstract class Response {
 
         public abstract Response.ResponseBuilder variants(List<Variant> values);
 
-        public Response.ResponseBuilder status(Response.StatusType status) {
-                return delegate.createResponseBuilder().status(
-                                status.getStatusCode());
-        }
     }
 
     public static enum Status implements StatusType {
@@ -270,6 +270,13 @@ public abstract class Response {
         return ResponseBuilder.newInstance().status(status);
     }
 
+    public static Response.ResponseBuilder status(Response.StatusType status) {
+        if (status == null) {
+            throw new IllegalArgumentException();
+        }
+        return ResponseBuilder.newInstance().status(status);
+    }
+
     public static Response.ResponseBuilder temporaryRedirect(URI location) {
         return status(Status.TEMPORARY_REDIRECT).location(location);
     }

Modified: geronimo/specs/trunk/geronimo-jaxrs_1.1_spec/src/main/java/javax/ws/rs/core/UriBuilder.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_1.1_spec/src/main/java/javax/ws/rs/core/UriBuilder.java?rev=932558&r1=932557&r2=932558&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_1.1_spec/src/main/java/javax/ws/rs/core/UriBuilder.java
(original)
+++ geronimo/specs/trunk/geronimo-jaxrs_1.1_spec/src/main/java/javax/ws/rs/core/UriBuilder.java
Fri Apr  9 19:29:56 2010
@@ -59,13 +59,13 @@ public abstract class UriBuilder {
         return delegate.createUriBuilder();
     }
 
-    public abstract java.net.URI build(Object... values);
+    public abstract URI build(Object... values);
 
-    public abstract java.net.URI buildFromEncoded(Object... values);
+    public abstract URI buildFromEncoded(Object... values);
 
-    public abstract java.net.URI buildFromEncodedMap(Map<String, ? extends Object>
values);
+    public abstract URI buildFromEncodedMap(Map<String, ? extends Object> values);
 
-    public abstract java.net.URI buildFromMap(Map<String, ? extends Object> values);
+    public abstract URI buildFromMap(Map<String, ? extends Object> values);
 
     @Override
     public abstract UriBuilder clone();
@@ -76,9 +76,9 @@ public abstract class UriBuilder {
 
     public abstract UriBuilder matrixParam(String name, Object... values);
 
-    public abstract UriBuilder path(Class<?> resourceClass);
+    public abstract UriBuilder path(Class resourceClass);
 
-    public abstract UriBuilder path(Class<?> resourceClass, String resourceMethodName);
+    public abstract UriBuilder path(Class resourceClass, String resourceMethodName);
 
     public abstract UriBuilder path(Method resourceMethod);
 



Mime
View raw message