jetbrains.buildServer.web.util
Class BuildLookupService
java.lang.Object
jetbrains.buildServer.web.util.BuildLookupService
public class BuildLookupService
- extends java.lang.Object
- Author:
- Kir
|
Method Summary |
SBuild |
findBuild(javax.servlet.http.HttpServletRequest request)
Finds build information for given request, using parameters buildTypeId, buildId, buildNumber. |
SBuild |
getBuild(SBuildType buildType,
RevisionRule rule,
javax.servlet.http.HttpServletRequest request)
Get a build from given RevisionRule |
BuildFinder |
getFinder(java.lang.String name)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LAST_FINISHED_FINDER
@NonNls
public static final java.lang.String LAST_FINISHED_FINDER
- Last finished build finder name
- See Also:
- Constant Field Values
LAST_PINNED_FINDER
@NonNls
public static final java.lang.String LAST_PINNED_FINDER
- Last pinned build finder name
- See Also:
- Constant Field Values
BuildLookupService
public BuildLookupService(@NotNull
SBuildServer server,
@NotNull
RevisionRuleBuildFinders buildFinders)
getBuild
@Nullable
public SBuild getBuild(@NotNull
SBuildType buildType,
RevisionRule rule,
javax.servlet.http.HttpServletRequest request)
- Get a build from given RevisionRule
- Parameters:
buildType - build configuration to find build inrule - corresponding revision rulerequest -
- Returns:
- found build according to the revision rule
getFinder
public BuildFinder getFinder(java.lang.String name)
findBuild
@NotNull
public SBuild findBuild(javax.servlet.http.HttpServletRequest request)
throws BuildNotFoundException,
BuildTypeNotFoundException
- Finds build information for given request, using parameters buildTypeId, buildId, buildNumber.
Supported URL formats allow to specify parameters via PATH_INFO and as simple GET parameters.
buildId or buildNumber are required fields.
Supports:
page.html/buildTypeId/bt453/buildId/(lastFinished|lastSuccessful|lastPinned)
page.html/buildTypeId/bt453/buildNumber/345.32
page.html/buildId/345
page.html?buildTypeId=bt453&buildId=(lastFinished|lastSuccessful|lastPinned)
page.html?buildId=345
- Parameters:
request - http request
- Returns:
- found build according to incoming parameters
- Throws:
BuildNotFoundException - Was able to find build type, but cannot find corresponding build
BuildTypeNotFoundException - Unable to find neither build nor build type- See Also:
#findBuild(String, String, String,javax.servlet.http.HttpServletRequest)