public class

MockBaseUrl

extends Object
implements BaseUrl
java.lang.Object
   ↳ com.atlassian.jira.util.MockBaseUrl

Summary

Public Constructors
MockBaseUrl(String baseUrl, String staticBaseUrl)
Public Methods
URI getBaseUri()
@Nonnull String getBaseUrl()
@Nonnull String getCanonicalBaseUrl()
@Nullable <I, O> O runWithStaticBaseUrl(I input, Function<I, O> runnable)
Run the passed function in an environment where JIRA's configured baseURL is always used.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.util.BaseUrl

Public Constructors

public MockBaseUrl (String baseUrl, String staticBaseUrl)

Public Methods

public URI getBaseUri ()

@Nonnull public String getBaseUrl ()

@Nonnull public String getCanonicalBaseUrl ()

@Nullable public O runWithStaticBaseUrl (I input, Function<I, O> runnable)

Run the passed function in an environment where JIRA's configured baseURL is always used. This basically makes the passed function ignore any smart baseURL that can be generated from the request associated with the calling thread.

Parameters
input input to pass to the function.
runnable the function to execute.
Returns
  • the result of the function.