return value;
}
private V1RepositoryConfiguration readV1RepositoryConfiguration( String prefix, Registry registry )
{
V1RepositoryConfiguration value = new V1RepositoryConfiguration();
//String url = registry.getString( prefix + "url", value.getUrl() );
List<String> urlList = registry.getList( prefix + "url" );
String url = value.getUrl();
if (urlList != null && !urlList.isEmpty() )
{
StringBuilder sb = new StringBuilder( );
for (int i = 0,size = urlList.size();i<size;i++)
{
sb.append( urlList.get( i ) );
if (i<size - 1)
{
sb.append( ',' );
}
}
url = sb.toString();
}
value.setUrl( url );
boolean indexed = registry.getBoolean( prefix + "indexed", value.isIndexed() );
value.setIndexed( indexed );
//String location = registry.getString( prefix + "location", value.getLocation() );
List<String> locationList = registry.getList( prefix + "location" );
String location = value.getLocation();
if (locationList != null && !locationList.isEmpty() )
{
StringBuilder sb = new StringBuilder( );
for (int i = 0,size = locationList.size();i<size;i++)
{
sb.append( locationList.get( i ) );
if (i<size - 1)
{
sb.append( ',' );
}
}
location = sb.toString();
}
value.setLocation( location );
boolean releases = registry.getBoolean( prefix + "releases", value.isReleases() );
value.setReleases( releases );
boolean blockRedeployments = registry.getBoolean( prefix + "blockRedeployments", value.isBlockRedeployments() );
value.setBlockRedeployments( blockRedeployments );
boolean snapshots = registry.getBoolean( prefix + "snapshots", value.isSnapshots() );
value.setSnapshots( snapshots );
boolean scanned = registry.getBoolean( prefix + "scanned", value.isScanned() );
value.setScanned( scanned );
//String refreshCronExpression = registry.getString( prefix + "refreshCronExpression", value.getRefreshCronExpression() );
List<String> refreshCronExpressionList = registry.getList( prefix + "refreshCronExpression" );
String refreshCronExpression = value.getRefreshCronExpression();
if (refreshCronExpressionList != null && !refreshCronExpressionList.isEmpty() )
{
StringBuilder sb = new StringBuilder( );
for (int i = 0,size = refreshCronExpressionList.size();i<size;i++)
{
sb.append( refreshCronExpressionList.get( i ) );
if (i<size - 1)
{
sb.append( ',' );
}
}
refreshCronExpression = sb.toString();
}
value.setRefreshCronExpression( refreshCronExpression );
int retentionCount = registry.getInt( prefix + "retentionCount", value.getRetentionCount() );
value.setRetentionCount( retentionCount );
int daysOlder = registry.getInt( prefix + "daysOlder", value.getDaysOlder() );
value.setDaysOlder( daysOlder );
boolean deleteReleasedSnapshots = registry.getBoolean( prefix + "deleteReleasedSnapshots", value.isDeleteReleasedSnapshots() );
value.setDeleteReleasedSnapshots( deleteReleasedSnapshots );
boolean skipPackedIndexCreation = registry.getBoolean( prefix + "skipPackedIndexCreation", value.isSkipPackedIndexCreation() );
value.setSkipPackedIndexCreation( skipPackedIndexCreation );
boolean stageRepoNeeded = registry.getBoolean( prefix + "stageRepoNeeded", value.isStageRepoNeeded() );
value.setStageRepoNeeded( stageRepoNeeded );
//String id = registry.getString( prefix + "id", value.getId() );
List<String> idList = registry.getList( prefix + "id" );
String id = value.getId();
if (idList != null && !idList.isEmpty() )
{
StringBuilder sb = new StringBuilder( );
for (int i = 0,size = idList.size();i<size;i++)
{
sb.append( idList.get( i ) );
if (i<size - 1)
{
sb.append( ',' );
}
}
id = sb.toString();
}
value.setId( id );
//String name = registry.getString( prefix + "name", value.getName() );
List<String> nameList = registry.getList( prefix + "name" );
String name = value.getName();
if (nameList != null && !nameList.isEmpty() )
{
StringBuilder sb = new StringBuilder( );
for (int i = 0,size = nameList.size();i<size;i++)
{
sb.append( nameList.get( i ) );
if (i<size - 1)
{
sb.append( ',' );
}
}
name = sb.toString();
}
value.setName( name );
//String layout = registry.getString( prefix + "layout", value.getLayout() );
List<String> layoutList = registry.getList( prefix + "layout" );
String layout = value.getLayout();
if (layoutList != null && !layoutList.isEmpty() )
{
StringBuilder sb = new StringBuilder( );
for (int i = 0,size = layoutList.size();i<size;i++)
{
sb.append( layoutList.get( i ) );
if (i<size - 1)
{
sb.append( ',' );
}
}
layout = sb.toString();
}
value.setLayout( layout );
//String indexDir = registry.getString( prefix + "indexDir", value.getIndexDir() );
List<String> indexDirList = registry.getList( prefix + "indexDir" );
String indexDir = value.getIndexDir();
if (indexDirList != null && !indexDirList.isEmpty() )
{
StringBuilder sb = new StringBuilder( );
for (int i = 0,size = indexDirList.size();i<size;i++)
{
sb.append( indexDirList.get( i ) );
if (i<size - 1)
{
sb.append( ',' );
}
}
indexDir = sb.toString();
}
value.setIndexDir( indexDir );
//String description = registry.getString( prefix + "description", value.getDescription() );
List<String> descriptionList = registry.getList( prefix + "description" );
String description = value.getDescription();
if (descriptionList != null && !descriptionList.isEmpty() )
{
StringBuilder sb = new StringBuilder( );
for (int i = 0,size = descriptionList.size();i<size;i++)
{
sb.append( descriptionList.get( i ) );
if (i<size - 1)
{
sb.append( ',' );
}
}
description = sb.toString();
}
value.setDescription( description );
return value;
}