Skip to content
Permalink
Browse files
[JENKINS-40521] Added WorkflowJobProperty.isBuildable.
  • Loading branch information
jglick committed Feb 6, 2017
1 parent 139ac7e commit 333bd368a0d705b8273450bce6f9c7f6373aa651
@@ -205,6 +205,14 @@ public void setDefinition(FlowDefinition definition) {
}

@Override public boolean isBuildable() {
for (JobProperty<?> property : properties) {
if (property instanceof WorkflowJobProperty) {
Boolean buildable = ((WorkflowJobProperty) property).isBuildable();
if (buildable != null) {
return buildable;
}
}
}
return true; // why not?
}

@@ -26,6 +26,7 @@

import hudson.model.JobProperty;
import hudson.security.ACL;
import javax.annotation.CheckForNull;
import javax.annotation.Nonnull;

/**
@@ -40,4 +41,12 @@
return acl;
}

/**
* Allows a property to control whether {@link WorkflowJob#isBuildable}.
* @return a value, or null to have no effect
*/
public @CheckForNull Boolean isBuildable() {
return null;
}

}

0 comments on commit 333bd36

Please sign in to comment.