@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(); }
/** * {@inheritDoc} */ @Override protected final void init() { super.init(); if (orphanedItemStrategy == null) { orphanedItemStrategy = new DefaultOrphanedItemStrategy(true, "", ""); } if (triggers == null) { triggers = new DescribableList<Trigger<?>,TriggerDescriptor>(this); } else { triggers.setOwner(this); } for (Trigger t : triggers) { t.start(this, Items.currentlyUpdatingByXml()); } synchronized (this) { computation = createComputation(null); } currentObservationsLock = new ReentrantLock(); currentObservationsChanged = currentObservationsLock.newCondition(); currentObservations = new HashSet<>(); }
/** * {@inheritDoc} */ @Override protected void init() { super.init(); if (orphanedItemStrategy == null) { orphanedItemStrategy = new DefaultOrphanedItemStrategy(true, "", ""); } if (triggers == null) { triggers = new DescribableList<Trigger<?>,TriggerDescriptor>(this); } else { triggers.setOwner(this); } for (Trigger t : triggers) { t.start(this, Items.currentlyUpdatingByXml()); } synchronized (this) { computation = createComputation(null); } currentObservationsLock = new ReentrantLock(); currentObservationsChanged = currentObservationsLock.newCondition(); currentObservations = new HashSet<>(); }
@Override public void addProperty(JobProperty jobProp) throws IOException { super.addProperty(jobProp); getTriggersJobProperty().stopTriggers(); getTriggersJobProperty().startTriggers(Items.currentlyUpdatingByXml()); }
@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 void onLoad(ItemGroup<? extends Item> parent, String name) throws IOException { super.onLoad(parent, name); if (buildMixIn == null) { buildMixIn = createBuildMixIn(); } buildMixIn.onLoad(parent, name); if (triggers != null && !triggers.isEmpty()) { setTriggers(triggers.toList()); } if (concurrentBuild != null) { setConcurrentBuild(concurrentBuild); } getTriggersJobProperty().stopTriggers(); getTriggersJobProperty().startTriggers(Items.currentlyUpdatingByXml()); }