/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* See LICENSE.txt included in this distribution for the specific
* language governing permissions and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at LICENSE.txt.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright (c) 2011 Jens Elkner.
*/
/**
* URL Prefixes usually tied to a certain servlet.
*
* @author Jens Elkner
* @version $Revision$
*/
public enum Prefix {
/** unknown prefix */
/** a cross reference */
/** show more lines. If a search result set for a file matches more lines
* than a given limit (default: 10), only the first <i>limit</i> lines gets
* shown as well as an "[all ...]" link, which can be used to show all
* matching lines. The servlet path of this link starts with this prefix. */
/** diff to previous version (link prefix) */
/** show the history for a file (link prefix) */
/** RSS XML Feed of latest changes (link prefix) */
/** Download file (link prefix) */
/** full blown search from main page or top bar (link prefix) */
/** search from cross reference, can lead to direct match (which opens
* directly) or to a matches Summary page */
/** opensearch description page */
/** related source file or directory not found/unavailable/ignored */
/** misc error occurred */
/** fetch annotations for the request path */
;
}
/**
* Get the string used as prefix.
* @return the prefix
*/
return prefix;
}
// should be sufficient for now
static {
}
}
/**
* Get the prefix of the given path.
* @param servletPath path to check
* @return {@link Prefix#UNKNOWN} if <var>path</var> is {@code null} or has
* no or unknown prefix, the corresponding prefix otherwise.
* @see #toString()
*/
{
return UNKNOWN;
}
}
}