Codota Logo
DescribableList.get
Code IndexAdd Codota to your IDE (free)

How to use
get
method
in
hudson.util.DescribableList

Best Java code snippets using hudson.util.DescribableList.get (Showing top 20 results out of 540)

  • Common ways to obtain DescribableList
private void myMethod () {
DescribableList d =
  • Codota IconBuildableItemWithBuildWrappers biwbw;biwbw.getBuildWrappersList()
  • Codota IconSaveable owner;new DescribableList<ToolProperty<?>, ToolPropertyDescriptor>(owner)
  • Codota IconListView listView;new DescribableList<ViewJobFilter, Descriptor<ViewJobFilter>>(listView)
  • Smart code suggestions by Codota
}
origin: jenkinsci/jenkins

public boolean contains(D d) {
  return get(d)!=null;
}
origin: jenkinsci/jenkins

@Override
public boolean isFingerprintConfigured() {
  return getPublishersList().get(Fingerprinter.class)!=null;
}
origin: jenkinsci/jenkins

/**
 * Is this monitor currently ignored?
 */
public boolean isIgnored() {
  NodeMonitor m = ComputerSet.getMonitors().get(this);
  return m==null || m.isIgnored();
}
origin: jenkinsci/jenkins

public MavenInstallation inferMavenInstallation() {
  Maven m = getBuildersList().get(Maven.class);
  if (m!=null)    return m.getMaven();
  return null;
}
origin: jenkinsci/jenkins

/**
 * Returns only those upstream projects that defines {@link BuildTrigger} to this project.
 * This is a subset of {@link #getUpstreamProjects()}
 * <p>No longer used in the UI.
 * @return A List of upstream projects that has a {@link BuildTrigger} to this project.
 */
public final List<AbstractProject> getBuildTriggerUpstreamProjects() {
  ArrayList<AbstractProject> result = new ArrayList<AbstractProject>();
  for (AbstractProject<?,?> ap : getUpstreamProjects()) {
    BuildTrigger buildTrigger = ap.getPublishersList().get(BuildTrigger.class);
    if (buildTrigger != null)
      if (buildTrigger.getChildJobs(ap).contains(this))
        result.add(ap);
  }
  return result;
}
origin: jenkinsci/jenkins

  private void locationChanged(Item item, String oldFullName, String newFullName) {
    // update BuildTrigger of other projects that point to this object.
    // can't we generalize this?
    for( Project<?,?> p : Jenkins.getInstance().allItems(Project.class) ) {
      BuildTrigger t = p.getPublishersList().get(BuildTrigger.class);
      if(t!=null) {
        String cp2 = Items.computeRelativeNamesAfterRenaming(oldFullName, newFullName, t.childProjects, p.getParent());
        if (!cp2.equals(t.childProjects)) {
          t.childProjects = cp2;
          try {
            p.save();
          } catch (IOException e) {
            LOGGER.log(Level.WARNING, "Failed to persist project setting during rename from "+oldFullName+" to "+newFullName,e);
          }
        }
      }
    }
  }
}
origin: jenkinsci/jenkins

  return null;
