geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1612628 [3/4] - in /geronimo/specs/trunk/geronimo-jaxrs_2.0_spec: ./ src/ src/main/ src/main/java/ src/main/java/javax/ src/main/java/javax/ws/ src/main/java/javax/ws/rs/ src/main/java/javax/ws/rs/client/ src/main/java/javax/ws/rs/containe...
Date Tue, 22 Jul 2014 17:50:27 GMT
Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/Suspended.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/Suspended.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/Suspended.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/Suspended.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,34 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed 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.
+ * #L%
+ */
+
+package javax.ws.rs.container;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+
+@Target({ElementType.PARAMETER})
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface Suspended {
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/TimeoutHandler.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/TimeoutHandler.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/TimeoutHandler.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/TimeoutHandler.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,28 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed 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.
+ * #L%
+ */
+
+package javax.ws.rs.container;
+
+
+public interface TimeoutHandler {
+
+
+    void handleTimeout(AsyncResponse asyncResponse);
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/package-info.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/package-info.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/package-info.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/container/package-info.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,22 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed 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.
+ * #L%
+ */
+
+
+package javax.ws.rs.container;

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/AbstractMultivaluedMap.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/AbstractMultivaluedMap.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/AbstractMultivaluedMap.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/AbstractMultivaluedMap.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,253 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed 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.
+ * #L%
+ */
+
+package javax.ws.rs.core;
+
+import java.util.Collection;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+
+public abstract class AbstractMultivaluedMap<K, V> implements MultivaluedMap<K, V> {
+
+
+    protected final Map<K, List<V>> store;
+
+
+    public AbstractMultivaluedMap(Map<K, List<V>> store) {
+        if (store == null) {
+            throw new NullPointerException("Underlying store must not be 'null'.");
+        }
+        this.store = store;
+    }
+
+
+    @Override
+    public final void putSingle(K key, V value) {
+        List<V> values = getValues(key);
+
+        values.clear();
+        if (value != null) {
+            values.add(value);
+        } else {
+            addNull(values);
+        }
+    }
+
+
+    @SuppressWarnings("UnusedParameters")
+    protected void addNull(List<V> values) {
+
+    }
+
+
+    @SuppressWarnings("UnusedParameters")
+    protected void addFirstNull(List<V> values) {
+
+    }
+
+
+    @Override
+    public final void add(K key, V value) {
+        List<V> values = getValues(key);
+
+        if (value != null) {
+            values.add(value);
+        } else {
+            addNull(values);
+        }
+    }
+
+
+    @Override
+    public final void addAll(K key, V... newValues) {
+        if (newValues == null) {
+            throw new NullPointerException("Supplied array of values must not be null.");
+        }
+        if (newValues.length == 0) {
+            return;
+        }
+
+        List<V> values = getValues(key);
+
+        for (V value : newValues) {
+            if (value != null) {
+                values.add(value);
+            } else {
+                addNull(values);
+            }
+        }
+    }
+
+
+    @Override
+    public final void addAll(K key, List<V> valueList) {
+        if (valueList == null) {
+            throw new NullPointerException("Supplied list of values must not be null.");
+        }
+        if (valueList.isEmpty()) {
+            return;
+        }
+
+        List<V> values = getValues(key);
+
+        for (V value : valueList) {
+            if (value != null) {
+                values.add(value);
+            } else {
+                addNull(values);
+            }
+        }
+    }
+
+    @Override
+    public final V getFirst(K key) {
+        List<V> values = store.get(key);
+        if (values != null && values.size() > 0) {
+            return values.get(0);
+        } else {
+            return null;
+        }
+    }
+
+
+    @Override
+    public final void addFirst(K key, V value) {
+        List<V> values = getValues(key);
+
+        if (value != null) {
+            values.add(0, value);
+        } else {
+            addFirstNull(values);
+        }
+    }
+
+
+    protected final List<V> getValues(K key) {
+        List<V> l = store.get(key);
+        if (l == null) {
+            l = new LinkedList<V>();
+            store.put(key, l);
+        }
+        return l;
+    }
+
+    @Override
+    public String toString() {
+        return store.toString();
+    }
+
+
+    @Override
+    public int hashCode() {
+        return store.hashCode();
+    }
+
+
+    @Override
+    @SuppressWarnings("EqualsWhichDoesntCheckParameterClass")
+    public boolean equals(Object o) {
+        return store.equals(o);
+    }
+
+    @Override
+    public Collection<List<V>> values() {
+        return store.values();
+    }
+
+    @Override
+    public int size() {
+        return store.size();
+    }
+
+    @Override
+    public List<V> remove(Object key) {
+        return store.remove(key);
+    }
+
+    @Override
+    public void putAll(Map<? extends K, ? extends List<V>> m) {
+        store.putAll(m);
+    }
+
+    @Override
+    public List<V> put(K key, List<V> value) {
+        return store.put(key, value);
+    }
+
+    @Override
+    public Set<K> keySet() {
+        return store.keySet();
+    }
+
+    @Override
+    public boolean isEmpty() {
+        return store.isEmpty();
+    }
+
+    @Override
+    public List<V> get(Object key) {
+        return store.get(key);
+    }
+
+    @Override
+    public Set<Entry<K, List<V>>> entrySet() {
+        return store.entrySet();
+    }
+
+    @Override
+    public boolean containsValue(Object value) {
+        return store.containsValue(value);
+    }
+
+    @Override
+    public boolean containsKey(Object key) {
+        return store.containsKey(key);
+    }
+
+    @Override
+    public void clear() {
+        store.clear();
+    }
+
+    @Override
+    public boolean equalsIgnoreValueOrder(MultivaluedMap<K, V> omap) {
+        if (this == omap) {
+            return true;
+        }
+        if (!keySet().equals(omap.keySet())) {
+            return false;
+        }
+        for (Entry<K, List<V>> e : entrySet()) {
+            List<V> olist = omap.get(e.getKey());
+            if (e.getValue().size() != olist.size()) {
+                return false;
+            }
+            for (V v : e.getValue()) {
+                if (!olist.contains(v)) {
+                    return false;
+                }
+            }
+        }
+        return true;
+    }
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/Application.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/Application.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/Application.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/Application.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,44 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed 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.
+ * #L%
+ */
+
+package javax.ws.rs.core;
+
+import java.util.Collections;
+import java.util.Map;
+import java.util.Set;
+
+
+public class Application {
+
+
+    public Set<Class<?>> getClasses() {
+        return Collections.emptySet();
+    }
+
+
+    public Set<Object> getSingletons() {
+        return Collections.emptySet();
+    }
+
+
+    public Map<String, Object> getProperties() {
+        return Collections.emptyMap();
+    }
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/CacheControl.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/CacheControl.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/CacheControl.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/CacheControl.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,234 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed 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.
+ * #L%
+ */
+
+package javax.ws.rs.core;
+
+import javax.ws.rs.ext.RuntimeDelegate;
+import javax.ws.rs.ext.RuntimeDelegate.HeaderDelegate;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+public class CacheControl {
+
+    private static final HeaderDelegate<CacheControl> HEADER_DELEGATE = RuntimeDelegate.getInstance().createHeaderDelegate(CacheControl.class);
+    private boolean privateFlag;
+    private List<String> privateFields;
+    private boolean noCache;
+    private List<String> noCacheFields;
+    private boolean noStore;
+    private boolean noTransform;
+    private boolean mustRevalidate;
+    private boolean proxyRevalidate;
+    private int maxAge = -1;
+    private int sMaxAge = -1;
+    private Map<String, String> cacheExtension;
+
+
+    public CacheControl() {
+        privateFlag = false;
+        noCache = false;
+        noStore = false;
+        noTransform = true;
+        mustRevalidate = false;
+        proxyRevalidate = false;
+    }
+
+
+    public static CacheControl valueOf(final String value) {
+        return HEADER_DELEGATE.fromString(value);
+    }
+
+
+    public boolean isMustRevalidate() {
+        return mustRevalidate;
+    }
+
+
+    public void setMustRevalidate(final boolean mustRevalidate) {
+        this.mustRevalidate = mustRevalidate;
+    }
+
+
+    public boolean isProxyRevalidate() {
+        return proxyRevalidate;
+    }
+
+
+    public void setProxyRevalidate(final boolean proxyRevalidate) {
+        this.proxyRevalidate = proxyRevalidate;
+    }
+
+
+    public int getMaxAge() {
+        return maxAge;
+    }
+
+
+    public void setMaxAge(final int maxAge) {
+        this.maxAge = maxAge;
+    }
+
+
+    public int getSMaxAge() {
+        return sMaxAge;
+    }
+
+
+    public void setSMaxAge(final int sMaxAge) {
+        this.sMaxAge = sMaxAge;
+    }
+
+
+    public List<String> getNoCacheFields() {
+        if (noCacheFields == null) {
+            noCacheFields = new ArrayList<String>();
+        }
+        return noCacheFields;
+    }
+
+
+    public void setNoCache(final boolean noCache) {
+        this.noCache = noCache;
+    }
+
+
+    public boolean isNoCache() {
+        return noCache;
+    }
+
+
+    public boolean isPrivate() {
+        return privateFlag;
+    }
+
+
+    public List<String> getPrivateFields() {
+        if (privateFields == null) {
+            privateFields = new ArrayList<String>();
+        }
+        return privateFields;
+    }
+
+
+    public void setPrivate(final boolean flag) {
+        this.privateFlag = flag;
+    }
+
+
+    public boolean isNoTransform() {
+        return noTransform;
+    }
+
+
+    public void setNoTransform(final boolean noTransform) {
+        this.noTransform = noTransform;
+    }
+
+
+    public boolean isNoStore() {
+        return noStore;
+    }
+
+
+    public void setNoStore(final boolean noStore) {
+        this.noStore = noStore;
+    }
+
+
+    public Map<String, String> getCacheExtension() {
+        if (cacheExtension == null) {
+            cacheExtension = new HashMap<String, String>();
+        }
+        return cacheExtension;
+    }
+
+
+    @Override
+    public String toString() {
+        return HEADER_DELEGATE.toString(this);
+    }
+
+
+    @Override
+    public int hashCode() {
+        int hash = 7;
+        hash = 41 * hash + (this.privateFlag ? 1 : 0);
+        hash = 41 * hash + (this.privateFields != null ? this.privateFields.hashCode() : 0);
+        hash = 41 * hash + (this.noCache ? 1 : 0);
+        hash = 41 * hash + (this.noCacheFields != null ? this.noCacheFields.hashCode() : 0);
+        hash = 41 * hash + (this.noStore ? 1 : 0);
+        hash = 41 * hash + (this.noTransform ? 1 : 0);
+        hash = 41 * hash + (this.mustRevalidate ? 1 : 0);
+        hash = 41 * hash + (this.proxyRevalidate ? 1 : 0);
+        hash = 41 * hash + this.maxAge;
+        hash = 41 * hash + this.sMaxAge;
+        hash = 41 * hash + (this.cacheExtension != null ? this.cacheExtension.hashCode() : 0);
+        return hash;
+    }
+
+
+    @Override
+    public boolean equals(final Object obj) {
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        final CacheControl other = (CacheControl) obj;
+        if (this.privateFlag != other.privateFlag) {
+            return false;
+        }
+        if (this.privateFields != other.privateFields && (this.privateFields == null || !this.privateFields.equals(other.privateFields))) {
+            return false;
+        }
+        if (this.noCache != other.noCache) {
+            return false;
+        }
+        if (this.noCacheFields != other.noCacheFields && (this.noCacheFields == null || !this.noCacheFields.equals(other.noCacheFields))) {
+            return false;
+        }
+        if (this.noStore != other.noStore) {
+            return false;
+        }
+        if (this.noTransform != other.noTransform) {
+            return false;
+        }
+        if (this.mustRevalidate != other.mustRevalidate) {
+            return false;
+        }
+        if (this.proxyRevalidate != other.proxyRevalidate) {
+            return false;
+        }
+        if (this.maxAge != other.maxAge) {
+            return false;
+        }
+        if (this.sMaxAge != other.sMaxAge) {
+            return false;
+        }
+        if (this.cacheExtension != other.cacheExtension && (this.cacheExtension == null || !this.cacheExtension.equals(other.cacheExtension))) {
+            return false;
+        }
+        return true;
+    }
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/Configurable.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/Configurable.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/Configurable.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/Configurable.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,57 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed 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.
+ * #L%
+ */
+
+package javax.ws.rs.core;
+
+import java.util.Map;
+
+
+public interface Configurable<C extends Configurable> {
+
+
+    Configuration getConfiguration();
+
+
+    C property(String name, Object value);
+
+
+    C register(Class<?> componentClass);
+
+
+    C register(Class<?> componentClass, int priority);
+
+
+    C register(Class<?> componentClass, Class<?>... contracts);
+
+
+    C register(Class<?> componentClass, Map<Class<?>, Integer> contracts);
+
+
+    C register(Object component);
+
+
+    C register(Object component, int priority);
+
+
+    C register(Object component, Class<?>... contracts);
+
+
+    C register(Object component, Map<Class<?>, Integer> contracts);
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/Configuration.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/Configuration.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/Configuration.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/Configuration.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,63 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed 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.
+ * #L%
+ */
+
+package javax.ws.rs.core;
+
+import javax.ws.rs.RuntimeType;
+import java.util.Collection;
+import java.util.Map;
+import java.util.Set;
+
+
+public interface Configuration {
+
+
+    public RuntimeType getRuntimeType();
+
+
+    public Map<String, Object> getProperties();
+
+
+    public Object getProperty(String name);
+
+
+    public Collection<String> getPropertyNames();
+
+
+    public boolean isEnabled(Feature feature);
+
+
+    public boolean isEnabled(Class<? extends Feature> featureClass);
+
+
+    public boolean isRegistered(Object component);
+
+
+    public boolean isRegistered(Class<?> componentClass);
+
+
+    public Map<Class<?>, Integer> getContracts(Class<?> componentClass);
+
+
+    public Set<Class<?>> getClasses();
+
+
+    public Set<Object> getInstances();
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/Context.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/Context.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/Context.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/Context.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,34 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed 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.
+ * #L%
+ */
+
+package javax.ws.rs.core;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+
+@Target({ElementType.PARAMETER, ElementType.METHOD, ElementType.FIELD})
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface Context {
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/Cookie.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/Cookie.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/Cookie.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/Cookie.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,136 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed 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.
+ * #L%
+ */
+
+package javax.ws.rs.core;
+
+import javax.ws.rs.ext.RuntimeDelegate;
+import javax.ws.rs.ext.RuntimeDelegate.HeaderDelegate;
+
+
+public class Cookie {
+
+
+    public static final int DEFAULT_VERSION = 1;
+    private static final HeaderDelegate<Cookie> HEADER_DELEGATE = RuntimeDelegate.getInstance().createHeaderDelegate(Cookie.class);
+    private final String name;
+    private final String value;
+    private final int version;
+    private final String path;
+    private final String domain;
+
+
+    public Cookie(final String name, final String value, final String path, final String domain, final int version) throws IllegalArgumentException {
+        if (name == null) {
+            throw new IllegalArgumentException("name==null");
+        }
+        this.name = name;
+        this.value = value;
+        this.version = version;
+        this.domain = domain;
+        this.path = path;
+    }
+
+
+    public Cookie(final String name, final String value, final String path, final String domain) throws IllegalArgumentException {
+        this(name, value, path, domain, DEFAULT_VERSION);
+    }
+
+
+    public Cookie(final String name, final String value) throws IllegalArgumentException {
+        this(name, value, null, null);
+    }
+
+
+    public static Cookie valueOf(final String value) {
+        return HEADER_DELEGATE.fromString(value);
+    }
+
+
+    public String getName() {
+        return name;
+    }
+
+
+    public String getValue() {
+        return value;
+    }
+
+
+    public int getVersion() {
+        return version;
+    }
+
+
+    public String getDomain() {
+        return domain;
+    }
+
+
+    public String getPath() {
+        return path;
+    }
+
+
+    @Override
+    public String toString() {
+        return HEADER_DELEGATE.toString(this);
+    }
+
+
+    @Override
+    public int hashCode() {
+        int hash = 7;
+        hash = 97 * hash + (this.name != null ? this.name.hashCode() : 0);
+        hash = 97 * hash + (this.value != null ? this.value.hashCode() : 0);
+        hash = 97 * hash + this.version;
+        hash = 97 * hash + (this.path != null ? this.path.hashCode() : 0);
+        hash = 97 * hash + (this.domain != null ? this.domain.hashCode() : 0);
+        return hash;
+    }
+
+
+    @SuppressWarnings({"StringEquality", "RedundantIfStatement"})
+    @Override
+    public boolean equals(final Object obj) {
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        final Cookie other = (Cookie) obj;
+        if (this.name != other.name && (this.name == null || !this.name.equals(other.name))) {
+            return false;
+        }
+        if (this.value != other.value && (this.value == null || !this.value.equals(other.value))) {
+            return false;
+        }
+        if (this.version != other.version) {
+            return false;
+        }
+        if (this.path != other.path && (this.path == null || !this.path.equals(other.path))) {
+            return false;
+        }
+        if (this.domain != other.domain && (this.domain == null || !this.domain.equals(other.domain))) {
+            return false;
+        }
+        return true;
+    }
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/EntityTag.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/EntityTag.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/EntityTag.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/EntityTag.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,92 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed 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.
+ * #L%
+ */
+
+package javax.ws.rs.core;
+
+import javax.ws.rs.ext.RuntimeDelegate;
+import javax.ws.rs.ext.RuntimeDelegate.HeaderDelegate;
+
+
+public class EntityTag {
+
+    private static final HeaderDelegate<EntityTag> HEADER_DELEGATE = RuntimeDelegate.getInstance().createHeaderDelegate(EntityTag.class);
+    private String value;
+    private boolean weak;
+
+
+    public EntityTag(final String value) {
+        this(value, false);
+    }
+
+
+    public EntityTag(final String value, final boolean weak) {
+        if (value == null) {
+            throw new IllegalArgumentException("value==null");
+        }
+        this.value = value;
+        this.weak = weak;
+    }
+
+
+    public static EntityTag valueOf(final String value) {
+        return HEADER_DELEGATE.fromString(value);
+    }
+
+
+    public boolean isWeak() {
+        return weak;
+    }
+
+
+    public String getValue() {
+        return value;
+    }
+
+
+    @Override
+    public boolean equals(final Object obj) {
+        if (obj == null) {
+            return false;
+        }
+        if (!(obj instanceof EntityTag)) {
+            return super.equals(obj);
+        }
+        EntityTag other = (EntityTag) obj;
+        if (value.equals(other.getValue()) && weak == other.isWeak()) {
+            return true;
+        }
+        return false;
+    }
+
+
+    @Override
+    public int hashCode() {
+        int hash = 3;
+        hash = 17 * hash + (this.value != null ? this.value.hashCode() : 0);
+        hash = 17 * hash + (this.weak ? 1 : 0);
+        return hash;
+    }
+
+
+    @Override
+    public String toString() {
+        return HEADER_DELEGATE.toString(this);
+    }
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/Feature.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/Feature.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/Feature.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/Feature.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,28 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed 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.
+ * #L%
+ */
+
+package javax.ws.rs.core;
+
+
+public interface Feature {
+
+
+    boolean configure(FeatureContext context);
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/FeatureContext.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/FeatureContext.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/FeatureContext.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/FeatureContext.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,25 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed 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.
+ * #L%
+ */
+
+package javax.ws.rs.core;
+
+
+public interface FeatureContext extends Configurable<FeatureContext> {
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/Form.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/Form.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/Form.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/Form.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,60 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed 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.
+ * #L%
+ */
+
+package javax.ws.rs.core;
+
+import java.util.LinkedHashMap;
+import java.util.List;
+
+
+public class Form {
+    private final MultivaluedMap<String, String> parameters;
+
+
+    public Form() {
+        this(new AbstractMultivaluedMap<String, String>(new LinkedHashMap<String, List<String>>()) {
+
+        });
+    }
+
+
+    public Form(final String parameterName, final String parameterValue) {
+        this();
+
+        parameters.add(parameterName, parameterValue);
+    }
+
+
+    public Form(final MultivaluedMap<String, String> store) {
+        this.parameters = store;
+    }
+
+
+    public Form param(final String name, final String value) {
+        parameters.add(name, value);
+
+        return this;
+    }
+
+
+    public MultivaluedMap<String, String> asMap() {
+        return parameters;
+    }
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/GenericEntity.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/GenericEntity.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/GenericEntity.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/GenericEntity.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,110 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed 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.
+ * #L%
+ */
+
+package javax.ws.rs.core;
+
+import java.lang.reflect.GenericArrayType;
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Type;
+
+
+public class GenericEntity<T> {
+
+    private final Class<?> rawType;
+    private final Type type;
+    private final T entity;
+
+
+    protected GenericEntity(final T entity) {
+        if (entity == null) {
+            throw new IllegalArgumentException("The entity must not be null");
+        }
+        this.entity = entity;
+        this.type = GenericType.getTypeArgument(getClass(), GenericEntity.class);
+        this.rawType = entity.getClass();
+    }
+
+
+    public GenericEntity(final T entity, final Type genericType) {
+        if (entity == null || genericType == null) {
+            throw new IllegalArgumentException("Arguments must not be null.");
+        }
+        this.entity = entity;
+        this.rawType = entity.getClass();
+        checkTypeCompatibility(this.rawType, genericType);
+        this.type = genericType;
+    }
+
+    private void checkTypeCompatibility(final Class<?> c, final Type t) {
+        if (t instanceof Class) {
+            Class<?> ct = (Class<?>) t;
+            if (ct.isAssignableFrom(c)) {
+                return;
+            }
+        } else if (t instanceof ParameterizedType) {
+            ParameterizedType pt = (ParameterizedType) t;
+            Type rt = pt.getRawType();
+            checkTypeCompatibility(c, rt);
+            return;
+        } else if (c.isArray() && (t instanceof GenericArrayType)) {
+            GenericArrayType at = (GenericArrayType) t;
+            Type rt = at.getGenericComponentType();
+            checkTypeCompatibility(c.getComponentType(), rt);
+            return;
+        }
+        throw new IllegalArgumentException("The type is incompatible with the class of the entity.");
+    }
+
+
+    public final Class<?> getRawType() {
+        return rawType;
+    }
+
+
+    public final Type getType() {
+        return type;
+    }
+
+
+    public final T getEntity() {
+        return entity;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        boolean result = this == obj;
+        if (!result && obj instanceof GenericEntity) {
+
+            GenericEntity<?> that = (GenericEntity<?>) obj;
+            return this.type.equals(that.type) && this.entity.equals(that.entity);
+        }
+        return result;
+    }
+
+    @Override
+    public int hashCode() {
+        return entity.hashCode() + type.hashCode() * 37 + 5;
+    }
+
+    @Override
+    public String toString() {
+        return "GenericEntity{" + entity.toString() + ", " + type.toString() + "}";
+    }
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/GenericType.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/GenericType.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/GenericType.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/GenericType.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,159 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed 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.
+ * #L%
+ */
+
+package javax.ws.rs.core;
+
+import java.lang.reflect.Array;
+import java.lang.reflect.GenericArrayType;
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Type;
+import java.lang.reflect.TypeVariable;
+import java.util.Arrays;
+import java.util.Stack;
+
+
+public class GenericType<T> {
+
+
+    private final Type type;
+
+    private final Class<?> rawType;
+
+
+    protected GenericType() {
+
+        type = getTypeArgument(getClass(), GenericType.class);
+        rawType = getClass(type);
+    }
+
+
+    public GenericType(Type genericType) {
+        if (genericType == null) {
+            throw new IllegalArgumentException("Type must not be null");
+        }
+
+        type = genericType;
+        rawType = getClass(type);
+    }
+
+
+    public final Type getType() {
+        return type;
+    }
+
+
+    public final Class<?> getRawType() {
+        return rawType;
+    }
+
+
+    private static Class getClass(Type type) {
+        if (type instanceof Class) {
+            return (Class) type;
+        } else if (type instanceof ParameterizedType) {
+            ParameterizedType parameterizedType = (ParameterizedType) type;
+            if (parameterizedType.getRawType() instanceof Class) {
+                return (Class) parameterizedType.getRawType();
+            }
+        } else if (type instanceof GenericArrayType) {
+            GenericArrayType array = (GenericArrayType) type;
+            final Class<?> componentRawType = getClass(array.getGenericComponentType());
+            return getArrayClass(componentRawType);
+        }
+        throw new IllegalArgumentException("Type parameter " + type.toString() + " not a class or " +
+            "parameterized type whose raw type is a class");
+    }
+
+
+    private static Class getArrayClass(Class c) {
+        try {
+            Object o = Array.newInstance(c, 0);
+            return o.getClass();
+        } catch (Exception e) {
+            throw new IllegalArgumentException(e);
+        }
+    }
+
+
+    static Type getTypeArgument(Class<?> clazz, Class<?> baseClass) {
+
+        Stack<Type> superclasses = new Stack<Type>();
+        Type currentType;
+        Class<?> currentClass = clazz;
+        do {
+            currentType = currentClass.getGenericSuperclass();
+            superclasses.push(currentType);
+            if (currentType instanceof Class) {
+                currentClass = (Class) currentType;
+            } else if (currentType instanceof ParameterizedType) {
+                currentClass = (Class) ((ParameterizedType) currentType).getRawType();
+            }
+        } while (!currentClass.equals(baseClass));
+
+
+        TypeVariable tv = baseClass.getTypeParameters()[0];
+        while (!superclasses.isEmpty()) {
+            currentType = superclasses.pop();
+
+            if (currentType instanceof ParameterizedType) {
+                ParameterizedType pt = (ParameterizedType) currentType;
+                Class<?> rawType = (Class) pt.getRawType();
+                int argIndex = Arrays.asList(rawType.getTypeParameters()).indexOf(tv);
+                if (argIndex > -1) {
+                    Type typeArg = pt.getActualTypeArguments()[argIndex];
+                    if (typeArg instanceof TypeVariable) {
+
+
+                        tv = (TypeVariable) typeArg;
+                        continue;
+                    } else {
+
+                        return typeArg;
+                    }
+                }
+            }
+
+
+            break;
+        }
+        throw new IllegalArgumentException(currentType + " does not specify the type parameter T of GenericType<T>");
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        boolean result = this == obj;
+        if (!result && obj instanceof GenericType) {
+
+            GenericType<?> that = (GenericType<?>) obj;
+            return this.type.equals(that.type);
+        }
+        return result;
+    }
+
+    @Override
+    public int hashCode() {
+        return type.hashCode();
+    }
+
+    @Override
+    public String toString() {
+        return "GenericType{" + type.toString() + "}";
+    }
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/HttpHeaders.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/HttpHeaders.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/HttpHeaders.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/HttpHeaders.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,123 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed 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.
+ * #L%
+ */
+
+package javax.ws.rs.core;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
+
+public interface HttpHeaders {
+
+
+    List<String> getRequestHeader(String name);
+
+
+    String getHeaderString(String name);
+
+
+    MultivaluedMap<String, String> getRequestHeaders();
+
+
+    List<MediaType> getAcceptableMediaTypes();
+
+
+    List<Locale> getAcceptableLanguages();
+
+
+    MediaType getMediaType();
+
+
+    Locale getLanguage();
+
+
+    Map<String, Cookie> getCookies();
+
+
+    Date getDate();
+
+
+    int getLength();
+
+
+    static final String ACCEPT = "Accept";
+
+    static final String ACCEPT_CHARSET = "Accept-Charset";
+
+    static final String ACCEPT_ENCODING = "Accept-Encoding";
+
+    static final String ACCEPT_LANGUAGE = "Accept-Language";
+
+    static final String ALLOW = "Allow";
+
+    static final String AUTHORIZATION = "Authorization";
+
+    static final String CACHE_CONTROL = "Cache-Control";
+
+    static final String CONTENT_DISPOSITION = "Content-Disposition";
+
+    static final String CONTENT_ENCODING = "Content-Encoding";
+
+    static final String CONTENT_ID = "Content-ID";
+
+    static final String CONTENT_LANGUAGE = "Content-Language";
+
+    static final String CONTENT_LENGTH = "Content-Length";
+
+    static final String CONTENT_LOCATION = "Content-Location";
+
+    static final String CONTENT_TYPE = "Content-Type";
+
+    static final String DATE = "Date";
+
+    static final String ETAG = "ETag";
+
+    static final String EXPIRES = "Expires";
+
+    static final String HOST = "Host";
+
+    static final String IF_MATCH = "If-Match";
+
+    static final String IF_MODIFIED_SINCE = "If-Modified-Since";
+
+    static final String IF_NONE_MATCH = "If-None-Match";
+
+    static final String IF_UNMODIFIED_SINCE = "If-Unmodified-Since";
+
+    static final String LAST_MODIFIED = "Last-Modified";
+
+    static final String LOCATION = "Location";
+
+    static final String LINK = "Link";
+
+    static final String RETRY_AFTER = "Retry-After";
+
+    static final String USER_AGENT = "User-Agent";
+
+    static final String VARY = "Vary";
+
+    static final String WWW_AUTHENTICATE = "WWW-Authenticate";
+
+    static final String COOKIE = "Cookie";
+
+    static final String SET_COOKIE = "Set-Cookie";
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/Link.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/Link.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/Link.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/Link.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,225 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed 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.
+ * #L%
+ */
+
+package javax.ws.rs.core;
+
+import javax.ws.rs.ext.RuntimeDelegate;
+import javax.xml.bind.annotation.XmlAnyAttribute;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.adapters.XmlAdapter;
+import javax.xml.namespace.QName;
+import java.net.URI;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+
+
+public abstract class Link {
+
+
+    public static final String TITLE = "title";
+
+
+    public static final String REL = "rel";
+
+
+    public static final String TYPE = "type";
+
+
+    public abstract URI getUri();
+
+
+    public abstract UriBuilder getUriBuilder();
+
+
+    public abstract String getRel();
+
+
+    public abstract List<String> getRels();
+
+
+    public abstract String getTitle();
+
+
+    public abstract String getType();
+
+
+    public abstract Map<String, String> getParams();
+
+
+    @Override
+    public abstract String toString();
+
+
+    public static Link valueOf(String value) {
+        Builder b = RuntimeDelegate.getInstance().createLinkBuilder();
+        b.link(value);
+        return b.build();
+    }
+
+
+    public static Builder fromUri(URI uri) {
+        Builder b = RuntimeDelegate.getInstance().createLinkBuilder();
+        b.uri(uri);
+        return b;
+    }
+
+
+    public static Builder fromUri(String uri) {
+        Builder b = RuntimeDelegate.getInstance().createLinkBuilder();
+        b.uri(uri);
+        return b;
+    }
+
+
+    public static Builder fromUriBuilder(UriBuilder uriBuilder) {
+        Builder b = RuntimeDelegate.getInstance().createLinkBuilder();
+        b.uriBuilder(uriBuilder);
+        return b;
+    }
+
+
+    public static Builder fromLink(Link link) {
+        Builder b = RuntimeDelegate.getInstance().createLinkBuilder();
+        b.link(link);
+        return b;
+    }
+
+
+    public static Builder fromPath(String path) {
+        return fromUriBuilder(UriBuilder.fromPath(path));
+    }
+
+
+    public static Builder fromResource(Class<?> resource) {
+        return fromUriBuilder(UriBuilder.fromResource(resource));
+    }
+
+
+    public static Builder fromMethod(Class<?> resource, String method) {
+        return fromUriBuilder(UriBuilder.fromMethod(resource, method));
+    }
+
+
+    public interface Builder {
+
+
+        public Builder link(Link link);
+
+
+        public Builder link(String link);
+
+
+        public Builder uri(URI uri);
+
+
+        public Builder uri(String uri);
+
+
+        public Builder baseUri(URI uri);
+
+
+        public Builder baseUri(String uri);
+
+
+        public Builder uriBuilder(UriBuilder uriBuilder);
+
+
+        public Builder rel(String rel);
+
+
+        public Builder title(String title);
+
+
+        public Builder type(String type);
+
+
+        public Builder param(String name, String value);
+
+
+        public Link build(Object... values);
+
+
+        public Link buildRelativized(URI uri, Object... values);
+    }
+
+
+    public static class JaxbLink {
+
+        private URI uri;
+        private Map<QName, Object> params;
+
+
+        public JaxbLink() {
+        }
+
+
+        public JaxbLink(URI uri) {
+            this.uri = uri;
+        }
+
+
+        public JaxbLink(URI uri, Map<QName, Object> params) {
+            this.uri = uri;
+            this.params = params;
+        }
+
+
+        @XmlAttribute(name = "href")
+        public URI getUri() {
+            return uri;
+        }
+
+
+        @XmlAnyAttribute
+        public Map<QName, Object> getParams() {
+            if (params == null) {
+                params = new HashMap<QName, Object>();
+            }
+            return params;
+        }
+    }
+
+
+    public static class JaxbAdapter extends XmlAdapter<JaxbLink, Link> {
+
+
+        @Override
+        public Link unmarshal(JaxbLink v) {
+            Link.Builder lb = Link.fromUri(v.getUri());
+            for (Entry<QName, Object> e : v.getParams().entrySet()) {
+                lb.param(e.getKey().getLocalPart(), e.getValue().toString());
+            }
+            return lb.build();
+        }
+
+
+        @Override
+        public JaxbLink marshal(Link v) {
+            JaxbLink jl = new JaxbLink(v.getUri());
+            for (Entry<String, String> e : v.getParams().entrySet()) {
+                final String name = e.getKey();
+                jl.getParams().put(new QName("", name), e.getValue());
+            }
+            return jl;
+        }
+    }
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/MediaType.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/MediaType.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/MediaType.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/MediaType.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,214 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed 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.
+ * #L%
+ */
+
+package javax.ws.rs.core;
+
+import javax.ws.rs.ext.RuntimeDelegate;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Map;
+import java.util.TreeMap;
+
+
+@SuppressWarnings("JavaDoc")
+public class MediaType {
+
+    private String type;
+    private String subtype;
+    private Map<String, String> parameters;
+
+
+    public static final String CHARSET_PARAMETER = "charset";
+
+    public static final String MEDIA_TYPE_WILDCARD = "*";
+
+
+    public final static String WILDCARD = "*/*";
+
+    public final static MediaType WILDCARD_TYPE = new MediaType();
+
+    public final static String APPLICATION_XML = "application/xml";
+
+    public final static MediaType APPLICATION_XML_TYPE = new MediaType("application", "xml");
+
+    public final static String APPLICATION_ATOM_XML = "application/atom+xml";
+
+    public final static MediaType APPLICATION_ATOM_XML_TYPE = new MediaType("application", "atom+xml");
+
+    public final static String APPLICATION_XHTML_XML = "application/xhtml+xml";
+
+    public final static MediaType APPLICATION_XHTML_XML_TYPE = new MediaType("application", "xhtml+xml");
+
+    public final static String APPLICATION_SVG_XML = "application/svg+xml";
+
+    public final static MediaType APPLICATION_SVG_XML_TYPE = new MediaType("application", "svg+xml");
+
+    public final static String APPLICATION_JSON = "application/json";
+
+    public final static MediaType APPLICATION_JSON_TYPE = new MediaType("application", "json");
+
+    public final static String APPLICATION_FORM_URLENCODED = "application/x-www-form-urlencoded";
+
+    public final static MediaType APPLICATION_FORM_URLENCODED_TYPE = new MediaType("application", "x-www-form-urlencoded");
+
+    public final static String MULTIPART_FORM_DATA = "multipart/form-data";
+
+    public final static MediaType MULTIPART_FORM_DATA_TYPE = new MediaType("multipart", "form-data");
+
+    public final static String APPLICATION_OCTET_STREAM = "application/octet-stream";
+
+    public final static MediaType APPLICATION_OCTET_STREAM_TYPE = new MediaType("application", "octet-stream");
+
+    public final static String TEXT_PLAIN = "text/plain";
+
+    public final static MediaType TEXT_PLAIN_TYPE = new MediaType("text", "plain");
+
+    public final static String TEXT_XML = "text/xml";
+
+    public final static MediaType TEXT_XML_TYPE = new MediaType("text", "xml");
+
+    public final static String TEXT_HTML = "text/html";
+
+    public final static MediaType TEXT_HTML_TYPE = new MediaType("text", "html");
+
+
+    public static MediaType valueOf(String type) {
+        return RuntimeDelegate.getInstance().createHeaderDelegate(MediaType.class).fromString(type);
+    }
+
+    private static TreeMap<String, String> createParametersMap(Map<String, String> initialValues) {
+        final TreeMap<String, String> map = new TreeMap<String, String>(new Comparator<String>() {
+
+            @Override
+            public int compare(String o1, String o2) {
+                return o1.compareToIgnoreCase(o2);
+            }
+        });
+        if (initialValues != null) {
+            for (Map.Entry<String, String> e : initialValues.entrySet()) {
+                map.put(e.getKey().toLowerCase(), e.getValue());
+            }
+        }
+        return map;
+    }
+
+
+    public MediaType(String type, String subtype, Map<String, String> parameters) {
+        this(type, subtype, null, createParametersMap(parameters));
+    }
+
+
+    public MediaType(String type, String subtype) {
+        this(type, subtype, null, null);
+    }
+
+
+    public MediaType(String type, String subtype, String charset) {
+        this(type, subtype, charset, null);
+    }
+
+
+    public MediaType() {
+        this(MEDIA_TYPE_WILDCARD, MEDIA_TYPE_WILDCARD, null, null);
+    }
+
+    private MediaType(String type, String subtype, String charset, Map<String, String> parameterMap) {
+
+        this.type = type == null ? MEDIA_TYPE_WILDCARD : type;
+        this.subtype = subtype == null ? MEDIA_TYPE_WILDCARD : subtype;
+
+        if (parameterMap == null) {
+            parameterMap = new TreeMap<String, String>(new Comparator<String>() {
+
+                @Override
+                public int compare(String o1, String o2) {
+                    return o1.compareToIgnoreCase(o2);
+                }
+            });
+        }
+
+        if (charset != null && !charset.isEmpty()) {
+            parameterMap.put(CHARSET_PARAMETER, charset);
+        }
+        this.parameters = Collections.unmodifiableMap(parameterMap);
+    }
+
+
+    public String getType() {
+        return this.type;
+    }
+
+
+    public boolean isWildcardType() {
+        return this.getType().equals(MEDIA_TYPE_WILDCARD);
+    }
+
+
+    public String getSubtype() {
+        return this.subtype;
+    }
+
+
+    public boolean isWildcardSubtype() {
+        return this.getSubtype().equals(MEDIA_TYPE_WILDCARD);
+    }
+
+
+    public Map<String, String> getParameters() {
+        return parameters;
+    }
+
+
+    public MediaType withCharset(String charset) {
+        return new MediaType(this.type, this.subtype, charset, createParametersMap(this.parameters));
+    }
+
+
+    public boolean isCompatible(MediaType other) {
+        return other != null && (type.equals(MEDIA_TYPE_WILDCARD) || other.type.equals(MEDIA_TYPE_WILDCARD) ||
+            (type.equalsIgnoreCase(other.type) && (subtype.equals(MEDIA_TYPE_WILDCARD) || other.subtype.equals(MEDIA_TYPE_WILDCARD))) ||
+            (type.equalsIgnoreCase(other.type) && this.subtype.equalsIgnoreCase(other.subtype)));
+    }
+
+
+    @SuppressWarnings("UnnecessaryJavaDocLink")
+    @Override
+    public boolean equals(Object obj) {
+        if (!(obj instanceof MediaType)) {
+            return false;
+        }
+
+        MediaType other = (MediaType) obj;
+        return (this.type.equalsIgnoreCase(other.type) && this.subtype.equalsIgnoreCase(other.subtype) && this.parameters.equals(other.parameters));
+    }
+
+
+    @SuppressWarnings("UnnecessaryJavaDocLink")
+    @Override
+    public int hashCode() {
+        return (this.type.toLowerCase() + this.subtype.toLowerCase()).hashCode() + this.parameters.hashCode();
+    }
+
+
+    @Override
+    public String toString() {
+        return RuntimeDelegate.getInstance().createHeaderDelegate(MediaType.class).toString(this);
+    }
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/MultivaluedHashMap.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/MultivaluedHashMap.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/MultivaluedHashMap.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/MultivaluedHashMap.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,69 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed 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.
+ * #L%
+ */
+
+package javax.ws.rs.core;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+public class MultivaluedHashMap<K, V> extends AbstractMultivaluedMap<K, V> implements Serializable {
+
+    private static final long serialVersionUID = -6052320403766368902L;
+
+
+    public MultivaluedHashMap() {
+        super(new HashMap<K, List<V>>());
+    }
+
+
+    public MultivaluedHashMap(int initialCapacity) {
+        super(new HashMap<K, List<V>>(initialCapacity));
+    }
+
+
+    public MultivaluedHashMap(int initialCapacity, float loadFactor) {
+        super(new HashMap<K, List<V>>(initialCapacity, loadFactor));
+    }
+
+
+    public MultivaluedHashMap(MultivaluedMap<? extends K, ? extends V> map) {
+        this();
+        putAll(map);
+    }
+
+
+    private <T extends K, U extends V> void putAll(MultivaluedMap<T, U> map) {
+        for (Entry<T, List<U>> e : map.entrySet()) {
+            store.put(e.getKey(), new ArrayList<V>(e.getValue()));
+        }
+    }
+
+
+    public MultivaluedHashMap(Map<? extends K, ? extends V> map) {
+        this();
+        for (Entry<? extends K, ? extends V> e : map.entrySet()) {
+            this.putSingle(e.getKey(), e.getValue());
+        }
+    }
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/MultivaluedMap.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/MultivaluedMap.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/MultivaluedMap.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/MultivaluedMap.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,50 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed 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.
+ * #L%
+ */
+
+package javax.ws.rs.core;
+
+import java.util.List;
+import java.util.Map;
+
+
+public interface MultivaluedMap<K, V> extends Map<K, List<V>> {
+
+
+    void putSingle(K key, V value);
+
+
+    void add(K key, V value);
+
+
+    V getFirst(K key);
+
+
+    void addAll(K key, V... newValues);
+
+
+    void addAll(K key, List<V> valueList);
+
+
+    void addFirst(K key, V value);
+
+
+    boolean equalsIgnoreValueOrder(MultivaluedMap<K, V> otherMap);
+
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/NewCookie.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/NewCookie.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/NewCookie.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/NewCookie.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,189 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed 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.
+ * #L%
+ */
+
+package javax.ws.rs.core;
+
+import javax.ws.rs.ext.RuntimeDelegate;
+import javax.ws.rs.ext.RuntimeDelegate.HeaderDelegate;
+import java.util.Date;
+
+
+public class NewCookie extends Cookie {
+
+
+    public static final int DEFAULT_MAX_AGE = -1;
+
+    private static final HeaderDelegate<NewCookie> delegate = RuntimeDelegate.getInstance().createHeaderDelegate(NewCookie.class);
+
+    private final String comment;
+    private final int maxAge;
+    private final Date expiry;
+    private final boolean secure;
+    private final boolean httpOnly;
+
+
+    public NewCookie(String name, String value) {
+        this(name, value, null, null, DEFAULT_VERSION, null, DEFAULT_MAX_AGE, null, false, false);
+    }
+
+
+    public NewCookie(String name, String value, String path, String domain, String comment, int maxAge, boolean secure) {
+        this(name, value, path, domain, DEFAULT_VERSION, comment, maxAge, null, secure, false);
+    }
+
+
+    public NewCookie(String name, String value, String path, String domain, String comment, int maxAge, boolean secure, boolean httpOnly) {
+        this(name, value, path, domain, DEFAULT_VERSION, comment, maxAge, null, secure, httpOnly);
+    }
+
+
+    public NewCookie(String name, String value, String path, String domain, int version, String comment, int maxAge, boolean secure) {
+        this(name, value, path, domain, version, comment, maxAge, null, secure, false);
+    }
+
+
+    public NewCookie(String name, String value, String path, String domain, int version, String comment, int maxAge, Date expiry, boolean secure, boolean httpOnly) {
+        super(name, value, path, domain, version);
+        this.comment = comment;
+        this.maxAge = maxAge;
+        this.expiry = expiry;
+        this.secure = secure;
+        this.httpOnly = httpOnly;
+    }
+
+
+    public NewCookie(Cookie cookie) {
+        this(cookie, null, DEFAULT_MAX_AGE, null, false, false);
+    }
+
+
+    public NewCookie(Cookie cookie, String comment, int maxAge, boolean secure) {
+        this(cookie, comment, maxAge, null, secure, false);
+    }
+
+
+    public NewCookie(Cookie cookie, String comment, int maxAge, Date expiry, boolean secure, boolean httpOnly) {
+        super(cookie == null ? null : cookie.getName(), cookie == null ? null : cookie.getValue(), cookie == null ? null : cookie.getPath(), cookie == null ? null : cookie.getDomain(), cookie == null ? Cookie.DEFAULT_VERSION : cookie.getVersion());
+        this.comment = comment;
+        this.maxAge = maxAge;
+        this.expiry = expiry;
+        this.secure = secure;
+        this.httpOnly = httpOnly;
+    }
+
+
+    public static NewCookie valueOf(String value) {
+        return delegate.fromString(value);
+    }
+
+
+    public String getComment() {
+        return comment;
+    }
+
+
+    public int getMaxAge() {
+        return maxAge;
+    }
+
+
+    public Date getExpiry() {
+        return expiry;
+    }
+
+
+    public boolean isSecure() {
+        return secure;
+    }
+
+
+    public boolean isHttpOnly() {
+        return httpOnly;
+    }
+
+
+    public Cookie toCookie() {
+        return new Cookie(this.getName(), this.getValue(), this.getPath(), this.getDomain(), this.getVersion());
+    }
+
+
+    @Override
+    public String toString() {
+        return delegate.toString(this);
+    }
+
+
+    @Override
+    public int hashCode() {
+        int hash = super.hashCode();
+        hash = 59 * hash + (this.comment != null ? this.comment.hashCode() : 0);
+        hash = 59 * hash + this.maxAge;
+        hash = 59 + hash + (this.expiry != null ? this.expiry.hashCode() : 0);
+        hash = 59 * hash + (this.secure ? 1 : 0);
+        hash = 59 * hash + (this.httpOnly ? 1 : 0);
+        return hash;
+    }
+
+
+    @SuppressWarnings({"StringEquality", "RedundantIfStatement"})
+    @Override
+    public boolean equals(Object obj) {
+        if (obj == null) {
+            return false;
+        }
+        if (getClass() != obj.getClass()) {
+            return false;
+        }
+        final NewCookie other = (NewCookie) obj;
+        if (this.getName() != other.getName() && (this.getName() == null || !this.getName().equals(other.getName()))) {
+            return false;
+        }
+        if (this.getValue() != other.getValue() && (this.getValue() == null || !this.getValue().equals(other.getValue()))) {
+            return false;
+        }
+        if (this.getVersion() != other.getVersion()) {
+            return false;
+        }
+        if (this.getPath() != other.getPath() && (this.getPath() == null || !this.getPath().equals(other.getPath()))) {
+            return false;
+        }
+        if (this.getDomain() != other.getDomain() && (this.getDomain() == null || !this.getDomain().equals(other.getDomain()))) {
+            return false;
+        }
+        if (this.comment != other.comment && (this.comment == null || !this.comment.equals(other.comment))) {
+            return false;
+        }
+        if (this.maxAge != other.maxAge) {
+            return false;
+        }
+
+        if (this.expiry != other.expiry && (this.expiry == null || !this.expiry.equals(other.expiry))) {
+            return false;
+        }
+
+        if (this.secure != other.secure) {
+            return false;
+        }
+        if (this.httpOnly != other.httpOnly) {
+            return false;
+        }
+        return true;
+    }
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/NoContentException.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/NoContentException.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/NoContentException.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/NoContentException.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,43 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed 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.
+ * #L%
+ */
+
+package javax.ws.rs.core;
+
+import java.io.IOException;
+
+
+public class NoContentException extends IOException {
+    private static final long serialVersionUID = -3082577759787473245L;
+
+
+    public NoContentException(String message) {
+        super(message);
+    }
+
+
+    public NoContentException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+
+    public NoContentException(Throwable cause) {
+        super(cause);
+    }
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/PathSegment.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/PathSegment.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/PathSegment.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/PathSegment.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,31 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed 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.
+ * #L%
+ */
+
+package javax.ws.rs.core;
+
+
+public interface PathSegment {
+
+
+    String getPath();
+
+
+    MultivaluedMap<String, String> getMatrixParameters();
+}

Added: geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/Request.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/Request.java?rev=1612628&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/Request.java (added)
+++ geronimo/specs/trunk/geronimo-jaxrs_2.0_spec/src/main/java/javax/ws/rs/core/Request.java Tue Jul 22 17:50:24 2014
@@ -0,0 +1,47 @@
+/*
+ * #%L
+ * Apache Geronimo JAX-RS Spec 2.0
+ * %%
+ * Copyright (C) 2003 - 2014 The Apache Software Foundation
+ * %%
+ * Licensed 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.
+ * #L%
+ */
+
+package javax.ws.rs.core;
+
+import javax.ws.rs.core.Response.ResponseBuilder;
+import java.util.Date;
+import java.util.List;
+
+
+public interface Request {
+
+
+    String getMethod();
+
+
+    Variant selectVariant(List<Variant> variants);
+
+
+    ResponseBuilder evaluatePreconditions(EntityTag eTag);
+
+
+    ResponseBuilder evaluatePreconditions(Date lastModified);
+
+
+    ResponseBuilder evaluatePreconditions(Date lastModified, EntityTag eTag);
+
+
+    ResponseBuilder evaluatePreconditions();
+}



Mime
View raw message