jetbrains.buildServer.web.util
Class ArtifactsWebUtil

java.lang.Object
  extended by jetbrains.buildServer.web.util.ArtifactsWebUtil

public class ArtifactsWebUtil
extends java.lang.Object

Contains the handy methods used to extract build and build type out of request path. Examples of paths supported:

 /download/[module]/[build id]:id/
 /download/[module]/[build id].tcbuildid/
 /download/[module]/.lastFinished/
 /download/[module]/[build number]/
 
To handle these requests the client needs to split the path on tokens (see preparePath(HttpServletRequest)), and look up the build type (lookupBuildConfiguration(String, SBuildServer)) and build (getBuild(String, SBuildType, HttpServletRequest, SBuildServer, RevisionRuleBuildFinders)) passing [module] and [revision] into them.

Author:
Maxim Podkolzine (maxim.podkolzine@jetbrains.com)

Constructor Summary
ArtifactsWebUtil()
           
 
Method Summary
static SBuild findScopeBuild(javax.servlet.http.HttpServletRequest request, SBuildServer server)
           
static SBuild getBuild(java.lang.String revision, SBuildType buildType, javax.servlet.http.HttpServletRequest request, SBuildServer server, RevisionRuleBuildFinders buildFinders)
           
static SBuildType lookupBuildConfiguration(java.lang.String module, SBuildServer server)
           
static java.lang.String preparePath(javax.servlet.http.HttpServletRequest request)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArtifactsWebUtil

public ArtifactsWebUtil()
Method Detail

lookupBuildConfiguration

@Nullable
public static SBuildType lookupBuildConfiguration(@NotNull
                                                           java.lang.String module,
                                                           @NotNull
                                                           SBuildServer server)

getBuild

@Nullable
public static SBuild getBuild(@NotNull
                                       java.lang.String revision,
                                       @NotNull
                                       SBuildType buildType,
                                       @NotNull
                                       javax.servlet.http.HttpServletRequest request,
                                       @NotNull
                                       SBuildServer server,
                                       @NotNull
                                       RevisionRuleBuildFinders buildFinders)

findScopeBuild

@Nullable
public static SBuild findScopeBuild(@NotNull
                                             javax.servlet.http.HttpServletRequest request,
                                             @NotNull
                                             SBuildServer server)

preparePath

@NotNull
public static java.lang.String preparePath(@NotNull
                                                   javax.servlet.http.HttpServletRequest request)