InstallSourceProperty isp = tool.getProperties().get(InstallSourceProperty.class);
if (isp == null) {
  return null;
origin: jenkinsci/jenkins

T existing = get((D)d);
String name = d.getJsonSafeClassName();
JSONObject o = json.optJSONObject(name);
origin: jenkinsci/jenkins

ToolLocationNodeProperty property = node.getNodeProperties().get(ToolLocationNodeProperty.class);
if (property != null) {
  result = property.getHome(installation);
origin: jenkinsci/gitlab-plugin

  public static String resolvePendingBuildName(Job<?, ?> job) {
    if (job instanceof AbstractProject) {
      GitLabCommitStatusPublisher publisher =
        (GitLabCommitStatusPublisher) ((AbstractProject) job).getPublishersList().get(GitLabCommitStatusPublisher.class);
      if (publisher != null) {
        return publisher.getName();
      }
    } else if (job instanceof WorkflowJob) {
      GitLabPushTrigger trigger = GitLabPushTrigger.getFromJob(job);
      if (trigger != null) {
        return trigger.getPendingBuildName();
      }
    }
    return null;
  }
}
origin: jenkinsci/jenkins

for (AbstractProject<?,?> p : Jenkins.getInstance().allItems(AbstractProject.class)) {
  try {
    ArtifactArchiver aa = p.getPublishersList().get(ArtifactArchiver.class);
    if (aa != null && aa.latestOnly != null) {
      if (aa.latestOnly) {
      p.save();
    Fingerprinter f = p.getPublishersList().get(Fingerprinter.class);
    if (f != null && f.getRecordBuildArtifacts()) {
      f.recordBuildArtifacts = null;
origin: jenkinsci/jenkins

/**
 * Accepts submission from the configuration page.
 */
@RequirePOST
public synchronized HttpResponse doConfigSubmit( StaplerRequest req) throws IOException, ServletException, FormException {
  BulkChange bc = new BulkChange(MONITORS_OWNER);
  try {
    Jenkins.getInstance().checkPermission(Jenkins.ADMINISTER);
    monitors.rebuild(req,req.getSubmittedForm(),getNodeMonitorDescriptors());
    // add in the rest of instances are ignored instances
    for (Descriptor<NodeMonitor> d : NodeMonitor.all())
      if(monitors.get(d)==null) {
        NodeMonitor i = createDefaultInstance(d, true);
        if(i!=null)
          monitors.add(i);
      }
    // recompute the data
    for (NodeMonitor nm : monitors) {
      nm.triggerUpdate();
    }
    return FormApply.success(".");
  } finally {
    bc.commit();
  }
}
origin: jenkinsci/configuration-as-code-plugin

  @Test
  @ConfiguredWithCode("MavenConfiguratorTest.yml")
  public void should_configure_maven_tools_and_global_config() {
    final Maven.DescriptorImpl descriptor= (Maven.DescriptorImpl) j.jenkins.getDescriptorOrDie(Maven.class);
    Assert.assertEquals(1, descriptor.getInstallations().length);
    Assert.assertEquals("/usr/share/maven", descriptor.getInstallations()[0].getHome());

    InstallSourceProperty installSourceProperty = descriptor.getInstallations()[0].getProperties().get(InstallSourceProperty.class);
    Assert.assertEquals("3.5.0", installSourceProperty.installers.get(Maven.MavenInstaller.class).id);

    final SettingsProvider provider = GlobalMavenConfig.get().getSettingsProvider();
    Assert.assertTrue(provider instanceof FilePathSettingsProvider);
    Assert.assertEquals("/usr/share/maven-settings.xml", ((FilePathSettingsProvider)provider).getPath());
  }
}
origin: jenkinsci/configuration-as-code-plugin

  @Test
  @ConfiguredWithCode("JdkConfiguratorTest.yml")
  public void should_configure_maven_tools_and_global_config() {
    final Object descriptor = j.jenkins.getDescriptorOrDie(JDK.class);
    Assert.assertNotNull(descriptor);
    Assert.assertEquals(1, ((JDK.DescriptorImpl) descriptor).getInstallations().length);

    JDK jdk = ((JDK.DescriptorImpl) descriptor).getInstallations()[0];
    Assert.assertEquals("jdk8", jdk.getName());
    Assert.assertEquals("/jdk", jdk.getHome());

    InstallSourceProperty installSourceProperty = jdk.getProperties().get(InstallSourceProperty.class);
    Assert.assertEquals(1, installSourceProperty.installers.size());

    JDKInstaller installer = installSourceProperty.installers.get(JDKInstaller.class);
    Assert.assertEquals("jdk-8u181-oth-JPR", installer.id);
    Assert.assertTrue(installer.acceptLicense);
  }
}
origin: org.jenkins-ci.plugins/git

/**
 * @deprecated
 *      Moved to {@link IgnoreNotifyCommit}
 * @return true if commit notifications are ignored
 */
public boolean isIgnoreNotifyCommit() {
  return getExtensions().get(IgnoreNotifyCommit.class)!=null;
}
origin: org.jenkins-ci.plugins/git

/**
 * @deprecated
 *      Moved to {@link WipeWorkspace}
 * @return true if wipe workspace extenstion is enabled
 */
public boolean getWipeOutWorkspace() {
  return getExtensions().get(WipeWorkspace.class)!=null;
}
origin: org.jenkins-ci.plugins/git

@Deprecated
public String getExcludedUsers() {
  UserExclusion ue = getExtensions().get(UserExclusion.class);
  return ue!=null ? ue.getExcludedUsers() : null;
}
origin: org.jenkins-ci.plugins/git

/**
 * @deprecated
 *      Moved to {@link CloneOption}
 * @return reference repository or null if reference repository is not defined
 */
public String getReference() {
  CloneOption m = getExtensions().get(CloneOption.class);
  return m!=null ? m.getReference() : null;
}
origin: org.jenkins-ci.plugins/git

/**
 * @deprecated
 *      Moved to {@link LocalBranch}
 * @return name of local branch used for checkout or null if LocalBranch extension is not enabled
 */
public String getLocalBranch() {
  LocalBranch lb = getExtensions().get(LocalBranch.class);
  return lb!=null ? lb.getLocalBranch() : null;
}
origin: jenkinsci/ghprb-plugin

  private void addIfMissing(GhprbExtension ext) {
    if (getExtensions().get(ext.getClass()) == null) {
      getExtensions().add(ext);
    }
  }
}
hudson.utilDescribableListget

Javadoc

Binds items in the collection to URL.

Popular methods of DescribableList

  • 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
  • isEmpty
  • addAll,
  • isEmpty,
  • replace,
  • replaceBy,
  • addAllTo,
  • removeAll,
  • size,
  • onModified,
  • clear

Popular in Java

  • Making http post requests using okhttp
  • addToBackStack (FragmentTransaction)
  • getApplicationContext (Context)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • BitSet (java.util)
    This class implements a vector of bits that grows as needed. Each component of the bit set has a boo
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • JList (javax.swing)
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now