This project has retired. For details please refer to its
Attic page.
NetworkProxy xref
1 package org.apache.archiva.admin.model.beans;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 import javax.xml.bind.annotation.XmlRootElement;
22 import java.io.Serializable;
23
24
25
26
27
28 @XmlRootElement( name = "networkProxy" )
29 public class NetworkProxy
30 implements Serializable
31 {
32 private String id;
33
34
35
36
37
38 private String protocol = "http";
39
40
41
42
43 private String host;
44
45
46
47
48 private int port = 8080;
49
50
51
52
53 private String username;
54
55
56
57
58 private String password;
59
60
61
62
63
64
65 private boolean useNtlm;
66
67 public NetworkProxy()
68 {
69
70 }
71
72 public NetworkProxy( String id, String protocol, String host, int port, String username, String password )
73 {
74 this.id = id;
75 this.protocol = protocol;
76 this.host = host;
77 this.port = port;
78 this.username = username;
79 this.password = password;
80 }
81
82 public String getId()
83 {
84 return id;
85 }
86
87 public void setId( String id )
88 {
89 this.id = id;
90 }
91
92 public String getProtocol()
93 {
94 return protocol;
95 }
96
97 public void setProtocol( String protocol )
98 {
99 this.protocol = protocol;
100 }
101
102 public String getHost()
103 {
104 return host;
105 }
106
107 public void setHost( String host )
108 {
109 this.host = host;
110 }
111
112 public int getPort()
113 {
114 return port;
115 }
116
117 public void setPort( int port )
118 {
119 this.port = port;
120 }
121
122 public String getUsername()
123 {
124 return username;
125 }
126
127 public void setUsername( String username )
128 {
129 this.username = username;
130 }
131
132 public String getPassword()
133 {
134 return password;
135 }
136
137 public void setPassword( String password )
138 {
139 this.password = password;
140 }
141
142 public boolean isUseNtlm()
143 {
144 return useNtlm;
145 }
146
147 public void setUseNtlm( boolean useNtlm )
148 {
149 this.useNtlm = useNtlm;
150 }
151
152 @Override
153 public boolean equals( Object o )
154 {
155 if ( this == o )
156 {
157 return true;
158 }
159 if ( o == null || getClass() != o.getClass() )
160 {
161 return false;
162 }
163
164 NetworkProxy that = (NetworkProxy) o;
165
166 if ( id != null ? !id.equals( that.id ) : that.id != null )
167 {
168 return false;
169 }
170
171 return true;
172 }
173
174 @Override
175 public int hashCode()
176 {
177 int result = 17;
178 result = 37 * result + ( id != null ? id.hashCode() : 0 );
179 return result;
180 }
181
182 @Override
183 public String toString()
184 {
185 final StringBuilder sb = new StringBuilder();
186 sb.append( "NetworkProxy" );
187 sb.append( "{id='" ).append( id ).append( '\'' );
188 sb.append( ", protocol='" ).append( protocol ).append( '\'' );
189 sb.append( ", host='" ).append( host ).append( '\'' );
190 sb.append( ", port=" ).append( port );
191 sb.append( ", username='" ).append( username ).append( '\'' );
192
193 sb.append( ", useNtlm=" ).append( useNtlm );
194 sb.append( '}' );
195 return sb.toString();
196 }
197 }