mirror of https://github.com/apache/archiva.git
[MRM-1490] REST services add missing fields when creating a managed repository
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1171014 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1aa85c7d7e
commit
7b51409788
|
@ -215,6 +215,7 @@ public class DefaultManagedRepositoryAdmin
|
||||||
repository.setDaysOlder( daysOlder );
|
repository.setDaysOlder( daysOlder );
|
||||||
repository.setRetentionCount( retentionCount );
|
repository.setRetentionCount( retentionCount );
|
||||||
repository.setDeleteReleasedSnapshots( deteleReleasedSnapshots );
|
repository.setDeleteReleasedSnapshots( deteleReleasedSnapshots );
|
||||||
|
repository.setIndexDir( indexDir );
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
@ -50,7 +50,21 @@ public class ManagedRepository
|
||||||
|
|
||||||
private boolean resetStats;
|
private boolean resetStats;
|
||||||
|
|
||||||
private boolean scanned =false;
|
private boolean scanned = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* default model value
|
||||||
|
*/
|
||||||
|
private int daysOlder = 100;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* default model value
|
||||||
|
*/
|
||||||
|
private int retentionCount = 2;
|
||||||
|
|
||||||
|
private boolean deleteReleasedSnapshots;
|
||||||
|
|
||||||
|
private String indexDirectory;
|
||||||
|
|
||||||
public ManagedRepository()
|
public ManagedRepository()
|
||||||
{
|
{
|
||||||
|
@ -186,6 +200,46 @@ public class ManagedRepository
|
||||||
this.scanned = scanned;
|
this.scanned = scanned;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getIndexDirectory()
|
||||||
|
{
|
||||||
|
return indexDirectory;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIndexDirectory( String indexDirectory )
|
||||||
|
{
|
||||||
|
this.indexDirectory = indexDirectory;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getDaysOlder()
|
||||||
|
{
|
||||||
|
return daysOlder;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDaysOlder( int daysOlder )
|
||||||
|
{
|
||||||
|
this.daysOlder = daysOlder;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getRetentionCount()
|
||||||
|
{
|
||||||
|
return retentionCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRetentionCount( int retentionCount )
|
||||||
|
{
|
||||||
|
this.retentionCount = retentionCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isDeleteReleasedSnapshots()
|
||||||
|
{
|
||||||
|
return deleteReleasedSnapshots;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDeleteReleasedSnapshots( boolean deleteReleasedSnapshots )
|
||||||
|
{
|
||||||
|
this.deleteReleasedSnapshots = deleteReleasedSnapshots;
|
||||||
|
}
|
||||||
|
|
||||||
public int hashCode()
|
public int hashCode()
|
||||||
{
|
{
|
||||||
int result = 17;
|
int result = 17;
|
||||||
|
@ -227,6 +281,7 @@ public class ManagedRepository
|
||||||
sb.append( ", cronExpression='" ).append( cronExpression ).append( '\'' );
|
sb.append( ", cronExpression='" ).append( cronExpression ).append( '\'' );
|
||||||
sb.append( ", resetStats=" ).append( resetStats );
|
sb.append( ", resetStats=" ).append( resetStats );
|
||||||
sb.append( ", scanned=" ).append( scanned );
|
sb.append( ", scanned=" ).append( scanned );
|
||||||
|
sb.append( ", indexDirectory='" ).append( indexDirectory ).append( '\'' );
|
||||||
sb.append( '}' );
|
sb.append( '}' );
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,6 +119,10 @@ public class DefaultManagedRepositoriesService
|
||||||
repo.setName( managedRepository.getName() );
|
repo.setName( managedRepository.getName() );
|
||||||
repo.setReleases( managedRepository.isReleases() );
|
repo.setReleases( managedRepository.isReleases() );
|
||||||
repo.setSnapshots( managedRepository.isSnapshots() );
|
repo.setSnapshots( managedRepository.isSnapshots() );
|
||||||
|
repo.setIndexDirectory( managedRepository.getIndexDirectory() );
|
||||||
|
repo.setDaysOlder( managedRepository.getDaysOlder() );
|
||||||
|
repo.setDeleteReleasedSnapshots( managedRepository.isDeleteReleasedSnapshots() );
|
||||||
|
repo.setRetentionCount( managedRepository.getRetentionCount() );
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return managedRepositoryAdmin.addManagedRepository( repo, managedRepository.isStageRepoNeeded(),
|
return managedRepositoryAdmin.addManagedRepository( repo, managedRepository.isStageRepoNeeded(),
|
||||||
|
|
Loading…
Reference in New Issue