use of org.jenkinsci.plugins.workflow.job.properties.DisableResumeJobProperty in project workflow-job-plugin by jenkinsci.
the class WorkflowJob method setResumeBlocked.
@Override
public void setResumeBlocked(boolean resumeBlocked) {
try {
boolean previousState = isResumeBlocked();
if (resumeBlocked != previousState) {
BulkChange bc = new BulkChange(this);
try {
removeProperty(DisableResumeJobProperty.class);
if (resumeBlocked) {
addProperty(new DisableResumeJobProperty());
}
bc.commit();
} finally {
bc.abort();
}
}
} catch (IOException ioe) {
LOGGER.log(Level.WARNING, "Error persisting resume property statue", ioe);
}
}
Aggregations