Example usage for org.eclipse.jgit.storage.file FileBasedConfig setStringList

List of usage examples for org.eclipse.jgit.storage.file FileBasedConfig setStringList

Introduction

In this page you can find the example usage for org.eclipse.jgit.storage.file FileBasedConfig setStringList.

Prototype

public void setStringList(final String section, final String subsection, final String name,
        final List<String> values) 

Source Link

Document

Set a configuration value.

Usage

From source file:com.googlesource.gerrit.plugins.its.jira.JiraITTest.java

License:Apache License

private void createItsRulesConfigWithTransitions() throws IOException {
    FileBasedConfig cfg = new FileBasedConfig(its_dir.resolve("actions-its-jira.config").toFile(), FS.DETECTED);
    cfg.setString("rule", "open", "event-type", "patchset-created");
    List<String> actions = new ArrayList<>();
    actions.add(TRANSITION);// w ww.  j  a  va2s . c o m
    cfg.setStringList("rule", "open", "action", actions);
    cfg.save();
}

From source file:com.googlesource.gerrit.plugins.its.jira.JiraITTest.java

License:Apache License

private void createItsRulesConfigWithComment() throws IOException {
    FileBasedConfig cfg = new FileBasedConfig(its_dir.resolve("actions-its-jira.config").toFile(), FS.DETECTED);
    cfg.setString("rule", "open", "event-type", "patchset-created");
    List<String> actions = new ArrayList<>();
    actions.add("add-comment Change created");
    cfg.setStringList("rule", "open", "action", actions);
    cfg.save();//from  www.j a  va 2 s.c  o  m
}

From source file:com.googlesource.gerrit.plugins.its.jira.JiraITTest.java

License:Apache License

private void createItsRulesConfigWithAllActions() throws IOException {
    FileBasedConfig cfg = new FileBasedConfig(its_dir.resolve("actions-its-jira.config").toFile(), FS.DETECTED);
    cfg.setString("rule", "open", "event-type", "patchset-created");
    List<String> actions = new ArrayList<>();
    actions.add(TRANSITION);//from  w w  w.  j ava 2 s .c  o  m
    actions.add("add-comment Change created");
    cfg.setStringList("rule", "open", "action", actions);
    cfg.save();
}