private static List<S3CopyArtifact> getCopiers(AbstractProject project) { DescribableList<Builder,Descriptor<Builder>> list = project instanceof Project ? ((Project<?,?>)project).getBuildersList() : (project instanceof MatrixProject ? ((MatrixProject)project).getBuildersList() : null); if (list == null) return Collections.emptyList(); return (List<S3CopyArtifact>)list.getAll(S3CopyArtifact.class); } }
private static List<CopyArtifact> getCopyArtifactsInProject(AbstractProject<?,?> project) throws IOException { DescribableList<Builder,Descriptor<Builder>> list = project instanceof Project ? ((Project<?,?>)project).getBuildersList() : (project instanceof MatrixProject ? ((MatrixProject)project).getBuildersList() : null); if (list == null) return Collections.emptyList(); return list.getAll(CopyArtifact.class); }
/** * Historical synonym for {@link #canAdd}. * * @param tid the potential child item. * @return {@code true} if it can be added. */ public boolean isAllowedChild(TopLevelItem tid) { for (FolderProperty<?> p : getProperties().getAll(FolderProperty.class)) { if (!p.allowsParentToHave(tid)) { return false; } } return true; }
public List<BuildConfigurationDTO> getBuilderConfigurations(final String projectName) { checkNotNull(projectName); log.debug("Fetching builder configs: {}", projectName); MetaProject project = new MetaProject(projects.getProject(projectName)); project.checkPermission(Item.CONFIGURE); List<MavenBuilder> builders = project.getBuildersList().getAll(MavenBuilder.class); List<BuildConfigurationDTO> configs = Lists.newArrayListWithCapacity(builders.size()); for (MavenBuilder builder : builders) { configs.add(builder.getConfig()); } return configs; }
/** * Historical synonym for {@link #canAdd}. * * @param tid the potential child item. * @return {@code true} if it can be added. */ public boolean isAllowedChild(TopLevelItem tid) { for (FolderProperty<?> p : getProperties().getAll(FolderProperty.class)) { if (!p.allowsParentToHave(tid)) { return false; } } return true; }
@Deprecated protected List<Action> createTransientActions() { Vector<Action> ta = new Vector<Action>(); for (TransientFolderActionFactory tpaf : TransientFolderActionFactory.all()) { ta.addAll(Util.fixNull(tpaf.createFor(this))); // be defensive against null } for (FolderProperty<?> p: getProperties().getAll(FolderProperty.class)) { ta.addAll(Util.fixNull(p.getFolderActions())); } return ta; }
@SuppressWarnings("deprecation") protected List<Action> createTransientActions() { Vector<Action> ta = new Vector<Action>(); for (TransientFolderActionFactory tpaf : TransientFolderActionFactory.all()) { ta.addAll(Util.fixNull(tpaf.createFor(this))); // be defensive against null } for (FolderProperty<?> p: getProperties().getAll(FolderProperty.class)) { ta.addAll(Util.fixNull(p.getFolderActions())); } return ta; }
private void copyParentBuildWrappers(IvyModuleSet parent) { if(!parent.isAggregatorStyleBuild()) { List<BuildWrapper> parentWrappers = parent.getBuildWrappersList().getAll(BuildWrapper.class); for (BuildWrapper buildWrapper : parentWrappers) { try { IvyClonerWrapper cloner = new IvyClonerWrapper(); cloner.dontClone(Descriptor.class); getBuildWrappersList().add(cloner.deepClone(buildWrapper)); } catch(IOException e) { throw new RuntimeException("Could not copy build wrappers", e); } } } }
private void copyParentBuildWrappers(IvyModuleSet parent) { if(!parent.isAggregatorStyleBuild()) { List<BuildWrapper> parentWrappers = parent.getBuildWrappersList().getAll(BuildWrapper.class); for (BuildWrapper buildWrapper : parentWrappers) { try { IvyClonerWrapper cloner = new IvyClonerWrapper(); cloner.dontClone(Descriptor.class); getBuildWrappersList().add(cloner.deepClone(buildWrapper)); } catch(IOException e) { throw new RuntimeException("Could not copy build wrappers", e); } } } }
private void copyParentBuildWrappers(IvyModuleSet parent) { if(!parent.isAggregatorStyleBuild()) { List<BuildWrapper> parentWrappers = parent.getBuildWrappersList().getAll(BuildWrapper.class); for (BuildWrapper buildWrapper : parentWrappers) { try { IvyClonerWrapper cloner = new IvyClonerWrapper(); cloner.dontClone(Descriptor.class); getBuildWrappersList().add(cloner.deepClone(buildWrapper)); } catch(IOException e) { throw new RuntimeException("Could not copy build wrappers", e); } } } }
/** * Returns true if the specified descriptor type is allowed for this container. * * @param tid the type of child item. * @return {@code true} if it can be added. */ public boolean isAllowedChildDescriptor(TopLevelItemDescriptor tid) { for (FolderProperty<?> p : getProperties().getAll(FolderProperty.class)) { if (!p.allowsParentToCreate(tid)) { return false; } } if (!getACL().hasCreatePermission(Jenkins.getAuthentication(), this, tid)) { return false; } return tid.isApplicableIn(this); }
/** * Returns true if the specified descriptor type is allowed for this container. * * @param tid the type of child item. * @return {@code true} if it can be added. */ public boolean isAllowedChildDescriptor(TopLevelItemDescriptor tid) { for (FolderProperty<?> p : getProperties().getAll(FolderProperty.class)) { if (!p.allowsParentToCreate(tid)) { return false; } } if (!getACL().hasCreatePermission(Jenkins.getAuthentication(), this, tid)) { return false; } return tid.isApplicableIn(this); }
List<BuildTrigger> existingList = pl.getAll(BuildTrigger.class); BuildTrigger existing; switch (existingList.size()) {
List<BuildTrigger> existingList = pl.getAll(BuildTrigger.class); BuildTrigger existing; switch (existingList.size()) {
List<BuildTrigger> existingList = pl.getAll(BuildTrigger.class); BuildTrigger existing; switch (existingList.size()) {
List<BuildTrigger> existingList = pl.getAll(BuildTrigger.class); BuildTrigger existing; switch (existingList.size()) {
.getAll(EnvironmentVariablesNodeProperty.class); if (envVarsNodePropertyList != null && envVarsNodePropertyList.size() != 0) { globalVars = envVarsNodePropertyList.get(0).getEnvVars();