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 * PathSegment.java
015 *
016 * Created on January 30, 2007, 4:35 PM
017 *
018 */
019
020 package javax.ws.rs.core;
021
022 /**
023 * Represents a URI path segment and any associated matrix parameters. When an
024 * instance of this type is injected with {@link javax.ws.rs.PathParam}, the
025 * value of the annotation identifies which path segment is selected and the
026 * presence of an {@link javax.ws.rs.Encoded} annotation will result in an
027 * instance that supplies the path and matrix parameter values in
028 * URI encoded form.
029 *
030 * @see UriInfo#getPathSegments
031 * @see javax.ws.rs.PathParam
032 */
033 public interface PathSegment {
034
035 /**
036 * Get the path segment.
037 * <p>
038 * @return the path segment
039 */
040 String getPath();
041
042 /**
043 * Get a map of the matrix parameters associated with the path segment.
044 * The map keys are the names of the matrix parameters with any
045 * percent-escaped octets decoded.
046 *
047 * @return the map of matrix parameters
048 * @see <a href="http://www.w3.org/DesignIssues/MatrixURIs.html">Matrix URIs</a>
049 */
050 MultivaluedMap<String, String> getMatrixParameters();
051
052 }