View Javadoc
1   /*
2    Licensed to the Apache Software Foundation (ASF) under one
3    or more contributor license agreements.  See the NOTICE file
4    distributed with this work for additional information
5    regarding copyright ownership.  The ASF licenses this file
6    to you under the Apache License, Version 2.0 (the
7    "License"); you may not use this file except in compliance
8    with the License.  You may obtain a copy of the License at
9    
10       http://www.apache.org/licenses/LICENSE-2.0
11   
12   Unless required by applicable law or agreed to in writing,
13   software distributed under the License is distributed on an
14   "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   KIND, either express or implied.  See the License for the
16   specific language governing permissions and limitations
17   under the License.
18   =================== DO NOT EDIT THIS FILE ====================
19   Generated by Modello 2.4.0,
20   any modifications will be overwritten.
21   ==============================================================
22   */
23  
24  package org.apache.maven.settings;
25  
26  /**
27   * 
28   *         
29   *         The <code>&lt;proxy&gt;</code> element contains
30   * informations required to a proxy settings.
31   *         
32   * 
33   * @version $Revision$ $Date$
34   */
35  @SuppressWarnings( "all" )
36  public class Proxy
37      extends IdentifiableBase
38      implements java.io.Serializable, java.lang.Cloneable
39  {
40  
41        //--------------------------/
42       //- Class/Member Variables -/
43      //--------------------------/
44  
45      /**
46       * 
47       *             
48       *             Whether this proxy configuration is the active
49       * one.
50       *             
51       *           
52       */
53      private boolean active = true;
54  
55      /**
56       * 
57       *             
58       *             The proxy protocol.
59       *             
60       *           
61       */
62      private String protocol = "http";
63  
64      /**
65       * 
66       *             
67       *             The proxy user.
68       *             
69       *           
70       */
71      private String username;
72  
73      /**
74       * 
75       *             
76       *             The proxy password.
77       *             
78       *           
79       */
80      private String password;
81  
82      /**
83       * 
84       *             
85       *             The proxy port.
86       *             
87       *           
88       */
89      private int port = 8080;
90  
91      /**
92       * 
93       *             
94       *             The proxy host.
95       *             
96       *           
97       */
98      private String host;
99  
100     /**
101      * 
102      *             
103      *             The list of non-proxied hosts (delimited by
104      * <code>|</code>).
105      *             
106      *           
107      */
108     private String nonProxyHosts;
109 
110 
111       //-----------/
112      //- Methods -/
113     //-----------/
114 
115     /**
116      * Method clone.
117      * 
118      * @return Proxy
119      */
120     public Proxy clone()
121     {
122         try
123         {
124             Proxy copy = (Proxy) super.clone();
125 
126             return copy;
127         }
128         catch ( java.lang.Exception ex )
129         {
130             throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
131                 + " does not support clone()" ).initCause( ex );
132         }
133     } //-- Proxy clone()
134 
135     /**
136      * Get the proxy host.
137      * 
138      * @return String
139      */
140     public String getHost()
141     {
142         return this.host;
143     } //-- String getHost()
144 
145     /**
146      * Get the list of non-proxied hosts (delimited by
147      * <code>|</code>).
148      * 
149      * @return String
150      */
151     public String getNonProxyHosts()
152     {
153         return this.nonProxyHosts;
154     } //-- String getNonProxyHosts()
155 
156     /**
157      * Get the proxy password.
158      * 
159      * @return String
160      */
161     public String getPassword()
162     {
163         return this.password;
164     } //-- String getPassword()
165 
166     /**
167      * Get the proxy port.
168      * 
169      * @return int
170      */
171     public int getPort()
172     {
173         return this.port;
174     } //-- int getPort()
175 
176     /**
177      * Get the proxy protocol.
178      * 
179      * @return String
180      */
181     public String getProtocol()
182     {
183         return this.protocol;
184     } //-- String getProtocol()
185 
186     /**
187      * Get the proxy user.
188      * 
189      * @return String
190      */
191     public String getUsername()
192     {
193         return this.username;
194     } //-- String getUsername()
195 
196     /**
197      * Get whether this proxy configuration is the active one.
198      * 
199      * @return boolean
200      */
201     public boolean isActive()
202     {
203         return this.active;
204     } //-- boolean isActive()
205 
206     /**
207      * Set whether this proxy configuration is the active one.
208      * 
209      * @param active a active object.
210      */
211     public void setActive( boolean active )
212     {
213         this.active = active;
214     } //-- void setActive( boolean )
215 
216     /**
217      * Set the proxy host.
218      * 
219      * @param host a host object.
220      */
221     public void setHost( String host )
222     {
223         this.host = host;
224     } //-- void setHost( String )
225 
226     /**
227      * Set the list of non-proxied hosts (delimited by
228      * <code>|</code>).
229      * 
230      * @param nonProxyHosts a nonProxyHosts object.
231      */
232     public void setNonProxyHosts( String nonProxyHosts )
233     {
234         this.nonProxyHosts = nonProxyHosts;
235     } //-- void setNonProxyHosts( String )
236 
237     /**
238      * Set the proxy password.
239      * 
240      * @param password a password object.
241      */
242     public void setPassword( String password )
243     {
244         this.password = password;
245     } //-- void setPassword( String )
246 
247     /**
248      * Set the proxy port.
249      * 
250      * @param port a port object.
251      */
252     public void setPort( int port )
253     {
254         this.port = port;
255     } //-- void setPort( int )
256 
257     /**
258      * Set the proxy protocol.
259      * 
260      * @param protocol a protocol object.
261      */
262     public void setProtocol( String protocol )
263     {
264         this.protocol = protocol;
265     } //-- void setProtocol( String )
266 
267     /**
268      * Set the proxy user.
269      * 
270      * @param username a username object.
271      */
272     public void setUsername( String username )
273     {
274         this.username = username;
275     } //-- void setUsername( String )
276 
277 }