This project has retired. For details please refer to its Attic page.
NetworkProxyConfiguration xref
View Javadoc
1   // =================== DO NOT EDIT THIS FILE ====================
2   // Generated by Modello 1.7,
3   // any modifications will be overwritten.
4   // ==============================================================
5   
6   package org.apache.archiva.configuration;
7   
8   /**
9    * Class NetworkProxyConfiguration.
10   * 
11   * @version $Revision$ $Date$
12   */
13  @SuppressWarnings( "all" )
14  public class NetworkProxyConfiguration
15      implements java.io.Serializable
16  {
17  
18        //--------------------------/
19       //- Class/Member Variables -/
20      //--------------------------/
21  
22      /**
23       * 
24       *             The ID for this proxy.
25       *           
26       */
27      private String id;
28  
29      /**
30       * 
31       *             The network protocol to use with this proxy:
32       * "http", "socks-4"
33       *           .
34       */
35      private String protocol = "http";
36  
37      /**
38       * 
39       *             The proxy host.
40       *           
41       */
42      private String host;
43  
44      /**
45       * 
46       *             The proxy port.
47       *           
48       */
49      private int port = 8080;
50  
51      /**
52       * 
53       *             The proxy user.
54       *           
55       */
56      private String username;
57  
58      /**
59       * 
60       *             The proxy password.
61       *           
62       */
63      private String password;
64  
65      /**
66       * 
67       *             Use ntlm authentification.
68       *           
69       */
70      private boolean useNtlm = false;
71  
72  
73        //-----------/
74       //- Methods -/
75      //-----------/
76  
77      /**
78       * Get the proxy host.
79       * 
80       * @return String
81       */
82      public String getHost()
83      {
84          return this.host;
85      } //-- String getHost()
86  
87      /**
88       * Get the ID for this proxy.
89       * 
90       * @return String
91       */
92      public String getId()
93      {
94          return this.id;
95      } //-- String getId()
96  
97      /**
98       * Get the proxy password.
99       * 
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 }