congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
ResourceConfigs.importFromCsv
Code IndexAdd Tabnine to your IDE (free)

How to use
importFromCsv
method
in
com.thoughtworks.go.config.ResourceConfigs

Best Java code snippets using com.thoughtworks.go.config.ResourceConfigs.importFromCsv (Showing top 3 results out of 315)

origin: gocd/gocd

  public CruiseConfig update(CruiseConfig cruiseConfig) {
    AgentConfig agentConfig = cruiseConfig.agents().getAgentByUuid(uuid);
    agentConfig.getResourceConfigs().importFromCsv(resources);
    return cruiseConfig;
  }
}
origin: gocd/gocd

public void setConfigAttributes(Object attributes, TaskFactory taskFactory) {
  Map attributesMap = (Map) attributes;
  if (attributesMap.containsKey(NAME)) {
    String nameString = (String) attributesMap.get(NAME);
    jobName = nameString == null ? null : new CaseInsensitiveString(nameString);
  }
  if (attributesMap.containsKey("elasticProfileId")) {
    String elasticProfileId = (String) attributesMap.get("elasticProfileId");
    setElasticProfileId(StringUtils.isBlank(elasticProfileId) ? null : elasticProfileId);
  }
  if (attributesMap.containsKey(TASKS)) {
    tasks.setConfigAttributes(attributesMap.get(TASKS), taskFactory);
  }
  if (attributesMap.containsKey(ENVIRONMENT_VARIABLES)) {
    variables.setConfigAttributes(attributesMap.get(ENVIRONMENT_VARIABLES));
  }
  if (attributesMap.containsKey(TABS)) {
    tabs.setConfigAttributes(attributesMap.get(TABS));
  }
  if (attributesMap.containsKey(RESOURCES)) {
    resourceConfigs.importFromCsv((String) attributesMap.get(RESOURCES));
  }
  if (attributesMap.containsKey(ARTIFACT_CONFIGS)) {
    artifactConfigs.setConfigAttributes(attributesMap.get(ARTIFACT_CONFIGS));
  }
  setTimeoutAttribute(attributesMap);
  setJobRunTypeAttribute(attributesMap);
}
origin: gocd/gocd

@Test
public void shouldClearAndSetPrimitiveAttributes() {
  ResourceConfigs resourceConfigs = new ResourceConfigs();
  String csv = "a, b,   c,d   ";
  resourceConfigs.add(new ResourceConfig("old_resource"));
  assertThat(resourceConfigs.size(), is(1));
  resourceConfigs.importFromCsv(csv);
  assertThat(resourceConfigs.size(), is(4));
  assertThat(resourceConfigs.exportToCsv(), is("a, b, c, d, "));
}
com.thoughtworks.go.configResourceConfigsimportFromCsv

Popular methods of ResourceConfigs

  • <init>
  • add
  • resourceNames
  • clear
  • contains
  • stream
  • validateTree
  • compareTo
  • containsAll
  • equals
  • errors
  • exportToCsv
  • errors,
  • exportToCsv,
  • hashCode,
  • isEmpty,
  • iterator,
  • join,
  • remove,
  • size,
  • toString

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getApplicationContext (Context)
  • getExternalFilesDir (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Top 17 PhpStorm Plugins
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