001// =================== DO NOT EDIT THIS FILE ==================== 002// Generated by Modello 1.7, 003// any modifications will be overwritten. 004// ============================================================== 005 006package org.apache.archiva.configuration; 007 008/** 009 * Class NetworkProxyConfiguration. 010 * 011 * @version $Revision$ $Date$ 012 */ 013@SuppressWarnings( "all" ) 014public class NetworkProxyConfiguration 015 implements java.io.Serializable 016{ 017 018 //--------------------------/ 019 //- Class/Member Variables -/ 020 //--------------------------/ 021 022 /** 023 * 024 * The ID for this proxy. 025 * 026 */ 027 private String id; 028 029 /** 030 * 031 * The network protocol to use with this proxy: 032 * "http", "socks-4" 033 * . 034 */ 035 private String protocol = "http"; 036 037 /** 038 * 039 * The proxy host. 040 * 041 */ 042 private String host; 043 044 /** 045 * 046 * The proxy port. 047 * 048 */ 049 private int port = 8080; 050 051 /** 052 * 053 * The proxy user. 054 * 055 */ 056 private String username; 057 058 /** 059 * 060 * The proxy password. 061 * 062 */ 063 private String password; 064 065 /** 066 * 067 * Use ntlm authentification. 068 * 069 */ 070 private boolean useNtlm = false; 071 072 073 //-----------/ 074 //- Methods -/ 075 //-----------/ 076 077 /** 078 * Get the proxy host. 079 * 080 * @return String 081 */ 082 public String getHost() 083 { 084 return this.host; 085 } //-- String getHost() 086 087 /** 088 * Get the ID for this proxy. 089 * 090 * @return String 091 */ 092 public String getId() 093 { 094 return this.id; 095 } //-- String getId() 096 097 /** 098 * Get the proxy password. 099 * 100 * @return String 101 */ 102 public String getPassword() 103 { 104 return this.password; 105 } //-- String getPassword() 106 107 /** 108 * Get the proxy port. 109 * 110 * @return int 111 */ 112 public int getPort() 113 { 114 return this.port; 115 } //-- int getPort() 116 117 /** 118 * Get the network protocol to use with this proxy: "http", 119 * "socks-4". 120 * 121 * @return String 122 */ 123 public String getProtocol() 124 { 125 return this.protocol; 126 } //-- String getProtocol() 127 128 /** 129 * Get the proxy user. 130 * 131 * @return String 132 */ 133 public String getUsername() 134 { 135 return this.username; 136 } //-- String getUsername() 137 138 /** 139 * Get use ntlm authentification. 140 * 141 * @return boolean 142 */ 143 public boolean isUseNtlm() 144 { 145 return this.useNtlm; 146 } //-- boolean isUseNtlm() 147 148 /** 149 * Set the proxy host. 150 * 151 * @param host 152 */ 153 public void setHost( String host ) 154 { 155 this.host = host; 156 } //-- void setHost( String ) 157 158 /** 159 * Set the ID for this proxy. 160 * 161 * @param id 162 */ 163 public void setId( String id ) 164 { 165 this.id = id; 166 } //-- void setId( String ) 167 168 /** 169 * Set the proxy password. 170 * 171 * @param password 172 */ 173 public void setPassword( String password ) 174 { 175 this.password = password; 176 } //-- void setPassword( String ) 177 178 /** 179 * Set the proxy port. 180 * 181 * @param port 182 */ 183 public void setPort( int port ) 184 { 185 this.port = port; 186 } //-- void setPort( int ) 187 188 /** 189 * Set the network protocol to use with this proxy: "http", 190 * "socks-4". 191 * 192 * @param protocol 193 */ 194 public void setProtocol( String protocol ) 195 { 196 this.protocol = protocol; 197 } //-- void setProtocol( String ) 198 199 /** 200 * Set use ntlm authentification. 201 * 202 * @param useNtlm 203 */ 204 public void setUseNtlm( boolean useNtlm ) 205 { 206 this.useNtlm = useNtlm; 207 } //-- void setUseNtlm( boolean ) 208 209 /** 210 * Set the proxy user. 211 * 212 * @param username 213 */ 214 public void setUsername( String username ) 215 { 216 this.username = username; 217 } //-- void setUsername( String ) 218 219 220 public int hashCode() 221 { 222 int result = 17; 223 result = 37 * result + ( id != null ? id.hashCode() : 0 ); 224 return result; 225 } 226 227 public boolean equals( Object other ) 228 { 229 if ( this == other ) 230 { 231 return true; 232 } 233 234 if ( !( other instanceof NetworkProxyConfiguration ) ) 235 { 236 return false; 237 } 238 239 NetworkProxyConfiguration that = (NetworkProxyConfiguration) other; 240 boolean result = true; 241 result = result && ( getId() == null ? that.getId() == null : getId().equals( that.getId() ) ); 242 return result; 243 } 244 245}