aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-base
diff options
context:
space:
mode:
authorMartin Stockhammer <martin_s@apache.org>2017-10-03 19:50:23 +0200
committerMartin Stockhammer <martin_s@apache.org>2017-10-03 19:50:23 +0200
commite0eff36ebc61da1ef90718ecd2bd2bb9e27fb3a8 (patch)
tree2c25f742270ed7dac1cca199062761b8765b16f5 /archiva-modules/archiva-base
parent3976c3fb23ffc68e0b8e83934db68f8db96f9c0f (diff)
downloadarchiva-e0eff36ebc61da1ef90718ecd2bd2bb9e27fb3a8.tar.gz
archiva-e0eff36ebc61da1ef90718ecd2bd2bb9e27fb3a8.zip
Changing daysOlder to retentionTime
Diffstat (limited to 'archiva-modules/archiva-base')
-rw-r--r--archiva-modules/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo2
-rw-r--r--archiva-modules/archiva-base/archiva-configuration/src/main/resources/org/apache/archiva/configuration/default-archiva.xml4
-rw-r--r--archiva-modules/archiva-base/archiva-configuration/src/test/conf/archiva-1.3.xml4
-rwxr-xr-xarchiva-modules/archiva-base/archiva-configuration/src/test/resources/org/apache/archiva/configuration/test-default-archiva.xml4
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/DaysOldRepositoryPurge.java8
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/conf/repository-manager-daysOld.xml2
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/conf/repository-manager.xml2
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/test/conf/repository-manager.xml2
-rw-r--r--archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/ManagedRepository.java18
-rw-r--r--archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java8
10 files changed, 27 insertions, 27 deletions
diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo b/archiva-modules/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo
index 5af50af7f..1189ec006 100644
--- a/archiva-modules/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo
+++ b/archiva-modules/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo
@@ -709,7 +709,7 @@
<defaultValue>2</defaultValue>
</field>
<field>
- <name>daysOlder</name>
+ <name>retentionTime</name>
<version>1.0.0+</version>
<type>int</type>
<description>
diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/resources/org/apache/archiva/configuration/default-archiva.xml b/archiva-modules/archiva-base/archiva-configuration/src/main/resources/org/apache/archiva/configuration/default-archiva.xml
index 88144df1c..9a34ace94 100644
--- a/archiva-modules/archiva-base/archiva-configuration/src/main/resources/org/apache/archiva/configuration/default-archiva.xml
+++ b/archiva-modules/archiva-base/archiva-configuration/src/main/resources/org/apache/archiva/configuration/default-archiva.xml
@@ -13,7 +13,7 @@
<blockRedeployments>true</blockRedeployments>
<scanned>true</scanned>
<refreshCronExpression>0 0 * * * ?</refreshCronExpression>
- <daysOlder>30</daysOlder>
+ <retentionTime>30</retentionTime>
</managedRepository>
<managedRepository>
<id>snapshots</id>
@@ -26,7 +26,7 @@
<blockRedeployments>false</blockRedeployments>
<scanned>true</scanned>
<refreshCronExpression>0 0\,30 * * * ?</refreshCronExpression>
- <daysOlder>30</daysOlder>
+ <retentionTime>30</retentionTime>
</managedRepository>
</managedRepositories>
<remoteRepositories>
diff --git a/archiva-modules/archiva-base/archiva-configuration/src/test/conf/archiva-1.3.xml b/archiva-modules/archiva-base/archiva-configuration/src/test/conf/archiva-1.3.xml
index 7d559f492..4462b6dac 100644
--- a/archiva-modules/archiva-base/archiva-configuration/src/test/conf/archiva-1.3.xml
+++ b/archiva-modules/archiva-base/archiva-configuration/src/test/conf/archiva-1.3.xml
@@ -103,7 +103,7 @@
<managedRepository>
<location>${appserver.base}/data/repositories/internal</location>
<blockRedeployments>true</blockRedeployments>
-<daysOlder>30</daysOlder>
+<retentionTime>30</retentionTime>
<id>internal</id>
<name>Archiva Managed Internal Repository</name>
</managedRepository>
@@ -112,7 +112,7 @@
<releases>false</releases>
<snapshots>true</snapshots>
<refreshCronExpression>0 0\,30 * * * ?</refreshCronExpression>
-<daysOlder>30</daysOlder>
+<retentionTime>30</retentionTime>
<id>snapshots</id>
<name>Archiva Managed Snapshot Repository</name>
</managedRepository>
diff --git a/archiva-modules/archiva-base/archiva-configuration/src/test/resources/org/apache/archiva/configuration/test-default-archiva.xml b/archiva-modules/archiva-base/archiva-configuration/src/test/resources/org/apache/archiva/configuration/test-default-archiva.xml
index 6f44eb4af..ab0f50dbb 100755
--- a/archiva-modules/archiva-base/archiva-configuration/src/test/resources/org/apache/archiva/configuration/test-default-archiva.xml
+++ b/archiva-modules/archiva-base/archiva-configuration/src/test/resources/org/apache/archiva/configuration/test-default-archiva.xml
@@ -10,7 +10,7 @@
<snapshots>false</snapshots>
<scanned>true</scanned>
<refreshCronExpression>0 0 * * * ?</refreshCronExpression>
- <daysOlder>30</daysOlder>
+ <retentionTime>30</retentionTime>
</managedRepository>
<managedRepository>
<id>snapshots</id>
@@ -21,7 +21,7 @@
<snapshots>true</snapshots>
<scanned>true</scanned>
<refreshCronExpression>0 0\,30 * * * ?</refreshCronExpression>
- <daysOlder>30</daysOlder>
+ <retentionTime>30</retentionTime>
</managedRepository>
</managedRepositories>
<remoteRepositories>
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/DaysOldRepositoryPurge.java b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/DaysOldRepositoryPurge.java
index 155e5f620..8687313b7 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/DaysOldRepositoryPurge.java
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/DaysOldRepositoryPurge.java
@@ -53,15 +53,15 @@ public class DaysOldRepositoryPurge
{
private SimpleDateFormat timestampParser;
- private int daysOlder;
+ private int retentionTime;
private int retentionCount;
- public DaysOldRepositoryPurge( ManagedRepositoryContent repository, int daysOlder, int retentionCount,
+ public DaysOldRepositoryPurge( ManagedRepositoryContent repository, int retentionTime, int retentionCount,
RepositorySession repositorySession, List<RepositoryListener> listeners )
{
super( repository, repositorySession, listeners );
- this.daysOlder = daysOlder;
+ this.retentionTime = retentionTime;
this.retentionCount = retentionCount;
timestampParser = new SimpleDateFormat( "yyyyMMdd.HHmmss" );
timestampParser.setTimeZone( DateUtils.UTC_TIME_ZONE );
@@ -83,7 +83,7 @@ public class DaysOldRepositoryPurge
ArtifactReference artifact = repository.toArtifactReference( path );
Calendar olderThanThisDate = Calendar.getInstance( DateUtils.UTC_TIME_ZONE );
- olderThanThisDate.add( Calendar.DATE, -daysOlder );
+ olderThanThisDate.add( Calendar.DATE, -retentionTime );
// respect retention count
VersionedReference reference = new VersionedReference( );
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/conf/repository-manager-daysOld.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/conf/repository-manager-daysOld.xml
index bbbee3eb2..6b1779c47 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/conf/repository-manager-daysOld.xml
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/conf/repository-manager-daysOld.xml
@@ -68,7 +68,7 @@
<snapshots>true</snapshots>
<indexed>true</indexed>
<refreshCronExpression>0 0 * * * ?</refreshCronExpression>
- <daysOlder>100</daysOlder>
+ <retentionTime>100</retentionTime>
<deleteReleasedSnapshots>true</deleteReleasedSnapshots>
</repository>
</repositories>
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/conf/repository-manager.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/conf/repository-manager.xml
index 29cdebde4..171cfd131 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/conf/repository-manager.xml
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/conf/repository-manager.xml
@@ -68,7 +68,7 @@
<snapshots>true</snapshots>
<indexed>true</indexed>
<refreshCronExpression>0 0 * * * ?</refreshCronExpression>
- <daysOlder>0</daysOlder>
+ <retentionTime>0</retentionTime>
<retentionCount>2</retentionCount>
</repository>
</repositories>
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/test/conf/repository-manager.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/test/conf/repository-manager.xml
index 19e1449cd..6c836b81c 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/test/conf/repository-manager.xml
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/test/conf/repository-manager.xml
@@ -30,7 +30,7 @@
<snapshots>true</snapshots>
<indexed>true</indexed>
<refreshCronExpression>0 0 * * * ?</refreshCronExpression>
- <daysOlder>0</daysOlder>
+ <retentionTime>0</retentionTime>
<retentionCount>2</retentionCount>
</repository>
</repositories>
diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/ManagedRepository.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/ManagedRepository.java
index 4236ca114..b8b58ea50 100644
--- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/ManagedRepository.java
+++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/beans/ManagedRepository.java
@@ -57,7 +57,7 @@ public class ManagedRepository
/**
* default model value
*/
- private int daysOlder = 100;
+ private int retentionTime = 100;
/**
* default model value
@@ -82,7 +82,7 @@ public class ManagedRepository
public ManagedRepository( String id, String name, String location, String layout, boolean snapshots,
boolean releases, boolean blockRedeployments, String cronExpression, String indexDir,
- boolean scanned, int daysOlder, int retentionCount, boolean deleteReleasedSnapshots,
+ boolean scanned, int retentionTime, int retentionCount, boolean deleteReleasedSnapshots,
boolean stageRepoNeeded )
{
super( id, name, layout );
@@ -94,7 +94,7 @@ public class ManagedRepository
this.setCronExpression( cronExpression );
this.setIndexDirectory( indexDir );
this.scanned = scanned;
- this.daysOlder = daysOlder;
+ this.retentionTime = retentionTime;
this.retentionCount = retentionCount;
this.deleteReleasedSnapshots = deleteReleasedSnapshots;
this.stageRepoNeeded = stageRepoNeeded;
@@ -105,11 +105,11 @@ public class ManagedRepository
*/
public ManagedRepository( String id, String name, String location, String layout, boolean snapshots,
boolean releases, boolean blockRedeployments, String cronExpression, String indexDir,
- boolean scanned, int daysOlder, int retentionCount, boolean deleteReleasedSnapshots,
+ boolean scanned, int retentionTime, int retentionCount, boolean deleteReleasedSnapshots,
boolean stageRepoNeeded, String description, boolean skipPackedIndexCreation )
{
this( id, name, location, layout, snapshots, releases, blockRedeployments, cronExpression, indexDir, scanned,
- daysOlder, retentionCount, deleteReleasedSnapshots, stageRepoNeeded );
+ retentionTime, retentionCount, deleteReleasedSnapshots, stageRepoNeeded );
setDescription( description );
setSkipPackedIndexCreation( skipPackedIndexCreation );
}
@@ -194,12 +194,12 @@ public class ManagedRepository
public int getDaysOlder()
{
- return daysOlder;
+ return retentionTime;
}
- public void setDaysOlder( int daysOlder )
+ public void setDaysOlder( int retentionTime )
{
- this.daysOlder = daysOlder;
+ this.retentionTime = retentionTime;
}
public int getRetentionCount()
@@ -265,7 +265,7 @@ public class ManagedRepository
sb.append( ", cronExpression='" ).append( cronExpression ).append( '\'' );
sb.append( ", stagingRepository=" ).append( stagingRepository );
sb.append( ", scanned=" ).append( scanned );
- sb.append( ", daysOlder=" ).append( daysOlder );
+ sb.append( ", retentionTime=" ).append( retentionTime );
sb.append( ", retentionCount=" ).append( retentionCount );
sb.append( ", deleteReleasedSnapshots=" ).append( deleteReleasedSnapshots );
sb.append( ", stageRepoNeeded=" ).append( stageRepoNeeded );
diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java
index d36546a99..6d7a914f5 100644
--- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java
+++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/managed/DefaultManagedRepositoryAdmin.java
@@ -158,7 +158,7 @@ public class DefaultManagedRepositoryAdmin
new ManagedRepository( repoConfig.getId(), repoConfig.getName(), repoConfig.getLocation(),
repoConfig.getLayout(), repoConfig.isSnapshots(), repoConfig.isReleases(),
repoConfig.isBlockRedeployments(), repoConfig.getRefreshCronExpression(),
- repoConfig.getIndexDir(), repoConfig.isScanned(), repoConfig.getDaysOlder(),
+ repoConfig.getIndexDir(), repoConfig.isScanned(), repoConfig.getRetentionTime(),
repoConfig.getRetentionCount(), repoConfig.isDeleteReleasedSnapshots(),
repoConfig.isStageRepoNeeded() );
repo.setDescription( repoConfig.getDescription() );
@@ -225,7 +225,7 @@ public class DefaultManagedRepositoryAdmin
String location, boolean blockRedeployments,
boolean releasesIncluded, boolean snapshotsIncluded,
boolean stageRepoNeeded, String cronExpression,
- String indexDir, int daysOlder, int retentionCount,
+ String indexDir, int retentionTime, int retentionCount,
boolean deteleReleasedSnapshots, String description,
boolean skipPackedIndexCreation, boolean scanned,
AuditInformation auditInformation,
@@ -245,7 +245,7 @@ public class DefaultManagedRepositoryAdmin
repository.setLayout( layout );
repository.setRefreshCronExpression( cronExpression );
repository.setIndexDir( indexDir );
- repository.setDaysOlder( daysOlder );
+ repository.setRetentionTime( retentionTime );
repository.setRetentionCount( retentionCount );
repository.setDeleteReleasedSnapshots( deteleReleasedSnapshots );
repository.setIndexDir( indexDir );
@@ -675,7 +675,7 @@ public class DefaultManagedRepositoryAdmin
stagingRepository.setLayout( repository.getLayout() );
stagingRepository.setName( repository.getName() + STAGE_REPO_ID_END );
stagingRepository.setBlockRedeployments( repository.isBlockRedeployments() );
- stagingRepository.setDaysOlder( repository.getDaysOlder() );
+ stagingRepository.setRetentionTime( repository.getRetentionTime() );
stagingRepository.setDeleteReleasedSnapshots( repository.isDeleteReleasedSnapshots() );
String path = repository.getLocation();