/** * Determines the initial state of the checkbox. * * @return true when the view is empty or already contains jobs specified by name. */ @Restricted(NoExternalUse.class) // called from newJob_button-bar view @SuppressWarnings("unused") // called from newJob_button-bar view public boolean isAddToCurrentView() { synchronized(this) { return !jobNames.isEmpty() || // There are already items in this view specified by name (jobFilters.isEmpty() && includePattern == null) // No other way to include items is used ; } }
if (QueueItemAuthenticatorDescriptor.all().isEmpty()) { LOGGER.fine("no QueueItemAuthenticator implementations installed"); } else if (QueueItemAuthenticatorConfiguration.get().getAuthenticators().isEmpty()) { LOGGER.fine("no QueueItemAuthenticator implementations configured"); } else {
/** * Determines the initial state of the checkbox. * * @return true when the view is empty or already contains jobs specified by name. */ @Restricted(NoExternalUse.class) // called from newJob_button-bar view @SuppressWarnings("unused") // called from newJob_button-bar view public boolean isAddToCurrentView() { synchronized(this) { return !jobNames.isEmpty() || // There are already items in this view specified by name (jobFilters.isEmpty() && includePattern == null) // No other way to include items is used ; } }
protected void convertPublishersProperties() { if ((null != publishers) && !publishers.isEmpty()) { putAllProjectProperties(DescribableListUtil.convertToProjectProperties(publishers, this), false); } publishers = null; }
protected void convertBuildWrappersProperties() { if ((null != buildWrappers) && !buildWrappers.isEmpty() ) { putAllProjectProperties(DescribableListUtil.convertToProjectProperties(buildWrappers, this), false); } buildWrappers = null; }
@Override protected boolean returnOriginalValue() { return isOverridden() || !getOriginalValue().isEmpty(); }
@Override protected boolean returnOriginalValue() { return isOverridden() || !getOriginalValue().isEmpty(); }
protected void convertBuildersProjectProperty() { if ((null != builders) && !builders.isEmpty() && (null == getProperty(BUILDERS_PROPERTY_NAME))) { setBuilders(builders); } builders = null; }
@Override protected boolean returnOriginalValue() { return isOverridden() || !getOriginalValue().isEmpty(); }
@Override protected boolean returnOriginalValue() { return isOverridden() || !getOriginalValue().isEmpty(); }
protected void convertBuildersProperties() { if ((null != builders) && !builders.isEmpty() && (null == getProperty(BUILDERS_PROPERTY_NAME))) { putAllProjectProperties(DescribableListUtil.convertToProjectProperties(builders, this), false); } builders = null; }
public boolean isUpstreamBuildVisibleByDownstreamBuildAuth(@Nonnull WorkflowJob upstreamPipeline, @Nonnull Queue.Task downstreamPipeline) { Authentication auth = Tasks.getAuthenticationOf(downstreamPipeline); Authentication downstreamPipelineAuth; if (auth.equals(ACL.SYSTEM) && !QueueItemAuthenticatorConfiguration.get().getAuthenticators().isEmpty()) { downstreamPipelineAuth = Jenkins.ANONYMOUS; // cf. BuildTrigger } else { downstreamPipelineAuth = auth; } try (ACLContext ignored = ACL.as(downstreamPipelineAuth)) { WorkflowJob upstreamPipelineObtainedAsImpersonated = getItemByFullName(upstreamPipeline.getFullName(), WorkflowJob.class); boolean result = upstreamPipelineObtainedAsImpersonated != null; LOGGER.log(Level.FINE, "isUpstreamBuildVisibleByDownstreamBuildAuth({0}, {1}): taskAuth: {2}, downstreamPipelineAuth: {3}, upstreamPipelineObtainedAsImpersonated:{4}, result: {5}", new Object[]{upstreamPipeline, downstreamPipeline, auth, downstreamPipelineAuth, upstreamPipelineObtainedAsImpersonated, result}); return result; } }
if (list.isEmpty()) { it.remove();
List<TopLevelItem> items = new LinkedList<TopLevelItem>(); if (this.getProjectReferences().isEmpty()) {
List<TopLevelItem> items = new LinkedList<TopLevelItem>(); if (this.getProjectReferences().isEmpty()) {
if (auth.equals(ACL.SYSTEM) && !QueueItemAuthenticatorConfiguration.get().getAuthenticators().isEmpty()) { auth = Jenkins.ANONYMOUS;
@Exported(name = "healthReport") public List<HealthReport> getBuildHealthReports() { if (healthMetrics == null || healthMetrics.isEmpty()) { return Collections.emptyList();
@Exported(name = "healthReport") public List<HealthReport> getBuildHealthReports() { if (healthMetrics == null || healthMetrics.isEmpty()) { return Collections.<HealthReport>emptyList();
if (QueueItemAuthenticatorDescriptor.all().isEmpty()) { LOGGER.fine("no QueueItemAuthenticator implementations installed"); } else if (QueueItemAuthenticatorConfiguration.get().getAuthenticators().isEmpty()) { LOGGER.fine("no QueueItemAuthenticator implementations configured"); } else {
@Override public void onLoad(ItemGroup<? extends Item> parent, String name) throws IOException { super.onLoad(parent, name); if (buildMixIn == null) { buildMixIn = createBuildMixIn(); } buildMixIn.onLoad(parent, name); if (triggers != null && !triggers.isEmpty()) { setTriggers(triggers.toList()); } if (concurrentBuild != null) { setConcurrentBuild(concurrentBuild); } getTriggersJobProperty().stopTriggers(); getTriggersJobProperty().startTriggers(Items.currentlyUpdatingByXml()); }