Package com.atlassian.bamboo.utils
Class BambooUrl
java.lang.Object
com.atlassian.bamboo.utils.BambooUrl
Encapsulates creation of redirect URLs.
-
Constructor Summary
ConstructorDescriptionBambooUrl
(AdministrationConfigurationAccessor administrationConfigurationAccessor) -
Method Summary
Modifier and TypeMethodDescriptiongetBaseUrl
(com.atlassian.sal.api.UrlMode urlMode) static @NotNull String
This URL should be used for storage or when a user other than the current one will use it.@NotNull String
withBaseUrlFromConfiguration
(@NotNull String path) This URL should be used for storage or when a user other than the current one will use it.@NotNull String
This URL should be used when redirecting to Bamboo instance from external applications within the same user session.@NotNull String
withBaseUrlFromRequest
(@NotNull String path) This URL should be used when redirecting to Bamboo instance from external applications within the same user session.@NotNull String
This URL should be used when redirecting internally within Bamboo instance
-
Constructor Details
-
BambooUrl
-
-
Method Details
-
withBaseUrlFromConfiguration
This URL should be used for storage or when a user other than the current one will use it.- Returns:
- current absolute URL with base taken from configuration with the current path and query appended to it.
-
withBaseUrlFromConfiguration
This URL should be used for storage or when a user other than the current one will use it.- Returns:
- current absolute URL with base taken from configuration with the provided path appended to it.
-
withRelativeUrl
This URL should be used when redirecting internally within Bamboo instance- Returns:
- path and query from the current Request
-
withBaseUrlFromRequest
This URL should be used when redirecting to Bamboo instance from external applications within the same user session. Example: login dance.- Returns:
- base url, path and query from the current Request
-
withBaseUrlFromRequest
This URL should be used when redirecting to Bamboo instance from external applications within the same user session. Example: login dance.- Returns:
- base urlfrom the current Request with supplied path appended to it
-
getCurrentPathAndQuery
- Returns:
- the current path and query from request
- Throws:
IllegalStateException
- if HttpServletRequest is not present
-
rootContext
-
getBaseUrl
-