Class BuildLookupService


  • public class BuildLookupService
    extends java.lang.Object
    Author:
    Kir
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String LAST_FINISHED_FINDER
      Last finished build finder name
      static java.lang.String LAST_PINNED_FINDER
      Last pinned build finder name
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      SBuild findBuild​(java.lang.String buildTypeId, java.lang.String buildIdFilter, java.lang.String buildNumber, java.lang.String buildTag, java.lang.String buildBranch, javax.servlet.http.HttpServletRequest request)
      Finds build information for given set of web parameters.
      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
    • Field Detail

      • 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
    • 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
      • 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
      • findBuild

        @NotNull
        public SBuild findBuild​(@Nullable
                                java.lang.String buildTypeId,
                                @Nullable
                                java.lang.String buildIdFilter,
                                @Nullable
                                java.lang.String buildNumber,
                                @Nullable
                                java.lang.String buildTag,
                                @Nullable
                                java.lang.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