/** * @param item A changed project * @return null if this is not a template implementation project */ private static TemplateImplementationProperty getTemplateImplementationProperty(Item item) { if (item instanceof AbstractProject) { return (TemplateImplementationProperty) ((AbstractProject) item).getProperty(TemplateImplementationProperty.class); } return null; }
void convertConcurrentBuildProperty() throws IOException { if (null == getProperty(CONCURRENT_BUILD_PROPERTY_NAME)) { setConcurrentBuild(concurrentBuild); concurrentBuild = false; } }
void convertQuietPeriodProperty() throws IOException { if (null != quietPeriod && null == getProperty(QUIET_PERIOD_PROPERTY_NAME)) { setQuietPeriod(quietPeriod); quietPeriod = null; } }
void convertCleanWorkspaceRequiredProperty() throws IOException { if (null == getProperty(CLEAN_WORKSPACE_REQUIRED_PROPERTY_NAME)) { setCleanWorkspaceRequired(cleanWorkspaceRequired); cleanWorkspaceRequired = false; } }
void convertQuietPeriodProperty() throws IOException { if (null != quietPeriod && null == getProperty(QUIET_PERIOD_PROPERTY_NAME)) { setQuietPeriod(quietPeriod); quietPeriod = null; } }
void convertJDKProperty() throws IOException { if (null != jdk && null == getProperty(JDK_PROPERTY_NAME)) { setJDK(jdk); jdk = null; } }
void convertScmProperty() throws IOException { if (null != scm && null == getProperty(SCM_PROPERTY_NAME)) { setScm(scm); scm = null; } }
public Long getDiskUsageWithoutBuilds(){ DiskUsageProperty property = project.getProperty(DiskUsageProperty.class); if(property==null){ DiskUsageUtil.addProperty(project); property = project.getProperty(DiskUsageProperty.class); } return property.getDiskUsageWithoutBuilds(); }
void convertScmCheckoutRetryCountProperty() throws IOException { if (null != scmCheckoutRetryCount && null == getProperty(SCM_CHECKOUT_RETRY_COUNT_PROPERTY_NAME)) { setScmCheckoutRetryCount(scmCheckoutRetryCount); scmCheckoutRetryCount = null; } }
void convertBlockBuildWhenDownstreamBuildingProperty() throws IOException { if (null == getProperty(BLOCK_BUILD_WHEN_DOWNSTREAM_BUILDING_PROPERTY_NAME)) { setBlockBuildWhenDownstreamBuilding(blockBuildWhenDownstreamBuilding); blockBuildWhenDownstreamBuilding = false; } }
void convertBlockBuildWhenUpstreamBuildingProperty() throws IOException { if (null == getProperty(BLOCK_BUILD_WHEN_UPSTREAM_BUILDING_PROPERTY_NAME)) { setBlockBuildWhenUpstreamBuilding(blockBuildWhenUpstreamBuilding, false); blockBuildWhenUpstreamBuilding = false; } }
void convertBlockBuildWhenDownstreamBuildingProperty() throws IOException { if (null == getProperty(BLOCK_BUILD_WHEN_DOWNSTREAM_BUILDING_PROPERTY_NAME)) { setBlockBuildWhenDownstreamBuilding(blockBuildWhenDownstreamBuilding, false); blockBuildWhenDownstreamBuilding = false; } }
void convertQuietPeriodProperty() throws IOException { if (null != quietPeriod && null == getProperty(QUIET_PERIOD_PROPERTY_NAME)) { setQuietPeriod(quietPeriod, false); quietPeriod = null; } }
void convertScmCheckoutRetryCountProperty() throws IOException { if (null != scmCheckoutRetryCount && null == getProperty(SCM_CHECKOUT_RETRY_COUNT_PROPERTY_NAME)) { setScmCheckoutRetryCount(scmCheckoutRetryCount); scmCheckoutRetryCount = null; } }
void convertScmProperty() throws IOException { if (null != scm && null == getProperty(SCM_PROPERTY_NAME)) { setScm(scm, false); scm = null; } }
@Override public boolean startsWithParameters(BuildPipelineView owner) { final AbstractProject<?, ?> firstJob = this.getFirstJob(owner); final ParametersDefinitionProperty pdp = firstJob.getProperty(ParametersDefinitionProperty.class); return pdp != null; }
private Map<String, ParameterValue> getDefaultParameters() { Map<String, ParameterValue> values = new HashMap<>(); if (job != null) { ParametersDefinitionProperty definitionProperty = job.getProperty(ParametersDefinitionProperty.class); if (definitionProperty != null) { for (ParameterDefinition definition : definitionProperty.getParameterDefinitions()) { values.put(definition.getName(), definition.getDefaultParameterValue()); } } } return values; }
public EmailExtWatchJobProperty getJobProperty() throws IOException { EmailExtWatchJobProperty prop = project.getProperty(EmailExtWatchJobProperty.class); if(prop == null) { prop = new EmailExtWatchJobProperty(); project.addProperty(prop); } return prop; }
void convertAppointedNode() { if (assignedNode != null && getProperty(APPOINTED_NODE_PROPERTY_NAME) == null) { setAppointedNode(new AppointedNode(assignedNode, advancedAffinityChooser)); assignedNode = null; advancedAffinityChooser = null; } }
/** * @return Disk usage of the build (included child builds) */ public Long getDiskUsage() { AbstractProject project = build.getProject(); DiskUsageProperty property = (DiskUsageProperty) project.getProperty(DiskUsageProperty.class); if(property==null){ DiskUsageUtil.addProperty(project); property = (DiskUsageProperty) project.getProperty(DiskUsageProperty.class); } return property.getDiskUsageOfBuild(build.getId()); }