Class HistoryWidget<O extends ModelObject,​T>

  • Type Parameters:
    O - Owner of the widget.
    T - Type individual record.
    Direct Known Subclasses:

    public class HistoryWidget<O extends ModelObject,​T>
    extends Widget
    Displays the history of records (normally Runs) on the side panel.
    Kohsuke Kawaguchi
    • Constructor Detail

      • HistoryWidget

        public HistoryWidget​(O owner,
                             Iterable<T> baseList,
                             HistoryWidget.Adapter<? super T> adapter)
        owner - The parent model object that owns this widget.
    • Method Detail

      • getOwnerUrl

        protected String getOwnerUrl()
        getOwnerUrl in class Widget
        The URL of the owner of this widget relative to context path. Always ends with a trailing slash. Can be null for backward compatibility with widgets annotated with @Extension.
      • getDisplayName

        public String getDisplayName()
        Title of the widget.
      • getUrlName

        public String getUrlName()
        Description copied from class: Widget
        Gets the URL path name.

        For example, if this method returns "xyz", and if the parent object (that this widget is associated with) is bound to /foo/bar/zot, then this widget object will be exposed to /foo/bar/zot/widget/xyz.

        This method is useful when the widget needs to expose additional URLs, for example for serving AJAX requests.

        This method should return a string that's unique among other Widgets. The default implementation returns the unqualified class name.

        getUrlName in class Widget
      • getFirstTransientBuildKey

        public String getFirstTransientBuildKey()
      • updateFirstTransientBuildKey

        protected HistoryPageFilter updateFirstTransientBuildKey​(HistoryPageFilter historyPageFilter)
        Calculates the first transient build record. Everything ≥ this will be discarded when AJAX call is made.
        historyPageFilter - The history page filter containing the list of builds.
        The history page filter that was passed in.
      • isTrimmed

        public boolean isTrimmed()
      • setTrimmed

        public void setTrimmed​(boolean trimmed)
      • doAjax

        public void doAjax​(org.kohsuke.stapler.StaplerRequest req,
                           org.kohsuke.stapler.StaplerResponse rsp,
                           String n)
                    throws IOException,
        Handles AJAX requests from browsers to update build history.
        n - The build 'number' to fetch. This is string because various variants uses non-numbers as the build key.
      • getNextBuildNumberToFetch

        public String getNextBuildNumberToFetch()
      • setNextBuildNumberToFetch

        public void setNextBuildNumberToFetch​(String nextBuildNumberToFetch)