/** * Creates a GitLab group folder manager for customized folder creation. * * @param itemGroup the item group * @param folderDescriptor the folder descriptor */ /* package */ GroupFolderManager( ModifiableTopLevelItemGroup itemGroup, TopLevelItemDescriptor folderDescriptor) { // include all groups this(null, itemGroup, folderDescriptor); }
/** * Creates a GitLab group folder manager for customized folder creation. * * @param managesGroupPredicate predicate to determine whether to manage a group. * @param itemGroup the item group * @param folderDescriptor the folder descriptor */ /* package */ GroupFolderManager( ManagesGroupPredicate managesGroupPredicate, ModifiableTopLevelItemGroup itemGroup, TopLevelItemDescriptor folderDescriptor) { this.managesGroupPredicate = managesGroupPredicate; this.itemGroup = itemGroup; this.folderDescriptor = folderDescriptor; }
@Override public TopLevelItemDescriptor getDescriptor() { return ExtensionList.lookup(TopLevelItemDescriptor.class).get(DescriptorImpl.class); }
/** * Gets the descriptor of {@link com.cloudbees.hudson.plugins.folder.Folder} * * @return the descriptor or null if Jenkins can't be accessed */ private static TopLevelItemDescriptor getFolderDescriptor() { Jenkins jenkins = getJenkinsInstance(); return jenkins != null ? jenkins.getDescriptorByType(Folder.DescriptorImpl.class) : null; }
public FolderSynchronizerImplementation( ModifiableTopLevelItemGroup itemGroup, TopLevelItemDescriptor folderDescriptor) { super(itemGroup, folderDescriptor); }
@Override public TopLevelItemDescriptor getDescriptor() { return (DescriptorImpl) Hudson.getInstance().getDescriptorOrDie(getClass()); }
public DynamicProject createProject(final Class<DynamicProject> type, final String projectName) throws IOException { return type.cast(createProject((TopLevelItemDescriptor) Hudson.getInstance().getDescriptor(type), projectName)); }
public TopLevelItem createProject(final TopLevelItemDescriptor type, final String name) throws IOException { return createProject(type, name, true); }
public TopLevelItem createProject(final TopLevelItemDescriptor type, final String name, final boolean notify) throws IOException { return this.mixin.createProject(type, name, notify); }
@Override public TopLevelItemDescriptor getDescriptor() { // TODO Auto-generated method stub return null; }
/** * Creates a group folder synchronizer with a custom item group and folder descriptor. * * This is used by tests not using an actual Jenkins item group and folder descriptor. * * @param itemGroup the item group to create folders in * @param folderDescriptor the descriptor for folder items */ protected GroupFolderSynchronizer(ModifiableTopLevelItemGroup itemGroup, TopLevelItemDescriptor folderDescriptor) { this.folderManager = new GroupFolderManager(this, itemGroup, folderDescriptor); }
/** * Gets the descriptor of {@link Folder} * * @return the descriptor */ private static TopLevelItemDescriptor getFolderDescriptor() { return getJenkinsInstance().getDescriptorByType(Folder.DescriptorImpl.class); }