public abstract class AbstractFolder<I extends hudson.model.TopLevelItem>
extends hudson.model.AbstractItem
implements hudson.model.TopLevelItem, hudson.model.ItemGroup<I>, hudson.model.ModifiableViewGroup, org.kohsuke.stapler.StaplerFallback, jenkins.model.ModelObjectWithChildren, org.kohsuke.stapler.StaplerOverridable
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,I> |
items
Child items, keyed by
Item.getName(). |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractFolder(hudson.model.ItemGroup parent,
String name)
Subclasses should also call
init(). |
| Modifier and Type | Method and Description |
|---|---|
void |
addProperty(AbstractFolderProperty p) |
void |
addView(hudson.model.View v) |
boolean |
canDelete(hudson.model.View view) |
void |
deleteView(hudson.model.View view) |
jenkins.model.ModelObjectWithContextMenu.ContextMenu |
doChildrenContextMenu(org.kohsuke.stapler.StaplerRequest request,
org.kohsuke.stapler.StaplerResponse response) |
void |
doConfigSubmit(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp) |
void |
doCreateView(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp) |
void |
doDoRename(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp) |
org.kohsuke.stapler.HttpResponse |
doLastBuild(org.kohsuke.stapler.StaplerRequest req) |
void |
doSubmitDescription(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp) |
hudson.util.FormValidation |
doViewExistsCheck(String value)
Checks if a top-level view with the given name exists.
|
Collection<? extends hudson.model.Job> |
getAllJobs() |
hudson.model.HealthReport |
getBuildHealth()
Get the current health report for a folder.
|
List<hudson.model.HealthReport> |
getBuildHealthReports() |
AbstractFolderDescriptor |
getDescriptor() |
hudson.util.DescribableList<FolderHealthMetric,FolderHealthMetricDescriptor> |
getHealthMetrics() |
FolderIcon |
getIcon()
Gets the icon used for this folder.
|
FolderIcon |
getIconColor() |
I |
getItem(String name) |
hudson.model.ItemGroup<? extends hudson.model.TopLevelItem> |
getItemGroup() |
Collection<I> |
getItems() |
I |
getJob(String name)
For URL binding.
|
protected File |
getJobsDir()
May be overridden, but
loadJobTotal() will be inaccurate in that case. |
Collection<?> |
getOverrides()
Overrides from job properties.
|
hudson.model.View |
getPrimaryView() |
String |
getPronoun() |
hudson.util.DescribableList<AbstractFolderProperty<?>,AbstractFolderPropertyDescriptor> |
getProperties()
May be used to enumerate or remove properties.
|
File |
getRootDirFor(I child) |
protected File |
getRootDirFor(String name) |
hudson.model.View |
getStaplerFallback()
Fallback to the primary view.
|
String |
getUrlChildPrefix() |
hudson.model.View |
getView(String name) |
List<hudson.model.Action> |
getViewActions() |
Collection<hudson.model.View> |
getViews() |
hudson.views.ViewsTabBar |
getViewsTabBar() |
protected void |
init() |
protected void |
initViews(List<hudson.model.View> views) |
static void |
loadJobTotal() |
protected hudson.search.SearchIndexBuilder |
makeSearchIndex() |
void |
onDeleted(hudson.model.TopLevelItem item) |
void |
onLoad(hudson.model.ItemGroup<? extends hudson.model.Item> parent,
String name) |
void |
onRenamed(hudson.model.TopLevelItem item,
String oldName,
String newName) |
void |
onViewRenamed(hudson.model.View view,
String oldName,
String newName) |
protected void |
performDelete() |
protected String |
renameBlocker()
Allows a subclass to block renames under dynamic conditions.
|
void |
renameTo(String newName)
Renames this item container.
|
void |
save() |
void |
setIcon(FolderIcon icon) |
void |
setPrimaryView(hudson.model.View v) |
protected void |
submit(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp) |
checkPermission, delete, delete, doConfigDotXml, doDoDelete, doReload, doSetName, getAbsoluteUrl, getACL, getApi, getConfigFile, getDescription, getDescriptorByName, getDisplayName, getDisplayNameOrNull, getFullDisplayName, getFullName, getName, getParent, getRelativeDisplayNameFrom, getRelativeNameFrom, getRelativeNameFrom, getRelativeNameFromGroup, getRootDir, getSearchName, getSearchUrl, getShortUrl, getUrl, hasPermission, movedTo, onCopiedFrom, onCreatedFromScratch, resolveForCLI, setDescription, setDisplayName, setDisplayNameOrNull, toString, updateByXml, updateByXmladdAction, doContextMenu, getAction, getAction, getActions, getActions, getAllActions, getDynamic, replaceActiongetSearch, getSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendErrorclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdelete, getAbsoluteUrl, getDisplayName, getFullDisplayName, getFullName, getName, getParent, getRelativeNameFrom, getRelativeNameFrom, getShortUrl, getUrl, onCopiedFrom, onCreatedFromScratch@Initializer(before=JOB_LOADED,
fatal=false)
public static void loadJobTotal()
protected void init()
protected void initViews(List<hudson.model.View> views) throws IOException
IOExceptionpublic void onLoad(hudson.model.ItemGroup<? extends hudson.model.Item> parent,
String name)
throws IOException
onLoad in interface hudson.model.ItemonLoad in class hudson.model.AbstractItemIOExceptionpublic AbstractFolderDescriptor getDescriptor()
getDescriptor in interface hudson.model.Describable<hudson.model.TopLevelItem>getDescriptor in interface hudson.model.TopLevelItempublic hudson.util.DescribableList<AbstractFolderProperty<?>,AbstractFolderPropertyDescriptor> getProperties()
addProperty(com.cloudbees.hudson.plugins.folder.AbstractFolderProperty).public void addProperty(AbstractFolderProperty p) throws IOException
IOExceptionprotected File getJobsDir()
loadJobTotal() will be inaccurate in that case.public File getRootDirFor(I child)
getRootDirFor in interface hudson.model.ItemGroup<I extends hudson.model.TopLevelItem>public String getUrlChildPrefix()
getUrlChildPrefix in interface hudson.model.ItemGroup<I extends hudson.model.TopLevelItem>public I getJob(String name)
getUrlChildPrefix()public String getPronoun()
getPronoun in class hudson.model.AbstractItempublic Collection<?> getOverrides()
getOverrides in interface org.kohsuke.stapler.StaplerOverridablepublic void addView(hudson.model.View v)
throws IOException
addView in interface hudson.model.ModifiableViewGroupIOExceptionpublic boolean canDelete(hudson.model.View view)
canDelete in interface hudson.model.ViewGrouppublic void deleteView(hudson.model.View view)
throws IOException
deleteView in interface hudson.model.ViewGroupIOExceptionpublic hudson.model.View getView(String name)
getView in interface hudson.model.ViewGroup@Exported public Collection<hudson.model.View> getViews()
getViews in interface hudson.model.ViewGroup@Exported public hudson.model.View getPrimaryView()
getPrimaryView in interface hudson.model.ViewGrouppublic void setPrimaryView(hudson.model.View v)
public void onViewRenamed(hudson.model.View view,
String oldName,
String newName)
onViewRenamed in interface hudson.model.ViewGrouppublic hudson.views.ViewsTabBar getViewsTabBar()
getViewsTabBar in interface hudson.model.ViewGrouppublic hudson.model.ItemGroup<? extends hudson.model.TopLevelItem> getItemGroup()
getItemGroup in interface hudson.model.ViewGrouppublic List<hudson.model.Action> getViewActions()
getViewActions in interface hudson.model.ViewGrouppublic hudson.model.View getStaplerFallback()
getStaplerFallback in interface org.kohsuke.stapler.StaplerFallbackprotected hudson.search.SearchIndexBuilder makeSearchIndex()
makeSearchIndex in class hudson.model.AbstractModelObjectpublic jenkins.model.ModelObjectWithContextMenu.ContextMenu doChildrenContextMenu(org.kohsuke.stapler.StaplerRequest request,
org.kohsuke.stapler.StaplerResponse response)
doChildrenContextMenu in interface jenkins.model.ModelObjectWithChildrenpublic void doCreateView(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException,
javax.servlet.ServletException,
ParseException,
hudson.model.Descriptor.FormException
IOExceptionjavax.servlet.ServletExceptionParseExceptionhudson.model.Descriptor.FormExceptionpublic hudson.util.FormValidation doViewExistsCheck(@QueryParameter
String value)
public hudson.model.HealthReport getBuildHealth()
@Exported(name="healthReport") public List<hudson.model.HealthReport> getBuildHealthReports()
public hudson.util.DescribableList<FolderHealthMetric,FolderHealthMetricDescriptor> getHealthMetrics()
public org.kohsuke.stapler.HttpResponse doLastBuild(org.kohsuke.stapler.StaplerRequest req)
public FolderIcon getIcon()
public void setIcon(FolderIcon icon)
public FolderIcon getIconColor()
public Collection<? extends hudson.model.Job> getAllJobs()
getAllJobs in interface hudson.model.ItemgetAllJobs in class hudson.model.AbstractItem@Exported(name="jobs") public Collection<I> getItems()
getItems in interface hudson.model.ItemGroup<I extends hudson.model.TopLevelItem>public I getItem(String name) throws org.acegisecurity.AccessDeniedException
getItem in interface hudson.model.ItemGroup<I extends hudson.model.TopLevelItem>org.acegisecurity.AccessDeniedExceptionpublic void onRenamed(hudson.model.TopLevelItem item,
String oldName,
String newName)
throws IOException
onRenamed in interface hudson.model.ItemGroup<I extends hudson.model.TopLevelItem>IOExceptionpublic void onDeleted(hudson.model.TopLevelItem item)
throws IOException
onDeleted in interface hudson.model.ItemGroup<I extends hudson.model.TopLevelItem>IOExceptionprotected void performDelete()
throws IOException,
InterruptedException
performDelete in class hudson.model.AbstractItemIOExceptionInterruptedExceptionpublic void save()
throws IOException
save in interface hudson.model.Itemsave in interface hudson.model.Saveablesave in class hudson.model.AbstractItemIOExceptionpublic void renameTo(String newName) throws IOException
renameTo in class hudson.model.AbstractItemIOExceptionpublic void doSubmitDescription(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException,
javax.servlet.ServletException
doSubmitDescription in class hudson.model.AbstractItemIOExceptionjavax.servlet.ServletException@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class)
public void doConfigSubmit(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException,
javax.servlet.ServletException,
hudson.model.Descriptor.FormException
IOExceptionjavax.servlet.ServletExceptionhudson.model.Descriptor.FormExceptionprotected void submit(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException,
javax.servlet.ServletException,
hudson.model.Descriptor.FormException
IOExceptionjavax.servlet.ServletExceptionhudson.model.Descriptor.FormException@Restricted(value=org.kohsuke.accmod.restrictions.DoNotUse.class)
public void doDoRename(org.kohsuke.stapler.StaplerRequest req,
org.kohsuke.stapler.StaplerResponse rsp)
throws IOException,
javax.servlet.ServletException
IOExceptionjavax.servlet.ServletException@CheckForNull protected String renameBlocker()
Copyright © 2016. All rights reserved.