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.UserInfoExtensionPoint.LegacyInstancesAreScopedToHudsonCONFIGURE, 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
Jobs 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, writeXmlgetSearch, getSearchIndex, getSearchName, requirePOST, sendError, sendError, sendError, sendError, sendErrorclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetDisplayNamecheckPermission, 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()
Jobs in this view.
This method returns a separate copy each time to avoid concurrent modification issue.
public boolean contains(TopLevelItem item)
Viewpublic TopLevelItem doCreateItem(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException
ViewItem in this collection.
This method should call ModifiableItemGroup.doCreateItem(StaplerRequest, StaplerResponse)
and then add the newly created item to this view.
doCreateItem in class ViewIOExceptionjavax.servlet.ServletExceptionprotected void submit(org.kohsuke.stapler.StaplerRequest req)
throws IOException,
javax.servlet.ServletException,
Descriptor.FormException
Viewsubmit in class ViewIOExceptionjavax.servlet.ServletExceptionDescriptor.FormExceptionpublic boolean canDelete(View view)
ViewGrouppublic void deleteView(View view) throws IOException
ViewGroupdeleteView in interface ViewGroupIOExceptionpublic Collection<View> getViews()
ViewGrouppublic View getView(String name)
ViewGrouppublic View getPrimaryView()
ViewGroupIf 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, Views can use View.getOwnerPrimaryView().
getPrimaryView in interface ViewGrouppublic void onViewRenamed(View view, String oldName, String newName)
ViewGroupView 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 ViewGrouppublic void doCreateView(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException,
javax.servlet.ServletException,
Descriptor.FormException
IOExceptionjavax.servlet.ServletExceptionDescriptor.FormException@Extension public static ViewDescriptor register()
public ViewsTabBar getViewsTabBar()
ViewGroupgetViewsTabBar in interface ViewGrouppublic ItemGroup<? extends TopLevelItem> getItemGroup()
ViewGroupItemGroup from which the views in this group should render items.
Generally speaking, Views render a subset of TopLevelItems 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, Views can use View.getOwnerItemGroup().
getItemGroup in interface ViewGroupModifiableItemGroup (if the container allows arbitrary addition)public List<Action> getViewActions()
ViewGroupIn 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, Views can use View.getOwnerViewActions().
getViewActions in interface ViewGroupActionable.getActions()Copyright © 2019. All rights reserved.