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
,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 ofMultiBranchProject
s, one per repository.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
OrganizationFolder.DescriptorImpl
Our descriptorstatic class
OrganizationFolder.OrganizationScan
Our scan.static class
OrganizationFolder.SCMEventListenerImpl
Listens for events from the SCM event system.static class
OrganizationFolder.StateActionFactory
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 hudson.model.AbstractItem
description, displayName, name, PRONOUN, SKIP_PERMISSION_CHECK, TASK_NOUN
-
-
Constructor Summary
Constructors Constructor Description OrganizationFolder(ItemGroup parent, String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected 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)
ACL
getACL()
DescribableList<BranchBuildStrategy,BranchBuildStrategyDescriptor>
getBuildStrategies()
TheBranchBuildStrategy
s to apply.String
getDescription()
String
getDisplayName()
String
getIconClassName()
MultiBranchProject<?,?>
getItem(String name)
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>
getNavigators()
View
getPrimaryView()
Will create an specialized view when there are no repositories or branches found, which contain a Jenkinsfile or other MARKER file.DescribableList<MultiBranchProjectFactory,MultiBranchProjectFactoryDescriptor>
getProjectFactories()
List<jenkins.scm.api.SCMNavigator>
getSCMNavigators()
jenkins.scm.api.SCMSource
getSCMSource(String sourceId)
jenkins.scm.api.SCMSourceCriteria
getSCMSourceCriteria(jenkins.scm.api.SCMSource source)
List<jenkins.scm.api.SCMSource>
getSCMSources()
String
getSourcePronoun()
Get the term used in the UI to represent the source for this kind ofItem
.BranchPropertyStrategy
getStrategy()
Gets the strategy.View
getView(String name)
protected View
getWelcomeView()
Creates a place-holder view when there's no active repositories indexed.boolean
isBuildable()
boolean
isHasEvents()
boolean
isSingleOrigin()
Deprecated.Directly checkList.size()
ofgetSCMNavigators()
if desired.protected com.cloudbees.hudson.plugins.folder.FolderIcon
newDefaultFolderIcon()
protected com.cloudbees.hudson.plugins.folder.views.AbstractFolderViewHolder
newFolderViewHolder()
void
onCreatedFromScratch()
void
onLoad(ItemGroup<? extends Item> parent, String name)
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, delete, 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, doCheckNewName, doConfigDotXml, doConfirmRename, doDoDelete, doReload, doSetName, getAbsoluteUrl, getApi, getConfigFile, getDisplayNameOrNull, getFullDisplayName, getFullName, getName, getParent, getRelativeDisplayNameFrom, getRelativeNameFromGroup, getRootDir, getSearchName, getSearchUrl, getShortUrl, getTarget, getTaskNoun, getUrl, 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
-
-
-
-
Method Detail
-
onCreatedFromScratch
public void onCreatedFromScratch()
- Specified by:
onCreatedFromScratch
in interfaceItem
- Overrides:
onCreatedFromScratch
in classcom.cloudbees.hudson.plugins.folder.computed.ComputedFolder<MultiBranchProject<?,?>>
-
onLoad
public void onLoad(ItemGroup<? extends Item> parent, String name) throws IOException
- 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
@CheckForNull public MultiBranchProject<?,?> getItemByProjectName(@NonNull String projectName)
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 public boolean isSingleOrigin()
Deprecated.Directly checkList.size()
ofgetSCMNavigators()
if desired.
-
getNavigators
public DescribableList<jenkins.scm.api.SCMNavigator,jenkins.scm.api.SCMNavigatorDescriptor> getNavigators()
-
getSCMNavigators
@NonNull public List<jenkins.scm.api.SCMNavigator> getSCMNavigators()
- Specified by:
getSCMNavigators
in interfacejenkins.scm.api.SCMNavigatorOwner
-
getProjectFactories
public DescribableList<MultiBranchProjectFactory,MultiBranchProjectFactoryDescriptor> getProjectFactories()
-
getStrategy
public BranchPropertyStrategy getStrategy()
Gets the strategy.- Returns:
- the strategy.
- Since:
- 2.5.9
-
setStrategy
public void setStrategy(BranchPropertyStrategy strategy)
Sets the branch property strategy.- Parameters:
strategy
- chosen.- Since:
- 2.5.9
-
getBuildStrategies
public DescribableList<BranchBuildStrategy,BranchBuildStrategyDescriptor> 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
public String getIconClassName()
- Specified by:
getIconClassName
in interfaceIconSpec
-
getSourcePronoun
public String 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
@NonNull public List<jenkins.scm.api.SCMSource> getSCMSources()
- Specified by:
getSCMSources
in interfacejenkins.scm.api.SCMSourceOwner
-
getSCMSource
public jenkins.scm.api.SCMSource getSCMSource(String sourceId)
- 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
public View 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
protected View 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
public View getView(String name)
- Specified by:
getView
in interfaceViewGroup
- Overrides:
getView
in classcom.cloudbees.hudson.plugins.folder.AbstractFolder<MultiBranchProject<?,?>>
-
getDescription
public String getDescription()
- Overrides:
getDescription
in classAbstractItem
-
getDisplayName
public String getDisplayName()
- Specified by:
getDisplayName
in interfaceItem
- Specified by:
getDisplayName
in interfaceModelObject
- Specified by:
getDisplayName
in interfaceResourceActivity
- Overrides:
getDisplayName
in classAbstractItem
-
getACL
@NonNull public ACL getACL()
- Specified by:
getACL
in interfaceAccessControlled
- Overrides:
getACL
in classAbstractItem
-
-