public interface NavBuilder
Modifier and Type | Interface and Description |
---|---|
static interface |
NavBuilder.AddonMarketplace |
static interface |
NavBuilder.AddonRequests |
static interface |
NavBuilder.Addons |
static interface |
NavBuilder.Admin
The builder for /admin
|
static interface |
NavBuilder.BrowseRepoResource
The builder of urls of the form /projects/PROJ/repos/REPO/browse[/...]
|
static interface |
NavBuilder.Builder<B extends NavBuilder.Builder>
Base interface for all terminal builders (builders which can produce a url)
|
static interface |
NavBuilder.Commit
Builds URLs of the form /projects/PROJ/repos/REPO/commits/ID
|
static interface |
NavBuilder.CommitComment
Builds URLs of the form /projects/PROJ/repos/REPO/commits/ID/comment/ID
|
static interface |
NavBuilder.Compare
The builder of urls of the form /projects/PROJ/repos/REPO/compare
|
static interface |
NavBuilder.CompareBuilder<T extends NavBuilder.CompareBuilder> |
static interface |
NavBuilder.CreateProject
The builder of urls of the form /projects/PROJ?create
|
static interface |
NavBuilder.CreatePullRequest
The builder for urls of the form /projects/PROJ/repos/REPO/pull-requests?create...
|
static interface |
NavBuilder.CreateRepo
The builder of urls of the form /projects/PROJ/repos?create
|
static interface |
NavBuilder.Dashboard |
static interface |
NavBuilder.Database |
static interface |
NavBuilder.DeleteGroup |
static interface |
NavBuilder.DeleteUser
The builder for /users/delete
|
static interface |
NavBuilder.GettingStarted
Builds a URL to the GettingStarted page with an option of adding "next" as a query parameter with the current
request url or the passed in url
|
static interface |
NavBuilder.GitAdmin |
static interface |
NavBuilder.GlobalListRepos
The builder for /repos
|
static interface |
NavBuilder.Groups |
static interface |
NavBuilder.JiraCloudIntegration
The builder for the JSW Admin page.
|
static interface |
NavBuilder.Licensing |
static interface |
NavBuilder.ListBranches
The builder of urls of the form /projects/PROJ/repos/REPO/branches
|
static interface |
NavBuilder.ListCommits
The builder of urls of the form /projects/PROJ/repos/REPO/commits
|
static interface |
NavBuilder.ListForks
The builder of urls of the form /projects/PROJ/repos/REPO/forks
|
static interface |
NavBuilder.ListProjects
The builder for /projects
|
static interface |
NavBuilder.ListPullRequests |
static interface |
NavBuilder.ListRepos
The builder for /projects/PROJ/repos/REPO/browse - essentially the same as
NavBuilder.Project but with
support for start and limit params o control the repository list |
static interface |
NavBuilder.ListTags
The builder of urls of the form /projects/PROJ/repos/REPO/tags[/...]
|
static interface |
NavBuilder.Login
Builds a login URL for the with an option of adding "next" as a query parameter with the current request url
or the passed in url
|
static interface |
NavBuilder.Mesh
A builder for URLs at/under
/admin/git/mesh . |
static interface |
NavBuilder.NavigationStep<B extends NavBuilder.NavigationStep<B>>
Builds URL for the with an option of adding "next" as a query parameter with the current request url
or the passed in url
|
static interface |
NavBuilder.PagedBuilder<B extends NavBuilder.PagedBuilder>
A builder for urls that represent a collection of things, one page at a time.
|
static interface |
NavBuilder.PathBuilder<B extends NavBuilder.PathBuilder>
The builder of urls that have a path to a file resource
|
static interface |
NavBuilder.PluginServlets
The builder for the plugin servlets
|
static interface |
NavBuilder.Profile |
static interface |
NavBuilder.Project
The builder for urls hanging off /projects/PROJ.
|
static interface |
NavBuilder.ProjectAutoDeclineSettings
The builder of urls of the form /projects/PROJ/settings/auto-decline
|
static interface |
NavBuilder.ProjectDelete
The builder of urls of the form /projects/PROJ/delete
|
static interface |
NavBuilder.ProjectHooks
The builder of urls of the form /projects/PROJ/settings/hooks
|
static interface |
NavBuilder.ProjectJiraCommitCheckerSettings
Deprecated.
in 7.16 without replacement for removal in 8.0
|
static interface |
NavBuilder.ProjectMergeChecks
The builder of urls of the form /projects/PROJ/settings/merge-checks
|
static interface |
NavBuilder.ProjectMergeStrategySettings
The builder of urls of the form /projects/PROJ/settings/merge-strategies/<scmId>
|
static interface |
NavBuilder.ProjectPermissions
The builder of urls of the form /projects/PROJ/permissions
|
static interface |
NavBuilder.ProjectPullRequestTemplateSettings
The builder of urls of the form /projects/PROJ/settings/pull-request-templates
|
static interface |
NavBuilder.ProjectReviewerGroupSettings
The builder of urls of the form /projects/PROJ/settings/reviewer-groups
|
static interface |
NavBuilder.ProjectSettings
The builder of urls of the form /projects/PROJ/settings
|
static interface |
NavBuilder.PullRequest
The builder for urls of the form /projects/PROJ/repos/REPO/pull-requests/ID/...
|
static interface |
NavBuilder.PullRequestActivity
Builds URLs of the form /projects/PROJ/repos/REPO/pull-requests/ID/activities
|
static interface |
NavBuilder.PullRequestBuilds
Builds URLs of the form /projects/PROJ/repos/REPO/pull-requests/ID/builds
|
static interface |
NavBuilder.PullRequestComment
Builds URLs of the form /projects/PROJ/repos/REPO/pull-requests/ID/overview?commentId=ID
|
static interface |
NavBuilder.PullRequestCommit
Builds URLs of the form /projects/PROJ/repos/REPO/pull-requests/ID/commits/ID
|
static interface |
NavBuilder.PullRequestOverview
Builds URLs of the form /projects/PROJ/repos/REPO/pull-requests/ID/overview
|
static interface |
NavBuilder.PullRequestRepoSettings
The builder of urls of the form /projects/PROJ/repos/REPO/settings/pull-requests
|
static interface |
NavBuilder.Repo
The builder of urls hanging off /projects/PROJ/repos/REPO.
|
static interface |
NavBuilder.RepoArchive
Builds URLs of the form /rest/api/1.0/projects/PROJ/repos/REPO/archive
|
static interface |
NavBuilder.RepoAttachment
The builder for URLs of the form /projects/PROJ/repos/REPO/attachments
|
static interface |
NavBuilder.RepoAttachmentMetadata
The builder for the URLs of the form /projects/PROJ/repos/REPO/attachments/ID/metadata
|
static interface |
NavBuilder.RepoAttachments
Deprecated.
since 7.0 for removal in 8.0
|
static interface |
NavBuilder.RepoAutoDeclineSettings
The builder of urls of the form /projects/PROJ/repos/REPO/settings/auto-decline
|
static interface |
NavBuilder.RepoBuilds
The builder for urls of the form /projects/PROJ/repos/REPO/builds
|
static interface |
NavBuilder.RepoDelete
The builder of urls of the form /projects/PROJ/repos/REPO/delete
|
static interface |
NavBuilder.RepoFork
The builder for urls of the form /projects/PROJ/repos/REPO?fork
|
static interface |
NavBuilder.RepoHooks
The builder of urls of the form /projects/PROJ/repos/REPO/hooks
|
static interface |
NavBuilder.RepoJiraCommitCheckerSettings
Deprecated.
in 7.16 without replacement for removal in 8.0
|
static interface |
NavBuilder.RepoMergeChecks
The builder of urls of the form /projects/PROJ/repos/REPO/merge-checks
|
static interface |
NavBuilder.RepoMergeStrategySettings
The builder of urls of the form /projects/PROJ/repos/REPO/settings/merge-strategies
|
static interface |
NavBuilder.RepoPermissions |
static interface |
NavBuilder.RepoPullRequestTemplateSettings
The builder of urls of the form /projects/PROJ/repos/REPO/settings/pull-request-templates
|
static interface |
NavBuilder.RepoPushLog
The builder for urls of the form /projects/PROJ/repos/REPO/push-log
|
static interface |
NavBuilder.RepoRequiredBuildsSettings
The builder of urls of the form /projects/PROJ/repos/REPO/settings/required-builds
|
static interface |
NavBuilder.RepoReviewerGroupsSettings
The builder of urls of the form /projects/PROJ/repos/REPO/settings/reviewer-groups
|
static interface |
NavBuilder.RepoSettings
The builder of urls of the form /projects/PROJ/repos/REPO/settings
|
static interface |
NavBuilder.Rest
The builder for the REST API
|
static interface |
NavBuilder.RestAdmin
The builder for the REST admin API
|
static interface |
NavBuilder.RestHook
The builder of urls of the form /rest/hooks/KEY
|
static interface |
NavBuilder.RestHooks
The builder of urls of the form /rest/hooks
|
static interface |
NavBuilder.RestUser
The builder for /rest/users/slug
|
static interface |
NavBuilder.RestUsers
The builder for /rest/users
|
static interface |
NavBuilder.RevisionBrowse
The builder for urls of the form /projects/PROJ/repos/REPO/browse/...?at=REVISION
|
static interface |
NavBuilder.RevisionBuilds
The builder for urls of the form /projects/PROJ/repos/REPO/builds?at=REVISION
|
static interface |
NavBuilder.Tmp
Group builder for endpoints under /tmp, which are intended to provide access to temporary data stored by the
system to facilitate user actions.
|
static interface |
NavBuilder.UserAccount
The builder for /account
|
static interface |
NavBuilder.Users |
static interface |
NavBuilder.ViewGroup
The builder for /group/view
|
static interface |
NavBuilder.ViewUser
The builder for /users/view
|
Modifier and Type | Field and Description |
---|---|
static String |
BASE_URL_KEY
A key which is wrapped in
TOKEN_PREFIX and TOKEN_SUFFIX to produce a base URL token. |
static String |
BASE_URL_TOKEN
|
static String |
TOKEN_PREFIX
A prefix which is applied to the beginning of tokens which are emitted in built URLs.
|
static String |
TOKEN_SUFFIX
A suffix which is appended to the ending of tokens which are emitted in built URLs.
|
static String |
USE_BASE_URL_TOKEN
The query parameter on the request which indicates the base URL on emitted URLs should be replaced with
BASE_URL_TOKEN instead. |
static final String BASE_URL_KEY
TOKEN_PREFIX
and TOKEN_SUFFIX
to produce a base URL token.
The key used needs to contain (preferably end with) something which is escaped when URL-encoded. Doing so causes the end token to be different depending on whether the base URL has been encoded and allows callers to encode the value they replace it with. That, in turn, ensures the resulting full URL has correct encoding from beginning to end.
Over and above containing something which requires encoding, the value needs to encode reliably. That means if the token has been encoded 4 times, any caller performing the substitution should be able to detect that count, because they will need to encode the replacement value 4 times over as well.
The current choice is a single trailing %. On first encoding, this produces "%25"; second produces "%2525", third produces "%252525", etc. This allows for two use cases:
TOKEN_SUFFIX
TOKEN_PREFIX
+ this key to find the first
25, if any are present, and the location of the first TOKEN_SUFFIX
to find the end. Use the number
of 25s present to determine the depthstatic final String TOKEN_PREFIX
static final String TOKEN_SUFFIX
static final String BASE_URL_TOKEN
static final String USE_BASE_URL_TOKEN
BASE_URL_TOKEN
instead. Using this token allows callers to format in their own base URL for
producing links which are correct based on their context.
For example, to better explain the need for this, consider the following:
buildAbsolute()
uses the HTTP
request (which is the default behaviour), links are emitted pointing to http://stash.private.example.com.
From an end user's browser, however, such links will not workString buildAbsolute()
USE_BASE_URL_TOKEN
parameter if present on the context request. Use
buildBaseUrl()
if you with to avoid this behaviour. Note: if the USE_BASE_URL_TOKEN
is present
this method may return a String
that is not a syntactically valid URI. The base URL (the scheme, host,
port etc and webapp context) will be taken from the context HTTP request, if one is present, or otherwise fall
back to the configured base URL
for
the server.buildBaseUrl()
,
USE_BASE_URL_TOKEN
,
buildRelative()
String buildConfigured()
buildAbsolute()
, but ignores any context HTTP request and always uses the
server's configured base URL
for
generating the scheme, host, port etc and webapp context components of the URL.configured
for this serverString buildBaseUrl()
USE_BASE_URL_TOKEN
parameter. Unless you have a specific need to avoid
the token substitution behaviour for this particular URL, you should use buildAbsolute()
.buildAbsolute()
,
USE_BASE_URL_TOKEN
,
buildRelative()
String buildRelative()
buildAbsolute()
,
buildBaseUrl()
NavBuilder.Admin admin()
NavBuilder.Builder<?> about()
NavBuilder.PluginServlets pluginServlets()
NavBuilder.Rest rest()
NavBuilder.Tmp tmp()
Retrieve a builder for constructing URLs related to temporary data.
NavBuilder.Addons addons()
NavBuilder.Project project(@Nonnull String key)
key
- project keyNavBuilder.Project project(@Nonnull Project project)
project
- the projectNavBuilder.Repo repo(@Nonnull Repository repository)
repository
- the repositoryNavBuilder.Login login()
NavBuilder.Builder<?> logout()
NavBuilder.Builder<?> signup()
NavBuilder.Builder<?> captcha()
NavBuilder.Builder<?> retrievePassword()
NavBuilder.Builder<?> passwordReset()
NavBuilder.Profile profile()
NavBuilder.Profile user(ApplicationUser user)
user
- the userNavBuilder.Profile userBySlug(String userSlug, UserType type)
userSlug
- the user slugtype
- the user typeNavBuilder.Builder<?> securityCheck()
NavBuilder.Builder<?> xsrfNotification()
NavBuilder.Builder<?> setup()
NavBuilder.ListProjects allProjects()
NavBuilder.GlobalListRepos allRepos()
NavBuilder.CreateProject createProject()
NavBuilder.UserAccount account()
NavBuilder.GettingStarted gettingStarted()
NavBuilder.Dashboard dashboard()
Copyright © 2022 Atlassian. All rights reserved.