Class Folder
java.lang.Object
hudson.model.AbstractModelObject
hudson.model.Actionable
hudson.model.AbstractItem
com.cloudbees.hudson.plugins.folder.AbstractFolder<TopLevelItem>
com.cloudbees.hudson.plugins.folder.Folder
- All Implemented Interfaces:
ExtensionPoint
,Describable<TopLevelItem>
,DescriptorByNameOwner
,Item
,ItemGroup<TopLevelItem>
,ModelObject
,ModifiableItemGroup<TopLevelItem>
,ModifiableViewGroup
,PersistenceRoot
,Saveable
,TopLevelItem
,ViewGroup
,SearchableModelObject
,SearchItem
,AccessControlled
,DirectlyModifiableTopLevelItemGroup
,Loadable
,ModelObjectWithChildren
,ModelObjectWithContextMenu
,ModifiableTopLevelItemGroup
,OnMaster
,org.kohsuke.stapler.HttpDeletable
,org.kohsuke.stapler.StaplerFallback
,org.kohsuke.stapler.StaplerOverridable
,org.kohsuke.stapler.StaplerProxy
public class Folder
extends AbstractFolder<TopLevelItem>
implements DirectlyModifiableTopLevelItemGroup
A mutable folder.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Deprecated.static class
Nested classes/interfaces inherited from class com.cloudbees.hudson.plugins.folder.AbstractFolder
AbstractFolder.ItemListenerImpl, AbstractFolder.RunListenerImpl
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
Nested classes/interfaces inherited from interface org.kohsuke.stapler.HttpDeletable
org.kohsuke.stapler.HttpDeletable.HttpDeletableDispatcher
Nested classes/interfaces inherited from interface jenkins.model.ModelObjectWithContextMenu
ModelObjectWithContextMenu.ContextMenu, ModelObjectWithContextMenu.ContextMenuVisibility, ModelObjectWithContextMenu.MenuItem, ModelObjectWithContextMenu.MenuItemType
-
Field Summary
Modifier and TypeFieldDescriptionstatic final AlternativeUiTextProvider.Message<Folder>
Deprecated.Fields inherited from class com.cloudbees.hudson.plugins.folder.AbstractFolder
items, reloadingThis
Fields inherited from class hudson.model.AbstractItem
description, displayName, name, PRONOUN, SKIP_PERMISSION_CHECK, TASK_NOUN
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<I extends TopLevelItem>
Ivoid
addProperty
(FolderProperty<?> p) Deprecated.boolean
canAdd
(TopLevelItem item) <T extends TopLevelItem>
TCopies an existingTopLevelItem
to into this folder with a new name.createProject
(TopLevelItemDescriptor type, String name) createProject
(TopLevelItemDescriptor type, String name, boolean notify) <T extends TopLevelItem>
TcreateProject
(Class<T> type, String name) createProjectFromXML
(String name, InputStream xml) Deprecated.doCreateItem
(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) Deprecated.as of 1.7 Folder is no longer a view by itself.Items that can be created in thisFolder
.Used in "New Job" side menu.protected final void
init()
protected void
boolean
Historical synonym forcanAdd(hudson.model.TopLevelItem)
.boolean
Returns true if the specified descriptor type is allowed for this container.void
onCopiedFrom
(Item _src) If copied, copy folder contents.void
void
void
remove
(TopLevelItem item) protected void
submit
(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) protected void
Deprecated.UseTransientActionFactory
instead.Methods inherited from class com.cloudbees.hudson.plugins.folder.AbstractFolder
addLoadedChild, addProperty, addView, canDelete, checkRename, deleteView, doChildrenContextMenu, doConfigSubmit, doCreateView, doDisable, doEnable, doLastBuild, doSubmitDescription, doViewExistsCheck, getAllJobs, getBuildHealth, getBuildHealthReports, getFolderViews, getHealthMetrics, getIcon, getIconColor, getItem, getItemGroup, getItemName, getItems, getItems, getJob, getJobsDir, getOverrides, getPrimaryView, getPronoun, getProperties, getRootDirFor, getRootDirFor, getStaplerFallback, getSuccessfulDestination, getUrlChildPrefix, getView, getViewActions, getViews, getViewsTabBar, hasVisibleItems, invalidateBuildHealthReports, isDisabled, isNameEditable, itemsPut, loadChildren, loadJobTotal, makeDisabled, makeSearchIndex, newDefaultFolderIcon, newDefaultViewsTabBar, newFolderViewHolder, onDeleted, onRenamed, onViewRenamed, reloadThis, renameBlocker, renameTo, resetFolderViews, save, setDisabled, setIcon, setPrimaryView, supportsMakeDisabled
Methods inherited from class hudson.model.AbstractItem
delete, delete, delete, doCheckNewName, doConfigDotXml, doConfigDotXml, doConfirmRename, doDoDelete, doDoDelete, doReload, doSetName, doSubmitDescription, getAbsoluteUrl, getACL, getApi, getConfigFile, getDescription, getDisplayName, getDisplayNameOrNull, getFullDisplayName, getFullName, getName, getParent, getRelativeDisplayNameFrom, getRelativeNameFromGroup, getRootDir, getSearchName, getSearchUrl, getShortUrl, getTarget, getTaskNoun, getUrl, load, movedTo, performDelete, resolveForCLI, setDescription, setDisplayName, setDisplayNameOrNull, toString, updateByXml, updateByXml, writeConfigDotXml, writeReplace
Methods inherited from class hudson.model.Actionable
addAction, addOrReplaceAction, doContextMenu, doContextMenu, getAction, getAction, getActions, getActions, getAllActions, getDynamic, getDynamic, removeAction, removeActions, replaceAction, replaceActions
Methods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, requirePOST, sendError, sendError, sendError, 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.security.AccessControlled
checkAnyPermission, checkPermission, getACL, hasAnyPermission, hasPermission, hasPermission, hasPermission2
Methods inherited from interface hudson.model.DescriptorByNameOwner
getDescriptorByName
Methods inherited from interface hudson.model.Item
delete, getAbsoluteUrl, getDisplayName, getFullDisplayName, getFullName, getName, getParent, getRelativeNameFrom, getRelativeNameFrom, getShortUrl, getUrl
Methods inherited from interface hudson.model.ItemGroup
allItems, allItems, allItems, getAllItems, getAllItems, getAllItems, getFullDisplayName, getFullName, getItem, getItemName, getItems, getItems, getItemsStream, getItemsStream, getRootDirFor, getUrl, getUrlChildPrefix, onDeleted, onRenamed
Methods inherited from interface jenkins.model.ModelObjectWithChildren
doChildrenContextMenu
Methods inherited from interface hudson.model.ModifiableItemGroup
doCreateItem
Methods inherited from interface hudson.model.PersistenceRoot
getRootDir
Methods inherited from interface hudson.search.SearchableModelObject
getSearch
Methods inherited from interface hudson.search.SearchItem
getSearchIndex, getSearchName, getSearchUrl
Methods inherited from interface hudson.model.ViewGroup
getAllViews, getUrl
-
Field Details
-
NEW_PRONOUN
- Since:
- 4.0
- See Also:
-
transientActions
Deprecated.UseTransientActionFactory
instead.
-
-
Constructor Details
-
Folder
-
-
Method Details
-
onLoad
Description copied from class:AbstractFolder
- Specified by:
onLoad
in interfaceItem
- Overrides:
onLoad
in classAbstractFolder<TopLevelItem>
- Throws:
IOException
-
init
protected final void init()- Overrides:
init
in classAbstractFolder<TopLevelItem>
-
initViews
- Overrides:
initViews
in classAbstractFolder<TopLevelItem>
- Throws:
IOException
-
onCreatedFromScratch
public void onCreatedFromScratch()- Specified by:
onCreatedFromScratch
in interfaceItem
-
updateTransientActions
Deprecated.UseTransientActionFactory
instead. -
createTransientActions
Deprecated. -
getNewPronoun
Used in "New Job" side menu.- Returns:
- the pronoun for new item creation.
- See Also:
-
getColumns
Deprecated.as of 1.7 Folder is no longer a view by itself.- Returns:
- the columns.
-
addProperty
Deprecated.Legacy binary compatibility method.- Parameters:
p
- the property.- Throws:
IOException
- if the folder could not be saved.
-
onCopiedFrom
If copied, copy folder contents.- Specified by:
onCopiedFrom
in interfaceItem
- Overrides:
onCopiedFrom
in classAbstractItem
-
doCreateItem
@POST public TopLevelItem doCreateItem(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException - Specified by:
doCreateItem
in interfaceModifiableItemGroup<TopLevelItem>
- Throws:
IOException
javax.servlet.ServletException
-
copy
Copies an existingTopLevelItem
to into this folder with a new name.- Specified by:
copy
in interfaceModifiableTopLevelItemGroup
- Throws:
IOException
-
createProjectFromXML
- Specified by:
createProjectFromXML
in interfaceModifiableTopLevelItemGroup
- Throws:
IOException
-
createProject
public <T extends TopLevelItem> T createProject(@NonNull Class<T> type, @NonNull String name) throws IOException - Throws:
IOException
-
createProject
public TopLevelItem createProject(@NonNull TopLevelItemDescriptor type, @NonNull String name) throws IOException - Throws:
IOException
-
createProject
public TopLevelItem createProject(@NonNull TopLevelItemDescriptor type, @NonNull String name, boolean notify) throws IOException - Specified by:
createProject
in interfaceModifiableTopLevelItemGroup
- Throws:
IOException
-
submit
protected void submit(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException, Descriptor.FormException - Overrides:
submit
in classAbstractFolder<TopLevelItem>
- Throws:
IOException
javax.servlet.ServletException
Descriptor.FormException
-
getItemDescriptors
Items that can be created in thisFolder
.- Returns:
- the descriptors of items that can be created within this folder.
- See Also:
-
isAllowedChildDescriptor
Returns true if the specified descriptor type is allowed for this container.- Parameters:
tid
- the type of child item.- Returns:
true
if it can be added.
-
isAllowedChild
Historical synonym forcanAdd(hudson.model.TopLevelItem)
.- Parameters:
tid
- the potential child item.- Returns:
true
if it can be added.
-
getDescriptor
Description copied from class:AbstractFolder
- Specified by:
getDescriptor
in interfaceDescribable<TopLevelItem>
- Specified by:
getDescriptor
in interfaceTopLevelItem
- Overrides:
getDescriptor
in classAbstractFolder<TopLevelItem>
-
canAdd
- Specified by:
canAdd
in interfaceDirectlyModifiableTopLevelItemGroup
-
add
public <I extends TopLevelItem> I add(I item, String name) throws IOException, IllegalArgumentException - Specified by:
add
in interfaceDirectlyModifiableTopLevelItemGroup
- Throws:
IOException
IllegalArgumentException
-
remove
- Specified by:
remove
in interfaceDirectlyModifiableTopLevelItemGroup
- Throws:
IOException
IllegalArgumentException
-
TransientActionFactory
instead.