|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthudson.model.AbstractModelObject
hudson.model.View
hudson.model.TreeView
public class TreeView
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
| Nested Class Summary | |
|---|---|
static class |
TreeView.DescriptorImpl
|
| Nested classes/interfaces inherited from class hudson.model.View |
|---|
View.AsynchPeople, View.People, View.PropertyList, View.UserInfo |
| Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
|---|
ExtensionPoint.LegacyInstancesAreScopedToHudson |
| Field Summary |
|---|
| Fields inherited from class hudson.model.View |
|---|
CONFIGURE, CREATE, DELETE, description, filterExecutors, filterQueue, LIST, name, NEW_PRONOUN, owner, PERMISSIONS, READ, SORTER, transientActions |
| Fields inherited from interface hudson.model.Saveable |
|---|
NOOP |
| Constructor Summary | |
|---|---|
TreeView(String name)
|
|
| Method Summary | |
|---|---|
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 |
onJobRenamed(Item item,
String oldName,
String newName)
Called when a job name is changed or deleted. |
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. |
| Methods inherited from class hudson.model.AbstractModelObject |
|---|
getSearch, getSearchIndex, getSearchName, requirePOST, sendError, sendError, sendError, sendError, sendError |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface hudson.model.ViewGroup |
|---|
getUrl |
| Methods inherited from interface hudson.model.Saveable |
|---|
save |
| Methods inherited from interface hudson.model.ModelObject |
|---|
getDisplayName |
| Methods inherited from interface hudson.security.AccessControlled |
|---|
checkPermission, getACL, hasPermission |
| Constructor Detail |
|---|
@DataBoundConstructor public TreeView(String name)
| Method Detail |
|---|
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.
getItems in class Viewpublic boolean contains(TopLevelItem item)
View
contains in class View
public 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 ViewIOException
javax.servlet.ServletException
public void onJobRenamed(Item item,
String oldName,
String newName)
ViewIf this view contains this job, it should update the view membership so that the renamed job will remain in the view, and the deleted job is removed.
onJobRenamed in class Viewitem - The item whose name is being changed.oldName - Old name of the item. Always non-null.newName - New name of the item, if the item is renamed. Or null, if the item is removed.
protected void submit(org.kohsuke.stapler.StaplerRequest req)
throws IOException,
javax.servlet.ServletException,
Descriptor.FormException
View
submit in class ViewIOException
javax.servlet.ServletException
Descriptor.FormExceptionpublic boolean canDelete(View view)
ViewGroup
canDelete in interface ViewGroup
public void deleteView(View view)
throws IOException
ViewGroup
deleteView in interface ViewGroupIOExceptionpublic Collection<View> getViews()
ViewGroup
getViews in interface ViewGrouppublic View getView(String name)
ViewGroup
getView in interface 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 ViewGroup
public 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 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 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()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||