1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.maven.settings.crypto;
20
21 import java.util.ArrayList;
22 import java.util.List;
23
24 import org.apache.maven.settings.Proxy;
25 import org.apache.maven.settings.Server;
26 import org.apache.maven.settings.building.SettingsProblem;
27
28
29
30
31
32
33 @Deprecated(since = "4.0.0")
34 class DefaultSettingsDecryptionResult implements SettingsDecryptionResult {
35
36 private List<Server> servers;
37
38 private List<Proxy> proxies;
39
40 private List<SettingsProblem> problems;
41
42 DefaultSettingsDecryptionResult(List<Server> servers, List<Proxy> proxies, List<SettingsProblem> problems) {
43 this.servers = (servers != null) ? servers : new ArrayList<>();
44 this.proxies = (proxies != null) ? proxies : new ArrayList<>();
45 this.problems = (problems != null) ? problems : new ArrayList<>();
46 }
47
48 @Override
49 public Server getServer() {
50 return servers.isEmpty() ? null : servers.get(0);
51 }
52
53 @Override
54 public List<Server> getServers() {
55 return servers;
56 }
57
58 @Override
59 public Proxy getProxy() {
60 return proxies.isEmpty() ? null : proxies.get(0);
61 }
62
63 @Override
64 public List<Proxy> getProxies() {
65 return proxies;
66 }
67
68 @Override
69 public List<SettingsProblem> getProblems() {
70 return problems;
71 }
72 }