Skip to content

Commit

Permalink
Javadoc and @SInCE as applicable
Browse files Browse the repository at this point in the history
  • Loading branch information
Vlatombe committed Oct 15, 2024
1 parent 3a6d79c commit 168ffeb
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/src/main/java/hudson/model/Computer.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Expand Down
3 changes: 3 additions & 0 deletions core/src/main/java/hudson/model/Node.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
3 changes: 3 additions & 0 deletions core/src/main/java/hudson/slaves/OfflineCause.java
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,9 @@ public User getUser() {
;
}

/**
* @return the message that was provided when the computer was taken offline
*/
public String getMessage() {
return message;
}
Expand Down

0 comments on commit 168ffeb

Please sign in to comment.