This project has retired. For details please refer to its Attic page.
Source code
001package org.apache.archiva.configuration;
002
003/*
004 * Licensed to the Apache Software Foundation (ASF) under one
005 * or more contributor license agreements.  See the NOTICE file
006 * distributed with this work for additional information
007 * regarding copyright ownership.  The ASF licenses this file
008 * to you under the Apache License, Version 2.0 (the
009 * "License"); you may not use this file except in compliance
010 * with the License.  You may obtain a copy of the License at
011 *
012 *   http://www.apache.org/licenses/LICENSE-2.0
013 *
014 * Unless required by applicable law or agreed to in writing,
015 * software distributed under the License is distributed on an
016 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
017 * KIND, either express or implied.  See the License for the
018 * specific language governing permissions and limitations
019 * under the License.
020 */
021
022/**
023 * Class ManagedRepositoryConfiguration.
024 * 
025 * @version $Revision$ $Date$
026 */
027@SuppressWarnings( "all" )
028public class ManagedRepositoryConfiguration
029    extends AbstractRepositoryConfiguration
030    implements java.io.Serializable
031{
032
033      //--------------------------/
034     //- Class/Member Variables -/
035    //--------------------------/
036
037    /**
038     * 
039     *             The file system location for this repository.
040     *           
041     */
042    private String location;
043
044    /**
045     * True if this repository contains release versioned artifacts.
046     */
047    private boolean releases = true;
048
049    /**
050     * True if re-deployment of artifacts already in the repository
051     * will be blocked.
052     */
053    private boolean blockRedeployments = false;
054
055    /**
056     * True if this repository contains snapshot versioned artifacts
057     */
058    private boolean snapshots = false;
059
060    /**
061     * True if this repository should be scanned and processed.
062     */
063    private boolean scanned = true;
064
065    /**
066     * 
067     *             When to run the refresh task.
068     *             Default is every hour
069     *           .
070     */
071    private String refreshCronExpression = "0 0 * * * ?";
072
073    /**
074     * 
075     *             The total count of the artifact to be retained
076     * for each snapshot.
077     *           
078     */
079    private int retentionCount = 2;
080
081    /**
082     * 
083     *             The number of days after which snapshots will be
084     * removed.
085     *           
086     */
087    private int retentionPeriod = 100;
088
089    /**
090     * 
091     *             True if the released snapshots are to be removed
092     * from the repo during repository purge.
093     *           
094     */
095    private boolean deleteReleasedSnapshots = false;
096
097    /**
098     * 
099     *             True to not generate packed index (note you
100     * won't be able to export your index.
101     *           
102     */
103    private boolean skipPackedIndexCreation = false;
104
105    /**
106     * 
107     *             Need a staging repository
108     *           .
109     */
110    private boolean stageRepoNeeded = false;
111
112
113      //-----------/
114     //- Methods -/
115    //-----------/
116
117    /**
118     * Get the file system location for this repository.
119     * 
120     * @return String
121     */
122    public String getLocation()
123    {
124        return this.location;
125    } //-- String getLocation()
126
127    /**
128     * Get when to run the refresh task.
129     *             Default is every hour.
130     * 
131     * @return String
132     */
133    public String getRefreshCronExpression()
134    {
135        return this.refreshCronExpression;
136    } //-- String getRefreshCronExpression()
137
138    /**
139     * Get the total count of the artifact to be retained for each
140     * snapshot.
141     * 
142     * @return int
143     */
144    public int getRetentionCount()
145    {
146        return this.retentionCount;
147    } //-- int getRetentionCount()
148
149    /**
150     * Get the number of days after which snapshots will be
151     * removed.
152     * 
153     * @return int
154     */
155    public int getRetentionPeriod()
156    {
157        return this.retentionPeriod;
158    } //-- int getRetentionPeriod()
159
160    /**
161     * Get true if re-deployment of artifacts already in the
162     * repository will be blocked.
163     * 
164     * @return boolean
165     */
166    public boolean isBlockRedeployments()
167    {
168        return this.blockRedeployments;
169    } //-- boolean isBlockRedeployments()
170
171    /**
172     * Get true if the released snapshots are to be removed from
173     * the repo during repository purge.
174     * 
175     * @return boolean
176     */
177    public boolean isDeleteReleasedSnapshots()
178    {
179        return this.deleteReleasedSnapshots;
180    } //-- boolean isDeleteReleasedSnapshots()
181
182    /**
183     * Get true if this repository contains release versioned
184     * artifacts.
185     * 
186     * @return boolean
187     */
188    public boolean isReleases()
189    {
190        return this.releases;
191    } //-- boolean isReleases()
192
193    /**
194     * Get true if this repository should be scanned and processed.
195     * 
196     * @return boolean
197     */
198    public boolean isScanned()
199    {
200        return this.scanned;
201    } //-- boolean isScanned()
202
203    /**
204     * Get true to not generate packed index (note you won't be
205     * able to export your index.
206     * 
207     * @return boolean
208     */
209    public boolean isSkipPackedIndexCreation()
210    {
211        return this.skipPackedIndexCreation;
212    } //-- boolean isSkipPackedIndexCreation()
213
214    /**
215     * Get true if this repository contains snapshot versioned
216     * artifacts.
217     * 
218     * @return boolean
219     */
220    public boolean isSnapshots()
221    {
222        return this.snapshots;
223    } //-- boolean isSnapshots()
224
225    /**
226     * Get need a staging repository.
227     * 
228     * @return boolean
229     */
230    public boolean isStageRepoNeeded()
231    {
232        return this.stageRepoNeeded;
233    } //-- boolean isStageRepoNeeded()
234
235    /**
236     * Set true if re-deployment of artifacts already in the
237     * repository will be blocked.
238     * 
239     * @param blockRedeployments
240     */
241    public void setBlockRedeployments( boolean blockRedeployments )
242    {
243        this.blockRedeployments = blockRedeployments;
244    } //-- void setBlockRedeployments( boolean )
245
246    /**
247     * Set true if the released snapshots are to be removed from
248     * the repo during repository purge.
249     * 
250     * @param deleteReleasedSnapshots
251     */
252    public void setDeleteReleasedSnapshots( boolean deleteReleasedSnapshots )
253    {
254        this.deleteReleasedSnapshots = deleteReleasedSnapshots;
255    } //-- void setDeleteReleasedSnapshots( boolean )
256
257    /**
258     * Set the file system location for this repository.
259     * 
260     * @param location
261     */
262    public void setLocation( String location )
263    {
264        this.location = location;
265    } //-- void setLocation( String )
266
267    /**
268     * Set when to run the refresh task.
269     *             Default is every hour.
270     * 
271     * @param refreshCronExpression
272     */
273    public void setRefreshCronExpression( String refreshCronExpression )
274    {
275        this.refreshCronExpression = refreshCronExpression;
276    } //-- void setRefreshCronExpression( String )
277
278    /**
279     * Set true if this repository contains release versioned
280     * artifacts.
281     * 
282     * @param releases
283     */
284    public void setReleases( boolean releases )
285    {
286        this.releases = releases;
287    } //-- void setReleases( boolean )
288
289    /**
290     * Set the total count of the artifact to be retained for each
291     * snapshot.
292     * 
293     * @param retentionCount
294     */
295    public void setRetentionCount( int retentionCount )
296    {
297        this.retentionCount = retentionCount;
298    } //-- void setRetentionCount( int )
299
300    /**
301     * Set the number of days after which snapshots will be
302     * removed.
303     * 
304     * @param retentionPeriod
305     */
306    public void setRetentionPeriod( int retentionPeriod )
307    {
308        this.retentionPeriod = retentionPeriod;
309    } //-- void setRetentionPeriod( int )
310
311    /**
312     * Set true if this repository should be scanned and processed.
313     * 
314     * @param scanned
315     */
316    public void setScanned( boolean scanned )
317    {
318        this.scanned = scanned;
319    } //-- void setScanned( boolean )
320
321    /**
322     * Set true to not generate packed index (note you won't be
323     * able to export your index.
324     * 
325     * @param skipPackedIndexCreation
326     */
327    public void setSkipPackedIndexCreation( boolean skipPackedIndexCreation )
328    {
329        this.skipPackedIndexCreation = skipPackedIndexCreation;
330    } //-- void setSkipPackedIndexCreation( boolean )
331
332    /**
333     * Set true if this repository contains snapshot versioned
334     * artifacts.
335     * 
336     * @param snapshots
337     */
338    public void setSnapshots( boolean snapshots )
339    {
340        this.snapshots = snapshots;
341    } //-- void setSnapshots( boolean )
342
343    /**
344     * Set need a staging repository.
345     * 
346     * @param stageRepoNeeded
347     */
348    public void setStageRepoNeeded( boolean stageRepoNeeded )
349    {
350        this.stageRepoNeeded = stageRepoNeeded;
351    } //-- void setStageRepoNeeded( boolean )
352
353}