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,ITask,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
MultiBranchProjects, one per repository.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classOur descriptorstatic classOur scan.static classListens for events from the SCM event system.static classAdds 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.RunListenerImplNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudsonNested classes/interfaces inherited from interface org.kohsuke.stapler.HttpDeletable
org.kohsuke.stapler.HttpDeletable.HttpDeletableDispatcherNested 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, reloadingThisFields inherited from class hudson.model.AbstractItem
description, displayName, name, PRONOUN, SKIP_PERMISSION_CHECK, TASK_NOUN -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcomputeChildren(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()TheBranchBuildStrategys to apply.MultiBranchProject<?,?> MultiBranchProject<?,?> getItemByProjectName(String projectName) Returns the child job with the specified project name ornullif 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.SCMSourcegetSCMSource(String sourceId) jenkins.scm.api.SCMSourceCriteriagetSCMSourceCriteria(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 ViewCreates a place-holder view when there's no active repositories indexed.booleanbooleanbooleanDeprecated.protected com.cloudbees.hudson.plugins.folder.FolderIconprotected com.cloudbees.hudson.plugins.folder.views.AbstractFolderViewHoldervoidvoidvoidonSCMSourceUpdated(jenkins.scm.api.SCMSource source) voidsetStrategy(BranchPropertyStrategy strategy) Sets the branch property strategy.protected voidsubmit(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 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, submit, supportsMakeDisabledMethods inherited from class com.cloudbees.hudson.plugins.folder.AbstractFolder
addLoadedChild, addProperty, addView, canDelete, deleteView, doChildrenContextMenu, doChildrenContextMenu, doCreateView, doCreateView, doDisable, doEnable, doLastBuild, doLastBuild, doSubmitDescription, doSubmitDescription, doViewExistsCheck, getAllJobs, getBuildHealth, getBuildHealthReports, getDescriptor, getFolderViews, getHealthMetrics, getIcon, getIconColor, getItemGroup, getItemName, 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, reloadThis, renameBlocker, renameTo, resetFolderViews, save, setIcon, setPrimaryViewMethods inherited from class hudson.model.AbstractItem
delete, delete, delete, doCheckNewName, doConfigDotXml, doConfigDotXml, doConfirmRename, doDoDelete, 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, writeReplaceMethods inherited from class hudson.model.Actionable
addAction, addOrReplaceAction, doContextMenu, doContextMenu, getAction, getAction, getActions, getAllActions, getDynamic, getDynamic, removeAction, removeActions, replaceAction, replaceActionsMethods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError, sendError, sendError, sendErrorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface hudson.security.AccessControlled
checkAnyPermission, checkPermission, hasAnyPermission, hasPermission, hasPermission, hasPermission2Methods inherited from interface hudson.model.BuildableItem
scheduleBuild, scheduleBuildMethods inherited from interface hudson.model.DescriptorByNameOwner
getDescriptorByNameMethods inherited from interface jenkins.model.queue.ITask
hasReadPermissionMethods inherited from interface hudson.model.Item
delete, getAbsoluteUrl, getAllJobs, getFullDisplayName, getFullName, getName, getParent, getRelativeNameFrom, getRelativeNameFrom, getSearchGroup, getShortUrl, getUrl, onCopiedFrom, saveMethods inherited from interface hudson.model.ItemGroup
allItems, allItems, allItems, getAllItems, getAllItems, getAllItems, getFullDisplayName, getFullName, getItemsStream, getItemsStream, getUrlMethods inherited from interface hudson.model.PersistenceRoot
getRootDirMethods inherited from interface hudson.model.Queue.Task
getAffinityKey, getDefaultAuthentication, getDefaultAuthentication, getDefaultAuthentication2, getDefaultAuthentication2, getFullDisplayName, getName, getSubTasks, getUrl, getWhyBlocked, isBuildBlocked, isConcurrentBuildMethods inherited from interface hudson.model.ResourceActivity
getResourceListMethods inherited from interface hudson.search.SearchableModelObject
getSearchMethods inherited from interface hudson.search.SearchItem
getSearchIcon, getSearchIndex, getSearchName, getSearchUrlMethods inherited from interface hudson.model.queue.SubTask
getOwnerExecutable, getOwnerTask, getSameNodeConstraintMethods inherited from interface hudson.model.ViewGroup
getAllViews, getUrl
-
Constructor Details
-
OrganizationFolder
-
-
Method Details
-
onCreatedFromScratch
public void onCreatedFromScratch()- Specified by:
onCreatedFromScratchin interfaceItem- Overrides:
onCreatedFromScratchin classcom.cloudbees.hudson.plugins.folder.computed.ComputedFolder<MultiBranchProject<?,?>>
-
onLoad
- Specified by:
onLoadin interfaceItem- Overrides:
onLoadin classcom.cloudbees.hudson.plugins.folder.computed.ComputedFolder<MultiBranchProject<?,?>> - Throws:
IOException
-
getItem
public MultiBranchProject<?,?> getItem(String name) throws org.springframework.security.access.AccessDeniedException - Specified by:
getItemin interfaceItemGroup<MultiBranchProject<?,?>> - Overrides:
getItemin classcom.cloudbees.hudson.plugins.folder.AbstractFolder<MultiBranchProject<?,?>> - Throws:
org.springframework.security.access.AccessDeniedException
-
getItemByProjectName
Returns the child job with the specified project name ornullif no such child job exists.- Parameters:
projectName- the name of the project.- Returns:
- the child job or
nullif 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
TheBranchBuildStrategys to apply.- Returns:
- The
BranchBuildStrategys to apply. - Since:
- 2.0.12
-
submit
protected void submit(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) throws IOException, jakarta.servlet.ServletException, Descriptor.FormException - Overrides:
submitin classcom.cloudbees.hudson.plugins.folder.computed.ComputedFolder<MultiBranchProject<?,?>> - Throws:
IOExceptionjakarta.servlet.ServletExceptionDescriptor.FormException
-
createComputation
@NonNull protected com.cloudbees.hudson.plugins.folder.computed.FolderComputation<MultiBranchProject<?,?>> createComputation(@CheckForNull com.cloudbees.hudson.plugins.folder.computed.FolderComputation<MultiBranchProject<?, ?>> previous) - Overrides:
createComputationin classcom.cloudbees.hudson.plugins.folder.computed.ComputedFolder<MultiBranchProject<?,?>>
-
isHasEvents
public boolean isHasEvents()- Overrides:
isHasEventsin classcom.cloudbees.hudson.plugins.folder.computed.ComputedFolder<MultiBranchProject<?,?>>
-
isBuildable
public boolean isBuildable()- Overrides:
isBuildablein 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:
computeChildrenin classcom.cloudbees.hudson.plugins.folder.computed.ComputedFolder<MultiBranchProject<?,?>> - Throws:
IOExceptionInterruptedException
-
newFolderViewHolder
protected com.cloudbees.hudson.plugins.folder.views.AbstractFolderViewHolder newFolderViewHolder()- Overrides:
newFolderViewHolderin classcom.cloudbees.hudson.plugins.folder.AbstractFolder<MultiBranchProject<?,?>>
-
newDefaultFolderIcon
protected com.cloudbees.hudson.plugins.folder.FolderIcon newDefaultFolderIcon()- Overrides:
newDefaultFolderIconin classcom.cloudbees.hudson.plugins.folder.AbstractFolder<MultiBranchProject<?,?>>
-
getIconClassName
- Specified by:
getIconClassNamein interfaceIconSpec- Overrides:
getIconClassNamein classcom.cloudbees.hudson.plugins.folder.AbstractFolder<MultiBranchProject<?,?>>
-
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:
getSCMSourcesin interfacejenkins.scm.api.SCMSourceOwner
-
getSCMSource
- Specified by:
getSCMSourcein interfacejenkins.scm.api.SCMSourceOwner
-
onSCMSourceUpdated
public void onSCMSourceUpdated(@NonNull jenkins.scm.api.SCMSource source) - Specified by:
onSCMSourceUpdatedin interfacejenkins.scm.api.SCMSourceOwner
-
getSCMSourceCriteria
public jenkins.scm.api.SCMSourceCriteria getSCMSourceCriteria(@NonNull jenkins.scm.api.SCMSource source) - Specified by:
getSCMSourceCriteriain 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:
getPrimaryViewin interfaceViewGroup- Overrides:
getPrimaryViewin 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:
getViewin interfaceViewGroup- Overrides:
getViewin classcom.cloudbees.hudson.plugins.folder.AbstractFolder<MultiBranchProject<?,?>>
-
getDescription
- Overrides:
getDescriptionin classAbstractItem
-
getDisplayName
- Specified by:
getDisplayNamein interfaceItem- Specified by:
getDisplayNamein interfaceModelObject- Specified by:
getDisplayNamein interfaceResourceActivity- Overrides:
getDisplayNamein classAbstractItem
-
getACL
- Specified by:
getACLin interfaceAccessControlled- Overrides:
getACLin classAbstractItem
-
List.size()ofgetSCMNavigators()if desired.