Search in sources :

Example 1 with MergeConfiguration

use of org.apache.archiva.rest.api.v2.model.MergeConfiguration in project archiva by apache.

the class DefaultRepositoryGroupService method toConfig.

private RepositoryGroupConfiguration toConfig(RepositoryGroup group) {
    RepositoryGroupConfiguration result = new RepositoryGroupConfiguration();
    result.setId(group.getId());
    result.setName(group.getName());
    result.setLocation(group.getLocation());
    result.setRepositories(group.getRepositories());
    MergeConfiguration mergeConfig = group.getMergeConfiguration();
    if (mergeConfig != null) {
        result.setMergedIndexPath(mergeConfig.getMergedIndexPath());
        result.setMergedIndexTtl(mergeConfig.getMergedIndexTtlMinutes());
        result.setCronExpression(mergeConfig.getIndexMergeSchedule());
    }
    return result;
}
Also used : RepositoryGroupConfiguration(org.apache.archiva.configuration.model.RepositoryGroupConfiguration) MergeConfiguration(org.apache.archiva.rest.api.v2.model.MergeConfiguration)

Aggregations

RepositoryGroupConfiguration (org.apache.archiva.configuration.model.RepositoryGroupConfiguration)1 MergeConfiguration (org.apache.archiva.rest.api.v2.model.MergeConfiguration)1