Search in sources :

Example 16 with Configuration

use of org.apache.archiva.configuration.Configuration in project archiva by apache.

the class DefaultArchivaAdministration method updateUiConfiguration.

@Override
public void updateUiConfiguration(UiConfiguration uiConfiguration) throws RepositoryAdminException {
    Configuration configuration = getArchivaConfiguration().getConfiguration();
    if (uiConfiguration != null) {
        UserInterfaceOptions userInterfaceOptions = getModelMapper().map(uiConfiguration, UserInterfaceOptions.class);
        configuration.getWebapp().setUi(userInterfaceOptions);
    } else {
        configuration.getWebapp().setUi(null);
    }
    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) UserInterfaceOptions(org.apache.archiva.configuration.UserInterfaceOptions)

Example 17 with Configuration

use of org.apache.archiva.configuration.Configuration in project archiva by apache.

the class DefaultArchivaAdministration method setOrganisationInformation.

@Override
public void setOrganisationInformation(OrganisationInformation organisationInformation) throws RepositoryAdminException {
    Configuration configuration = getArchivaConfiguration().getConfiguration();
    if (organisationInformation != null) {
        org.apache.archiva.configuration.OrganisationInformation organisationInformationModel = getModelMapper().map(organisationInformation, org.apache.archiva.configuration.OrganisationInformation.class);
        configuration.setOrganisationInfo(organisationInformationModel);
    } else {
        configuration.setOrganisationInfo(null);
    }
    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)

Example 18 with Configuration

use of org.apache.archiva.configuration.Configuration in project archiva by apache.

the class DefaultArchivaAdministration method deleteLegacyArtifactPath.

@Override
public void deleteLegacyArtifactPath(String path, AuditInformation auditInformation) throws RepositoryAdminException {
    Configuration configuration = getArchivaConfiguration().getConfiguration();
    org.apache.archiva.configuration.LegacyArtifactPath legacyArtifactPath = new org.apache.archiva.configuration.LegacyArtifactPath();
    legacyArtifactPath.setPath(path);
    configuration.removeLegacyArtifactPath(legacyArtifactPath);
    saveConfiguration(configuration);
    triggerAuditEvent("", "", AuditEvent.REMOVE_LEGACY_PATH, auditInformation);
}
Also used : LegacyArtifactPath(org.apache.archiva.admin.model.beans.LegacyArtifactPath) 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)

Example 19 with Configuration

use of org.apache.archiva.configuration.Configuration in project archiva by apache.

the class DefaultArchivaAdministration method removeInvalidContentConsumer.

@Override
public void removeInvalidContentConsumer(String invalidContentConsumer, AuditInformation auditInformation) throws RepositoryAdminException {
    Configuration configuration = getArchivaConfiguration().getConfiguration();
    configuration.getRepositoryScanning().removeInvalidContentConsumer(invalidContentConsumer);
    saveConfiguration(configuration);
    triggerAuditEvent("", "", AuditEvent.DISABLE_REPO_CONSUMER, auditInformation);
}
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)

Example 20 with Configuration

use of org.apache.archiva.configuration.Configuration in project archiva by apache.

the class DefaultArchivaAdministration method removeKnownContentConsumer.

@Override
public void removeKnownContentConsumer(String knownContentConsumer, AuditInformation auditInformation) throws RepositoryAdminException {
    Configuration configuration = getArchivaConfiguration().getConfiguration();
    configuration.getRepositoryScanning().removeKnownContentConsumer(knownContentConsumer);
    saveConfiguration(configuration);
    triggerAuditEvent("", "", AuditEvent.DISABLE_REPO_CONSUMER, auditInformation);
}
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)

Aggregations

Configuration (org.apache.archiva.configuration.Configuration)63 ArchivaConfiguration (org.apache.archiva.configuration.ArchivaConfiguration)30 ManagedRepositoryConfiguration (org.apache.archiva.configuration.ManagedRepositoryConfiguration)29 ProxyConnectorConfiguration (org.apache.archiva.configuration.ProxyConnectorConfiguration)21 RemoteRepositoryConfiguration (org.apache.archiva.configuration.RemoteRepositoryConfiguration)19 RepositoryAdminException (org.apache.archiva.admin.model.RepositoryAdminException)18 ContextConfiguration (org.springframework.test.context.ContextConfiguration)16 NetworkConfiguration (org.apache.archiva.admin.model.beans.NetworkConfiguration)13 UiConfiguration (org.apache.archiva.admin.model.beans.UiConfiguration)13 WebappConfiguration (org.apache.archiva.configuration.WebappConfiguration)13 IndeterminateConfigurationException (org.apache.archiva.configuration.IndeterminateConfigurationException)11 RepositoryGroupConfiguration (org.apache.archiva.configuration.RepositoryGroupConfiguration)11 RegistryException (org.apache.archiva.redback.components.registry.RegistryException)11 Before (org.junit.Before)11 ArrayList (java.util.ArrayList)10 Test (org.junit.Test)10 Path (java.nio.file.Path)8 RepositoryException (org.apache.archiva.repository.RepositoryException)7 IOException (java.io.IOException)4 NetworkProxyConfiguration (org.apache.archiva.configuration.NetworkProxyConfiguration)4