[FIXED JENKINS-36280] Enable DescriptorVisibilityFilter for Slave's ComputerLauncher, RetentionStrategy and NodeProperty

This commit is contained in:
Stephen Connolly committed 2016-06-28 17:07:00 +01:00
1 parent 533156c7c4
commit 53adb022e4
7 files changed
+170 -19

No files matched your search

+23
View File
@@ -25,6 +25,7 @@
*/
package hudson;
import hudson.model.Slave;
import jenkins.util.SystemProperties;
import hudson.cli.CLICommand;
import hudson.console.ConsoleAnnotationDescriptor;
@@ -158,6 +159,7 @@ import java.util.concurrent.atomic.AtomicLong;
import javax.annotation.CheckForNull;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.NoExternalUse;
import org.kohsuke.accmod.restrictions.DoNotUse;
/**
* Utility functions used in views.
@@ -889,10 +891,24 @@ public class Functions {
return SCM._for(project);
}
/**
* @since 2.12
* @deprecated replaced by {@link Slave.SlaveDescriptor#computerLauncherDescriptors(Slave)}
*/
@Deprecated
@Restricted(DoNotUse.class)
@RestrictedSince("2.12")
public static List<Descriptor<ComputerLauncher>> getComputerLauncherDescriptors() {
return Jenkins.getInstance().<ComputerLauncher,Descriptor<ComputerLauncher>>getDescriptorList(ComputerLauncher.class);
}
/**
* @since 2.12
* @deprecated replaced by {@link Slave.SlaveDescriptor#retentionStrategyDescriptors(Slave)}
*/
@Deprecated
@Restricted(DoNotUse.class)
@RestrictedSince("2.12")
public static List<Descriptor<RetentionStrategy<?>>> getRetentionStrategyDescriptors() {
return RetentionStrategy.all();
}
@@ -913,6 +929,13 @@ public class Functions {
return MyViewsTabBar.all();
}
/**
* @deprecated replaced by {@link Slave.SlaveDescriptor#nodePropertyDescriptors(Slave)}
* @since 2.12
*/
@Deprecated
@Restricted(DoNotUse.class)
@RestrictedSince("2.12")
public static List<NodePropertyDescriptor> getNodePropertyDescriptors(Class<? extends Node> clazz) {
List<NodePropertyDescriptor> result = new ArrayList<NodePropertyDescriptor>();
Collection<NodePropertyDescriptor> list = (Collection) Jenkins.getInstance().getDescriptorList(NodeProperty.class);