O
- Owner of the widget.T
- Type individual record.public class HistoryWidget<O extends ModelObject,T> extends Widget
Run
s) on the side panel.Modifier and Type | Class and Description |
---|---|
static interface |
HistoryWidget.Adapter<T> |
ExtensionPoint.LegacyInstancesAreScopedToHudson
Modifier and Type | Field and Description |
---|---|
HistoryWidget.Adapter<? super T> |
adapter |
Iterable<T> |
baseList
The given data model of records.
|
String |
baseUrl
URL of the
owner . |
O |
owner |
Constructor and Description |
---|
HistoryWidget(O owner,
Iterable<T> baseList,
HistoryWidget.Adapter<? super T> adapter) |
Modifier and Type | Method and Description |
---|---|
void |
doAjax(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp,
String n)
Handles AJAX requests from browsers to update build history.
|
String |
getDisplayName()
Title of the widget.
|
String |
getFirstTransientBuildKey() |
HistoryPageFilter |
getHistoryPageFilter()
Get a
HistoryPageFilter for rendering a page of queue items. |
String |
getNextBuildNumberToFetch() |
Iterable<HistoryPageEntry<T>> |
getRenderList()
The records to be rendered this time.
|
String |
getUrlName()
Gets the URL path name.
|
boolean |
isTrimmed() |
protected HistoryPageFilter<T> |
newPageFilter() |
void |
setNextBuildNumberToFetch(String nextBuildNumberToFetch) |
void |
setTrimmed(boolean trimmed) |
protected HistoryPageFilter |
updateFirstTransientBuildKey(HistoryPageFilter historyPageFilter)
Calculates the first transient build record.
|
public final O extends ModelObject owner
public final HistoryWidget.Adapter<? super T> adapter
public HistoryWidget(O owner, Iterable<T> baseList, HistoryWidget.Adapter<? super T> adapter)
owner
- The parent model object that owns this widget.public String getDisplayName()
public String getUrlName()
Widget
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/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 Widget
s.
The default implementation returns the unqualified class name.
getUrlName
in class Widget
public String getFirstTransientBuildKey()
protected HistoryPageFilter updateFirstTransientBuildKey(HistoryPageFilter historyPageFilter)
historyPageFilter
- The history page filter containing the list of builds.public Iterable<HistoryPageEntry<T>> getRenderList()
public HistoryPageFilter getHistoryPageFilter()
HistoryPageFilter
for rendering a page of queue items.protected HistoryPageFilter<T> newPageFilter()
public boolean isTrimmed()
public void setTrimmed(boolean trimmed)
public void doAjax(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp, @Header(value="n") String n) throws IOException, javax.servlet.ServletException
n
- The build 'number' to fetch. This is string because various variants
uses non-numbers as the build key.IOException
javax.servlet.ServletException
public String getNextBuildNumberToFetch()
public void setNextBuildNumberToFetch(String nextBuildNumberToFetch)
Copyright © 2004–2021. All rights reserved.