Search in sources :

Example 1 with SubscribeSection

use of com.google.gerrit.entities.SubscribeSection in project gerrit by GerritCodeReview.

the class ProjectConfig method saveSubscribeSections.

private void saveSubscribeSections(Config rc) {
    for (Project.NameKey p : subscribeSections.keySet()) {
        SubscribeSection s = subscribeSections.get(p);
        List<String> matchings = new ArrayList<>();
        for (String r : s.matchingRefSpecsAsString()) {
            matchings.add(r);
        }
        rc.setStringList(SUBSCRIBE_SECTION, p.get(), SUBSCRIBE_MATCH_REFS, matchings);
        List<String> multimatchs = new ArrayList<>();
        for (String r : s.multiMatchRefSpecsAsString()) {
            multimatchs.add(r);
        }
        rc.setStringList(SUBSCRIBE_SECTION, p.get(), SUBSCRIBE_MULTI_MATCH_REFS, multimatchs);
    }
}
Also used : Project(com.google.gerrit.entities.Project) ArrayList(java.util.ArrayList) SubscribeSection(com.google.gerrit.entities.SubscribeSection)

Aggregations

Project (com.google.gerrit.entities.Project)1 SubscribeSection (com.google.gerrit.entities.SubscribeSection)1 ArrayList (java.util.ArrayList)1