net.nemerosa.ontrack.job.JobRunProgress Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ontrack-job Show documentation
Show all versions of ontrack-job Show documentation
Abstract management of identified jobs.
package net.nemerosa.ontrack.job;
import lombok.Data;
@Data
public class JobRunProgress {
private final int percentage;
private final String message;
public static JobRunProgress message(String pattern, Object... parameters) {
return new JobRunProgress(-1, String.format(pattern, parameters));
}
public String getText() {
if (percentage >= 0) {
return String.format("%s (%d %%)", message, percentage);
} else {
return message;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy