hudson.model.ManagementLink Java Examples

The following examples show how to use hudson.model.ManagementLink. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RootElementConfigurator.java    From configuration-as-code-plugin with MIT License 6 votes vote down vote up
static List<RootElementConfigurator> all() {
    final Jenkins jenkins = Jenkins.get();
    List<RootElementConfigurator> configurators = new ArrayList<>(
        jenkins.getExtensionList(RootElementConfigurator.class));

    for (GlobalConfigurationCategory category : GlobalConfigurationCategory.all()) {
        configurators.add(new GlobalConfigurationCategoryConfigurator(category));
    }

    for (ManagementLink link : ManagementLink.all()) {
        final String name = link.getUrlName();
        final Descriptor descriptor = Jenkins.get().getDescriptor(name);
        if (descriptor != null)
            configurators.add(new DescriptorConfigurator(descriptor));
    }

    configurators.sort(Configurator.extensionOrdinalSort());

    return configurators;
}
 
Example #2
Source File: DockerManagement.java    From docker-plugin with MIT License 4 votes vote down vote up
public static DockerManagement get() {
    return ManagementLink.all().get(DockerManagement.class);
}