1 package org.apache.archiva.admin.model.beans;
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
22 import javax.xml.bind.annotation.XmlRootElement;
23 import java.io.Serializable;
26 * @author Olivier Lamy
29 @XmlRootElement( name = "repositoryGroup" )
30 public class RemoteRepository
31 extends AbstractRepository
32 implements Serializable
37 private String userName;
39 private String password;
41 private int timeout = 60;
44 * Activate download of remote index if remoteIndexUrl is set too.
46 private boolean downloadRemoteIndex = false;
49 * Remote Index Url : if not starting with http will be relative to the remote repository url.
51 private String remoteIndexUrl = ".index";
53 private String remoteDownloadNetworkProxyId;
56 * default model value daily : every sunday at 8H00
58 private String cronExpression = "0 0 08 ? * SUN";
60 private int remoteDownloadTimeout = 300;
65 private boolean downloadRemoteIndexOnStartup = false;
68 public RemoteRepository()
73 public RemoteRepository( String id, String name, String url, String layout )
75 super( id, name, layout );
79 public RemoteRepository( String id, String name, String url, String layout, String userName, String password,
82 super( id, name, layout );
84 this.userName = userName;
85 this.password = password;
86 this.timeout = timeout;
89 public String getUrl()
94 public void setUrl( String url )
99 public String getUserName()
104 public void setUserName( String userName )
106 this.userName = userName;
109 public String getPassword()
114 public void setPassword( String password )
116 this.password = password;
119 public int getTimeout()
124 public void setTimeout( int timeout )
126 this.timeout = timeout;
129 public boolean isDownloadRemoteIndex()
131 return downloadRemoteIndex;
134 public void setDownloadRemoteIndex( boolean downloadRemoteIndex )
136 this.downloadRemoteIndex = downloadRemoteIndex;
139 public String getRemoteIndexUrl()
141 return remoteIndexUrl;
144 public void setRemoteIndexUrl( String remoteIndexUrl )
146 this.remoteIndexUrl = remoteIndexUrl;
149 public String getRemoteDownloadNetworkProxyId()
151 return remoteDownloadNetworkProxyId;
154 public void setRemoteDownloadNetworkProxyId( String remoteDownloadNetworkProxyId )
156 this.remoteDownloadNetworkProxyId = remoteDownloadNetworkProxyId;
159 public String getCronExpression()
161 return cronExpression;
164 public void setCronExpression( String cronExpression )
166 this.cronExpression = cronExpression;
169 public int getRemoteDownloadTimeout()
171 return remoteDownloadTimeout;
174 public void setRemoteDownloadTimeout( int remoteDownloadTimeout )
176 this.remoteDownloadTimeout = remoteDownloadTimeout;
179 public boolean isDownloadRemoteIndexOnStartup()
181 return downloadRemoteIndexOnStartup;
184 public void setDownloadRemoteIndexOnStartup( boolean downloadRemoteIndexOnStartup )
186 this.downloadRemoteIndexOnStartup = downloadRemoteIndexOnStartup;
190 public String toString()
192 final StringBuilder sb = new StringBuilder();
193 sb.append( "RemoteRepository" );
194 sb.append( "{url='" ).append( url ).append( '\'' );
195 sb.append( ", userName='" ).append( userName ).append( '\'' );
196 sb.append( ", password='" ).append( password ).append( '\'' );
197 sb.append( ", timeout=" ).append( timeout );
198 sb.append( ", downloadRemoteIndex=" ).append( downloadRemoteIndex );
199 sb.append( ", remoteIndexUrl='" ).append( remoteIndexUrl ).append( '\'' );
200 sb.append( ", remoteDownloadNetworkProxyId='" ).append( remoteDownloadNetworkProxyId ).append( '\'' );
201 sb.append( ", cronExpression='" ).append( cronExpression ).append( '\'' );
202 sb.append( ", remoteDownloadTimeout=" ).append( remoteDownloadTimeout );
203 sb.append( ", downloadRemoteIndexOnStartup=" ).append( downloadRemoteIndexOnStartup );
205 return sb.toString();