public class ReportTabUtil extends java.lang.Object
|Constructor and Description|
|Modifier and Type||Method and Description|
Returns the build artifact corresponding to a
Returns whether the report page is available for a build (can be found in its artifacts).
Prepares the start page path for using in jsp (as iframe path).
@Contract(value="null, _ -> false") public static boolean isAvailable(@Nullable SBuild build, @NotNull java.lang.String startPage)
Returns whether the report page is available for a build (can be found
in its artifacts). For composite builds, always returns
build- the build to search in
startPage- the path to the start page
trueif the report page is available for a build
@Nullable public static BuildArtifact getArtifact(@NotNull SBuild build, @NotNull java.lang.String basePath)
build. A shortcut method.
build- the build
basePath- base path
@NotNull public static java.lang.String prepareStartPageForWeb(@NotNull java.lang.String path)
The problem especially arises when the report is packed into an archive: in order to be displayed correctly, an iframe path should mock the path of the files inside the artifact.
For example, typical javadoc report starts with an "index.html", which refers to "overview-frame.html",
"overview-summary.html", etc. The browser will render these resources as follows: it will find the last slash
/") in an iframe path, and append the name of a resource ("overview-frame.html", ...).
This means that the path must end with "/index.html", having last slash unescaped, or internal resources
won't be found.
Effectively this means that all slash symbols must be unescaped, and if the path is referring to a file inside an archive,
it should be formed as
path- the path to process
@NotNull public static java.lang.String getResolvedPath(@NotNull java.lang.String path, @Nullable SBuild build)