/** * Sets the custom quiet period of this project, or revert to the global default if null is given. */ public void setQuietPeriod(Integer seconds) throws IOException { this.quietPeriod = seconds; save(); }
public void setScmCheckoutStrategy(SCMCheckoutStrategy scmCheckoutStrategy) throws IOException { this.scmCheckoutStrategy = scmCheckoutStrategy; save(); }
public void setScm(SCM scm) throws IOException { this.scm = scm; save(); }
public void setConcurrentBuild(boolean b) throws IOException { concurrentBuild = b; save(); }
public void setBlockBuildWhenDownstreamBuilding(boolean b) throws IOException { blockBuildWhenDownstreamBuilding = b; save(); }
public void setBlockBuildWhenUpstreamBuilding(boolean b) throws IOException { blockBuildWhenUpstreamBuilding = b; save(); }
/** * Overwrites the JDK setting. */ public void setJDK(JDK jdk) throws IOException { this.jdk = jdk.getName(); save(); }
/** * User-specified workspace directory, or null if it's up to Jenkins. * * <p> * Normally a project uses the workspace location assigned by its parent container, * but sometimes people have builds that have hard-coded paths. * * <p> * This is not {@link File} because it may have to hold a path representation on another OS. * * <p> * If this path is relative, it's resolved against {@link Node#getRootPath()} on the node where this workspace * is prepared. * * @since 1.410 */ public void setCustomWorkspace(String customWorkspace) throws IOException { this.customWorkspace= Util.fixEmptyAndTrim(customWorkspace); save(); }
protected final synchronized <T extends Describable<T>> void removeFromList(Descriptor<T> item, List<T> collection) throws IOException { final Iterator<T> iCollection = collection.iterator(); while(iCollection.hasNext()) { final T next = iCollection.next(); if(next.getDescriptor()==item) { // found it iCollection.remove(); save(); updateTransientActions(); return; } } }
protected final synchronized <T extends Describable<T>> void addToList( T item, List<T> collection ) throws IOException { //No support to replace item in position, remove then add removeFromList(item.getDescriptor(), collection); collection.add(item); save(); updateTransientActions(); }
/** * Sets the assigned label. */ public void setAssignedLabel(Label l) throws IOException { if(l==null) { canRoam = true; assignedNode = null; } else { canRoam = false; if(l== Jenkins.getInstance().getSelfLabel()) assignedNode = null; else assignedNode = l.getExpression(); } save(); }
/** * Sets the custom quiet period of this project, or revert to the global default if null is given. */ public void setQuietPeriod(Integer seconds) throws IOException { this.quietPeriod = seconds; save(); }
/** * Overwrites the JDK setting. */ public void setJDK(JDK jdk) throws IOException { this.jdk = jdk.getName(); save(); }
/** * Overwrites the JDK setting. */ public void setJDK(JDK jdk) throws IOException { setJDK(jdk.getName()); save(); }
public void startWatching() throws IOException { User user = User.current(); if(user != null) { getJobProperty().addWatcher(user); project.save(); } }
public void stopWatching() throws IOException { User user = User.current(); if (user != null) { getJobProperty().removeWatcher(user); project.save(); } }
@SuppressWarnings("unchecked") public void removeTrigger(TriggerDescriptor trigger) throws IOException { CascadingUtil.getTriggerProjectProperty(this, trigger.getJsonSafeClassName()).setValue(null); save(); updateTransientActions(); }
@SuppressWarnings("unchecked") public void removeTrigger(TriggerDescriptor trigger) throws IOException { CascadingUtil.getTriggerProjectProperty(this, trigger.getJsonSafeClassName()).setValue(null); save(); updateTransientActions(); }