congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
DescribableList.replace
Code IndexAdd Tabnine to your IDE (free)

How to use
replace
method
in
hudson.util.DescribableList

Best Java code snippets using hudson.util.DescribableList.replace (Showing top 10 results out of 315)

origin: org.jenkins-ci.plugins/git

public void setBuildChooser(BuildChooser buildChooser) throws IOException {
  if (buildChooser.getClass()==DefaultBuildChooser.class) {
    getExtensions().remove(BuildChooserSetting.class);
  } else {
    getExtensions().replace(new BuildChooserSetting(buildChooser));
  }
}
origin: jenkinsci/pipeline-model-definition-plugin

public void set() throws IOException {
  List<EnvironmentVariablesNodeProperty.Entry> entries = new ArrayList<>(env.size());
  for (Map.Entry<String, String> entry : env.entrySet()) {
    entries.add(new EnvironmentVariablesNodeProperty.Entry(entry.getKey(), entry.getValue()));
  }
  EnvironmentVariablesNodeProperty newProperty = new EnvironmentVariablesNodeProperty(entries);
  DescribableList<NodeProperty<?>, NodePropertyDescriptor> nodeProperties = agent.getNodeProperties();
  nodeProperties.replace(newProperty);
}
origin: com.marvelution.jira.plugins/jenkins-jira-plugin

  response.getWriter().write("Successfully added a new JIRA Build Notifier");
} else if (!currentNotifier.postUrl.equals(postUrl)) {
  publishers.replace(currentNotifier, newNotifier);
  response.getWriter().write("Successfully replaced the existing JIRA Build Notifier");
} else {
origin: org.jvnet.hudson.main/hudson-core

pl.replace(new BuildTrigger(newChildProjects,
  existing==null?Result.SUCCESS:existing.getThreshold()));
origin: hudson/hudson-2.x

pl.replace(new BuildTrigger(newChildProjects,
  existing==null?Result.SUCCESS:existing.getThreshold()));
origin: org.eclipse.hudson/hudson-core

  continue;   // no need to touch
pl.replace(new BuildTrigger(newChildProjects,
  existing == null ? Result.SUCCESS : existing.getThreshold()));
origin: org.eclipse.hudson.main/hudson-core

  continue;   // no need to touch
pl.replace(new BuildTrigger(newChildProjects,
    existing == null ? Result.SUCCESS : existing.getThreshold()));
origin: org.jenkins-ci.plugins/git

getExtensions().replace(new PreBuildMerge(new UserMergeOptions(mergeOptions)));
mergeOptions = null;
origin: jenkinsci/mercurial-plugin

public MercurialInstallation createInstallation(JenkinsRule r, Version v, boolean debug, boolean useCaches, boolean useSharing, String config, Slave... slaves) throws IOException {
  MercurialInstallation.DescriptorImpl desc = r.jenkins.getDescriptorByType(MercurialInstallation.DescriptorImpl.class);
  ToolLocationNodeProperty.ToolLocation location = new ToolLocationNodeProperty.ToolLocation(desc, v.name(), "/opt/mercurial-" + v.exactVersion);
  MercurialInstallation inst = new MercurialInstallation(v.name(), "", "INSTALLATION/hg", debug, useCaches, useSharing, config, null);
  desc.setInstallations((MercurialInstallation[]) ArrayUtils.add(desc.getInstallations(), inst)); // TODO stop calling this here, should be responsibility of caller
  for (Slave slave : slaves) {
    DescribableList<NodeProperty<?>, NodePropertyDescriptor> props = slave.getNodeProperties();
    ToolLocationNodeProperty prop = props.get(ToolLocationNodeProperty.class);
    List<ToolLocationNodeProperty.ToolLocation> locations;
    if (prop == null) {
      locations = Collections.singletonList(location);
    } else {
      locations = new ArrayList<>(prop.getLocations());
      locations.add(location);
    }
    props.replace(new ToolLocationNodeProperty(locations));
  }
  return inst;
}
origin: jenkinsci/workflow-multibranch-plugin

assertEquals(1, releaseBuild.get().getNumber());
assertEquals(2, release.getNextBuildNumber());
top.getProperties().replace(new NoTriggerOrganizationFolderProperty("(?!master$).*"));
round3();
WorkflowMultiBranchProjectTest.showIndexing(p);
hudson.utilDescribableListreplace

Javadoc

Removes all instances of the same type, then add the new one.

Popular methods of DescribableList

  • get
  • toList
  • add
  • <init>
  • rebuild
  • remove
  • setOwner
  • getAll
  • toMap
    Creates a detached map from the current snapshot of the data, keyed from a descriptor to an instance
  • buildDependencyGraph
    Picks up DependecyDeclarers and allow it to build dependencies.
  • rebuildHetero
    Rebuilds the list by creating a fresh instances from the submitted form. This version works with the
  • addAll
  • rebuildHetero,
  • addAll,
  • isEmpty,
  • replaceBy,
  • addAllTo,
  • removeAll,
  • size,
  • onModified,
  • clear

Popular in Java

  • Updating database using SQL prepared statement
  • addToBackStack (FragmentTransaction)
  • setRequestProperty (URLConnection)
  • putExtra (Intent)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Notification (javax.management)
  • JOptionPane (javax.swing)
  • Top 12 Jupyter Notebook Extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now