Class RequestPath
java.lang.Object
com.atlassian.bamboo.plugin.servlet.RequestPath
Represents the "path" portion of an HTTP request (as returned by
HttpServletRequest.getPathInfo()
). Includes utility methods
for breaking the path down into its "head" (first component) and "tail"
(remainder of the path without the head).-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetHead()
Returns the first component of the path.Returns the full path without any leading "/" character.getSegment
(int i) Returns the specified zero-based path segment, or an empty string if that segment doesn't exist.int
Returns the number of non-empty segments in the path.getTail()
Returns the remainder of the path after removing the first component.subPath
(int from) Returns the subpath starting at the specified segment (zero-based) and extending to the end of the path.
-
Constructor Details
-
RequestPath
-
-
Method Details
-
getRelativePath
Returns the full path without any leading "/" character. -
getHead
Returns the first component of the path. Does not include any leading or trailing "/" character. -
getTail
Returns the remainder of the path after removing the first component. Does not include a leading "/" character. Returns an empty string if the path contains only a single component. -
subPath
Returns the subpath starting at the specified segment (zero-based) and extending to the end of the path. -
getSegmentCount
public int getSegmentCount()Returns the number of non-empty segments in the path. -
getSegment
Returns the specified zero-based path segment, or an empty string if that segment doesn't exist.
-