提交 fd42e33d 编写于 作者: O Oleg Nenashev

Merge pull request #1661 from deadmoose/deprecated_annotations

Add @Deprecated annotations to things documented as @deprecated.
......@@ -97,6 +97,7 @@ public class CLI {
* @deprecated
* Use {@link CLIConnectionFactory} to create {@link CLI}
*/
@Deprecated
public CLI(URL jenkins, ExecutorService exec) throws IOException, InterruptedException {
this(jenkins,exec,null);
}
......@@ -105,6 +106,7 @@ public class CLI {
* @deprecated
* Use {@link CLIConnectionFactory} to create {@link CLI}
*/
@Deprecated
public CLI(URL jenkins, ExecutorService exec, String httpsProxyTunnel) throws IOException, InterruptedException {
this(new CLIConnectionFactory().url(jenkins).executorService(exec).httpsProxyTunnel(httpsProxyTunnel));
}
......
......@@ -81,6 +81,7 @@ public class DescriptorExtensionList<T extends Describable<T>, D extends Descrip
* @deprecated as of 1.416
* Use {@link #create(Jenkins, Class)}
*/
@Deprecated
public static <T extends Describable<T>,D extends Descriptor<T>>
DescriptorExtensionList<T,D> createDescriptorList(Hudson hudson, Class<T> describableType) {
return (DescriptorExtensionList)createDescriptorList((Jenkins)hudson,describableType);
......@@ -95,6 +96,7 @@ public class DescriptorExtensionList<T extends Describable<T>, D extends Descrip
* @deprecated as of 1.416
* Use {@link #DescriptorExtensionList(Jenkins, Class)}
*/
@Deprecated
protected DescriptorExtensionList(Hudson hudson, Class<T> describableType) {
this((Jenkins)hudson,describableType);
}
......
......@@ -85,6 +85,7 @@ public abstract class ExtensionFinder implements ExtensionPoint {
* Use and implement {@link #find(Class,Hudson)} that allows us to put some metadata.
*/
@Restricted(NoExternalUse.class)
@Deprecated
public <T> Collection<T> findExtensions(Class<T> type, Hudson hudson) {
return Collections.emptyList();
}
......
......@@ -73,6 +73,7 @@ public class ExtensionList<T> extends AbstractList<T> {
* @deprecated as of 1.417
* Use {@link #jenkins}
*/
@Deprecated
public final Hudson hudson;
public final @CheckForNull Jenkins jenkins;
public final Class<T> extensionType;
......@@ -93,6 +94,7 @@ public class ExtensionList<T> extends AbstractList<T> {
* @deprecated as of 1.416
* Use {@link #ExtensionList(Jenkins, Class)}
*/
@Deprecated
protected ExtensionList(Hudson hudson, Class<T> extensionType) {
this((Jenkins)hudson,extensionType);
}
......@@ -105,6 +107,7 @@ public class ExtensionList<T> extends AbstractList<T> {
* @deprecated as of 1.416
* Use {@link #ExtensionList(Jenkins, Class, CopyOnWriteArrayList)}
*/
@Deprecated
protected ExtensionList(Hudson hudson, Class<T> extensionType, CopyOnWriteArrayList<ExtensionComponent<T>> legacyStore) {
this((Jenkins)hudson,extensionType,legacyStore);
}
......@@ -214,6 +217,7 @@ public class ExtensionList<T> extends AbstractList<T> {
* Prefer automatic registration.
*/
@Override
@Deprecated
public synchronized boolean add(T t) {
legacyInstances.add(new ExtensionComponent<T>(t));
// if we've already filled extensions, add it
......@@ -325,6 +329,7 @@ public class ExtensionList<T> extends AbstractList<T> {
* @deprecated as of 1.416
* Use {@link #create(Jenkins, Class)}
*/
@Deprecated
public static <T> ExtensionList<T> create(Hudson hudson, Class<T> type) {
return create((Jenkins)hudson,type);
}
......
......@@ -367,6 +367,7 @@ public final class FilePath implements Serializable {
*
* @deprecated as of 1.315. Use {@link #zip(OutputStream)} that has more consistent name.
*/
@Deprecated
public void createZipArchive(OutputStream os) throws IOException, InterruptedException {
zip(os);
}
......@@ -411,6 +412,7 @@ public final class FilePath implements Serializable {
* @deprecated as of 1.315
* Use {@link #zip(OutputStream,String)} that has more consistent name.
*/
@Deprecated
public void createZipArchive(OutputStream os, final String glob) throws IOException, InterruptedException {
archive(ArchiverFactory.ZIP,os,glob);
}
......@@ -2337,6 +2339,7 @@ public final class FilePath implements Serializable {
* @see #validateFileMask(FilePath, String)
* @deprecated use {@link #validateAntFileMask(String, int)} instead
*/
@Deprecated
public String validateAntFileMask(final String fileMasks) throws IOException, InterruptedException {
return validateAntFileMask(fileMasks, Integer.MAX_VALUE);
}
......
......@@ -204,6 +204,7 @@ public abstract class FileSystemProvisioner implements ExtensionPoint, Describab
/**
* @deprecated as of 1.350
*/
@Deprecated
public WorkspaceSnapshot snapshot(AbstractBuild<?, ?> build, FilePath ws, TaskListener listener) throws IOException, InterruptedException {
return snapshot(build, ws, "**/*", listener);
}
......
......@@ -438,6 +438,7 @@ public class Functions {
* JEXL now supports the real ternary operator "x?y:z", so this work around
* is no longer necessary.
*/
@Deprecated
public static Object ifThenElse(boolean cond, Object thenValue, Object elseValue) {
return cond ? thenValue : elseValue;
}
......@@ -1573,6 +1574,7 @@ public class Functions {
* @deprecated
* Use {@link #calcCheckUrl}
*/
@Deprecated
public String getCheckUrl(String userDefined, Object descriptor, String field) {
if(userDefined!=null || field==null) return userDefined;
if (descriptor instanceof Descriptor) {
......@@ -1823,6 +1825,7 @@ public class Functions {
* @deprecated as of 1.451
* Use {@link #getAvatar}
*/
@Deprecated
public String getUserAvatar(User user, String avatarSize) {
return getAvatar(user,avatarSize);
}
......
......@@ -133,6 +133,7 @@ public abstract class Launcher {
* figure out the current {@link Computer} from within a build, use
* {@link Computer#currentComputer()}
*/
@Deprecated
public Computer getComputer() {
for( Computer c : Jenkins.getInstance().getComputers() )
if(c.getChannel()==channel)
......@@ -412,6 +413,7 @@ public abstract class Launcher {
* @deprecated as of 1.311
* Use {@link #launch()} and its associated builder pattern
*/
@Deprecated
public final Proc launch(String cmd, Map<String,String> env, OutputStream out, FilePath workDir) throws IOException {
return launch(cmd,Util.mapToEnv(env),out,workDir);
}
......@@ -420,6 +422,7 @@ public abstract class Launcher {
* @deprecated as of 1.311
* Use {@link #launch()} and its associated builder pattern
*/
@Deprecated
public final Proc launch(String[] cmd, Map<String, String> env, OutputStream out, FilePath workDir) throws IOException {
return launch(cmd, Util.mapToEnv(env), out, workDir);
}
......@@ -428,6 +431,7 @@ public abstract class Launcher {
* @deprecated as of 1.311
* Use {@link #launch()} and its associated builder pattern
*/
@Deprecated
public final Proc launch(String[] cmd, Map<String, String> env, InputStream in, OutputStream out) throws IOException {
return launch(cmd, Util.mapToEnv(env), in, out);
}
......@@ -449,6 +453,7 @@ public abstract class Launcher {
* @deprecated as of 1.311
* Use {@link #launch()} and its associated builder pattern
*/
@Deprecated
public final Proc launch(String[] cmd, boolean[] mask, Map<String, String> env, OutputStream out, FilePath workDir) throws IOException {
return launch(cmd, mask, Util.mapToEnv(env), out, workDir);
}
......@@ -470,6 +475,7 @@ public abstract class Launcher {
* @deprecated as of 1.311
* Use {@link #launch()} and its associated builder pattern
*/
@Deprecated
public final Proc launch(String[] cmd, boolean[] mask, Map<String, String> env, InputStream in, OutputStream out) throws IOException {
return launch(cmd, mask, Util.mapToEnv(env), in, out);
}
......@@ -478,6 +484,7 @@ public abstract class Launcher {
* @deprecated as of 1.311
* Use {@link #launch()} and its associated builder pattern
*/
@Deprecated
public final Proc launch(String cmd,String[] env,OutputStream out, FilePath workDir) throws IOException {
return launch(Util.tokenize(cmd),env,out,workDir);
}
......@@ -486,6 +493,7 @@ public abstract class Launcher {
* @deprecated as of 1.311
* Use {@link #launch()} and its associated builder pattern
*/
@Deprecated
public final Proc launch(String[] cmd, String[] env, OutputStream out, FilePath workDir) throws IOException {
return launch(cmd, env, null, out, workDir);
}
......@@ -494,6 +502,7 @@ public abstract class Launcher {
* @deprecated as of 1.311
* Use {@link #launch()} and its associated builder pattern
*/
@Deprecated
public final Proc launch(String[] cmd, String[] env, InputStream in, OutputStream out) throws IOException {
return launch(cmd, env, in, out, null);
}
......@@ -515,6 +524,7 @@ public abstract class Launcher {
* @deprecated as of 1.311
* Use {@link #launch()} and its associated builder pattern
*/
@Deprecated
public final Proc launch(String[] cmd, boolean[] mask, String[] env, OutputStream out, FilePath workDir) throws IOException {
return launch(cmd, mask, env, null, out, workDir);
}
......@@ -536,6 +546,7 @@ public abstract class Launcher {
* @deprecated as of 1.311
* Use {@link #launch()} and its associated builder pattern
*/
@Deprecated
public final Proc launch(String[] cmd, boolean[] mask, String[] env, InputStream in, OutputStream out) throws IOException {
return launch(cmd, mask, env, in, out, null);
}
......@@ -554,6 +565,7 @@ public abstract class Launcher {
* @deprecated as of 1.311
* Use {@link #launch()} and its associated builder pattern
*/
@Deprecated
public Proc launch(String[] cmd, String[] env, InputStream in, OutputStream out, FilePath workDir) throws IOException {
return launch(launch().cmds(cmd).envs(env).stdin(in).stdout(out).pwd(workDir));
}
......@@ -576,6 +588,7 @@ public abstract class Launcher {
* @deprecated as of 1.311
* Use {@link #launch()} and its associated builder pattern
*/
@Deprecated
public Proc launch(String[] cmd, boolean[] mask, String[] env, InputStream in, OutputStream out, FilePath workDir) throws IOException {
return launch(launch().cmds(cmd).masks(mask).envs(env).stdin(in).stdout(out).pwd(workDir));
}
......
......@@ -283,6 +283,7 @@ public class MarkupText extends AbstractMarkupText {
* Use {@link #toString(boolean)} to be explicit about the escape mode.
*/
@Override
@Deprecated
public String toString() {
return toString(false);
}
......
......@@ -164,6 +164,7 @@ public abstract class Plugin implements Saveable {
* @since 1.233
* @deprecated as of 1.305 override {@link #configure(StaplerRequest,JSONObject)} instead
*/
@Deprecated
public void configure(JSONObject formData) throws IOException, ServletException, FormException {
}
......
......@@ -151,6 +151,7 @@ public abstract class PluginManager extends AbstractModelObject implements OnMas
* {@link PluginManager} can now live longer than {@link jenkins.model.Jenkins} instance, so
* use {@code Hudson.getInstance().servletContext} instead.
*/
@Deprecated
public final ServletContext context;
/**
......
......@@ -431,6 +431,7 @@ public abstract class Proc {
*
* @deprecated as of 1.399. Replaced by {@link Launcher.RemoteLauncher.ProcImpl}
*/
@Deprecated
public static final class RemoteProc extends Proc {
private final Future<Integer> process;
......
......@@ -165,6 +165,7 @@ public final class ProxyConfiguration extends AbstractDescribableImpl<ProxyConfi
* @deprecated
* Use {@link #createProxy(String)}
*/
@Deprecated
public Proxy createProxy() {
return createProxy(null);
}
......
......@@ -43,6 +43,7 @@ public class StructuredForm {
* @deprecated
* Use {@link StaplerRequest#getSubmittedForm()}. Since 1.238.
*/
@Deprecated
public static JSONObject get(StaplerRequest req) throws ServletException {
return req.getSubmittedForm();
}
......
......@@ -59,6 +59,7 @@ public class UDPBroadcastThread extends Thread {
* @deprecated as of 1.416
* Use {@link #UDPBroadcastThread(Jenkins)}
*/
@Deprecated
public UDPBroadcastThread(Hudson jenkins) throws IOException {
this((Jenkins)jenkins);
}
......
......@@ -774,6 +774,7 @@ public class Util {
* Deprecated since 2009-06-24, remove method after 2009-12-24.
*/
@Nonnull
@Deprecated
public static String combine(long n, @Nonnull String suffix) {
String s = Long.toString(n)+' '+suffix;
if(n!=1)
......@@ -1269,6 +1270,7 @@ public class Util {
* @deprecated as of 1.456
* Use {@link #resolveSymlink(File)}
*/
@Deprecated
public static String resolveSymlink(File link, TaskListener listener) throws InterruptedException, IOException {
return resolveSymlink(link);
}
......
......@@ -48,6 +48,7 @@ public class CliProtocol extends AgentProtocol {
* @deprecated as of 1.559
* Use {@link #Handler(NioChannelHub, Socket)}
*/
@Deprecated
public Handler(Socket socket) {
this(null,socket);
}
......
......@@ -37,6 +37,7 @@ public class CliProtocol2 extends CliProtocol {
* @deprecated as of 1.559
* Use {@link #Handler2(NioChannelHub, Socket)}
*/
@Deprecated
public Handler2(Socket socket) {
super(socket);
}
......
......@@ -413,6 +413,7 @@ public abstract class AbstractBuild<P extends AbstractProject<P,R>,R extends Abs
* @deprecated as of 1.467
* Please use {@link hudson.model.Run.RunExecution}
*/
@Deprecated
public abstract class AbstractRunner extends AbstractBuildExecution {
}
......@@ -691,6 +692,7 @@ public abstract class AbstractBuild<P extends AbstractProject<P,R>,R extends Abs
* @deprecated as of 1.356
* Use {@link #performAllBuildSteps(BuildListener, Map, boolean)}
*/
@Deprecated
protected final void performAllBuildStep(BuildListener listener, Map<?,? extends BuildStep> buildSteps, boolean phase) throws InterruptedException, IOException {
performAllBuildSteps(listener,buildSteps.values(),phase);
}
......@@ -703,6 +705,7 @@ public abstract class AbstractBuild<P extends AbstractProject<P,R>,R extends Abs
* @deprecated as of 1.356
* Use {@link #performAllBuildSteps(BuildListener, Iterable, boolean)}
*/
@Deprecated
protected final void performAllBuildStep(BuildListener listener, Iterable<? extends BuildStep> buildSteps, boolean phase) throws InterruptedException, IOException {
performAllBuildSteps(listener,buildSteps,phase);
}
......@@ -1051,6 +1054,7 @@ public abstract class AbstractBuild<P extends AbstractProject<P,R>,R extends Abs
/**
* @deprecated Use {@link #getAction(Class)} on {@link AbstractTestResultAction}.
*/
@Deprecated
public Action getTestResultAction() {
try {
return getAction(Jenkins.getInstance().getPluginManager().uberClassLoader.loadClass("hudson.tasks.test.AbstractTestResultAction").asSubclass(Action.class));
......@@ -1062,6 +1066,7 @@ public abstract class AbstractBuild<P extends AbstractProject<P,R>,R extends Abs
/**
* @deprecated Use {@link #getAction(Class)} on {@link AggregatedTestResultAction}.
*/
@Deprecated
public Action getAggregatedTestResultAction() {
try {
return getAction(Jenkins.getInstance().getPluginManager().uberClassLoader.loadClass("hudson.tasks.test.AggregatedTestResultAction").asSubclass(Action.class));
......@@ -1340,6 +1345,7 @@ public abstract class AbstractBuild<P extends AbstractProject<P,R>,R extends Abs
* @deprecated as of 1.489
* Use {@link #doStop()}
*/
@Deprecated
public void doStop(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException {
doStop().generateResponse(req,rsp,this);
}
......
......@@ -61,8 +61,9 @@ public abstract class AbstractCIBase extends Node implements ItemGroup<TopLevelI
/**
* @deprecated
* Why are you calling a method that always returns ""?
* You probably want o call {@link Jenkins#getRootUrl()}
* You probably want to call {@link Jenkins#getRootUrl()}
*/
@Deprecated
public String getUrl() {
return "";
}
......
......@@ -621,6 +621,7 @@ public abstract class AbstractItem extends Actionable implements Item, HttpDelet
* @deprecated as of 1.473
* Use {@link #updateByXml(Source)}
*/
@Deprecated
public void updateByXml(StreamSource source) throws IOException {
updateByXml((Source)source);
}
......
......@@ -81,6 +81,7 @@ public abstract class AbstractModelObject implements SearchableModelObject {
* @deprecated
* Use {@link RequirePOST} on your method.
*/
@Deprecated
protected final void requirePOST() throws ServletException {
StaplerRequest req = Stapler.getCurrentRequest();
if (req==null) return; // invoked outside the context of servlet
......
......@@ -505,6 +505,7 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
* If you are calling this method to serve a file from the workspace, doing a form validation, etc., then
* use {@link #getSomeWorkspace()}
*/
@Deprecated
public final FilePath getWorkspace() {
AbstractBuild b = getBuildForDeprecatedMethods();
return b != null ? b.getWorkspace() : null;
......@@ -586,6 +587,7 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
* @deprecated as of 1.319
* See {@link #getWorkspace()} for a migration strategy.
*/
@Deprecated
public FilePath getModuleRoot() {
AbstractBuild b = getBuildForDeprecatedMethods();
return b != null ? b.getModuleRoot() : null;
......@@ -601,6 +603,7 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
* @deprecated as of 1.319
* See {@link #getWorkspace()} for a migration strategy.
*/
@Deprecated
public FilePath[] getModuleRoots() {
AbstractBuild b = getBuildForDeprecatedMethods();
return b != null ? b.getModuleRoots() : null;
......@@ -797,6 +800,7 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
* @deprecated
* Use {@link #scheduleBuild(Cause)}. Since 1.283
*/
@Deprecated
public boolean scheduleBuild() {
return getParameterizedJobMixIn().scheduleBuild();
}
......@@ -805,6 +809,7 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
* @deprecated
* Use {@link #scheduleBuild(int, Cause)}. Since 1.283
*/
@Deprecated
public boolean scheduleBuild(int quietPeriod) {
return getParameterizedJobMixIn().scheduleBuild(quietPeriod);
}
......@@ -1226,6 +1231,7 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
* If you need to lock a workspace while you do some computation, see the source code of
* {@link #pollSCMChanges(TaskListener)} for how to obtain a lock of a workspace through {@link WorkspaceList}.
*/
@Deprecated
public Resource getWorkspaceResource() {
return new Resource(getFullDisplayName()+" workspace");
}
......@@ -1299,6 +1305,7 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
* @deprecated as of 1.346
* Use {@link #poll(TaskListener)} instead.
*/
@Deprecated
public boolean pollSCMChanges( TaskListener listener ) {
return poll(listener).hasChanges();
}
......@@ -1756,6 +1763,7 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
* @deprecated as of 1.489
* Inject {@link TimeDuration}.
*/
@Deprecated
public int getDelay(StaplerRequest req) throws ServletException {
String delay = req.getParameter("delay");
if (delay==null) return getQuietPeriod();
......@@ -1872,6 +1880,7 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
* @deprecated
* As of 1.261. Use {@link #buildDescribable(StaplerRequest, List)} instead.
*/
@Deprecated
protected final <T extends Describable<T>> List<T> buildDescribable(StaplerRequest req, List<? extends Descriptor<T>> descriptors, String prefix) throws FormException, ServletException {
return buildDescribable(req,descriptors);
}
......@@ -2219,6 +2228,7 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
/**
* @deprecated Just use {@link #CANCEL}.
*/
@Deprecated
public static final Permission ABORT = CANCEL;
/**
......
......@@ -119,6 +119,7 @@ public abstract class Build <P extends Project<P,B>,B extends Build<P,B>>
* proper execution object.
*/
@Restricted(NoExternalUse.class)
@Deprecated
protected Runner createRunner() {
return new BuildExecution();
}
......@@ -127,6 +128,7 @@ public abstract class Build <P extends Project<P,B>,B extends Build<P,B>>
* @deprecated as of 1.467
* Please use {@link BuildExecution}
*/
@Deprecated
protected class RunnerImpl extends BuildExecution {
}
......
......@@ -45,6 +45,7 @@ import org.kohsuke.stapler.HttpResponses;
* Use {@link ACL} and {@link Item#BUILD}. This code is only here
* for the backward compatibility.
*/
@Deprecated
public final class BuildAuthorizationToken {
private final String token;
......
......@@ -39,12 +39,14 @@ public interface BuildableItem extends Item, Task {
* @deprecated
* Use {@link #scheduleBuild(Cause)}. Since 1.283
*/
@Deprecated
boolean scheduleBuild();
boolean scheduleBuild(Cause c);
/**
* @deprecated
* Use {@link #scheduleBuild(int, Cause)}. Since 1.283
*/
@Deprecated
boolean scheduleBuild(int quietPeriod);
boolean scheduleBuild(int quietPeriod, Cause c);
}
......@@ -124,6 +124,7 @@ public abstract class Cause {
* Fall back implementation when no other type is available.
* @deprecated since 2009-02-08
*/
@Deprecated
public static class LegacyCodeCause extends Cause {
private StackTraceElement [] stackTrace;
public LegacyCodeCause() {
......@@ -162,6 +163,7 @@ public abstract class Cause {
* @deprecated since 2009-02-28
*/
// for backward bytecode compatibility
@Deprecated
public UpstreamCause(AbstractBuild<?,?> up) {
this((Run<?,?>)up);
}
......@@ -361,6 +363,7 @@ public abstract class Cause {
* @deprecated 1.428
* use {@link UserIdCause}
*/
@Deprecated
public static class UserCause extends Cause {
private String authenticationName;
public UserCause() {
......
......@@ -113,6 +113,7 @@ public class CauseAction implements FoldableAction, RunAction2 {
* @deprecated as of 1.288
* but left here for backward compatibility.
*/
@Deprecated
public String getShortDescription() {
if(causes.isEmpty()) return "N/A";
return causes.get(0).getShortDescription();
......
......@@ -378,6 +378,7 @@ public /*transient*/ abstract class Computer extends Actionable implements Acces
/**
* @deprecated since 2009-01-06. Use {@link #connect(boolean)}
*/
@Deprecated
public final void launch() {
connect(true);
}
......@@ -477,6 +478,7 @@ public /*transient*/ abstract class Computer extends Actionable implements Acces
* @deprecated as of 1.320.
* Use {@link #disconnect(OfflineCause)} and specify the cause.
*/
@Deprecated
public Future<?> disconnect() {
recordTermination();
if (Util.isOverridden(Computer.class,getClass(),"disconnect",OfflineCause.class))
......@@ -640,6 +642,7 @@ public /*transient*/ abstract class Computer extends Actionable implements Acces
* accidentally call this method.
*/
@Exported
@Deprecated
public boolean isTemporarilyOffline() {
return temporarilyOffline;
}
......@@ -648,6 +651,7 @@ public /*transient*/ abstract class Computer extends Actionable implements Acces
* @deprecated as of 1.320.
* Use {@link #setTemporarilyOffline(boolean, OfflineCause)}
*/
@Deprecated
public void setTemporarilyOffline(boolean temporarilyOffline) {
setTemporarilyOffline(temporarilyOffline,null);
}
......@@ -1051,6 +1055,7 @@ public /*transient*/ abstract class Computer extends Actionable implements Acces
* @deprecated as of 1.292
* Use {@link #getEnvironment()} instead.
*/
@Deprecated
public Map<String,String> getEnvVars() throws IOException, InterruptedException {
return getEnvironment();
}
......
......@@ -95,6 +95,7 @@ public final class ComputerSet extends AbstractModelObject implements Describabl
* @deprecated as of 1.301
* Use {@link #getMonitors()}.
*/
@Deprecated
public static List<NodeMonitor> get_monitors() {
return monitors.toList();
}
......
......@@ -30,4 +30,5 @@ import jenkins.model.DependencyDeclarer;
* @deprecated Use {@link DependencyDeclarer} instead.
* @since 1.160
*/
@Deprecated
public interface DependecyDeclarer extends DependencyDeclarer {}
......@@ -366,6 +366,7 @@ public abstract class Descriptor<T extends Describable<T>> implements Saveable {
* @deprecated since 1.528
* Use {@link #getCheckMethod(String)}
*/
@Deprecated
public String getCheckUrl(String fieldName) {
return getCheckMethod(fieldName).toCheckUrl();
}
......@@ -512,6 +513,7 @@ public abstract class Descriptor<T extends Describable<T>> implements Saveable {
* Implement {@link #newInstance(StaplerRequest, JSONObject)} method instead.
* Deprecated as of 1.145.
*/
@Deprecated
public T newInstance(StaplerRequest req) throws FormException {
throw new UnsupportedOperationException(getClass()+" should implement newInstance(StaplerRequest,JSONObject)");
}
......@@ -684,6 +686,7 @@ public abstract class Descriptor<T extends Describable<T>> implements Saveable {
* @deprecated
* As of 1.239, use {@link #configure(StaplerRequest, JSONObject)}.
*/
@Deprecated
public boolean configure( StaplerRequest req ) throws FormException {
return true;
}
......
......@@ -75,6 +75,7 @@ public final class DirectoryBrowserSupport implements HttpResponse {
* @deprecated as of 1.297
* Use {@link #DirectoryBrowserSupport(ModelObject, FilePath, String, String, boolean)}
*/
@Deprecated
public DirectoryBrowserSupport(ModelObject owner, String title) {
this(owner, (VirtualFile) null, title, null, false);
}
......@@ -147,6 +148,7 @@ public final class DirectoryBrowserSupport implements HttpResponse {
* Instead of calling this method explicitly, just return the {@link DirectoryBrowserSupport} object
* from the {@code doXYZ} method and let Stapler generate a response for you.
*/
@Deprecated
public void serveFile(StaplerRequest req, StaplerResponse rsp, FilePath root, String icon, boolean serveDirIndex) throws IOException, ServletException, InterruptedException {
serveFile(req, rsp, root.toVirtualFile(), icon, serveDirIndex);
}
......
......@@ -800,6 +800,7 @@ public class Executor extends Thread implements ModelObject {
* Use {@link #doStop()}.
*/
@RequirePOST
@Deprecated
public void doStop( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException {
doStop().generateResponse(req,rsp,this);
}
......@@ -937,6 +938,7 @@ public class Executor extends Thread implements ModelObject {
* @deprecated as of 1.388
* Use {@link Executables#getEstimatedDurationFor(Queue.Executable)}
*/
@Deprecated
public static long getEstimatedDurationFor(Executable e) {
return Executables.getEstimatedDurationFor(e);
}
......
......@@ -38,6 +38,7 @@ public class FreeStyleProject extends Project<FreeStyleProject,FreeStyleBuild> i
/**
* @deprecated as of 1.390
*/
@Deprecated
public FreeStyleProject(Jenkins parent, String name) {
super(parent, name);
}
......
......@@ -60,12 +60,14 @@ public class Hudson extends Jenkins {
* List of registered {@link hudson.model.listeners.ItemListener}s.
* @deprecated as of 1.286
*/
@Deprecated
private transient final CopyOnWriteList<ItemListener> itemListeners = ExtensionListView.createCopyOnWriteList(ItemListener.class);
/**
* List of registered {@link hudson.slaves.ComputerListener}s.
* @deprecated as of 1.286
*/
@Deprecated
private transient final CopyOnWriteList<ComputerListener> computerListeners = ExtensionListView.createCopyOnWriteList(ComputerListener.class);
/** @deprecated Here only for compatibility. Use {@link Jenkins#getInstance} instead. */
......@@ -89,6 +91,7 @@ public class Hudson extends Jenkins {
* @deprecated as of 1.286.
* Use {@link ItemListener#all()}.
*/
@Deprecated
public CopyOnWriteList<ItemListener> getJobListeners() {
return itemListeners;
}
......@@ -99,6 +102,7 @@ public class Hudson extends Jenkins {
* @deprecated as of 1.286.
* Use {@link ComputerListener#all()}.
*/
@Deprecated
public CopyOnWriteList<ComputerListener> getComputerListeners() {
return computerListeners;
}
......@@ -109,6 +113,7 @@ public class Hudson extends Jenkins {
* @deprecated
* Use {@link #getNode(String)}. Since 1.252.
*/
@Deprecated
public Slave getSlave(String name) {
Node n = getNode(name);
if (n instanceof Slave)
......@@ -120,6 +125,7 @@ public class Hudson extends Jenkins {
* @deprecated
* Use {@link #getNodes()}. Since 1.252.
*/
@Deprecated
public List<Slave> getSlaves() {
return (List)getNodes();
}
......@@ -130,6 +136,7 @@ public class Hudson extends Jenkins {
* @deprecated
* Use {@link #setNodes(List)}. Since 1.252.
*/
@Deprecated
public void setSlaves(List<Slave> slaves) throws IOException {
setNodes(slaves);
}
......@@ -139,6 +146,7 @@ public class Hudson extends Jenkins {
* Left only for the compatibility of URLs.
* Should not be invoked for any other purpose.
*/
@Deprecated
public TopLevelItem getJob(String name) {
return getItem(name);
}
......@@ -147,6 +155,7 @@ public class Hudson extends Jenkins {
* @deprecated
* Used only for mapping jobs to URL in a case-insensitive fashion.
*/
@Deprecated
public TopLevelItem getJobCaseInsensitive(String name) {
String match = Functions.toEmailSafeString(name);
for(TopLevelItem item : getItems()) {
......@@ -161,6 +170,7 @@ public class Hudson extends Jenkins {
* @deprecated as of 1.317
* Use {@link #doQuietDown()} instead.
*/
@Deprecated
public synchronized void doQuietDown(StaplerResponse rsp) throws IOException, ServletException {
doQuietDown().generateResponse(null, rsp, this);
}
......@@ -171,6 +181,7 @@ public class Hudson extends Jenkins {
* @deprecated
* As on 1.267, moved to "/log/rss..."
*/
@Deprecated
public void doLogRss( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException {
String qs = req.getQueryString();
rsp.sendRedirect2("./log/rss"+(qs==null?"":'?'+qs));
......@@ -180,6 +191,7 @@ public class Hudson extends Jenkins {
* @deprecated as of 1.294
* Define your own check method, instead of relying on this generic one.
*/
@Deprecated
public void doFieldCheck(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException {
doFieldCheck(
fixEmpty(req.getParameter("value")),
......@@ -201,6 +213,7 @@ public class Hudson extends Jenkins {
* Either use client-side validation (e.g. class="required number")
* or define your own check method, instead of relying on this generic one.
*/
@Deprecated
public FormValidation doFieldCheck(@QueryParameter(fixEmpty=true) String value,
@QueryParameter(fixEmpty=true) String type,
@QueryParameter(fixEmpty=true) String errorText,
......@@ -236,6 +249,7 @@ public class Hudson extends Jenkins {
* @deprecated
* Use {@link Functions#isWindows()}.
*/
@Deprecated
public static boolean isWindows() {
return File.pathSeparatorChar==';';
}
......@@ -244,6 +258,7 @@ public class Hudson extends Jenkins {
* @deprecated
* Use {@link hudson.Platform#isDarwin()}
*/
@Deprecated
public static boolean isDarwin() {
return Platform.isDarwin();
}
......@@ -252,6 +267,7 @@ public class Hudson extends Jenkins {
* @deprecated since 2007-12-18.
* Use {@link #checkPermission(hudson.security.Permission)}
*/
@Deprecated
public static boolean adminCheck() throws IOException {
return adminCheck(Stapler.getCurrentRequest(), Stapler.getCurrentResponse());
}
......@@ -260,6 +276,7 @@ public class Hudson extends Jenkins {
* @deprecated since 2007-12-18.
* Use {@link #checkPermission(hudson.security.Permission)}
*/
@Deprecated
public static boolean adminCheck(StaplerRequest req,StaplerResponse rsp) throws IOException {
if (isAdmin(req)) return true;
......@@ -285,6 +302,7 @@ public class Hudson extends Jenkins {
* if appropriate), then identify a suitable {@link hudson.security.AccessControlled} object to check its permission
* against.
*/
@Deprecated
public static boolean isAdmin() {
return Jenkins.getInstance().getACL().hasPermission(ADMINISTER);
}
......@@ -294,6 +312,7 @@ public class Hudson extends Jenkins {
* Define a custom {@link hudson.security.Permission} and check against ACL.
* See {@link #isAdmin()} for more instructions.
*/
@Deprecated
public static boolean isAdmin(StaplerRequest req) {
return isAdmin();
}
......@@ -305,6 +324,7 @@ public class Hudson extends Jenkins {
/**
* @deprecated only here for backward comp
*/
@Deprecated
public static final class MasterComputer extends Jenkins.MasterComputer {
// no op
}
......@@ -312,6 +332,7 @@ public class Hudson extends Jenkins {
/**
* @deprecated only here for backward comp
*/
@Deprecated
public static class CloudList extends Jenkins.CloudList {
public CloudList(Jenkins h) {
super(h);
......
......@@ -176,6 +176,7 @@ public interface Item extends PersistenceRoot, SearchableModelObject, AccessCont
* This method is only intended for the remote API clients who cannot resolve relative references
* (even this won't work for the same reason, which should be fixed.)
*/
@Deprecated
String getAbsoluteUrl();
/**
......
......@@ -66,6 +66,7 @@ public class Items {
* @deprecated as of 1.286
* Use {@link #all()} for read access and {@link Extension} for registration.
*/
@Deprecated
public static final List<TopLevelItemDescriptor> LIST = (List)new DescriptorList<TopLevelItem>(TopLevelItem.class);
/**
......@@ -172,6 +173,7 @@ public class Items {
* @deprecated as of 1.406
* Use {@link #fromNameList(ItemGroup, String, Class)}
*/
@Deprecated
public static <T extends Item> List<T> fromNameList(String list, Class<T> type) {
return fromNameList(null,list,type);
}
......
......@@ -80,6 +80,7 @@ public final class JDK extends ToolInstallation implements NodeSpecific<JDK>, En
* @deprecated as of 1.304
* Use {@link #getHome()}
*/
@Deprecated
public String getJavaHome() {
return getHome();
}
......@@ -108,6 +109,7 @@ public final class JDK extends ToolInstallation implements NodeSpecific<JDK>, En
/**
* @deprecated as of 1.460. Use {@link #buildEnvVars(EnvVars)}
*/
@Deprecated
public void buildEnvVars(Map<String,String> env) {
String home = getHome();
if (home == null) {
......
......@@ -442,6 +442,7 @@ public abstract class Job<JobT extends Job<JobT, RunT>, RunT extends Run<JobT, R
* @deprecated as of 1.503
* Use {@link #getBuildDiscarder()}.
*/
@Deprecated
public LogRotator getLogRotator() {
if (logRotator instanceof LogRotator)
return (LogRotator) logRotator;
......@@ -452,6 +453,7 @@ public abstract class Job<JobT extends Job<JobT, RunT>, RunT extends Run<JobT, R
* @deprecated as of 1.503
* Use {@link #setBuildDiscarder(BuildDiscarder)}
*/
@Deprecated
public void setLogRotator(LogRotator logRotator) throws IOException {
setBuildDiscarder(logRotator);
}
......@@ -744,6 +746,7 @@ public abstract class Job<JobT extends Job<JobT, RunT>, RunT extends Run<JobT, R
* as of 1.372. Should just do {@code getBuilds().byTimestamp(s,e)} to avoid code bloat in {@link Job}.
*/
@WithBridgeMethods(List.class)
@Deprecated
public RunList<RunT> getBuildsByTimestamp(long start, long end) {
return getBuilds().byTimestamp(start,end);
}
......
......@@ -104,6 +104,7 @@ public abstract class JobProperty<J extends Job<?,?>> implements ReconfigurableD
* @deprecated
* as of 1.341. Override {@link #getJobActions(Job)} instead.
*/
@Deprecated
public Action getJobAction(J job) {
return null;
}
......
......@@ -34,6 +34,7 @@ import java.util.List;
* @author Kohsuke Kawaguchi
* @deprecated since 1.281
*/
@Deprecated
public class Jobs {
/**
* List of all installed {@link JobPropertyDescriptor} types.
......@@ -47,6 +48,7 @@ public class Jobs {
* Use {@link JobPropertyDescriptor#all()} for read access,
* and {@link Extension} for registration.
*/
@Deprecated
public static final List<JobPropertyDescriptor> PROPERTIES = (List)
new DescriptorList<JobProperty<?>>((Class)JobProperty.class);
}
......@@ -50,6 +50,7 @@ import java.io.InputStreamReader;
* @author Kohsuke Kawaguchi
* @deprecated moved to stapler, as of Hudson 1.220
*/
@Deprecated
public class LargeText {
/**
* Represents the data source of this text.
......
......@@ -128,6 +128,7 @@ public abstract class LoadBalancer implements ExtensionPoint {
* @deprecated as of 1.377
* The only implementation in the core now is the one based on consistent hash.
*/
@Deprecated
public static final LoadBalancer DEFAULT = CONSISTENT_HASH;
......
......@@ -97,6 +97,7 @@ public abstract class ManagementLink implements ExtensionPoint, Action {
* @deprecated as of 1.286
* Use {@link #all()} for read access and put {@link Extension} for registration.
*/
@Deprecated
public static final List<ManagementLink> LIST = ExtensionListView.createList(ManagementLink.class);
/**
......
......@@ -110,6 +110,7 @@ public class MultiStageTimeSeries implements Serializable {
* @deprecated since 2009-04-05.
* Use {@link #MultiStageTimeSeries(Localizable, Color, float, float)}
*/
@Deprecated
public MultiStageTimeSeries(float initialValue, float decay) {
this(Messages._MultiStageTimeSeries_EMPTY_STRING(), Color.WHITE, initialValue,decay);
}
......
......@@ -133,6 +133,7 @@ public abstract class Node extends AbstractModelObject implements Reconfigurable
*
* @deprecated to indicate that this method isn't really meant to be called by random code.
*/
@Deprecated
public abstract void setNodeName(String name);
/**
......@@ -330,6 +331,7 @@ public abstract class Node extends AbstractModelObject implements Reconfigurable
* @deprecated as of 1.413
* Use {@link #canTake(Queue.BuildableItem)}
*/
@Deprecated
public CauseOfBlockage canTake(Task task) {
return null;
}
......
......@@ -48,6 +48,7 @@ public class OverallLoadStatistics extends LoadStatistics {
*/
@Exported
@Restricted(NoExternalUse.class)
@Deprecated
public final MultiStageTimeSeries totalQueueLength = queueLength;
public OverallLoadStatistics() {
......
......@@ -79,6 +79,7 @@ public abstract class PageDecorator extends Descriptor<PageDecorator> implements
* @deprecated as of 1.425
* Use the default constructor that's less error prone
*/
@Deprecated
protected PageDecorator(Class<? extends PageDecorator> yourClass) {
super(yourClass);
}
......@@ -119,6 +120,7 @@ public abstract class PageDecorator extends Descriptor<PageDecorator> implements
* @deprecated as of 1.286
* Use {@link #all()} for read access, and use {@link Extension} for registration.
*/
@Deprecated
public static final List<PageDecorator> ALL = (List)new DescriptorList<PageDecorator>(PageDecorator.class);
/**
......
......@@ -232,6 +232,7 @@ public abstract class ParameterDefinition implements
* @deprecated as of 1.286
* Use {@link #all()} for read access, and {@link Extension} for registration.
*/
@Deprecated
public static final DescriptorList<ParameterDefinition> LIST = new DescriptorList<ParameterDefinition>(ParameterDefinition.class);
public abstract static class ParameterDescriptor extends
......
......@@ -127,6 +127,7 @@ public abstract class ParameterValue implements Serializable {
* @deprecated as of 1.344
* Use {@link #buildEnvironment(Run, EnvVars)} instead.
*/
@Deprecated
public void buildEnvVars(AbstractBuild<?,?> build, Map<String,String> env) {
if (env instanceof EnvVars) {
if (Util.isOverridden(ParameterValue.class, getClass(), "buildEnvironment", Run.class, EnvVars.class)) {
......@@ -222,6 +223,7 @@ public abstract class ParameterValue implements Serializable {
* instead copy them in {@link ParameterDefinition#createValue(StaplerRequest, JSONObject)}
* into {@link ParameterValue}.
*/
@Deprecated
public ParameterDefinition getDefinition() {
throw new UnsupportedOperationException();
}
......
......@@ -64,6 +64,7 @@ public class ParametersAction implements Action, Iterable<ParameterValue>, Queue
/**
* @deprecated since 1.283; kept to avoid warnings loading old build data, but now transient.
*/
@Deprecated
private transient AbstractBuild<?, ?> build;
public ParametersAction(List<ParameterValue> parameters) {
......
......@@ -60,6 +60,7 @@ public abstract class PeriodicWork extends SafeTimerTask implements ExtensionPoi
/** @deprecated Use your own logger, or send messages to the logger in {@link AsyncPeriodicWork#execute}. */
@SuppressWarnings("NonConstantLogger")
@Deprecated
protected final Logger logger = Logger.getLogger(getClass().getName());
/**
......
......@@ -130,6 +130,7 @@ public abstract class Project<P extends Project<P,B>,B extends Build<P,B>>
* We will be soon removing the restriction that only one instance of publisher is allowed per type.
* Use {@link #getPublishersList()} instead.
*/
@Deprecated
public Map<Descriptor<Publisher>,Publisher> getPublishers() {
return getPublishersList().toMap();
}
......@@ -177,6 +178,7 @@ public abstract class Project<P extends Project<P,B>,B extends Build<P,B>>
* @deprecated as of 1.290
* Use {@code getPublishersList().add(x)}
*/
@Deprecated
public void addPublisher(Publisher buildStep) throws IOException {
getPublishersList().add(buildStep);
}
......@@ -187,6 +189,7 @@ public abstract class Project<P extends Project<P,B>,B extends Build<P,B>>
* @deprecated as of 1.290
* Use {@code getPublishersList().remove(x)}
*/
@Deprecated
public void removePublisher(Descriptor<Publisher> descriptor) throws IOException {
getPublishersList().remove(descriptor);
}
......
......@@ -519,6 +519,7 @@ public class Queue extends ResourceController implements Saveable {
* @deprecated as of 1.311
* Use {@link #schedule(AbstractProject)}
*/
@Deprecated
public boolean add(AbstractProject p) {
return schedule(p)!=null;
}
......@@ -541,6 +542,7 @@ public class Queue extends ResourceController implements Saveable {
* @deprecated as of 1.311
* Use {@link #schedule(Task, int)}
*/
@Deprecated
public boolean add(AbstractProject p, int quietPeriod) {
return schedule(p, quietPeriod)!=null;
}
......@@ -549,6 +551,7 @@ public class Queue extends ResourceController implements Saveable {
* @deprecated as of 1.521
* Use {@link #schedule2(Task, int, List)}
*/
@Deprecated
public WaitingItem schedule(Task p, int quietPeriod, List<Action> actions) {
return schedule2(p, quietPeriod, actions).getCreateItem();
}
......@@ -684,6 +687,7 @@ public class Queue extends ResourceController implements Saveable {
* @deprecated as of 1.311
* Use {@link #schedule(Task, int)}
*/
@Deprecated
public boolean add(Task p, int quietPeriod) {
return schedule(p, quietPeriod)!=null;
}
......@@ -696,6 +700,7 @@ public class Queue extends ResourceController implements Saveable {
* @deprecated as of 1.311
* Use {@link #schedule(Task, int, Action...)}
*/
@Deprecated
public boolean add(Task p, int quietPeriod, Action... actions) {
return schedule(p, quietPeriod, actions)!=null;
}
......@@ -1453,6 +1458,7 @@ public class Queue extends ResourceController implements Saveable {
}
/** @deprecated Use {@link #isBlockedByShutdown} instead. */
@Deprecated
public static boolean ifBlockedByHudsonShutdown(Task task) {
return isBlockedByShutdown(task);
}
......@@ -1530,6 +1536,7 @@ public class Queue extends ResourceController implements Saveable {
* @deprecated as of 1.330
* Use {@link CauseOfBlockage#getShortDescription()} instead.
*/
@Deprecated
String getWhyBlocked();
/**
......
......@@ -984,6 +984,7 @@ public abstract class Run <JobT extends Job<JobT,RunT>,RunT extends Run<JobT,Run
* This method is only intended for the remote API clients who cannot resolve relative references.
*/
@Exported(visibility=2,name="url")
@Deprecated
public final @Nonnull String getAbsoluteUrl() {
return project.getAbsoluteUrl()+getNumber()+'/';
}
......@@ -1554,6 +1555,7 @@ public abstract class Run <JobT extends Job<JobT,RunT>,RunT extends Run<JobT,Run
* @deprecated as of 1.467
* Please use {@link RunExecution}
*/
@Deprecated
protected abstract class Runner extends RunExecution {}
/**
......@@ -1675,6 +1677,7 @@ public abstract class Run <JobT extends Job<JobT,RunT>,RunT extends Run<JobT,Run
* @deprecated as of 1.467
* Use {@link #execute(RunExecution)}
*/
@Deprecated
protected final void run(@Nonnull Runner job) {
execute(job);
}
......@@ -2105,6 +2108,7 @@ public abstract class Run <JobT extends Job<JobT,RunT>,RunT extends Run<JobT,Run
* @deprecated as of 1.352
* Use {@code getLogText().doProgressiveText(req,rsp)}
*/
@Deprecated
public void doProgressiveLog( StaplerRequest req, StaplerResponse rsp) throws IOException {
getLogText().doProgressText(req,rsp);
}
......@@ -2192,6 +2196,7 @@ public abstract class Run <JobT extends Job<JobT,RunT>,RunT extends Run<JobT,Run
* @deprecated as of 1.292
* Use {@link #getEnvironment(TaskListener)} instead.
*/
@Deprecated
public Map<String,String> getEnvVars() {
LOGGER.log(WARNING, "deprecated call to Run.getEnvVars\n\tat {0}", new Throwable().getStackTrace()[1]);
try {
......@@ -2206,6 +2211,7 @@ public abstract class Run <JobT extends Job<JobT,RunT>,RunT extends Run<JobT,Run
/**
* @deprecated as of 1.305 use {@link #getEnvironment(TaskListener)}
*/
@Deprecated
public EnvVars getEnvironment() throws IOException, InterruptedException {
LOGGER.log(WARNING, "deprecated call to Run.getEnvironment\n\tat {0}", new Throwable().getStackTrace()[1]);
return getEnvironment(new LogTaskListener(LOGGER, Level.INFO));
......
......@@ -74,6 +74,7 @@ public final class RunMap<R extends Run<?,R>> extends AbstractLazyLoadRunMap<R>
* @deprecated as of 1.485
* Use {@link #RunMap(File, Constructor)}.
*/
@Deprecated
public RunMap() {
super(null); // will be set later
}
......@@ -152,6 +153,7 @@ public final class RunMap<R extends Run<?,R>> extends AbstractLazyLoadRunMap<R>
* @deprecated as of 1.485
* Use {@link ReverseComparator}
*/
@Deprecated
public static final Comparator<Comparable> COMPARATOR = new Comparator<Comparable>() {
public int compare(Comparable o1, Comparable o2) {
return -o1.compareTo(o2);
......@@ -247,6 +249,7 @@ public final class RunMap<R extends Run<?,R>> extends AbstractLazyLoadRunMap<R>
* @deprecated as of 1.485
* Use {@link #RunMap(File, Constructor)}
*/
@Deprecated
public void load(Job job, Constructor<R> cons) {
this.cons = cons;
initBaseDir(job.getBuildDir());
......
......@@ -74,6 +74,7 @@ public class RunParameterDefinition extends SimpleParameterDefinition {
/**
* @deprecated as of 1.517
*/
@Deprecated
public RunParameterDefinition(String name, String projectName, String description) {
// delegate to updated constructor with additional RunParameterFilter parameter defaulted to ALL.
this(name, projectName, description, RunParameterFilter.ALL);
......
......@@ -30,6 +30,7 @@ import jenkins.triggers.SCMTriggerItem;
/**
* @deprecated Implement {@link SCMTriggerItem} instead.
*/
@Deprecated
public interface SCMedItem extends BuildableItem {
/**
* Gets the {@link SCM} for this item.
......@@ -55,6 +56,7 @@ public interface SCMedItem extends BuildableItem {
* @deprecated as of 1.346
* Use {@link #poll(TaskListener)} instead.
*/
@Deprecated
boolean pollSCMChanges( TaskListener listener );
/**
......
......@@ -451,6 +451,7 @@ public abstract class Slave extends Node implements Serializable {
* "ssh myslave java -jar /path/to/hudson-remoting.jar"
* @deprecated in 1.216
*/
@Deprecated
private transient String agentCommand;
/**
......
......@@ -57,6 +57,7 @@ public class StreamBuildListener extends StreamTaskListener implements BuildList
* The caller should use {@link #StreamBuildListener(OutputStream, Charset)} to pass in
* the charset and output stream separately, so that this class can handle encoding correctly.
*/
@Deprecated
public StreamBuildListener(PrintStream w) {
super(w);
}
......
......@@ -80,6 +80,7 @@ public abstract class TaskAction extends AbstractModelObject implements Action {
* @deprecated as of 1.350
* Use {@link #obtainLog()}, which returns the same object in a more type-safe signature.
*/
@Deprecated
public LargeText getLog() {
return obtainLog();
}
......
......@@ -51,6 +51,7 @@ public abstract class TaskThread extends Thread {
* @deprecated as of Hudson 1.350
* Use {@link #log}. It's the same object, in a better type.
*/
@Deprecated
private final LargeText text;
/**
......@@ -163,6 +164,7 @@ public abstract class TaskThread extends Thread {
* @deprecated as of Hudson 1.350
* Use {@link #forMemory(TaskAction)} and pass in the calling {@link TaskAction}
*/
@Deprecated
public static ListenerAndText forMemory() {
return forMemory(null);
}
......@@ -171,6 +173,7 @@ public abstract class TaskThread extends Thread {
* @deprecated as of Hudson 1.350
* Use {@link #forFile(File, TaskAction)} and pass in the calling {@link TaskAction}
*/
@Deprecated
public static ListenerAndText forFile(File f) throws IOException {
return forFile(f,null);
}
......
......@@ -125,6 +125,7 @@ public abstract class TopLevelItemDescriptor extends Descriptor<TopLevelItem> {
* @deprecated as of 1.390
* Use {@link #newInstance(ItemGroup, String)}
*/
@Deprecated
public TopLevelItem newInstance(String name) {
return newInstance(Jenkins.getInstance(), name);
}
......
......@@ -37,6 +37,7 @@ public abstract class TransientBuildActionFactory implements ExtensionPoint {
* @deprecated as of 1.461
* Override and call {@link #createFor(Run)} instead.
*/
@Deprecated
public Collection<? extends Action> createFor(AbstractBuild target) {
return Collections.emptyList();
}
......@@ -47,4 +48,4 @@ public abstract class TransientBuildActionFactory implements ExtensionPoint {
public static ExtensionList<TransientBuildActionFactory> all() {
return ExtensionList.lookup(TransientBuildActionFactory.class);
}
}
\ No newline at end of file
}
......@@ -320,6 +320,7 @@ public class UpdateCenter extends AbstractModelObject implements Saveable, OnMas
* TODO: revisit tool update mechanism, as that should be de-centralized, too. In the mean time,
* please try not to use this method, and instead ping us to get this part completed.
*/
@Deprecated
public String getDefaultBaseUrl() {
return config.getUpdateCenterUrl();
}
......@@ -842,6 +843,7 @@ public class UpdateCenter extends AbstractModelObject implements Saveable, OnMas
* is now a part of the <tt>update-center.json</tt> file. See
* <tt>http://jenkins-ci.org/update-center.json</tt> as an example.
*/
@Deprecated
public String getConnectionCheckUrl() {
return "http://www.google.com";
}
......@@ -856,6 +858,7 @@ public class UpdateCenter extends AbstractModelObject implements Saveable, OnMas
* @return
* Absolute URL that ends with '/'.
*/
@Deprecated
public String getUpdateCenterUrl() {
return UPDATE_CENTER_URL;
}
......@@ -867,6 +870,7 @@ public class UpdateCenter extends AbstractModelObject implements Saveable, OnMas
* <tt>update-center.json</tt> is now signed, so we don't have to further make sure that
* we aren't downloading from anywhere unsecure.
*/
@Deprecated
public String getPluginRepositoryBaseUrl() {
return "http://jenkins-ci.org/";
}
......@@ -920,6 +924,7 @@ public class UpdateCenter extends AbstractModelObject implements Saveable, OnMas
* @deprecated as of 1.326
* Use {@link #submit()} instead.
*/
@Deprecated
public void schedule() {
submit();
}
......@@ -1270,6 +1275,7 @@ public class UpdateCenter extends AbstractModelObject implements Saveable, OnMas
/**
* @deprecated as of 1.442
*/
@Deprecated
public InstallationJob(Plugin plugin, UpdateSite site, Authentication auth) {
this(plugin,site,auth,false);
}
......@@ -1565,6 +1571,7 @@ public class UpdateCenter extends AbstractModelObject implements Saveable, OnMas
* @deprecated as of 1.333
* Use {@link UpdateSite#neverUpdate}
*/
@Deprecated
public static boolean neverUpdate = Boolean.getBoolean(UpdateCenter.class.getName()+".never");
public static final XStream2 XSTREAM = new XStream2();
......
......@@ -406,6 +406,7 @@ public class UpdateSite {
* @deprecated
* Exposed only for UI.
*/
@Deprecated
public String getDownloadUrl() {
/*
HACKISH:
......@@ -768,6 +769,7 @@ public class UpdateSite {
* @deprecated as of 1.326
* Use {@link #deploy()}.
*/
@Deprecated
public void install() {
deploy();
}
......
......@@ -357,6 +357,7 @@ public class User extends AbstractModelObject implements AccessControlled, Descr
* {@code create} is false.
* @deprecated use {@link User#get(String, boolean, java.util.Map)}
*/
@Deprecated
public static @Nullable User get(String idOrFullName, boolean create) {
return get(idOrFullName, create, Collections.emptyMap());
}
......
......@@ -33,10 +33,12 @@ import java.util.List;
* @author Kohsuke Kawaguchi
* @deprecated as of 1.286
*/
@Deprecated
public class UserProperties {
/**
* @deprecated as of 1.286
* Use {@link UserProperty#all()} for read access and {@link Extension} for auto-registration.
*/
@Deprecated
public static final List<UserPropertyDescriptor> LIST = (List)new DescriptorList<UserProperty>(UserProperty.class);
}
......@@ -655,6 +655,7 @@ public abstract class View extends AbstractModelObject implements AccessControll
* Does this {@link View} has any associated user information recorded?
* @deprecated Potentially very expensive call; do not use from Jelly views.
*/
@Deprecated
public boolean hasPeople() {
return People.isApplicable(getItems());
}
......@@ -738,6 +739,7 @@ public abstract class View extends AbstractModelObject implements AccessControll
/**
* @deprecated Potentially very expensive call; do not use from Jelly views.
*/
@Deprecated
public static boolean isApplicable(Collection<? extends Item> items) {
for (Item item : items) {
for (Job job : item.getAllJobs()) {
......@@ -1116,6 +1118,7 @@ public abstract class View extends AbstractModelObject implements AccessControll
* @deprecated as of 1.286
* Use {@link #all()} for read access, and use {@link Extension} for registration.
*/
@Deprecated
public static final DescriptorList<View> LIST = new DescriptorList<View>(View.class);
/**
......
......@@ -79,6 +79,7 @@ public abstract class ViewJob<JobT extends ViewJob<JobT,RunT>, RunT extends Run<
/**
* @deprecated as of 1.390
*/
@Deprecated
protected ViewJob(Jenkins parent, String name) {
super(parent,name);
}
......
......@@ -148,6 +148,7 @@ public class ItemListener implements ExtensionPoint {
* @deprecated as of 1.286
* put {@link Extension} on your class to have it auto-registered.
*/
@Deprecated
public void register() {
all().add(this);
}
......
......@@ -171,6 +171,7 @@ public abstract class RunListener<R extends Run> implements ExtensionPoint {
* @deprecated as of 1.281
* Put {@link Extension} on your class to get it auto-registered.
*/
@Deprecated
public void register() {
all().add(this);
}
......@@ -187,6 +188,7 @@ public abstract class RunListener<R extends Run> implements ExtensionPoint {
* @deprecated as of 1.281
* Use {@link #all()} for read access, and use {@link Extension} for registration.
*/
@Deprecated
public static final CopyOnWriteList<RunListener> LISTENERS = ExtensionListView.createCopyOnWriteList(RunListener.class);
/**
......
......@@ -60,6 +60,7 @@ public abstract class SaveableListener implements ExtensionPoint {
* @deprecated as of 1.281
* Put {@link Extension} on your class to get it auto-registered.
*/
@Deprecated
public void register() {
all().add(this);
}
......
......@@ -73,6 +73,7 @@ public abstract class LoadPredictor implements ExtensionPoint {
* @deprecated as of 1.380
* Use {@link #predict(MappingWorksheet, Computer, long, long)}
*/
@Deprecated
public Iterable<FutureLoad> predict(Computer computer, long start, long end) {
return Collections.emptyList();
}
......
......@@ -68,6 +68,7 @@ public abstract class QueueTaskDispatcher implements ExtensionPoint {
* @deprecated since 1.413
* Use {@link #canTake(Node, Queue.BuildableItem)}
*/
@Deprecated
public @CheckForNull CauseOfBlockage canTake(Node node, Task task) {
return null;
}
......
......@@ -58,6 +58,7 @@ public abstract class AbstractNodeMonitorDescriptor<T> extends Descriptor<NodeMo
* @deprecated as of 1.522
* Extend from {@link AbstractAsyncNodeMonitorDescriptor}
*/
@Deprecated
protected AbstractNodeMonitorDescriptor() {
this(HOUR);
}
......@@ -66,6 +67,7 @@ public abstract class AbstractNodeMonitorDescriptor<T> extends Descriptor<NodeMo
* @deprecated as of 1.522
* Extend from {@link AbstractAsyncNodeMonitorDescriptor}
*/
@Deprecated
protected AbstractNodeMonitorDescriptor(long interval) {
schedule(interval);
}
......@@ -74,6 +76,7 @@ public abstract class AbstractNodeMonitorDescriptor<T> extends Descriptor<NodeMo
* @deprecated as of 1.522
* Extend from {@link AbstractAsyncNodeMonitorDescriptor}
*/
@Deprecated
protected AbstractNodeMonitorDescriptor(Class<? extends NodeMonitor> clazz) {
this(clazz,HOUR);
}
......@@ -82,6 +85,7 @@ public abstract class AbstractNodeMonitorDescriptor<T> extends Descriptor<NodeMo
* @deprecated as of 1.522
* Extend from {@link AbstractAsyncNodeMonitorDescriptor}
*/
@Deprecated
protected AbstractNodeMonitorDescriptor(Class<? extends NodeMonitor> clazz, long interval) {
super(clazz);
......@@ -243,6 +247,7 @@ public abstract class AbstractNodeMonitorDescriptor<T> extends Descriptor<NodeMo
* @deprecated as of 1.320
* Use {@link #markOffline(Computer, OfflineCause)} to specify the cause.
*/
@Deprecated
protected boolean markOffline(Computer c) {
return markOffline(c,null);
}
......
......@@ -139,6 +139,7 @@ public abstract class NodeMonitor implements ExtensionPoint, Describable<NodeMon
* @deprecated as of 1.286.
* Use {@link #all()} for read access and {@link Extension} for registration.
*/
@Deprecated
public static final DescriptorList<NodeMonitor> LIST = new DescriptorList<NodeMonitor>(NodeMonitor.class);
/**
......
......@@ -102,6 +102,7 @@ public class ZFSProvisioner extends FileSystemProvisioner implements Serializabl
/**
* @deprecated as of 1.350
*/
@Deprecated
public WorkspaceSnapshot snapshot(AbstractBuild<?, ?> build, FilePath ws, TaskListener listener) throws IOException, InterruptedException {
throw new UnsupportedOperationException();
}
......
......@@ -70,6 +70,7 @@ public final class CronTab {
* @deprecated as of 1.448
* Use {@link #CronTab(String, int, Hash)}
*/
@Deprecated
public CronTab(String format, int line) throws ANTLRException {
set(format, line, null);
}
......
......@@ -98,6 +98,7 @@ public abstract class ChangeLogAnnotator implements ExtensionPoint {
* @deprecated as of 1.286
* Prefer automatic registration via {@link Extension}
*/
@Deprecated
public final void register() {
all().add(this);
}
......@@ -115,6 +116,7 @@ public abstract class ChangeLogAnnotator implements ExtensionPoint {
* @deprecated as of 1.286
* Use {@link #all()} for read access, and {@link Extension} for registration.
*/
@Deprecated
public static final CopyOnWriteList<ChangeLogAnnotator> annotators = ExtensionListView.createCopyOnWriteList(ChangeLogAnnotator.class);
/**
......
......@@ -46,6 +46,7 @@ public class RepositoryBrowsers {
* @deprecated as of 1.286.
* Use {@link RepositoryBrowser#all()} for read access and {@link Extension} for registration.
*/
@Deprecated
public static final List<Descriptor<RepositoryBrowser<?>>> LIST = new DescriptorList<RepositoryBrowser<?>>((Class)RepositoryBrowser.class);
/**
......@@ -65,6 +66,7 @@ public class RepositoryBrowsers {
* @deprecated since 2008-06-19.
* Use {@link #createInstance(Class, StaplerRequest, JSONObject, String)}.
*/
@Deprecated
public static <T extends RepositoryBrowser>
T createInstance(Class<T> type, StaplerRequest req, String fieldName) throws FormException {
List<Descriptor<RepositoryBrowser<?>>> list = filter(type);
......
......@@ -268,6 +268,7 @@ public abstract class SCM implements Describable<SCM>, ExtensionPoint {
*
* Call {@link #poll(AbstractProject, Launcher, FilePath, TaskListener, SCMRevisionState)} for use instead.
*/
@Deprecated
public boolean pollChanges(AbstractProject<?,?> project, Launcher launcher, FilePath workspace, TaskListener listener) throws IOException, InterruptedException {
// up until 1.336, this method was abstract, so everyone should have overridden this method
// without calling super.pollChanges. So the compatibility implementation is purely for
......@@ -578,6 +579,7 @@ public abstract class SCM implements Describable<SCM>, ExtensionPoint {
* @deprecated since 1.382
* Use/override {@link #getModuleRoot(FilePath, AbstractBuild)} instead.
*/
@Deprecated
public FilePath getModuleRoot(FilePath workspace) {
if (Util.isOverridden(SCM.class,getClass(),"getModuleRoot", FilePath.class,AbstractBuild.class))
// if the subtype already implements newer getModuleRoot(FilePath,AbstractBuild), call that.
......@@ -632,6 +634,7 @@ public abstract class SCM implements Describable<SCM>, ExtensionPoint {
* @deprecated as of 1.382.
* Use/derive from {@link #getModuleRoots(FilePath, AbstractBuild)} instead.
*/
@Deprecated
public FilePath[] getModuleRoots(FilePath workspace) {
if (Util.isOverridden(SCM.class,getClass(),"getModuleRoots", FilePath.class, AbstractBuild.class))
// if the subtype already derives newer getModuleRoots(FilePath,AbstractBuild), delegate to it
......
......@@ -45,6 +45,7 @@ public class SCMS {
* @deprecated as of 1.286
* Use {@link SCM#all()} for read access and {@link Extension} for registration.
*/
@Deprecated
public static final List<SCMDescriptor<?>> SCMS = (List)new DescriptorList<SCM>(SCM.class);
/**
......@@ -67,6 +68,7 @@ public class SCMS {
* @deprecated as of 1.294
* Use {@link #parseSCM(StaplerRequest, AbstractProject)} and pass in the caller's project type.
*/
@Deprecated
public static SCM parseSCM(StaplerRequest req) throws FormException, ServletException {
return parseSCM(req,null);
}
......
......@@ -194,6 +194,7 @@ public abstract class AuthorizationStrategy extends AbstractDescribableImpl<Auth
* @deprecated since 1.286
* Use {@link #all()} for read access, and {@link Extension} for registration.
*/
@Deprecated
public static final DescriptorList<AuthorizationStrategy> LIST = new DescriptorList<AuthorizationStrategy>(AuthorizationStrategy.class);
/**
......
......@@ -44,6 +44,7 @@ import hudson.security.SecurityRealm.SecurityComponents;
* {@link SecurityComponents} are now created after {@link SecurityRealm} is created, so
* the initialization order issue that this code was trying to address no longer exists.
*/
@Deprecated
public class DeferredCreationLdapAuthoritiesPopulator implements LdapAuthoritiesPopulator {
/**
......
......@@ -74,6 +74,7 @@ public class HudsonFilter implements Filter {
* This proxy always delegate to {@code Hudson.getInstance().getSecurityRealm().getSecurityComponents().manager},
* so use that instead.
*/
@Deprecated
public static final AuthenticationManagerProxy AUTHENTICATION_MANAGER = new AuthenticationManagerProxy();
/**
......@@ -84,6 +85,7 @@ public class HudsonFilter implements Filter {
* This proxy always delegate to {@code Hudson.getInstance().getSecurityRealm().getSecurityComponents().userDetails},
* so use that instead.
*/
@Deprecated
public static final UserDetailsServiceProxy USER_DETAILS_SERVICE_PROXY = new UserDetailsServiceProxy();
/**
......@@ -94,6 +96,7 @@ public class HudsonFilter implements Filter {
* This proxy always delegate to {@code Hudson.getInstance().getSecurityRealm().getSecurityComponents().rememberMe},
* so use that instead.
*/
@Deprecated
public static final RememberMeServicesProxy REMEMBER_ME_SERVICES_PROXY = new RememberMeServicesProxy();
public void init(FilterConfig filterConfig) throws ServletException {
......
......@@ -467,6 +467,7 @@ public class HudsonPrivateSecurityRealm extends AbstractPasswordBasedSecurityRea
* Field kept here to load old (pre 1.283) user records,
* but now marked transient so field is no longer saved.
*/
@Deprecated
private transient String password;
private Details(String passwordHash) {
......
......@@ -54,6 +54,7 @@ import jenkins.security.NonSerializableSecurityContext;
* Starting 1.285, Hudson stops persisting {@link Authentication} altogether
* (see {@link NonSerializableSecurityContext}), so there's no need to use this mechanism.
*/
@Deprecated
public interface InvalidatableUserDetails extends UserDetails {
boolean isInvalid();
}
......@@ -173,6 +173,7 @@ public final class Permission {
* @deprecated as of 1.421
* Use {@link #Permission(PermissionGroup, String, Localizable, Permission, boolean, PermissionScope[])}
*/
@Deprecated
public Permission(@Nonnull PermissionGroup group, @Nonnull String name, @CheckForNull Localizable description, @CheckForNull Permission impliedBy, boolean enable) {
this(group,name,description,impliedBy,enable,new PermissionScope[]{PermissionScope.JENKINS});
}
......@@ -181,6 +182,7 @@ public final class Permission {
* @deprecated as of 1.421
* Use {@link #Permission(PermissionGroup, String, Localizable, Permission, PermissionScope)}
*/
@Deprecated
public Permission(@Nonnull PermissionGroup group, @Nonnull String name, @CheckForNull Localizable description, @CheckForNull Permission impliedBy) {
this(group, name, description, impliedBy, PermissionScope.JENKINS);
}
......@@ -189,6 +191,7 @@ public final class Permission {
* @deprecated since 1.257.
* Use {@link #Permission(PermissionGroup, String, Localizable, Permission)}
*/
@Deprecated
public Permission(@Nonnull PermissionGroup group, @Nonnull String name, @CheckForNull Permission impliedBy) {
this(group,name,null,impliedBy);
}
......@@ -293,6 +296,7 @@ public final class Permission {
* @deprecated since 2009-01-23.
* Access {@link jenkins.model.Jenkins#PERMISSIONS} instead.
*/
@Deprecated
public static final PermissionGroup HUDSON_PERMISSIONS = new PermissionGroup(Hudson.class, hudson.model.Messages._Hudson_Permissions_Title());
/**
* {@link Permission} that represents the God-like access. Equivalent of Unix root.
......@@ -303,6 +307,7 @@ public final class Permission {
* @deprecated since 2009-01-23.
* Access {@link jenkins.model.Jenkins#ADMINISTER} instead.
*/
@Deprecated
public static final Permission HUDSON_ADMINISTER = new Permission(HUDSON_PERMISSIONS,"Administer", hudson.model.Messages._Hudson_AdministerPermission_Description(),null);
//
......@@ -322,6 +327,7 @@ public final class Permission {
* @deprecated since 2009-01-23.
* Use {@link jenkins.model.Jenkins#ADMINISTER}.
*/
@Deprecated
public static final Permission FULL_CONTROL = new Permission(GROUP, "FullControl",null, HUDSON_ADMINISTER);
/**
......
......@@ -593,6 +593,7 @@ public abstract class SecurityRealm extends AbstractDescribableImpl<SecurityReal
* @deprecated as of 1.286
* Use {@link #all()} for read access, and use {@link Extension} for registration.
*/
@Deprecated
public static final DescriptorList<SecurityRealm> LIST = new DescriptorList<SecurityRealm>(SecurityRealm.class);
/**
......
......@@ -62,6 +62,7 @@ public class Channels {
* @deprecated since 2009-04-13.
* Use {@link #forProcess(String, ExecutorService, InputStream, OutputStream, OutputStream, Proc)}
*/
@Deprecated
public static Channel forProcess(String name, ExecutorService execService, InputStream in, OutputStream out, Proc proc) throws IOException {
return forProcess(name,execService,in,out,null,proc);
}
......
......@@ -165,6 +165,7 @@ public abstract class Cloud extends AbstractModelObject implements ExtensionPoin
* @deprecated as of 1.286
* Use {@link #all()} for read access, and {@link Extension} for registration.
*/
@Deprecated
public static final DescriptorList<Cloud> ALL = new DescriptorList<Cloud>(Cloud.class);
/**
......
......@@ -93,6 +93,7 @@ public abstract class ComputerLauncher extends AbstractDescribableImpl<ComputerL
* @deprecated as of 1.304
* Use {@link #launch(SlaveComputer, TaskListener)}
*/
@Deprecated
public void launch(SlaveComputer computer, StreamTaskListener listener) throws IOException , InterruptedException {
throw new UnsupportedOperationException(getClass()+" must implement the launch method");
}
......@@ -117,6 +118,7 @@ public abstract class ComputerLauncher extends AbstractDescribableImpl<ComputerL
* @deprecated as of 1.304
* Use {@link #afterDisconnect(SlaveComputer, TaskListener)}
*/
@Deprecated
public void afterDisconnect(SlaveComputer computer, StreamTaskListener listener) {
}
......@@ -143,6 +145,7 @@ public abstract class ComputerLauncher extends AbstractDescribableImpl<ComputerL
* @deprecated as of 1.304
* Use {@link #beforeDisconnect(SlaveComputer, TaskListener)}
*/
@Deprecated
public void beforeDisconnect(SlaveComputer computer, StreamTaskListener listener) {
}
......@@ -159,6 +162,7 @@ public abstract class ComputerLauncher extends AbstractDescribableImpl<ComputerL
* Use {@link Extension} for registration, and use
* {@link jenkins.model.Jenkins#getDescriptorList(Class)} for read access.
*/
@Deprecated
public static final DescriptorList<ComputerLauncher> LIST = new DescriptorList<ComputerLauncher>(ComputerLauncher.class);
/**
......
......@@ -132,6 +132,7 @@ public abstract class ComputerListener implements ExtensionPoint {
* @deprecated as of 1.292
* Use {@link #onOnline(Computer, TaskListener)}
*/
@Deprecated
public void onOnline(Computer c) {}
/**
......@@ -214,6 +215,7 @@ public abstract class ComputerListener implements ExtensionPoint {
* @deprecated as of 1.286
* put {@link Extension} on your class to have it auto-registered.
*/
@Deprecated
public final void register() {
all().add(this);
}
......
......@@ -44,6 +44,7 @@ public final class DumbSlave extends Slave {
* @deprecated as of 1.286.
* Use {@link #DumbSlave(String, String, String, String, Node.Mode, String, ComputerLauncher, RetentionStrategy, List)}
*/
@Deprecated
public DumbSlave(String name, String nodeDescription, String remoteFS, String numExecutors, Mode mode, String labelString, ComputerLauncher launcher, RetentionStrategy retentionStrategy) throws FormException, IOException {
this(name, nodeDescription, remoteFS, numExecutors, mode, labelString, launcher, retentionStrategy, new ArrayList());
}
......
......@@ -120,6 +120,7 @@ public abstract class NodeDescriptor extends Descriptor<Node> {
* @deprecated as of 1.286
* Use {@link #all()} for read access, and {@link Extension} for registration.
*/
@Deprecated
public static final DescriptorList<Node> ALL = new DescriptorList<Node>(Node.class);
public static List<NodeDescriptor> allInstantiable() {
......
......@@ -97,6 +97,7 @@ public abstract class NodeProperty<N extends Node> implements ReconfigurableDesc
* @deprecated as of 1.413
* Use {@link #canTake(Queue.BuildableItem)}
*/
@Deprecated
public CauseOfBlockage canTake(Task task) {
return null;
}
......
......@@ -392,6 +392,7 @@ public class NodeProvisioner {
* The number of items in the queue requiring this {@link #getLabel()}.
* @deprecated use {@link #getSnapshot()}, {@link LoadStatistics.LoadStatisticsSnapshot#getQueueLength()}
*/
@Deprecated
public int getQueueLengthSnapshot() {
return snapshot.getQueueLength();
}
......@@ -407,6 +408,7 @@ public class NodeProvisioner {
* The number of idle executors for this {@link #getLabel()}
* @deprecated use {@link #getSnapshot()}, {@link LoadStatistics.LoadStatisticsSnapshot#getAvailableExecutors()}
*/
@Deprecated
public int getIdleSnapshot() {
return snapshot.getAvailableExecutors();
}
......@@ -415,6 +417,7 @@ public class NodeProvisioner {
* The total number of executors for this {@link #getLabel()}
* @deprecated use {@link #getSnapshot()}, {@link LoadStatistics.LoadStatisticsSnapshot#getOnlineExecutors()}
*/
@Deprecated
public int getTotalSnapshot() {
return snapshot.getOnlineExecutors();
}
......@@ -450,6 +453,7 @@ public class NodeProvisioner {
* The time series average number of idle executors for this {@link #getLabel()}
* @deprecated use {@link #getAvailableExecutorsLatest()}
*/
@Deprecated
public float getIdleLatest() {
return getAvailableExecutorsLatest();
}
......@@ -458,6 +462,7 @@ public class NodeProvisioner {
* The time series average total number of executors for this {@link #getLabel()}
* @deprecated use {@link #getOnlineExecutorsLatest()}
*/
@Deprecated
public float getTotalLatest() {
return getOnlineExecutorsLatest();
}
......
......@@ -115,6 +115,7 @@ public abstract class RetentionStrategy<T extends Computer> extends AbstractDesc
* @deprecated as of 1.286
* Use {@link #all()} for read access, and {@link Extension} for registration.
*/
@Deprecated
public static final DescriptorList<RetentionStrategy<?>> LIST = new DescriptorList<RetentionStrategy<?>>((Class)RetentionStrategy.class);
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册