From 84775832fdab4b3622ad95b4fe7237184859adda Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Thu, 8 Sep 2011 09:33:57 +0000 Subject: [PATCH] [MRM-1510] api to configure NetworkProxy : use it webapp git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1166586 13f79535-47bb-0310-9956-ffa450edef68 --- .../networkproxies/NetworkProxiesAction.java | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/networkproxies/NetworkProxiesAction.java b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/networkproxies/NetworkProxiesAction.java index 0215120d8..1d73e032e 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/networkproxies/NetworkProxiesAction.java +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/networkproxies/NetworkProxiesAction.java @@ -20,9 +20,9 @@ package org.apache.maven.archiva.web.action.admin.networkproxies; */ import com.opensymphony.xwork2.Preparable; +import org.apache.archiva.admin.repository.networkproxy.NetworkProxy; +import org.apache.archiva.admin.repository.networkproxy.NetworkProxyAdmin; import org.apache.archiva.security.common.ArchivaRoleConstants; -import org.apache.maven.archiva.configuration.ArchivaConfiguration; -import org.apache.maven.archiva.configuration.NetworkProxyConfiguration; import org.apache.maven.archiva.web.action.AbstractActionSupport; import org.codehaus.plexus.redback.rbac.Resource; import org.codehaus.redback.integration.interceptor.SecureAction; @@ -47,14 +47,14 @@ public class NetworkProxiesAction { @Inject - private ArchivaConfiguration configuration; + private NetworkProxyAdmin networkProxyAdmin; - private List networkProxies; + private List networkProxies; public void prepare() throws Exception { - networkProxies = configuration.getConfiguration().getNetworkProxies(); + networkProxies = getNetworkProxyAdmin().getNetworkProxies(); } public SecureActionBundle getSecureActionBundle() @@ -68,13 +68,23 @@ public class NetworkProxiesAction return bundle; } - public List getNetworkProxies() + public List getNetworkProxies() { return networkProxies; } - public void setNetworkProxies( List networkProxies ) + public void setNetworkProxies( List networkProxies ) { this.networkProxies = networkProxies; } + + public NetworkProxyAdmin getNetworkProxyAdmin() + { + return networkProxyAdmin; + } + + public void setNetworkProxyAdmin( NetworkProxyAdmin networkProxyAdmin ) + { + this.networkProxyAdmin = networkProxyAdmin; + } } -- 2.39.5