Make the SystemProperties API available to plugins
@@ -74,9 +74,10 @@ import org.kohsuke.accmod.restrictions.NoExternalUse;
*
* <p>While it looks like it on first glance, this cannot be mapped to {@link EnvVars},
* because {@link EnvVars} is only for build variables, not Jenkins itself variables.
+ *
+ * @since TODO
*/
@SuppressFBWarnings(value = "ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD", justification = "Currently Jenkins instance may have one ond only one context")
-@Restricted(NoExternalUse.class)
public class SystemProperties {
@FunctionalInterface
@@ -90,6 +91,7 @@ public class SystemProperties {
private static @NonNull Handler handler = NULL_HANDLER;
// declared in WEB-INF/web.xml
+ @Restricted(NoExternalUse.class)
public static final class Listener implements ServletContextListener, OnMaster {
/**
@@ -122,12 +124,15 @@ public class SystemProperties {
/**
* Mark a key whose value should be made accessible in agent JVMs.
+ *
+ * @param key Property key to be explicitly allowed
*/
public static void allowOnAgent(String key) {
ALLOW_ON_AGENT.add(key);
}
@Extension
+ @Restricted(NoExternalUse.class)
public static final class AgentCopier extends ComputerListener {
@Override
public void preOnline(Computer c, Channel channel, FilePath root, TaskListener listener) throws IOException, InterruptedException {
