123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353 |
- package org.apache.archiva.configuration;
-
- /*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
- /**
- * Class ManagedRepositoryConfiguration.
- *
- * @version $Revision$ $Date$
- */
- @SuppressWarnings( "all" )
- public class ManagedRepositoryConfiguration
- extends AbstractRepositoryConfiguration
- implements java.io.Serializable
- {
-
- //--------------------------/
- //- Class/Member Variables -/
- //--------------------------/
-
- /**
- *
- * The file system location for this repository.
- *
- */
- private String location;
-
- /**
- * True if this repository contains release versioned artifacts.
- */
- private boolean releases = true;
-
- /**
- * True if re-deployment of artifacts already in the repository
- * will be blocked.
- */
- private boolean blockRedeployments = false;
-
- /**
- * True if this repository contains snapshot versioned artifacts
- */
- private boolean snapshots = false;
-
- /**
- * True if this repository should be scanned and processed.
- */
- private boolean scanned = true;
-
- /**
- *
- * When to run the refresh task.
- * Default is every hour
- * .
- */
- private String refreshCronExpression = "0 0 * * * ?";
-
- /**
- *
- * The total count of the artifact to be retained
- * for each snapshot.
- *
- */
- private int retentionCount = 2;
-
- /**
- *
- * The number of days after which snapshots will be
- * removed.
- *
- */
- private int retentionPeriod = 100;
-
- /**
- *
- * True if the released snapshots are to be removed
- * from the repo during repository purge.
- *
- */
- private boolean deleteReleasedSnapshots = false;
-
- /**
- *
- * True to not generate packed index (note you
- * won't be able to export your index.
- *
- */
- private boolean skipPackedIndexCreation = false;
-
- /**
- *
- * Need a staging repository
- * .
- */
- private boolean stageRepoNeeded = false;
-
-
- //-----------/
- //- Methods -/
- //-----------/
-
- /**
- * Get the file system location for this repository.
- *
- * @return String
- */
- public String getLocation()
- {
- return this.location;
- } //-- String getLocation()
-
- /**
- * Get when to run the refresh task.
- * Default is every hour.
- *
- * @return String
- */
- public String getRefreshCronExpression()
- {
- return this.refreshCronExpression;
- } //-- String getRefreshCronExpression()
-
- /**
- * Get the total count of the artifact to be retained for each
- * snapshot.
- *
- * @return int
- */
- public int getRetentionCount()
- {
- return this.retentionCount;
- } //-- int getRetentionCount()
-
- /**
- * Get the number of days after which snapshots will be
- * removed.
- *
- * @return int
- */
- public int getRetentionPeriod()
- {
- return this.retentionPeriod;
- } //-- int getRetentionPeriod()
-
- /**
- * Get true if re-deployment of artifacts already in the
- * repository will be blocked.
- *
- * @return boolean
- */
- public boolean isBlockRedeployments()
- {
- return this.blockRedeployments;
- } //-- boolean isBlockRedeployments()
-
- /**
- * Get true if the released snapshots are to be removed from
- * the repo during repository purge.
- *
- * @return boolean
- */
- public boolean isDeleteReleasedSnapshots()
- {
- return this.deleteReleasedSnapshots;
- } //-- boolean isDeleteReleasedSnapshots()
-
- /**
- * Get true if this repository contains release versioned
- * artifacts.
- *
- * @return boolean
- */
- public boolean isReleases()
- {
- return this.releases;
- } //-- boolean isReleases()
-
- /**
- * Get true if this repository should be scanned and processed.
- *
- * @return boolean
- */
- public boolean isScanned()
- {
- return this.scanned;
- } //-- boolean isScanned()
-
- /**
- * Get true to not generate packed index (note you won't be
- * able to export your index.
- *
- * @return boolean
- */
- public boolean isSkipPackedIndexCreation()
- {
- return this.skipPackedIndexCreation;
- } //-- boolean isSkipPackedIndexCreation()
-
- /**
- * Get true if this repository contains snapshot versioned
- * artifacts.
- *
- * @return boolean
- */
- public boolean isSnapshots()
- {
- return this.snapshots;
- } //-- boolean isSnapshots()
-
- /**
- * Get need a staging repository.
- *
- * @return boolean
- */
- public boolean isStageRepoNeeded()
- {
- return this.stageRepoNeeded;
- } //-- boolean isStageRepoNeeded()
-
- /**
- * Set true if re-deployment of artifacts already in the
- * repository will be blocked.
- *
- * @param blockRedeployments
- */
- public void setBlockRedeployments( boolean blockRedeployments )
- {
- this.blockRedeployments = blockRedeployments;
- } //-- void setBlockRedeployments( boolean )
-
- /**
- * Set true if the released snapshots are to be removed from
- * the repo during repository purge.
- *
- * @param deleteReleasedSnapshots
- */
- public void setDeleteReleasedSnapshots( boolean deleteReleasedSnapshots )
- {
- this.deleteReleasedSnapshots = deleteReleasedSnapshots;
- } //-- void setDeleteReleasedSnapshots( boolean )
-
- /**
- * Set the file system location for this repository.
- *
- * @param location
- */
- public void setLocation( String location )
- {
- this.location = location;
- } //-- void setLocation( String )
-
- /**
- * Set when to run the refresh task.
- * Default is every hour.
- *
- * @param refreshCronExpression
- */
- public void setRefreshCronExpression( String refreshCronExpression )
- {
- this.refreshCronExpression = refreshCronExpression;
- } //-- void setRefreshCronExpression( String )
-
- /**
- * Set true if this repository contains release versioned
- * artifacts.
- *
- * @param releases
- */
- public void setReleases( boolean releases )
- {
- this.releases = releases;
- } //-- void setReleases( boolean )
-
- /**
- * Set the total count of the artifact to be retained for each
- * snapshot.
- *
- * @param retentionCount
- */
- public void setRetentionCount( int retentionCount )
- {
- this.retentionCount = retentionCount;
- } //-- void setRetentionCount( int )
-
- /**
- * Set the number of days after which snapshots will be
- * removed.
- *
- * @param retentionPeriod
- */
- public void setRetentionPeriod( int retentionPeriod )
- {
- this.retentionPeriod = retentionPeriod;
- } //-- void setRetentionPeriod( int )
-
- /**
- * Set true if this repository should be scanned and processed.
- *
- * @param scanned
- */
- public void setScanned( boolean scanned )
- {
- this.scanned = scanned;
- } //-- void setScanned( boolean )
-
- /**
- * Set true to not generate packed index (note you won't be
- * able to export your index.
- *
- * @param skipPackedIndexCreation
- */
- public void setSkipPackedIndexCreation( boolean skipPackedIndexCreation )
- {
- this.skipPackedIndexCreation = skipPackedIndexCreation;
- } //-- void setSkipPackedIndexCreation( boolean )
-
- /**
- * Set true if this repository contains snapshot versioned
- * artifacts.
- *
- * @param snapshots
- */
- public void setSnapshots( boolean snapshots )
- {
- this.snapshots = snapshots;
- } //-- void setSnapshots( boolean )
-
- /**
- * Set need a staging repository.
- *
- * @param stageRepoNeeded
- */
- public void setStageRepoNeeded( boolean stageRepoNeeded )
- {
- this.stageRepoNeeded = stageRepoNeeded;
- } //-- void setStageRepoNeeded( boolean )
-
- }
|