java.lang.Object | |
↳ | com.atlassian.bitbucket.scm.http.RepositoryUrlFragment |
Utility class for parsing project namespaces, project keys and repository slugs from scm urls - HTTP and SSH.
This class only works with paths that begin with:
path suffix
that did not describe the repository but still may be
useful to identify.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Extracts the namespaced repository URL fragment from the given path info.
| |||||||||||
Extracts the repository URL fragment from the given path info.
| |||||||||||
Formats this fragment as a path suitable for use with a
URI , such as with URI.resolve(String) ,
optionally pre-pending a provided base path. | |||||||||||
Formats this fragment as a path suitable for use with a
URI , such as with URI.resolve(String) ,
optionally pre-pending a provided base path. | |||||||||||
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Extracts the namespaced repository URL fragment from the given path info.
pathInfo | the path info as provided by the getPathInfo() method. |
---|
NullPointerException | if the path info is null |
---|
Extracts the repository URL fragment from the given path info.
pathInfo | the path info as provided by the getPathInfo() method. |
---|
NullPointerException | if the path info is null |
---|
repository | the repository to create a fragment for |
---|
Formats this fragment as a path suitable for use with a URI
, such as with URI.resolve(String)
,
optionally pre-pending a provided base path. The path suffix
nor the .git
extension if present in the original path are output here.
basePath | the base path to prepend, or null |
---|---|
includeNamespace | whether to include the namespace |
includeSuffix | whether to include the suffix |
Formats this fragment as a path suitable for use with a URI
, such as with URI.resolve(String)
,
optionally pre-pending a provided base path. The path suffix
nor the .git
extension if present in the original path are output here.
basePath | the base path to prepend, or null |
---|
KEY
/slug
for URLs on primary instances,
getProjectNamespace()
() NAMESPACE}/KEY
/slug
on mirrors