From 168ffeb6e5303627d814c29608315403cf477bff Mon Sep 17 00:00:00 2001 From: Vincent Latombe Date: Tue, 15 Oct 2024 09:06:47 +0200 Subject: [PATCH] Javadoc and @since as applicable --- core/src/main/java/hudson/model/Computer.java | 5 +++++ core/src/main/java/hudson/model/Node.java | 3 +++ core/src/main/java/hudson/slaves/OfflineCause.java | 3 +++ 3 files changed, 11 insertions(+) diff --git a/core/src/main/java/hudson/model/Computer.java b/core/src/main/java/hudson/model/Computer.java index e9d7c0a36427..7887cc07edd8 100644 --- a/core/src/main/java/hudson/model/Computer.java +++ b/core/src/main/java/hudson/model/Computer.java @@ -704,6 +704,7 @@ public void setTemporarilyOffline(boolean temporarilyOffline, OfflineCause cause * * @param temporaryOfflineCause The reason why the node is being put offline. * If null, this cancels the status + * @since TODO */ public void setTemporaryOfflineCause(@CheckForNull OfflineCause temporaryOfflineCause) { var node = getNode(); @@ -713,6 +714,10 @@ public void setTemporaryOfflineCause(@CheckForNull OfflineCause temporaryOffline node.setTemporaryOfflineCause(temporaryOfflineCause); } + /** + * @since TODO + * @return If the node is temporarily offline, the reason why. + */ @SuppressWarnings("unused") // used by setOfflineCause.jelly public String getTemporaryOfflineCauseReason() { var node = getNode(); diff --git a/core/src/main/java/hudson/model/Node.java b/core/src/main/java/hudson/model/Node.java index 4faa3ed106b4..d918b0f1db34 100644 --- a/core/src/main/java/hudson/model/Node.java +++ b/core/src/main/java/hudson/model/Node.java @@ -264,6 +264,9 @@ public void onLoad(Nodes parent, String name) { setNodeName(name); } + /** + * @return true if this node has a temporary offline cause set. + */ boolean isTemporarilyOffline() { return temporaryOfflineCause != null; } diff --git a/core/src/main/java/hudson/slaves/OfflineCause.java b/core/src/main/java/hudson/slaves/OfflineCause.java index 3f075a1acda9..2a267ef03a4a 100644 --- a/core/src/main/java/hudson/slaves/OfflineCause.java +++ b/core/src/main/java/hudson/slaves/OfflineCause.java @@ -170,6 +170,9 @@ public User getUser() { ; } + /** + * @return the message that was provided when the computer was taken offline + */ public String getMessage() { return message; }