1 package org.apache.maven.settings.crypto;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import java.util.ArrayList;
23 import java.util.Arrays;
24 import java.util.List;
25
26 import org.apache.maven.settings.Proxy;
27 import org.apache.maven.settings.Server;
28 import org.apache.maven.settings.Settings;
29
30
31
32
33
34
35 public class DefaultSettingsDecryptionRequest
36 implements SettingsDecryptionRequest
37 {
38
39 private List<Server> servers;
40
41 private List<Proxy> proxies;
42
43
44
45
46 public DefaultSettingsDecryptionRequest()
47 {
48
49 }
50
51
52
53
54
55
56 public DefaultSettingsDecryptionRequest( Settings settings )
57 {
58 setServers( settings.getServers() );
59 setProxies( settings.getProxies() );
60 }
61
62
63
64
65
66
67 public DefaultSettingsDecryptionRequest( Server server )
68 {
69 this.servers = new ArrayList<Server>( Arrays.asList( server ) );
70 }
71
72
73
74
75
76
77 public DefaultSettingsDecryptionRequest( Proxy proxy )
78 {
79 this.proxies = new ArrayList<Proxy>( Arrays.asList( proxy ) );
80 }
81
82 public List<Server> getServers()
83 {
84 if ( servers == null )
85 {
86 servers = new ArrayList<Server>();
87 }
88
89 return servers;
90 }
91
92 public DefaultSettingsDecryptionRequest setServers( List<Server> servers )
93 {
94 this.servers = servers;
95
96 return this;
97 }
98
99 public List<Proxy> getProxies()
100 {
101 if ( proxies == null )
102 {
103 proxies = new ArrayList<Proxy>();
104 }
105
106 return proxies;
107 }
108
109 public DefaultSettingsDecryptionRequest setProxies( List<Proxy> proxies )
110 {
111 this.proxies = proxies;
112
113 return this;
114 }
115
116 }