Package jenkins.branch
Class OrganizationFolder
java.lang.Object
hudson.model.AbstractModelObject
hudson.model.Actionable
hudson.model.AbstractItem
com.cloudbees.hudson.plugins.folder.AbstractFolder<I>
com.cloudbees.hudson.plugins.folder.computed.ComputedFolder<MultiBranchProject<?,?>>
jenkins.branch.OrganizationFolder
- All Implemented Interfaces:
ExtensionPoint
,BuildableItem
,Describable<TopLevelItem>
,DescriptorByNameOwner
,Item
,ItemGroup<MultiBranchProject<?,
,?>> ModelObject
,ModifiableViewGroup
,PersistenceRoot
,Queue.FlyweightTask
,SubTask
,Queue.Task
,ResourceActivity
,Saveable
,TopLevelItem
,ViewGroup
,SearchableModelObject
,SearchItem
,AccessControlled
,Loadable
,ModelObjectWithChildren
,ModelObjectWithContextMenu
,jenkins.scm.api.SCMNavigatorOwner
,jenkins.scm.api.SCMSourceOwner
,TriggeredItem
,OnMaster
,IconSpec
,org.kohsuke.stapler.HttpDeletable
,org.kohsuke.stapler.StaplerFallback
,org.kohsuke.stapler.StaplerOverridable
,org.kohsuke.stapler.StaplerProxy
public final class OrganizationFolder
extends com.cloudbees.hudson.plugins.folder.computed.ComputedFolder<MultiBranchProject<?,?>>
implements jenkins.scm.api.SCMNavigatorOwner, IconSpec
A folder-like collection of
MultiBranchProject
s, one per repository.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Our descriptorstatic class
Our scan.static class
Listens for events from the SCM event system.static class
Adds theOrganizationFolder.State.getActions()
toActionable.getAllActions()
.Nested classes/interfaces inherited from class com.cloudbees.hudson.plugins.folder.AbstractFolder
com.cloudbees.hudson.plugins.folder.AbstractFolder.ItemListenerImpl, com.cloudbees.hudson.plugins.folder.AbstractFolder.RunListenerImpl
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
Nested classes/interfaces inherited from interface jenkins.model.ModelObjectWithContextMenu
ModelObjectWithContextMenu.ContextMenu, ModelObjectWithContextMenu.ContextMenuVisibility, ModelObjectWithContextMenu.MenuItem, ModelObjectWithContextMenu.MenuItemType
-
Field Summary
Fields inherited from class com.cloudbees.hudson.plugins.folder.AbstractFolder
items
Fields inherited from class hudson.model.AbstractItem
description, displayName, name, PRONOUN, SKIP_PERMISSION_CHECK, TASK_NOUN
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
computeChildren
(com.cloudbees.hudson.plugins.folder.computed.ChildObserver<MultiBranchProject<?, ?>> observer, TaskListener listener) protected com.cloudbees.hudson.plugins.folder.computed.FolderComputation<MultiBranchProject<?,
?>> createComputation
(com.cloudbees.hudson.plugins.folder.computed.FolderComputation<MultiBranchProject<?, ?>> previous) getACL()
TheBranchBuildStrategy
s to apply.MultiBranchProject<?,
?> MultiBranchProject<?,
?> getItemByProjectName
(String projectName) Returns the child job with the specified project name ornull
if no such child job exists.DescribableList<jenkins.scm.api.SCMNavigator,
jenkins.scm.api.SCMNavigatorDescriptor> Will create an specialized view when there are no repositories or branches found, which contain a Jenkinsfile or other MARKER file.List<jenkins.scm.api.SCMNavigator>
jenkins.scm.api.SCMSource
getSCMSource
(String sourceId) jenkins.scm.api.SCMSourceCriteria
getSCMSourceCriteria
(jenkins.scm.api.SCMSource source) List<jenkins.scm.api.SCMSource>
Get the term used in the UI to represent the source for this kind ofItem
.Gets the strategy.protected View
Creates a place-holder view when there's no active repositories indexed.boolean
boolean
boolean
Deprecated.protected com.cloudbees.hudson.plugins.folder.FolderIcon
protected com.cloudbees.hudson.plugins.folder.views.AbstractFolderViewHolder
void
void
void
onSCMSourceUpdated
(jenkins.scm.api.SCMSource source) void
setStrategy
(BranchPropertyStrategy strategy) Sets the branch property strategy.protected void
submit
(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) Methods inherited from class com.cloudbees.hudson.plugins.folder.computed.ComputedFolder
addTrigger, checkAbortPermission, checkRename, createEventsChildObserver, createExecutable, doBuild, doConfigSubmit, getActions, getAssignedLabel, getCauseOfBlockage, getComputation, getComputationDir, getEstimatedDuration, getLastBuiltOn, getLastFailedBuild, getLastStableBuild, getLastSuccessfulBuild, getOrphanedItemStrategy, getOrphanedItemStrategyDescriptors, getSuccessfulDestination, getTriggerDescriptors, getTriggers, hasAbortPermission, init, isDisabled, openEventsChildObserver, orphanedItems, recalculateAfterSubmitted, removeTrigger, scheduleBuild, scheduleBuild, scheduleBuild2, setDisabled, setOrphanedItemStrategy, supportsMakeDisabled
Methods inherited from class com.cloudbees.hudson.plugins.folder.AbstractFolder
addProperty, addView, canDelete, deleteView, doChildrenContextMenu, doCreateView, doDisable, doEnable, doLastBuild, doSubmitDescription, doViewExistsCheck, getAllJobs, getBuildHealth, getBuildHealthReports, getDescriptor, getFolderViews, getHealthMetrics, getIcon, getIconColor, getItemGroup, getItems, getItems, getJob, getJobsDir, getOverrides, getPronoun, getProperties, getRootDirFor, getRootDirFor, getStaplerFallback, getUrlChildPrefix, getViewActions, getViews, getViewsTabBar, hasVisibleItems, initViews, invalidateBuildHealthReports, isNameEditable, itemsPut, loadChildren, loadJobTotal, makeDisabled, makeSearchIndex, newDefaultViewsTabBar, onDeleted, onRenamed, onViewRenamed, renameBlocker, renameTo, resetFolderViews, save, setIcon, setPrimaryView
Methods inherited from class hudson.model.AbstractItem
delete, delete, doCheckNewName, doConfigDotXml, doConfirmRename, doDoDelete, doReload, doSetName, getAbsoluteUrl, getApi, getConfigFile, getDisplayNameOrNull, getFullDisplayName, getFullName, getName, getParent, getRelativeDisplayNameFrom, getRelativeNameFromGroup, getRootDir, getSearchName, getSearchUrl, getShortUrl, getTarget, getTaskNoun, getUrl, load, movedTo, onCopiedFrom, performDelete, resolveForCLI, setDescription, setDisplayName, setDisplayNameOrNull, toString, updateByXml, updateByXml, writeConfigDotXml, writeReplace
Methods inherited from class hudson.model.Actionable
addAction, addOrReplaceAction, doContextMenu, getAction, getAction, getActions, getAllActions, getDynamic, removeAction, removeActions, replaceAction, replaceActions
Methods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, 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.security.AccessControlled
checkAnyPermission, checkPermission, hasAnyPermission, hasPermission, hasPermission, hasPermission2
Methods inherited from interface hudson.model.BuildableItem
scheduleBuild, scheduleBuild
Methods inherited from interface hudson.model.DescriptorByNameOwner
getDescriptorByName
Methods inherited from interface hudson.model.Item
delete, getAbsoluteUrl, getAllJobs, getFullDisplayName, getFullName, getName, getParent, getRelativeNameFrom, getRelativeNameFrom, getShortUrl, getUrl, onCopiedFrom, save
Methods inherited from interface hudson.model.ItemGroup
allItems, allItems, allItems, getAllItems, getAllItems, getAllItems, getFullDisplayName, getFullName, getItemsStream, getItemsStream, getUrl
Methods inherited from interface hudson.model.PersistenceRoot
getRootDir
Methods inherited from interface hudson.model.Queue.Task
getAffinityKey, getDefaultAuthentication, getDefaultAuthentication, getDefaultAuthentication2, getDefaultAuthentication2, getFullDisplayName, getName, getSubTasks, getUrl, getWhyBlocked, isBuildBlocked, isConcurrentBuild
Methods inherited from interface hudson.model.ResourceActivity
getResourceList
Methods inherited from interface hudson.search.SearchableModelObject
getSearch
Methods inherited from interface hudson.search.SearchItem
getSearchIndex, getSearchName, getSearchUrl
Methods inherited from interface hudson.model.queue.SubTask
getOwnerExecutable, getOwnerTask, getSameNodeConstraint
Methods inherited from interface hudson.model.ViewGroup
getAllViews, getUrl
-
Constructor Details
-
OrganizationFolder
-
-
Method Details
-
onCreatedFromScratch
public void onCreatedFromScratch()- Specified by:
onCreatedFromScratch
in interfaceItem
- Overrides:
onCreatedFromScratch
in classcom.cloudbees.hudson.plugins.folder.computed.ComputedFolder<MultiBranchProject<?,
?>>
-
onLoad
- Specified by:
onLoad
in interfaceItem
- Overrides:
onLoad
in classcom.cloudbees.hudson.plugins.folder.computed.ComputedFolder<MultiBranchProject<?,
?>> - Throws:
IOException
-
getItem
public MultiBranchProject<?,?> getItem(String name) throws org.springframework.security.access.AccessDeniedException - Specified by:
getItem
in interfaceItemGroup<MultiBranchProject<?,
?>> - Overrides:
getItem
in classcom.cloudbees.hudson.plugins.folder.AbstractFolder<MultiBranchProject<?,
?>> - Throws:
org.springframework.security.access.AccessDeniedException
-
getItemByProjectName
Returns the child job with the specified project name ornull
if no such child job exists.- Parameters:
projectName
- the name of the project.- Returns:
- the child job or
null
if no such job exists or if the requesting user does ave permission to view it. - Since:
- 2.0.0
-
isSingleOrigin
Deprecated.Directly checkList.size()
ofgetSCMNavigators()
if desired. -
getProjectFactories
public DescribableList<MultiBranchProjectFactory,MultiBranchProjectFactoryDescriptor> getProjectFactories() -
getStrategy
Gets the strategy.- Returns:
- the strategy.
- Since:
- 2.5.9
-
setStrategy
Sets the branch property strategy.- Parameters:
strategy
- chosen.- Since:
- 2.5.9
-
getBuildStrategies
TheBranchBuildStrategy
s to apply.- Returns:
- The
BranchBuildStrategy
s to apply. - Since:
- 2.0.12
-
submit
protected void submit(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws IOException, javax.servlet.ServletException, Descriptor.FormException - Overrides:
submit
in classcom.cloudbees.hudson.plugins.folder.computed.ComputedFolder<MultiBranchProject<?,
?>> - Throws:
IOException
javax.servlet.ServletException
Descriptor.FormException
-
createComputation
@NonNull protected com.cloudbees.hudson.plugins.folder.computed.FolderComputation<MultiBranchProject<?,?>> createComputation(@CheckForNull com.cloudbees.hudson.plugins.folder.computed.FolderComputation<MultiBranchProject<?, ?>> previous) - Overrides:
createComputation
in classcom.cloudbees.hudson.plugins.folder.computed.ComputedFolder<MultiBranchProject<?,
?>>
-
isHasEvents
public boolean isHasEvents()- Overrides:
isHasEvents
in classcom.cloudbees.hudson.plugins.folder.computed.ComputedFolder<MultiBranchProject<?,
?>>
-
isBuildable
public boolean isBuildable()- Overrides:
isBuildable
in classcom.cloudbees.hudson.plugins.folder.computed.ComputedFolder<MultiBranchProject<?,
?>>
-
computeChildren
protected void computeChildren(com.cloudbees.hudson.plugins.folder.computed.ChildObserver<MultiBranchProject<?, ?>> observer, TaskListener listener) throws IOException, InterruptedException- Specified by:
computeChildren
in classcom.cloudbees.hudson.plugins.folder.computed.ComputedFolder<MultiBranchProject<?,
?>> - Throws:
IOException
InterruptedException
-
newFolderViewHolder
protected com.cloudbees.hudson.plugins.folder.views.AbstractFolderViewHolder newFolderViewHolder()- Overrides:
newFolderViewHolder
in classcom.cloudbees.hudson.plugins.folder.AbstractFolder<MultiBranchProject<?,
?>>
-
newDefaultFolderIcon
protected com.cloudbees.hudson.plugins.folder.FolderIcon newDefaultFolderIcon()- Overrides:
newDefaultFolderIcon
in classcom.cloudbees.hudson.plugins.folder.AbstractFolder<MultiBranchProject<?,
?>>
-
getIconClassName
- Specified by:
getIconClassName
in interfaceIconSpec
-
getSourcePronoun
Get the term used in the UI to represent the source for this kind ofItem
. Must start with a capital letter.- Returns:
- term used in the UI to represent the souce
-
getSCMSources
- Specified by:
getSCMSources
in interfacejenkins.scm.api.SCMSourceOwner
-
getSCMSource
- Specified by:
getSCMSource
in interfacejenkins.scm.api.SCMSourceOwner
-
onSCMSourceUpdated
public void onSCMSourceUpdated(@NonNull jenkins.scm.api.SCMSource source) - Specified by:
onSCMSourceUpdated
in interfacejenkins.scm.api.SCMSourceOwner
-
getSCMSourceCriteria
public jenkins.scm.api.SCMSourceCriteria getSCMSourceCriteria(@NonNull jenkins.scm.api.SCMSource source) - Specified by:
getSCMSourceCriteria
in interfacejenkins.scm.api.SCMSourceOwner
-
getPrimaryView
Will create an specialized view when there are no repositories or branches found, which contain a Jenkinsfile or other MARKER file.- Specified by:
getPrimaryView
in interfaceViewGroup
- Overrides:
getPrimaryView
in classcom.cloudbees.hudson.plugins.folder.AbstractFolder<MultiBranchProject<?,
?>>
-
getWelcomeView
Creates a place-holder view when there's no active repositories indexed.- Returns:
- a place-holder view for when there's no active repositories indexed.
-
getView
- Specified by:
getView
in interfaceViewGroup
- Overrides:
getView
in classcom.cloudbees.hudson.plugins.folder.AbstractFolder<MultiBranchProject<?,
?>>
-
getDescription
- Overrides:
getDescription
in classAbstractItem
-
getDisplayName
- Specified by:
getDisplayName
in interfaceItem
- Specified by:
getDisplayName
in interfaceModelObject
- Specified by:
getDisplayName
in interfaceResourceActivity
- Overrides:
getDisplayName
in classAbstractItem
-
getACL
- Specified by:
getACL
in interfaceAccessControlled
- Overrides:
getACL
in classAbstractItem
-
List.size()
ofgetSCMNavigators()
if desired.