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 MultiBranchProjects, one per repository.
  • Constructor Details

    • OrganizationFolder

      public OrganizationFolder(ItemGroup parent, String name)
  • Method Details

    • onCreatedFromScratch

      public void onCreatedFromScratch()
      Specified by:
      onCreatedFromScratch in interface Item
      Overrides:
      onCreatedFromScratch in class com.cloudbees.hudson.plugins.folder.computed.ComputedFolder<MultiBranchProject<?,?>>
    • onLoad

      public void onLoad(ItemGroup<? extends Item> parent, String name) throws IOException
      Specified by:
      onLoad in interface Item
      Overrides:
      onLoad in class com.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 interface ItemGroup<MultiBranchProject<?,?>>
      Overrides:
      getItem in class com.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 or null 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 check List.size() of getSCMNavigators() 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 interface jenkins.scm.api.SCMNavigatorOwner
    • 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

      The BranchBuildStrategys to apply.
      Returns:
      The BranchBuildStrategys 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 class com.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 class com.cloudbees.hudson.plugins.folder.computed.ComputedFolder<MultiBranchProject<?,?>>
    • isHasEvents

      public boolean isHasEvents()
      Overrides:
      isHasEvents in class com.cloudbees.hudson.plugins.folder.computed.ComputedFolder<MultiBranchProject<?,?>>
    • isBuildable

      public boolean isBuildable()
      Overrides:
      isBuildable in class com.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 class com.cloudbees.hudson.plugins.folder.computed.ComputedFolder<MultiBranchProject<?,?>>
      Throws:
      IOException
      InterruptedException
    • newFolderViewHolder

      protected com.cloudbees.hudson.plugins.folder.views.AbstractFolderViewHolder newFolderViewHolder()
      Overrides:
      newFolderViewHolder in class com.cloudbees.hudson.plugins.folder.AbstractFolder<MultiBranchProject<?,?>>
    • newDefaultFolderIcon

      protected com.cloudbees.hudson.plugins.folder.FolderIcon newDefaultFolderIcon()
      Overrides:
      newDefaultFolderIcon in class com.cloudbees.hudson.plugins.folder.AbstractFolder<MultiBranchProject<?,?>>
    • getIconClassName

      public String getIconClassName()
      Specified by:
      getIconClassName in interface IconSpec
    • getSourcePronoun

      public String getSourcePronoun()
      Get the term used in the UI to represent the source for this kind of Item. 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 interface jenkins.scm.api.SCMSourceOwner
    • getSCMSource

      public jenkins.scm.api.SCMSource getSCMSource(String sourceId)
      Specified by:
      getSCMSource in interface jenkins.scm.api.SCMSourceOwner
    • onSCMSourceUpdated

      public void onSCMSourceUpdated(@NonNull jenkins.scm.api.SCMSource source)
      Specified by:
      onSCMSourceUpdated in interface jenkins.scm.api.SCMSourceOwner
    • getSCMSourceCriteria

      public jenkins.scm.api.SCMSourceCriteria getSCMSourceCriteria(@NonNull jenkins.scm.api.SCMSource source)
      Specified by:
      getSCMSourceCriteria in interface jenkins.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 interface ViewGroup
      Overrides:
      getPrimaryView in class com.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 interface ViewGroup
      Overrides:
      getView in class com.cloudbees.hudson.plugins.folder.AbstractFolder<MultiBranchProject<?,?>>
    • getDescription

      public String getDescription()
      Overrides:
      getDescription in class AbstractItem
    • getDisplayName

      public String getDisplayName()
      Specified by:
      getDisplayName in interface Item
      Specified by:
      getDisplayName in interface ModelObject
      Specified by:
      getDisplayName in interface ResourceActivity
      Overrides:
      getDisplayName in class AbstractItem
    • getACL

      @NonNull public ACL getACL()
      Specified by:
      getACL in interface AccessControlled
      Overrides:
      getACL in class AbstractItem