001 /*
002 * The contents of this file are subject to the terms
003 * of the Common Development and Distribution License
004 * (the "License"). You may not use this file except
005 * in compliance with the License.
006 *
007 * You can obtain a copy of the license at
008 * http://www.opensource.org/licenses/cddl1.php
009 * See the License for the specific language governing
010 * permissions and limitations under the License.
011 */
012
013 /*
014 * ApplicationPath.java
015 *
016 * Created on August 21, 2009
017 *
018 */
019
020 package javax.ws.rs;
021
022 import java.lang.annotation.ElementType;
023 import java.lang.annotation.Retention;
024 import java.lang.annotation.RetentionPolicy;
025 import java.lang.annotation.Target;
026
027 /**
028 * Identifies the application path that serves as the base URI
029 * for all resource URIs provided by {@link javax.ws.rs.Path}. May only be
030 * applied to a subclass of {@link javax.ws.rs.core.Application}.
031 *
032 * <p>When published in a Servlet container, the value of the application path
033 * may be overridden using a servlet-mapping element in the web.xml.</p>
034 *
035 * @see javax.ws.rs.core.Application
036 * @see Path
037 * @since 1.1
038 */
039 @Target({ElementType.TYPE})
040 @Retention(RetentionPolicy.RUNTIME)
041 public @interface ApplicationPath {
042 /**
043 * Defines the base URI for all resource URIs. A trailing '/' character will
044 * be automatically appended if one is not present.
045 *
046 * <p>The supplied value is automatically percent
047 * encoded to conform to the {@code path} production of
048 * {@link <a href="http://tools.ietf.org/html/rfc3986#section-3.3">RFC 3986 section 3.3</a>}.
049 * Note that percent encoded values are allowed in the value, an
050 * implementation will recognize such values and will not double
051 * encode the '%' character.</p>
052 */
053 String value();
054
055 }