Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions core/src/main/java/jenkins/model/Jenkins.java
Original file line number Diff line number Diff line change
Expand Up @@ -1373,10 +1373,32 @@ public UpdateCenter getUpdateCenter() {
return updateCenter;
}

/**
* If usage statistics has been disabled
*
* @since TODO
*/
@CheckForNull
public Boolean isNoUsageStatistics() {
Comment thread
timja marked this conversation as resolved.
return noUsageStatistics;
}

/**
* If usage statistics are being collected
*
Comment thread
timja marked this conversation as resolved.
* @return {@code true} if usage statistics should be collected.
* Defaults to {@code true} when {@link #noUsageStatistics} is not set.
* @since TODO
Comment thread
daniel-beck marked this conversation as resolved.
*/
public boolean isUsageStatisticsCollected() {
return noUsageStatistics==null || !noUsageStatistics;
}

/**
* Sets the noUsageStatistics flag
*
* @since TODO

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was introduced in 2011 or earlier, so it is not a big deal. All reasonable versions will be compatible 70c1065

*/
public void setNoUsageStatistics(Boolean noUsageStatistics) throws IOException {
this.noUsageStatistics = noUsageStatistics;
save();
Expand Down