@Override public synchronized void save() throws IOException { super.save(); updateTransientActions(); }
@Override public void addProperty(JobProperty<? super P> jobProp) throws IOException { super.addProperty(jobProp); updateTransientActions(); }
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(); }
@Override public void onCreatedFromScratch() { super.onCreatedFromScratch(); buildMixIn.onCreatedFromScratch(); builds = buildMixIn.getRunMap(); // solicit initial contributions, especially from TransientProjectActionFactory updateTransientActions(); }
@Override @RequirePOST public void doConfigSubmit( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException, FormException { super.doConfigSubmit(req,rsp); updateTransientActions(); // notify the queue as the project might be now tied to different node Jenkins.getInstance().getQueue().scheduleMaintenance(); // this is to reflect the upstream build adjustments done above Jenkins.getInstance().rebuildDependencyGraphAsync(); }
@Override public void onLoad(ItemGroup<? extends Item> parent, String name) throws IOException { super.onLoad(parent, name); if (buildMixIn == null) { buildMixIn = createBuildMixIn(); } buildMixIn.onLoad(parent, name); builds = buildMixIn.getRunMap(); triggers().setOwner(this); for (Trigger t : triggers()) { try { t.start(this, Items.currentlyUpdatingByXml()); } catch (Throwable e) { LOGGER.log(Level.WARNING, "could not start trigger while loading project '" + getFullName() + "'", e); } } if(scm==null) scm = new NullSCM(); // perhaps it was pointing to a plugin that no longer exists. if(transientActions==null) transientActions = new Vector<Action>(); // happens when loaded from disk updateTransientActions(); }
@Override public synchronized void save() throws IOException { super.save(); updateTransientActions(); }
@Override public void addProperty(JobProperty<? super P> jobProp) throws IOException { super.addProperty(jobProp); updateTransientActions(); }
@Override public void addProperty(JobProperty<? super P> jobProp) throws IOException { super.addProperty(jobProp); updateTransientActions(); }
protected final synchronized <T extends Describable<T>> void removeFromList(Descriptor<T> item, List<T> collection) throws IOException { for (int i = 0; i < collection.size(); i++) { if (collection.get(i).getDescriptor() == item) { // found it collection.remove(i); 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(); }
@Override public void onCreatedFromScratch() { super.onCreatedFromScratch(); buildMixIn.onCreatedFromScratch(); builds = buildMixIn.getRunMap(); // solicit initial contributions, especially from TransientProjectActionFactory updateTransientActions(); }
@Override protected void updateTransientActions(){ super.updateTransientActions(); if(getActiveConfigurations() !=null){ // update all transient actions in configurations too. for(MatrixConfiguration configuration: getActiveConfigurations()){ configuration.updateTransientActions(); } } }
@Override public void onCreatedFromScratch() { super.onCreatedFromScratch(); // solicit initial contributions, especially from TransientProjectActionFactory updateTransientActions(); setCreationTime(new GregorianCalendar().getTimeInMillis()); User user = User.current(); if (user != null) { setCreatedBy(user.getId()); grantProjectMatrixPermissions(user); } }
@Override public void onCreatedFromScratch() { super.onCreatedFromScratch(); // solicit initial contributions, especially from TransientProjectActionFactory updateTransientActions(); setCreationTime(new GregorianCalendar().getTimeInMillis()); User user = User.current(); if (user != null){ setCreatedBy(user.getId()); grantProjectMatrixPermissions(user); } }
@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(); }
/** * Adds a new {@link Trigger} to this {@link Project} if not active yet. */ @SuppressWarnings("unchecked") public void addTrigger(Trigger<?> trigger) throws IOException { CascadingUtil.getTriggerProjectProperty(this, trigger.getDescriptor().getJsonSafeClassName()).setValue(trigger); save(); updateTransientActions(); }
@Override @RequirePOST public void doConfigSubmit( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException, FormException { super.doConfigSubmit(req,rsp); updateTransientActions(); // notify the queue as the project might be now tied to different node Jenkins.getInstance().getQueue().scheduleMaintenance(); // this is to reflect the upstream build adjustments done above Jenkins.getInstance().rebuildDependencyGraphAsync(); }