Search in sources :

Example 1 with NetworkConfiguration

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);
}
Also used : NetworkConfiguration(org.apache.archiva.admin.model.beans.NetworkConfiguration) PostConstruct(javax.annotation.PostConstruct)

Example 2 with 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);
}
Also used : UiConfiguration(org.apache.archiva.admin.model.beans.UiConfiguration) NetworkConfiguration(org.apache.archiva.admin.model.beans.NetworkConfiguration) Configuration(org.apache.archiva.configuration.Configuration) WebappConfiguration(org.apache.archiva.configuration.WebappConfiguration) NetworkConfiguration(org.apache.archiva.admin.model.beans.NetworkConfiguration)

Example 3 with NetworkConfiguration

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());
}
Also used : NetworkConfiguration(org.apache.archiva.admin.model.beans.NetworkConfiguration) AbstractRepositoryAdminTest(org.apache.archiva.admin.repository.AbstractRepositoryAdminTest) Test(org.junit.Test)

Aggregations

NetworkConfiguration (org.apache.archiva.admin.model.beans.NetworkConfiguration)3 PostConstruct (javax.annotation.PostConstruct)1 UiConfiguration (org.apache.archiva.admin.model.beans.UiConfiguration)1 AbstractRepositoryAdminTest (org.apache.archiva.admin.repository.AbstractRepositoryAdminTest)1 Configuration (org.apache.archiva.configuration.Configuration)1 WebappConfiguration (org.apache.archiva.configuration.WebappConfiguration)1 Test (org.junit.Test)1