001// *************************************************************************************************************************** 002// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file * 003// * distributed with this work for additional information regarding copyright ownership. The ASF licenses this file * 004// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance * 005// * with the License. You may obtain a copy of the License at * 006// * * 007// * http://www.apache.org/licenses/LICENSE-2.0 * 008// * * 009// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an * 010// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * 011// * specific language governing permissions and limitations under the License. * 012// *************************************************************************************************************************** 013package org.apache.juneau.rest.annotation; 014 015import static java.lang.annotation.ElementType.*; 016import static java.lang.annotation.RetentionPolicy.*; 017 018import java.lang.annotation.*; 019 020/** 021 * Annotation that can be applied to a parameter of a {@link RestMethod @RestMethod} annotated method to identify it as the URL 022 * parameter remainder after a path pattern match. 023 * 024 * <h5 class='section'>Example:</h5> 025 * <p class='bcode'> 026 * <ja>@RestMethod</ja>(name=<jsf>GET</jsf>, path=<js>"/foo/*"</js>) 027 * <jk>public void</jk> doGet(RestRequest req, RestResponse res, <ja>@PathRemainder</ja> String remainder) { 028 * ... 029 * } 030 * </p> 031 * 032 * <p> 033 * This is functionally equivalent to the following code... 034 * <p class='bcode'> 035 * <ja>@RestMethod</ja>(name=<jsf>GET</jsf>, path=<js>"/foo/*"</js>) 036 * <jk>public void</jk> doGet(RestRequest req, RestResponse res) { 037 * String remainder = req.getPathRemainder(); 038 * ... 039 * } 040 * </p> 041 * 042 * <h5 class='section'>See Also:</h5> 043 * <ul> 044 * <li class='link'><a class="doclink" href="../../../../../overview-summary.html#juneau-rest-server.MethodParameters">Overview > juneau-rest-server > Method Parameters</a> 045 * </ul> 046 */ 047@Documented 048@Target(PARAMETER) 049@Retention(RUNTIME) 050@Inherited 051public @interface PathRemainder {}