Search in sources :

Example 1 with UserInterfaceOptions

use of org.apache.archiva.configuration.UserInterfaceOptions 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 2 with UserInterfaceOptions

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

the class DefaultArchivaAdministration method getUiConfiguration.

@Override
public UiConfiguration getUiConfiguration() throws RepositoryAdminException {
    WebappConfiguration webappConfiguration = getArchivaConfiguration().getConfiguration().getWebapp();
    if (webappConfiguration == null) {
        return null;
    }
    UserInterfaceOptions userInterfaceOptions = webappConfiguration.getUi();
    if (userInterfaceOptions == null) {
        return null;
    }
    return getModelMapper().map(userInterfaceOptions, UiConfiguration.class);
}
Also used : WebappConfiguration(org.apache.archiva.configuration.WebappConfiguration) UserInterfaceOptions(org.apache.archiva.configuration.UserInterfaceOptions)

Aggregations

UserInterfaceOptions (org.apache.archiva.configuration.UserInterfaceOptions)2 WebappConfiguration (org.apache.archiva.configuration.WebappConfiguration)2 NetworkConfiguration (org.apache.archiva.admin.model.beans.NetworkConfiguration)1 UiConfiguration (org.apache.archiva.admin.model.beans.UiConfiguration)1 Configuration (org.apache.archiva.configuration.Configuration)1