use of org.apache.archiva.admin.model.beans.NetworkConfiguration in project archiva by apache.
the class DefaultArchivaAdministration method initialize.
@PostConstruct
public void initialize() throws RepositoryAdminException {
// setup wagon on start with initial values
NetworkConfiguration networkConfiguration = getNetworkConfiguration();
setupWagon(networkConfiguration);
}
use of org.apache.archiva.admin.model.beans.NetworkConfiguration in project archiva by apache.
the class DefaultArchivaAdministration method setNetworkConfiguration.
@Override
public void setNetworkConfiguration(NetworkConfiguration networkConfiguration) throws RepositoryAdminException {
Configuration configuration = getArchivaConfiguration().getConfiguration();
if (networkConfiguration == null) {
configuration.setNetworkConfiguration(null);
} else {
configuration.setNetworkConfiguration(getModelMapper().map(networkConfiguration, org.apache.archiva.configuration.NetworkConfiguration.class));
}
setupWagon(networkConfiguration);
saveConfiguration(configuration);
}
use of org.apache.archiva.admin.model.beans.NetworkConfiguration in project archiva by apache.
the class ArchivaAdministrationTest method networkConfiguration.
@Test
public void networkConfiguration() throws Exception {
NetworkConfiguration networkConfiguration = archivaAdministration.getNetworkConfiguration();
assertNotNull(networkConfiguration);
assertTrue(networkConfiguration.isUsePooling());
assertEquals(30, networkConfiguration.getMaxTotal());
assertEquals(30, networkConfiguration.getMaxTotalPerHost());
}
Aggregations