diff options
author | Jon Bratseth <bratseth@yahoo-inc.com> | 2016-06-15 23:09:44 +0200 |
---|---|---|
committer | Jon Bratseth <bratseth@yahoo-inc.com> | 2016-06-15 23:09:44 +0200 |
commit | 72231250ed81e10d66bfe70701e64fa5fe50f712 (patch) | |
tree | 2728bba1131a6f6e5bdf95afec7d7ff9358dac50 /jaxrs_utils |
Publish
Diffstat (limited to 'jaxrs_utils')
-rw-r--r-- | jaxrs_utils/OWNERS | 2 | ||||
-rw-r--r-- | jaxrs_utils/README | 2 | ||||
-rw-r--r-- | jaxrs_utils/pom.xml | 35 | ||||
-rw-r--r-- | jaxrs_utils/src/main/java/com/yahoo/vespa/jaxrs/annotation/PATCH.java | 20 |
4 files changed, 59 insertions, 0 deletions
diff --git a/jaxrs_utils/OWNERS b/jaxrs_utils/OWNERS new file mode 100644 index 00000000000..9ecc8472a21 --- /dev/null +++ b/jaxrs_utils/OWNERS @@ -0,0 +1,2 @@ +bakksjo +hakon diff --git a/jaxrs_utils/README b/jaxrs_utils/README new file mode 100644 index 00000000000..82baf8429f5 --- /dev/null +++ b/jaxrs_utils/README @@ -0,0 +1,2 @@ +Utilities for JAX-RS. + diff --git a/jaxrs_utils/pom.xml b/jaxrs_utils/pom.xml new file mode 100644 index 00000000000..3f23c142e62 --- /dev/null +++ b/jaxrs_utils/pom.xml @@ -0,0 +1,35 @@ +<?xml version="1.0"?> +<!-- Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 + http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>com.yahoo.vespa</groupId> + <artifactId>parent</artifactId> + <version>6-SNAPSHOT</version> + <relativePath>../parent/pom.xml</relativePath> + </parent> + <artifactId>jaxrs_utils</artifactId> + <version>6-SNAPSHOT</version> + <packaging>container-plugin</packaging> + <name>${project.artifactId}</name> + <dependencies> + <dependency> + <groupId>javax.ws.rs</groupId> + <artifactId>javax.ws.rs-api</artifactId> + <version>2.0</version> + <scope>provided</scope> + </dependency> + </dependencies> + <build> + <plugins> + <plugin> + <groupId>com.yahoo.vespa</groupId> + <artifactId>bundle-plugin</artifactId> + <extensions>true</extensions> + </plugin> + </plugins> + </build> +</project> diff --git a/jaxrs_utils/src/main/java/com/yahoo/vespa/jaxrs/annotation/PATCH.java b/jaxrs_utils/src/main/java/com/yahoo/vespa/jaxrs/annotation/PATCH.java new file mode 100644 index 00000000000..0a0d8472731 --- /dev/null +++ b/jaxrs_utils/src/main/java/com/yahoo/vespa/jaxrs/annotation/PATCH.java @@ -0,0 +1,20 @@ +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.vespa.jaxrs.annotation; + +import javax.ws.rs.HttpMethod; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Workaround for missing HTTP PATCH request support in JAX-RS 2. + * See http://brianoneill.blogspot.in/2011/11/patch-methods-on-jax-rs.html + * + * @author bakksjo + */ +@Target({ElementType.METHOD}) +@Retention(RetentionPolicy.RUNTIME) +@HttpMethod("PATCH") +public @interface PATCH { +} |