public class TreeView extends View implements ViewGroup
The intention is to eventually merge this with the ListView
.
This class is here for experimentation.
Until this class is sufficiently stable, there's no need for l10n. TODO: use ViewGroupMixIn
Modifier and Type | Class and Description |
---|---|
static class |
TreeView.DescriptorImpl |
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
Modifier and Type | Method and Description |
---|---|
boolean |
canDelete(View view)
Determine whether a view may be deleted.
|
boolean |
contains(TopLevelItem item)
Checks if the job is in this collection.
|
Indenter |
createFixedIndenter(String d)
Returns
Indenter that has the fixed indentation width. |
void |
deleteView(View view)
Deletes a view in this group.
|
TopLevelItem |
doCreateItem(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
Creates a new
Item in this collection. |
void |
doCreateView(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp) |
ItemGroup<? extends TopLevelItem> |
getItemGroup()
Returns the
ItemGroup from which the views in this group should render items. |
List<TopLevelItem> |
getItems()
Returns a read-only view of all
Job s in this view. |
View |
getPrimaryView()
If the view group renders one view in its own URL (like Jenkins top page does),
then that view is called the primary view.
|
View |
getView(String name)
Gets a view of the given name.
|
List<Action> |
getViewActions()
Returns actions that should be displayed in views.
|
Collection<View> |
getViews()
Gets all the views in this group.
|
ViewsTabBar |
getViewsTabBar()
Gets the TabBar for the views.
|
void |
onViewRenamed(View view,
String oldName,
String newName)
View calls this method when it's renamed. |
static ViewDescriptor |
register() |
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, getColumns, 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getDisplayName
checkPermission, getACL, hasPermission
@DataBoundConstructor public TreeView(String name)
public Indenter createFixedIndenter(String d)
Indenter
that has the fixed indentation width.
Used for assisting view rendering.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 TopLevelItem 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
protected void submit(org.kohsuke.stapler.StaplerRequest req) throws IOException, javax.servlet.ServletException, Descriptor.FormException
View
submit
in class View
IOException
javax.servlet.ServletException
Descriptor.FormException
public boolean canDelete(View view)
ViewGroup
public void deleteView(View view) throws IOException
ViewGroup
deleteView
in interface ViewGroup
IOException
public Collection<View> getViews()
ViewGroup
public View getView(String name)
ViewGroup
public View getPrimaryView()
ViewGroup
If the view group doesn't do such rendering, this method can always return null.
This method was added later to ViewGroup
, so old plugins might not be implementing this.
To work around this, View
s can use View.getOwnerPrimaryView()
.
getPrimaryView
in interface ViewGroup
public void onViewRenamed(View view, String oldName, String newName)
ViewGroup
View
calls this method when it's renamed.
This method is intended to work as a notification to the ViewGroup
(so that it can adjust its internal data structure, for example.)
It is the caller's responsibility to ensure that the new name is a legal view name.
onViewRenamed
in interface ViewGroup
public void doCreateView(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException, Descriptor.FormException
IOException
javax.servlet.ServletException
Descriptor.FormException
@Extension public static ViewDescriptor register()
public ViewsTabBar getViewsTabBar()
ViewGroup
getViewsTabBar
in interface ViewGroup
public ItemGroup<? extends TopLevelItem> getItemGroup()
ViewGroup
ItemGroup
from which the views in this group should render items.
Generally speaking, Views render a subset of TopLevelItem
s that belong to this item group.
This method was added later to ViewGroup
, so old plugins might not be implementing this.
To work around this, View
s can use View.getOwnerItemGroup()
.
getItemGroup
in interface ViewGroup
ModifiableItemGroup
(if the container allows arbitrary addition)public List<Action> getViewActions()
ViewGroup
In this interface, the return value is used read-only. This doesn't prevent subtypes from returning modifiable actions, however.
This method was added later to ViewGroup
, so old plugins might not be implementing this.
To work around this, View
s can use View.getOwnerViewActions()
.
getViewActions
in interface ViewGroup
Actionable.getActions()
Copyright © 2014. All rights reserved.