Class BambooUrl

java.lang.Object
com.atlassian.bamboo.utils.BambooUrl

public class BambooUrl extends Object
Encapsulates creation of redirect URLs.
  • Constructor Details

  • Method Details

    • withBaseUrlFromConfiguration

      public String 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

      @NotNull public @NotNull String withBaseUrlFromConfiguration(@NotNull @NotNull String path)
      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

      @NotNull public @NotNull String withRelativeUrl()
      This URL should be used when redirecting internally within Bamboo instance
      Returns:
      path and query from the current Request
    • withBaseUrlFromRequest

      @NotNull public @NotNull String 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

      @NotNull public @NotNull String withBaseUrlFromRequest(@NotNull @NotNull String path)
      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

      @NotNull public static @NotNull String getCurrentPathAndQuery()
      Returns:
      the current path and query from request
      Throws:
      IllegalStateException - if HttpServletRequest is not present
    • rootContext

      public String rootContext()
    • getBaseUrl

      public String getBaseUrl(com.atlassian.sal.api.UrlMode urlMode)