001    // =================== DO NOT EDIT THIS FILE ====================
002    // Generated by Modello 1.7,
003    // any modifications will be overwritten.
004    // ==============================================================
005    
006    package org.apache.archiva.configuration;
007    
008    /**
009     * Class RemoteRepositoryConfiguration.
010     * 
011     * @version $Revision$ $Date$
012     */
013    @SuppressWarnings( "all" )
014    public class RemoteRepositoryConfiguration
015        extends AbstractRepositoryConfiguration
016        implements java.io.Serializable
017    {
018    
019          //--------------------------/
020         //- Class/Member Variables -/
021        //--------------------------/
022    
023        /**
024         * 
025         *             The URL for this repository.
026         *           
027         */
028        private String url;
029    
030        /**
031         * 
032         *             The Username for this repository.
033         *           
034         */
035        private String username;
036    
037        /**
038         * 
039         *             The Password for this repository.
040         *           
041         */
042        private String password;
043    
044        /**
045         * 
046         *             Timeout in seconds for connections to this
047         * repository
048         *           .
049         */
050        private int timeout = 60;
051    
052        /**
053         * 
054         *             When to run the refresh task.
055         *             Default is every sunday at 8H00.
056         *           
057         */
058        private String refreshCronExpression = "0 0 08 ? * SUN";
059    
060        /**
061         * 
062         *             Activate download of remote index if
063         * remoteIndexUrl is set too.
064         *           
065         */
066        private boolean downloadRemoteIndex = false;
067    
068        /**
069         * 
070         *             Remote Index Url : if not starting with http
071         * will be relative to the remote repository url.
072         *           
073         */
074        private String remoteIndexUrl;
075    
076        /**
077         * 
078         *             Id of the networkProxy to use when downloading
079         * remote index.
080         *           
081         */
082        private String remoteDownloadNetworkProxyId;
083    
084        /**
085         * 
086         *             Timeout in seconds for download remote index.
087         * Default is more long than artifact download.
088         *           
089         */
090        private int remoteDownloadTimeout = 300;
091    
092        /**
093         * 
094         *             Schedule download of remote index when archiva
095         * start
096         *           .
097         */
098        private boolean downloadRemoteIndexOnStartup = false;
099    
100        /**
101         * Field extraParameters.
102         */
103        private java.util.Map extraParameters;
104    
105        /**
106         * Field extraHeaders.
107         */
108        private java.util.Map extraHeaders;
109    
110    
111          //-----------/
112         //- Methods -/
113        //-----------/
114    
115        /**
116         * Method addExtraHeader.
117         * 
118         * @param key
119         * @param value
120         */
121        public void addExtraHeader( Object key, String value )
122        {
123            getExtraHeaders().put( key, value );
124        } //-- void addExtraHeader( Object, String )
125    
126        /**
127         * Method addExtraParameter.
128         * 
129         * @param key
130         * @param value
131         */
132        public void addExtraParameter( Object key, String value )
133        {
134            getExtraParameters().put( key, value );
135        } //-- void addExtraParameter( Object, String )
136    
137        /**
138         * Method getExtraHeaders.
139         * 
140         * @return Map
141         */
142        public java.util.Map getExtraHeaders()
143        {
144            if ( this.extraHeaders == null )
145            {
146                this.extraHeaders = new java.util.HashMap();
147            }
148    
149            return this.extraHeaders;
150        } //-- java.util.Map getExtraHeaders()
151    
152        /**
153         * Method getExtraParameters.
154         * 
155         * @return Map
156         */
157        public java.util.Map getExtraParameters()
158        {
159            if ( this.extraParameters == null )
160            {
161                this.extraParameters = new java.util.HashMap();
162            }
163    
164            return this.extraParameters;
165        } //-- java.util.Map getExtraParameters()
166    
167        /**
168         * Get the Password for this repository.
169         * 
170         * @return String
171         */
172        public String getPassword()
173        {
174            return this.password;
175        } //-- String getPassword()
176    
177        /**
178         * Get when to run the refresh task.
179         *             Default is every sunday at 8H00.
180         * 
181         * @return String
182         */
183        public String getRefreshCronExpression()
184        {
185            return this.refreshCronExpression;
186        } //-- String getRefreshCronExpression()
187    
188        /**
189         * Get id of the networkProxy to use when downloading remote
190         * index.
191         * 
192         * @return String
193         */
194        public String getRemoteDownloadNetworkProxyId()
195        {
196            return this.remoteDownloadNetworkProxyId;
197        } //-- String getRemoteDownloadNetworkProxyId()
198    
199        /**
200         * Get timeout in seconds for download remote index. Default is
201         * more long than artifact download.
202         * 
203         * @return int
204         */
205        public int getRemoteDownloadTimeout()
206        {
207            return this.remoteDownloadTimeout;
208        } //-- int getRemoteDownloadTimeout()
209    
210        /**
211         * Get remote Index Url : if not starting with http will be
212         * relative to the remote repository url.
213         * 
214         * @return String
215         */
216        public String getRemoteIndexUrl()
217        {
218            return this.remoteIndexUrl;
219        } //-- String getRemoteIndexUrl()
220    
221        /**
222         * Get timeout in seconds for connections to this repository.
223         * 
224         * @return int
225         */
226        public int getTimeout()
227        {
228            return this.timeout;
229        } //-- int getTimeout()
230    
231        /**
232         * Get the URL for this repository.
233         * 
234         * @return String
235         */
236        public String getUrl()
237        {
238            return this.url;
239        } //-- String getUrl()
240    
241        /**
242         * Get the Username for this repository.
243         * 
244         * @return String
245         */
246        public String getUsername()
247        {
248            return this.username;
249        } //-- String getUsername()
250    
251        /**
252         * Get activate download of remote index if remoteIndexUrl is
253         * set too.
254         * 
255         * @return boolean
256         */
257        public boolean isDownloadRemoteIndex()
258        {
259            return this.downloadRemoteIndex;
260        } //-- boolean isDownloadRemoteIndex()
261    
262        /**
263         * Get schedule download of remote index when archiva start.
264         * 
265         * @return boolean
266         */
267        public boolean isDownloadRemoteIndexOnStartup()
268        {
269            return this.downloadRemoteIndexOnStartup;
270        } //-- boolean isDownloadRemoteIndexOnStartup()
271    
272        /**
273         * Set activate download of remote index if remoteIndexUrl is
274         * set too.
275         * 
276         * @param downloadRemoteIndex
277         */
278        public void setDownloadRemoteIndex( boolean downloadRemoteIndex )
279        {
280            this.downloadRemoteIndex = downloadRemoteIndex;
281        } //-- void setDownloadRemoteIndex( boolean )
282    
283        /**
284         * Set schedule download of remote index when archiva start.
285         * 
286         * @param downloadRemoteIndexOnStartup
287         */
288        public void setDownloadRemoteIndexOnStartup( boolean downloadRemoteIndexOnStartup )
289        {
290            this.downloadRemoteIndexOnStartup = downloadRemoteIndexOnStartup;
291        } //-- void setDownloadRemoteIndexOnStartup( boolean )
292    
293        /**
294         * Set additionnal http headers to add to url when requesting
295         * remote repositories.
296         * 
297         * @param extraHeaders
298         */
299        public void setExtraHeaders( java.util.Map extraHeaders )
300        {
301            this.extraHeaders = extraHeaders;
302        } //-- void setExtraHeaders( java.util.Map )
303    
304        /**
305         * Set additionnal request parameters to add to url when
306         * requesting remote repositories.
307         * 
308         * @param extraParameters
309         */
310        public void setExtraParameters( java.util.Map extraParameters )
311        {
312            this.extraParameters = extraParameters;
313        } //-- void setExtraParameters( java.util.Map )
314    
315        /**
316         * Set the Password for this repository.
317         * 
318         * @param password
319         */
320        public void setPassword( String password )
321        {
322            this.password = password;
323        } //-- void setPassword( String )
324    
325        /**
326         * Set when to run the refresh task.
327         *             Default is every sunday at 8H00.
328         * 
329         * @param refreshCronExpression
330         */
331        public void setRefreshCronExpression( String refreshCronExpression )
332        {
333            this.refreshCronExpression = refreshCronExpression;
334        } //-- void setRefreshCronExpression( String )
335    
336        /**
337         * Set id of the networkProxy to use when downloading remote
338         * index.
339         * 
340         * @param remoteDownloadNetworkProxyId
341         */
342        public void setRemoteDownloadNetworkProxyId( String remoteDownloadNetworkProxyId )
343        {
344            this.remoteDownloadNetworkProxyId = remoteDownloadNetworkProxyId;
345        } //-- void setRemoteDownloadNetworkProxyId( String )
346    
347        /**
348         * Set timeout in seconds for download remote index. Default is
349         * more long than artifact download.
350         * 
351         * @param remoteDownloadTimeout
352         */
353        public void setRemoteDownloadTimeout( int remoteDownloadTimeout )
354        {
355            this.remoteDownloadTimeout = remoteDownloadTimeout;
356        } //-- void setRemoteDownloadTimeout( int )
357    
358        /**
359         * Set remote Index Url : if not starting with http will be
360         * relative to the remote repository url.
361         * 
362         * @param remoteIndexUrl
363         */
364        public void setRemoteIndexUrl( String remoteIndexUrl )
365        {
366            this.remoteIndexUrl = remoteIndexUrl;
367        } //-- void setRemoteIndexUrl( String )
368    
369        /**
370         * Set timeout in seconds for connections to this repository.
371         * 
372         * @param timeout
373         */
374        public void setTimeout( int timeout )
375        {
376            this.timeout = timeout;
377        } //-- void setTimeout( int )
378    
379        /**
380         * Set the URL for this repository.
381         * 
382         * @param url
383         */
384        public void setUrl( String url )
385        {
386            this.url = url;
387        } //-- void setUrl( String )
388    
389        /**
390         * Set the Username for this repository.
391         * 
392         * @param username
393         */
394        public void setUsername( String username )
395        {
396            this.username = username;
397        } //-- void setUsername( String )
398    
399        
400                public String toString()
401                {
402                    return "RemoteRepositoryConfiguration id:'" + getId() + "',name:'" + getName() +"'";
403                }
404    
405    
406           
407    }