]> source.dussan.org Git - archiva.git/commitdiff
[MRM-1510] api to configure NetworkProxy : use it webapp
authorOlivier Lamy <olamy@apache.org>
Thu, 8 Sep 2011 09:33:57 +0000 (09:33 +0000)
committerOlivier Lamy <olamy@apache.org>
Thu, 8 Sep 2011 09:33:57 +0000 (09:33 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1166586 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/networkproxies/NetworkProxiesAction.java

index 0215120d8d099a3d9a686657ed784383c497be97..1d73e032ee809dddc9994752e91e43562e9306b5 100644 (file)
@@ -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<NetworkProxyConfiguration> networkProxies;
+    private List<NetworkProxy> 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<NetworkProxyConfiguration> getNetworkProxies()
+    public List<NetworkProxy> getNetworkProxies()
     {
         return networkProxies;
     }
 
-    public void setNetworkProxies( List<NetworkProxyConfiguration> networkProxies )
+    public void setNetworkProxies( List<NetworkProxy> networkProxies )
     {
         this.networkProxies = networkProxies;
     }
+
+    public NetworkProxyAdmin getNetworkProxyAdmin()
+    {
+        return networkProxyAdmin;
+    }
+
+    public void setNetworkProxyAdmin( NetworkProxyAdmin networkProxyAdmin )
+    {
+        this.networkProxyAdmin = networkProxyAdmin;
+    }
 }