public class ListView extends View implements DirectlyModifiableView
Job
s in a flat list view.Modifier and Type | Class and Description |
---|---|
static class |
ListView.DescriptorImpl |
static class |
ListView.Listener |
View.AsynchPeople, View.People, View.PropertyList, View.UserInfo
ExtensionPoint.LegacyInstancesAreScopedToHudson
CONFIGURE, CREATE, DELETE, description, filterExecutors, filterQueue, LIST, name, NEW_PRONOUN, owner, PERMISSIONS, READ, SORTER, transientActions
Constructor and Description |
---|
ListView(String name) |
ListView(String name,
ViewGroup owner) |
Modifier and Type | Method and Description |
---|---|
void |
add(TopLevelItem item)
Adds the given item to this view.
|
boolean |
contains(TopLevelItem item)
Checks if the job is in this collection.
|
org.kohsuke.stapler.HttpResponse |
doAddJobToView(String name)
Handle addJobToView web method.
|
Item |
doCreateItem(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Creates a new
Item in this collection. |
org.kohsuke.stapler.HttpResponse |
doRemoveJobFromView(String name)
Handle removeJobFromView web method.
|
DescribableList<ListViewColumn,Descriptor<ListViewColumn>> |
getColumns()
If this view uses <t:projectView> for rendering, this method returns columns to be displayed.
|
static List<ListViewColumn> |
getDefaultColumns()
Deprecated.
as of 1.391
Use
ListViewColumn.createDefaultInitialColumnList() |
String |
getIncludeRegex() |
List<TopLevelItem> |
getItems()
Returns a read-only view of all
Job s in this view. |
DescribableList<ViewJobFilter,Descriptor<ViewJobFilter>> |
getJobFilters() |
Boolean |
getStatusFilter()
Filter by enabled/disabled status of jobs.
|
boolean |
hasJobFilterExtensions()
Used to determine if we want to display the Add button.
|
protected void |
initColumns() |
protected void |
initJobFilters() |
boolean |
isRecurse() |
boolean |
jobNamesContains(TopLevelItem item) |
boolean |
remove(TopLevelItem item)
Removes given item from this view.
|
void |
setIncludeRegex(String includeRegex) |
void |
setRecurse(boolean recurse) |
protected void |
submit(org.kohsuke.stapler.StaplerRequest req)
Handles the configuration submission.
|
all, allInstantiable, checkPermission, create, createViewFromXML, doChildrenContextMenu, doConfigDotXml, doConfigSubmit, doDoDelete, doRssAll, doRssFailed, doRssLatest, doSubmitDescription, getAbsoluteUrl, getACL, getActions, getAllItems, getAllProperties, getApi, getApplicablePropertyDescriptors, getApproximateQueueItemsQuickly, getAsynchPeople, getBuilds, getComputers, getDescription, getDescriptor, getDisplayName, getDynamic, getIndenter, getItem, getItemCreatePermission, getJob, getNewPronoun, getOwner, getOwnerItemGroup, getOwnerPrimaryView, getOwnerViewActions, getPeople, getPostConstructLandingPage, getProperties, getQueueItems, getSearchUrl, getTimeline, getUrl, getViewName, getViewUrl, getWidgets, hasPeople, hasPermission, isAutomaticRefreshEnabled, isDefault, isEditable, isFilterExecutors, isFilterQueue, makeSearchIndex, onJobRenamed, rename, save, toString, updateByXml, updateTransientActions, writeXml
getSearch, getSearchIndex, getSearchName, requirePOST, sendError, sendError, sendError, sendError, sendError
@DataBoundConstructor public ListView(String name)
protected void initColumns()
protected void initJobFilters()
public boolean hasJobFilterExtensions()
public DescribableList<ViewJobFilter,Descriptor<ViewJobFilter>> getJobFilters()
public DescribableList<ListViewColumn,Descriptor<ListViewColumn>> getColumns()
View
getColumns
in class View
public List<TopLevelItem> getItems()
Job
s in this view.
This method returns a separate copy each time to avoid concurrent modification issue.
public boolean contains(TopLevelItem item)
View
public boolean jobNamesContains(TopLevelItem item)
public void add(TopLevelItem item) throws IOException
add
in interface DirectlyModifiableView
IOException
- Adding failed.public boolean remove(TopLevelItem item) throws IOException
remove
in interface DirectlyModifiableView
IOException
- Removal failed.public String getIncludeRegex()
public boolean isRecurse()
public void setRecurse(boolean recurse)
public Boolean getStatusFilter()
public Item doCreateItem(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException
View
Item
in this collection.
This method should call ModifiableItemGroup.doCreateItem(StaplerRequest, StaplerResponse)
and then add the newly created item to this view.
doCreateItem
in class View
IOException
javax.servlet.ServletException
public org.kohsuke.stapler.HttpResponse doAddJobToView(@QueryParameter String name) throws IOException, javax.servlet.ServletException
DirectlyModifiableView
RequirePOST
.doAddJobToView
in interface DirectlyModifiableView
name
- Item name. This can be either full name relative to owner item group or full item name prefixed with '/'.IOException
javax.servlet.ServletException
public org.kohsuke.stapler.HttpResponse doRemoveJobFromView(@QueryParameter String name) throws IOException, javax.servlet.ServletException
DirectlyModifiableView
RequirePOST
.doRemoveJobFromView
in interface DirectlyModifiableView
name
- Item name. This can be either full name relative to owner item group or full item name prefixed with '/'.IOException
javax.servlet.ServletException
protected void submit(org.kohsuke.stapler.StaplerRequest req) throws javax.servlet.ServletException, Descriptor.FormException, IOException
submit
in class View
javax.servlet.ServletException
Descriptor.FormException
IOException
public void setIncludeRegex(String includeRegex)
@Deprecated public static List<ListViewColumn> getDefaultColumns()
ListViewColumn.createDefaultInitialColumnList()
Copyright © 2017. All rights reserved.