1 package org.apache.archiva.configuration;
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
23 * Class ManagedRepositoryConfiguration.
25 * @version $Revision$ $Date$
27 @SuppressWarnings( "all" )
28 public class ManagedRepositoryConfiguration
29 extends AbstractRepositoryConfiguration
30 implements java.io.Serializable
33 //--------------------------/
34 //- Class/Member Variables -/
35 //--------------------------/
39 * The file system location for this repository.
42 private String location;
45 * True if this repository contains release versioned artifacts.
47 private boolean releases = true;
50 * True if re-deployment of artifacts already in the repository
53 private boolean blockRedeployments = false;
56 * True if this repository contains snapshot versioned artifacts
58 private boolean snapshots = false;
61 * True if this repository should be scanned and processed.
63 private boolean scanned = true;
67 * When to run the refresh task.
68 * Default is every hour
71 private String refreshCronExpression = "0 0 * * * ?";
75 * The total count of the artifact to be retained
79 private int retentionCount = 2;
83 * The number of days after which snapshots will be
87 private int retentionPeriod = 100;
91 * True if the released snapshots are to be removed
92 * from the repo during repository purge.
95 private boolean deleteReleasedSnapshots = false;
99 * True to not generate packed index (note you
100 * won't be able to export your index.
103 private boolean skipPackedIndexCreation = false;
107 * Need a staging repository
110 private boolean stageRepoNeeded = false;
118 * Get the file system location for this repository.
122 public String getLocation()
124 return this.location;
125 } //-- String getLocation()
128 * Get when to run the refresh task.
129 * Default is every hour.
133 public String getRefreshCronExpression()
135 return this.refreshCronExpression;
136 } //-- String getRefreshCronExpression()
139 * Get the total count of the artifact to be retained for each
144 public int getRetentionCount()
146 return this.retentionCount;
147 } //-- int getRetentionCount()
150 * Get the number of days after which snapshots will be
155 public int getRetentionPeriod()
157 return this.retentionPeriod;
158 } //-- int getRetentionPeriod()
161 * Get true if re-deployment of artifacts already in the
162 * repository will be blocked.
166 public boolean isBlockRedeployments()
168 return this.blockRedeployments;
169 } //-- boolean isBlockRedeployments()
172 * Get true if the released snapshots are to be removed from
173 * the repo during repository purge.
177 public boolean isDeleteReleasedSnapshots()
179 return this.deleteReleasedSnapshots;
180 } //-- boolean isDeleteReleasedSnapshots()
183 * Get true if this repository contains release versioned
188 public boolean isReleases()
190 return this.releases;
191 } //-- boolean isReleases()
194 * Get true if this repository should be scanned and processed.
198 public boolean isScanned()
201 } //-- boolean isScanned()
204 * Get true to not generate packed index (note you won't be
205 * able to export your index.
209 public boolean isSkipPackedIndexCreation()
211 return this.skipPackedIndexCreation;
212 } //-- boolean isSkipPackedIndexCreation()
215 * Get true if this repository contains snapshot versioned
220 public boolean isSnapshots()
222 return this.snapshots;
223 } //-- boolean isSnapshots()
226 * Get need a staging repository.
230 public boolean isStageRepoNeeded()
232 return this.stageRepoNeeded;
233 } //-- boolean isStageRepoNeeded()
236 * Set true if re-deployment of artifacts already in the
237 * repository will be blocked.
239 * @param blockRedeployments
241 public void setBlockRedeployments( boolean blockRedeployments )
243 this.blockRedeployments = blockRedeployments;
244 } //-- void setBlockRedeployments( boolean )
247 * Set true if the released snapshots are to be removed from
248 * the repo during repository purge.
250 * @param deleteReleasedSnapshots
252 public void setDeleteReleasedSnapshots( boolean deleteReleasedSnapshots )
254 this.deleteReleasedSnapshots = deleteReleasedSnapshots;
255 } //-- void setDeleteReleasedSnapshots( boolean )
258 * Set the file system location for this repository.
262 public void setLocation( String location )
264 this.location = location;
265 } //-- void setLocation( String )
268 * Set when to run the refresh task.
269 * Default is every hour.
271 * @param refreshCronExpression
273 public void setRefreshCronExpression( String refreshCronExpression )
275 this.refreshCronExpression = refreshCronExpression;
276 } //-- void setRefreshCronExpression( String )
279 * Set true if this repository contains release versioned
284 public void setReleases( boolean releases )
286 this.releases = releases;
287 } //-- void setReleases( boolean )
290 * Set the total count of the artifact to be retained for each
293 * @param retentionCount
295 public void setRetentionCount( int retentionCount )
297 this.retentionCount = retentionCount;
298 } //-- void setRetentionCount( int )
301 * Set the number of days after which snapshots will be
304 * @param retentionPeriod
306 public void setRetentionPeriod( int retentionPeriod )
308 this.retentionPeriod = retentionPeriod;
309 } //-- void setRetentionPeriod( int )
312 * Set true if this repository should be scanned and processed.
316 public void setScanned( boolean scanned )
318 this.scanned = scanned;
319 } //-- void setScanned( boolean )
322 * Set true to not generate packed index (note you won't be
323 * able to export your index.
325 * @param skipPackedIndexCreation
327 public void setSkipPackedIndexCreation( boolean skipPackedIndexCreation )
329 this.skipPackedIndexCreation = skipPackedIndexCreation;
330 } //-- void setSkipPackedIndexCreation( boolean )
333 * Set true if this repository contains snapshot versioned
338 public void setSnapshots( boolean snapshots )
340 this.snapshots = snapshots;
341 } //-- void setSnapshots( boolean )
344 * Set need a staging repository.
346 * @param stageRepoNeeded
348 public void setStageRepoNeeded( boolean stageRepoNeeded )
350 this.stageRepoNeeded = stageRepoNeeded;
351 } //-- void setStageRepoNeeded( boolean )