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.setRetentionCount( retentionCount );
|
||||
repository.setDeleteReleasedSnapshots( deteleReleasedSnapshots );
|
||||
repository.setIndexDir( indexDir );
|
||||
|
||||
try
|
||||
{
|
||||
|
|
|
@ -52,6 +52,20 @@ public class ManagedRepository
|
|||
|
||||
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()
|
||||
{
|
||||
// no op
|
||||
|
@ -186,6 +200,46 @@ public class ManagedRepository
|
|||
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()
|
||||
{
|
||||
int result = 17;
|
||||
|
@ -227,6 +281,7 @@ public class ManagedRepository
|
|||
sb.append( ", cronExpression='" ).append( cronExpression ).append( '\'' );
|
||||
sb.append( ", resetStats=" ).append( resetStats );
|
||||
sb.append( ", scanned=" ).append( scanned );
|
||||
sb.append( ", indexDirectory='" ).append( indexDirectory ).append( '\'' );
|
||||
sb.append( '}' );
|
||||
return sb.toString();
|
||||
}
|
||||
|
|
|
@ -119,6 +119,10 @@ public class DefaultManagedRepositoriesService
|
|||
repo.setName( managedRepository.getName() );
|
||||
repo.setReleases( managedRepository.isReleases() );
|
||||
repo.setSnapshots( managedRepository.isSnapshots() );
|
||||
repo.setIndexDirectory( managedRepository.getIndexDirectory() );
|
||||
repo.setDaysOlder( managedRepository.getDaysOlder() );
|
||||
repo.setDeleteReleasedSnapshots( managedRepository.isDeleteReleasedSnapshots() );
|
||||
repo.setRetentionCount( managedRepository.getRetentionCount() );
|
||||
try
|
||||
{
|
||||
return managedRepositoryAdmin.addManagedRepository( repo, managedRepository.isStageRepoNeeded(),
|
||||
|
|
Loading…
Reference in New Issue