@Override public Void apply(ItemListener l) { l.onDeleted(item); return null; } });
@Override public Void apply(ItemListener l) { l.onLocationChanged(rootItem, oldFullName, newFullName); return null; } });
public static void firePollingFailed( AbstractProject<?, ?> project, TaskListener listener, Throwable exception ) { for( SCMPollListener l : all() ) { try { l.onPollingFailed(project, listener, exception); } catch (Exception e) { /* Make sure, that the listeners do not have any impact on the actual poll */ } } }
public void save() throws IOException { getConfigFile().write(monitors); SaveableListener.fireOnChange(this, getConfigFile()); } };
@Override public Void apply(ItemListener l) { l.onCreated(item); return null; } });
/** * Fires the {@link #onInitialize(Run)} event. */ public static void fireInitialize(Run r) { for (RunListener l : all()) { if(l.targetType.isInstance(r)) try { l.onInitialize(r); } catch (Throwable e) { report(e); } } }
@Override public Void apply(ItemListener l) { l.onCopied(src, result); return null; } });
@Override public Void apply(ItemListener l) { l.onRenamed(rootItem, oldName, newName); return null; } });
/** * Sets the project description HTML. */ public void setDescription(String description) throws IOException { this.description = description; save(); ItemListener.fireOnUpdated(this); }
/** * Reverse operation of {@link #register()}. */ public void unregister() { all().remove(this); }
/** * Reverse operation of {@link #register()}. */ public void unregister() { all().remove(this); }
@Override public Void apply(ItemListener l) { l.onUpdated(item); return null; } });
public static void fireBeforePolling( AbstractProject<?, ?> project, TaskListener listener ) { for (SCMPollListener l : all()) { try { l.onBeforePolling(project, listener); } catch (Exception e) { /* Make sure, that the listeners do not have any impact on the actual poll */ } } }
public static void firePollingSuccess( AbstractProject<?, ?> project, TaskListener listener, PollingResult result ) { for( SCMPollListener l : all() ) { try { l.onPollingSuccess(project, listener, result); } catch (Exception e) { /* Make sure, that the listeners do not have any impact on the actual poll */ } } }
public static void fireOnCopied(final Item src, final Item result) { forAll(new Function<ItemListener,Void>() { @Override public Void apply(ItemListener l) { l.onCopied(src, result); return null; } }); }
/** * Called after a new job is created by copying from an existing job. * * For backward compatibility, the default implementation of this method calls {@link #onCreated(Item)}. * If you choose to handle this method, think about whether you want to call super.onCopied or not. * * * @param src * The source item that the new one was copied from. Never null. * @param item * The newly created item. Never null. * * @since 1.325 * Before this version, a copy triggered {@link #onCreated(Item)}. */ public void onCopied(Item src, Item item) { onCreated(item); }
@Override public Void apply(ItemListener l) { l.onLocationChanged(child, childOld, childNew); return null; } });
public static void fireOnUpdated(final Item item) { forAll(new Function<ItemListener,Void>() { @Override public Void apply(ItemListener l) { l.onUpdated(item); return null; } }); }
/** @since 1.548 */ public static void fireOnDeleted(final Item item) { forAll(new Function<ItemListener,Void>() { @Override public Void apply(ItemListener l) { l.onDeleted(item); return null; } }); }
public static void fireOnCreated(final Item item) { forAll(new Function<ItemListener,Void>() { @Override public Void apply(ItemListener l) { l.onCreated(item); return null; } }); }