Class BuildLookupService


  • public class BuildLookupService
    extends Object
    Author:
    Kir
    • Field Detail

      • LAST_FINISHED_FINDER

        @NonNls
        public static final String LAST_FINISHED_FINDER
        Last finished build finder name
        See Also:
        Constant Field Values
      • LAST_PINNED_FINDER

        @NonNls
        public static final String LAST_PINNED_FINDER
        Last pinned build finder name
        See Also:
        Constant Field Values
    • Method Detail

      • 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 in
        rule - corresponding revision rule
        request - http servlet request
        Returns:
        found build according to the revision rule
      • 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
      • findBuild

        @NotNull
        public SBuild findBuild​(@Nullable
                                String buildTypeId,
                                @Nullable
                                String buildIdFilter,
                                @Nullable
                                String buildNumber,
                                @Nullable
                                String buildTag,
                                @Nullable
                                String buildBranch,
                                javax.servlet.http.HttpServletRequest request)
                         throws BuildNotFoundException,
                                BuildTypeNotFoundException
        Finds build information for given set of web parameters.
        Parameters:
        buildTypeId - build configuration identifier
        buildIdFilter - build filter (may be null, but in this case buildNumber or buildTag should not be null). Supported filters are: lastFinished, lastSuccessful, lastPinned or build id (number)
        buildNumber - build number string (may be null, but in this case buildIdFilter or buildTag should not be null)
        buildTag - build tag string (may be null, but in this case buildIdFilter or buildNumber should not be null)
        request - http servlet 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