1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.whitesource.teamcity.agent;
17
18 import jetbrains.buildServer.agent.BuildRunnerContext;
19 import org.whitesource.agent.api.model.AgentProjectInfo;
20 import org.whitesource.teamcity.common.Constants;
21 import org.whitesource.teamcity.common.WssUtils;
22
23 import java.util.Collection;
24 import java.util.List;
25
26
27
28
29
30
31 public abstract class BaseOssInfoExtractor {
32
33
34
35 protected BuildRunnerContext runner;
36
37 protected String projectToken;
38
39 protected List<String> includes;
40
41 protected List<String> excludes;
42
43
44
45
46
47
48
49
50 protected BaseOssInfoExtractor(BuildRunnerContext runner) {
51 this.runner = runner;
52
53 projectToken = runner.getRunnerParameters().get(Constants.RUNNER_PROJECT_TOKEN);
54 includes = WssUtils.splitParameters(
55 runner.getRunnerParameters().get(Constants.RUNNER_INCLUDES));
56 excludes = WssUtils.splitParameters(
57 runner.getRunnerParameters().get(Constants.RUNNER_EXCLUDES));
58 }
59
60
61
62 public abstract Collection<AgentProjectInfo> extract();
63
64 }