Refine search
@Override protected boolean isOptional(Extension annotation) { return annotation.optional(); }
@Override protected double getOrdinal(Extension annotation) { return annotation.ordinal(); }
@Extension public static class ListenForInstallComplete extends InstallStateFilter { @Override public InstallState getNextInstallState(InstallState current, Provider<InstallState> proceed) { InstallState next = proceed.get(); if (InstallState.INITIAL_SETUP_COMPLETED.equals(current)) { UpgradeWizard.get().isUpToDate = true; } return next; } }
@Extension public static final class AdministrativeMonitorImpl extends AdministrativeMonitor { @Override public String getDisplayName() { return Messages.SCMTrigger_AdministrativeMonitorImpl_DisplayName(); } private boolean on; public boolean isActivated() { return on; } }
@Extension public static class ConditionallyHidden extends DescriptorVisibilityFilter { @SuppressWarnings("rawtypes") @Override public boolean filter(Object context, Descriptor descriptor) { if (descriptor instanceof DescriptorImpl && context instanceof Job) { return ((Job) context).supportsLogRotator(); } return true; } }
public ExtensionComponent(T instance, Extension annotation) { this(instance,annotation.ordinal()); }
private Level logLevel(IndexItem<Extension, Object> item) { return item.annotation().optional() ? Level.FINE : Level.WARNING; } }
/** * Whitelist rule based on system properties. * * For the bypass "kill" switch to be effective, it needs to have a high enough priority */ @Extension(ordinal=100) public static class DefaultWhitelist extends CallableWhitelist { @Override public boolean isWhitelisted(RoleSensitive subject, Collection<Role> expected, Object context) { return BYPASS; } }
@Extension(ordinal = 10) public static class DescriptorImpl extends GlobalSettingsProviderDescriptor { @Override public String getDisplayName() { return Messages.FilePathGlobalSettingsProvider_DisplayName(); } } }
@Extension(ordinal = 100) public static class ProviderImpl extends QueueItemAuthenticatorProvider { @Nonnull @Override public List<QueueItemAuthenticator> getAuthenticators() { return get().getAuthenticators(); } } }
/** * The default executors widget. * * A plugin may remove this from {@link Jenkins#getWidgets()} and swap in their own. * * @author Kohsuke Kawaguchi * @since 1.514 */ @Extension(ordinal=100) @Symbol("executors") // historically this was above normal widgets and below BuildQueueWidget public class ExecutorsWidget extends Widget { }
/** * In case there are no other implementations we will fallback to this implementation. * * To make sure that we load this extension last (or at least very late) we use a negative ordinal. * This allows custom implementation to be "first" */ @Extension(ordinal=-9999) public class DefaultSimplePageDecorator extends SimplePageDecorator { }
@Extension @Symbol("standard") public static final class DescriptorImpl extends ProjectNamingStrategyDescriptor { @Override public String getDisplayName() { return Messages.DefaultProjectNamingStrategy_DisplayName(); } @Override public String getHelpFile() { return "/help/system-config/defaultJobNamingStrategy.html"; } } }
/** * Default pinger - use Java built-in functionality. This doesn't always work, * a host may be reachable even if this returns false. */ @Extension public static class BuiltInComputerPinger extends ComputerPinger { @Override public boolean isReachable(InetAddress ia, int timeout) throws IOException { return ia.isReachable(timeout * 1000); } }