1 package org.apache.archiva.configuration;
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with the License. You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 * KIND, either express or implied. See the License for the
18 * specific language governing permissions and limitations
23 * Class NetworkProxyConfiguration.
25 * @version $Revision$ $Date$
27 @SuppressWarnings( "all" )
28 public class NetworkProxyConfiguration
29 implements java.io.Serializable
32 //--------------------------/
33 //- Class/Member Variables -/
34 //--------------------------/
38 * The ID for this proxy.
45 * The network protocol to use with this proxy:
49 private String protocol = "http";
63 private int port = 8080;
70 private String username;
77 private String password;
81 * Use ntlm authentification.
84 private boolean useNtlm = false;
96 public String getHost()
99 } //-- String getHost()
102 * Get the ID for this proxy.
106 public String getId()
109 } //-- String getId()
112 * Get the proxy password.
116 public String getPassword()
118 return this.password;
119 } //-- String getPassword()
122 * Get the proxy port.
132 * Get the network protocol to use with this proxy: "http",
137 public String getProtocol()
139 return this.protocol;
140 } //-- String getProtocol()
143 * Get the proxy user.
147 public String getUsername()
149 return this.username;
150 } //-- String getUsername()
153 * Get use ntlm authentification.
157 public boolean isUseNtlm()
160 } //-- boolean isUseNtlm()
163 * Set the proxy host.
167 public void setHost( String host )
170 } //-- void setHost( String )
173 * Set the ID for this proxy.
177 public void setId( String id )
180 } //-- void setId( String )
183 * Set the proxy password.
187 public void setPassword( String password )
189 this.password = password;
190 } //-- void setPassword( String )
193 * Set the proxy port.
197 public void setPort( int port )
200 } //-- void setPort( int )
203 * Set the network protocol to use with this proxy: "http",
208 public void setProtocol( String protocol )
210 this.protocol = protocol;
211 } //-- void setProtocol( String )
214 * Set use ntlm authentification.
218 public void setUseNtlm( boolean useNtlm )
220 this.useNtlm = useNtlm;
221 } //-- void setUseNtlm( boolean )
224 * Set the proxy user.
228 public void setUsername( String username )
230 this.username = username;
231 } //-- void setUsername( String )
234 public int hashCode()
237 result = 37 * result + ( id != null ? id.hashCode() : 0 );
241 public boolean equals( Object other )
248 if ( !( other instanceof NetworkProxyConfiguration ) )
253 NetworkProxyConfiguration that = (NetworkProxyConfiguration) other;
254 boolean result = true;
255 result = result && ( getId() == null ? that.getId() == null : getId().equals( that.getId() ) );