You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@archiva.apache.org by jo...@apache.org on 2007/05/07 23:30:42 UTC

svn commit: r535999 - in /maven/archiva/trunk: archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/util/ archiva-web/archiva-webapp/ archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/...

Author: joakime
Date: Mon May  7 14:30:38 2007
New Revision: 535999

URL: http://svn.apache.org/viewvc?view=rev&rev=535999
Log:
Adding Network Proxy admin screens.

Added:
    maven/archiva/trunk/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/util/NetworkProxyComparator.java   (with props)
    maven/archiva/trunk/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/util/NetworkProxySelectionPredicate.java   (with props)
    maven/archiva/trunk/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/networkproxies/ConfigureNetworkProxyAction.java   (with props)
    maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/addNetworkProxy.jsp   (with props)
    maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/deleteNetworkProxy.jsp   (with props)
    maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/editNetworkProxy.jsp   (with props)
    maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/include/networkProxyForm.jspf
    maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/networkProxies.jsp   (with props)
Modified:
    maven/archiva/trunk/archiva-web/archiva-webapp/   (props changed)
    maven/archiva/trunk/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/ConfigureProxyConnectorAction.java
    maven/archiva/trunk/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/networkproxies/NetworkProxiesAction.java
    maven/archiva/trunk/archiva-web/archiva-webapp/src/main/resources/xwork.xml
    maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/deleteRepository.jsp
    maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/repositories.jsp
    maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/css/site.css

Added: maven/archiva/trunk/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/util/NetworkProxyComparator.java
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/util/NetworkProxyComparator.java?view=auto&rev=535999
==============================================================================
--- maven/archiva/trunk/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/util/NetworkProxyComparator.java (added)
+++ maven/archiva/trunk/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/util/NetworkProxyComparator.java Mon May  7 14:30:38 2007
@@ -0,0 +1,62 @@
+package org.apache.maven.archiva.configuration.util;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.archiva.configuration.NetworkProxyConfiguration;
+
+import java.util.Comparator;
+
+/**
+ * NetworkProxyComparator 
+ *
+ * @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
+ * @version $Id$
+ */
+public class NetworkProxyComparator
+    implements Comparator
+{
+
+    public int compare( Object o1, Object o2 )
+    {
+        if ( o1 == null && o2 == null )
+        {
+            return 0;
+        }
+
+        if ( o1 == null && o2 != null )
+        {
+            return 1;
+        }
+
+        if ( o1 != null && o2 == null )
+        {
+            return -1;
+        }
+
+        if ( ( o1 instanceof NetworkProxyConfiguration ) && ( o2 instanceof NetworkProxyConfiguration ) )
+        {
+            String id1 = ( (NetworkProxyConfiguration) o1 ).getId();
+            String id2 = ( (NetworkProxyConfiguration) o2 ).getId();
+            return id1.compareToIgnoreCase( id2 );
+        }
+
+        return 0;
+    }
+}

Propchange: maven/archiva/trunk/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/util/NetworkProxyComparator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/archiva/trunk/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/util/NetworkProxyComparator.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: maven/archiva/trunk/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/util/NetworkProxyComparator.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: maven/archiva/trunk/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/util/NetworkProxySelectionPredicate.java
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/util/NetworkProxySelectionPredicate.java?view=auto&rev=535999
==============================================================================
--- maven/archiva/trunk/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/util/NetworkProxySelectionPredicate.java (added)
+++ maven/archiva/trunk/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/util/NetworkProxySelectionPredicate.java Mon May  7 14:30:38 2007
@@ -0,0 +1,54 @@
+package org.apache.maven.archiva.configuration.util;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.commons.collections.Predicate;
+import org.apache.commons.lang.StringUtils;
+import org.apache.maven.archiva.configuration.NetworkProxyConfiguration;
+
+/**
+ * NetworkProxySelectionPredicate 
+ *
+ * @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
+ * @version $Id$
+ */
+public class NetworkProxySelectionPredicate
+    implements Predicate
+{
+    private String proxyId;
+
+    public NetworkProxySelectionPredicate( String id )
+    {
+        this.proxyId = id;
+    }
+
+    public boolean evaluate( Object object )
+    {
+        boolean satisfies = false;
+
+        if ( object instanceof NetworkProxyConfiguration )
+        {
+            NetworkProxyConfiguration proxy = (NetworkProxyConfiguration) object;
+            return ( StringUtils.equals( proxyId, proxy.getId() ) );
+        }
+
+        return satisfies;
+    }
+}

Propchange: maven/archiva/trunk/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/util/NetworkProxySelectionPredicate.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/archiva/trunk/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/util/NetworkProxySelectionPredicate.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: maven/archiva/trunk/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/util/NetworkProxySelectionPredicate.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Propchange: maven/archiva/trunk/archiva-web/archiva-webapp/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Mon May  7 14:30:38 2007
@@ -13,3 +13,4 @@
 .settings
 .wtpmodules
 cobertura.ser
+${appserver.base}

Modified: maven/archiva/trunk/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/ConfigureProxyConnectorAction.java
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/ConfigureProxyConnectorAction.java?view=diff&rev=535999&r1=535998&r2=535999
==============================================================================
--- maven/archiva/trunk/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/ConfigureProxyConnectorAction.java (original)
+++ maven/archiva/trunk/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/connectors/proxy/ConfigureProxyConnectorAction.java Mon May  7 14:30:38 2007
@@ -20,6 +20,7 @@
  */
 
 import com.opensymphony.xwork.Preparable;
+import com.opensymphony.xwork.Validateable;
 
 import org.apache.commons.collections.Closure;
 import org.apache.commons.collections.CollectionUtils;
@@ -63,7 +64,7 @@
  */
 public class ConfigureProxyConnectorAction
     extends PlexusActionSupport
-    implements SecureAction, Preparable, Initializable
+    implements SecureAction, Preparable, Validateable, Initializable
 {
     private static final String DIRECT_CONNECTION = "(direct connection)";
 
@@ -128,26 +129,22 @@
 
     public String add()
     {
-        getLogger().info( ".add()" );
         this.mode = "add";
         return INPUT;
     }
 
     public String confirm()
     {
-        getLogger().info( ".confirm()" );
         return INPUT;
     }
 
     public String delete()
     {
-        getLogger().info( ".delete()" );
         return INPUT;
     }
 
     public String addProperty()
     {
-        getLogger().info( ".addProperty()" );
         String key = getPropertyKey();
         String value = getPropertyValue();
 
@@ -173,7 +170,6 @@
 
     public String removeProperty()
     {
-        getLogger().info( ".removeProperty()" );
         String key = getPropertyKey();
 
         if ( StringUtils.isBlank( key ) )
@@ -193,7 +189,6 @@
 
     public String addWhiteListPattern()
     {
-        getLogger().info( ".addWhiteListPattern()" );
         String pattern = getWhiteListPattern();
 
         if ( StringUtils.isBlank( pattern ) )
@@ -203,10 +198,6 @@
 
         if ( !hasActionErrors() )
         {
-            getLogger().info(
-                              "whitelist patterns: (" + getConnector().getWhiteListPatterns().size() + "): "
-                                  + getConnector().getWhiteListPatterns() );
-
             getConnector().getWhiteListPatterns().add( pattern );
             setWhiteListPattern( null );
         }
@@ -217,7 +208,6 @@
     public String removeWhiteListPattern()
     {
         String pattern = getPattern();
-        getLogger().info( ".removeWhiteListPattern(" + pattern + ")" );
 
         if ( StringUtils.isBlank( pattern ) )
         {
@@ -235,7 +225,6 @@
 
     public String addBlackListPattern()
     {
-        getLogger().info( ".addBlackListPattern()" );
         String pattern = getBlackListPattern();
 
         if ( StringUtils.isBlank( pattern ) )
@@ -254,7 +243,6 @@
 
     public String removeBlackListPattern()
     {
-        getLogger().info( ".removeBlackListPattern()" );
         String pattern = getBlackListPattern();
 
         if ( StringUtils.isBlank( pattern ) )
@@ -273,7 +261,6 @@
 
     public String edit()
     {
-        getLogger().info( ".edit()" );
         this.mode = "edit";
         return INPUT;
     }
@@ -359,7 +346,6 @@
 
     public String input()
     {
-        getLogger().info( "input()" );
         return INPUT;
     }
 
@@ -369,13 +355,10 @@
         String sourceId = getSource();
         String targetId = getTarget();
 
-        getLogger().info( ".prepare() - sourceId [" + sourceId + "], targetId [" + targetId + "]" );
-
         if ( StringUtils.isBlank( sourceId ) || StringUtils.isBlank( targetId ) )
         {
             if ( this.connector == null )
             {
-                getLogger().info( "Creating new connector." );
                 this.connector = new ProxyConnectorConfiguration();
             }
         }
@@ -383,7 +366,6 @@
         {
             this.connector = findProxyConnector( sourceId, targetId );
         }
-        getLogger().info( "Connector: " + connector );
 
         Configuration config = archivaConfiguration.getConfiguration();
 
@@ -426,13 +408,6 @@
         String sourceId = getConnector().getSourceRepoId();
         String targetId = getConnector().getTargetRepoId();
 
-        getLogger().info( ".save(" + mode + ":" + sourceId + "->" + targetId + ")" );
-
-        if ( !isValid( getConnector() ) )
-        {
-            return INPUT;
-        }
-
         if ( StringUtils.equalsIgnoreCase( "edit", mode ) )
         {
             removeConnector( sourceId, targetId );
@@ -527,13 +502,14 @@
         ProxyConnectorSelectionPredicate selectedProxy = new ProxyConnectorSelectionPredicate( sourceId, targetId );
         return (ProxyConnectorConfiguration) CollectionUtils.find( config.getProxyConnectors(), selectedProxy );
     }
-
-    private boolean isValid( ProxyConnectorConfiguration proxyConnector )
+    
+    public void validate()
     {
+        ProxyConnectorConfiguration proxyConnector = getConnector();
+        
         if ( proxyConnector.getPolicies() == null )
         {
             addActionError( "Policies must be set." );
-            return false;
         }
 
         Iterator it = policyMap.entrySet().iterator();
@@ -568,13 +544,6 @@
                 continue;
             }
         }
-
-        if ( hasActionErrors() || hasActionMessages() )
-        {
-            return false;
-        }
-
-        return true;
     }
 
     private void removeConnector( String sourceId, String targetId )

Added: maven/archiva/trunk/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/networkproxies/ConfigureNetworkProxyAction.java
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/networkproxies/ConfigureNetworkProxyAction.java?view=auto&rev=535999
==============================================================================
--- maven/archiva/trunk/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/networkproxies/ConfigureNetworkProxyAction.java (added)
+++ maven/archiva/trunk/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/networkproxies/ConfigureNetworkProxyAction.java Mon May  7 14:30:38 2007
@@ -0,0 +1,211 @@
+package org.apache.maven.archiva.web.action.admin.networkproxies;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import com.opensymphony.xwork.Preparable;
+
+import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.collections.functors.NotPredicate;
+import org.apache.commons.lang.StringUtils;
+import org.apache.maven.archiva.configuration.ArchivaConfiguration;
+import org.apache.maven.archiva.configuration.Configuration;
+import org.apache.maven.archiva.configuration.InvalidConfigurationException;
+import org.apache.maven.archiva.configuration.NetworkProxyConfiguration;
+import org.apache.maven.archiva.configuration.util.NetworkProxySelectionPredicate;
+import org.apache.maven.archiva.security.ArchivaRoleConstants;
+import org.codehaus.plexus.registry.RegistryException;
+import org.codehaus.plexus.security.rbac.Resource;
+import org.codehaus.plexus.security.ui.web.interceptor.SecureAction;
+import org.codehaus.plexus.security.ui.web.interceptor.SecureActionBundle;
+import org.codehaus.plexus.security.ui.web.interceptor.SecureActionException;
+import org.codehaus.plexus.xwork.action.PlexusActionSupport;
+
+import java.io.IOException;
+
+/**
+ * ConfigureNetworkProxyAction 
+ *
+ * @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
+ * @version $Id$
+ * 
+ * @plexus.component role="com.opensymphony.xwork.Action" role-hint="configureNetworkProxyAction"
+ */
+public class ConfigureNetworkProxyAction
+    extends PlexusActionSupport
+    implements SecureAction, Preparable
+{
+    /**
+     * @plexus.requirement
+     */
+    private ArchivaConfiguration archivaConfiguration;
+
+    private String mode;
+
+    private String proxyid;
+
+    private NetworkProxyConfiguration proxy;
+
+    public String add()
+    {
+        this.mode = "add";
+        return INPUT;
+    }
+
+    public String confirm()
+    {
+        return INPUT;
+    }
+
+    public String delete()
+    {
+        return INPUT;
+    }
+
+    public String edit()
+    {
+        this.mode = "edit";
+        return INPUT;
+    }
+
+    public String getMode()
+    {
+        return mode;
+    }
+
+    public NetworkProxyConfiguration getProxy()
+    {
+        return proxy;
+    }
+    
+    public String getProxyid()
+    {
+        return proxyid;
+    }
+
+    public SecureActionBundle getSecureActionBundle()
+        throws SecureActionException
+    {
+        SecureActionBundle bundle = new SecureActionBundle();
+
+        bundle.setRequiresAuthentication( true );
+        bundle.addRequiredAuthorization( ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION, Resource.GLOBAL );
+
+        return bundle;
+    }
+
+    public String input()
+    {
+        return INPUT;
+    }
+
+    public void prepare()
+        throws Exception
+    {
+        String id = getProxyid();
+
+        if ( StringUtils.isNotBlank( id ) )
+        {
+            proxy = findNetworkProxy( id );
+        }
+
+        if ( proxy == null )
+        {
+            proxy = new NetworkProxyConfiguration();
+        }
+    }
+
+    public String save()
+    {
+        String mode = getMode();
+
+        String id = getProxy().getId();
+
+        if ( StringUtils.equalsIgnoreCase( "edit", mode ) )
+        {
+            removeNetworkProxy( id );
+        }
+
+        try
+        {
+            addNetworkProxy( getProxy() );
+            saveConfiguration();
+        }
+        catch ( IOException e )
+        {
+            addActionError( "I/O Exception: " + e.getMessage() );
+        }
+        catch ( InvalidConfigurationException e )
+        {
+            addActionError( "Invalid Configuration Exception: " + e.getMessage() );
+        }
+        catch ( RegistryException e )
+        {
+            addActionError( "Configuration Registry Exception: " + e.getMessage() );
+        }
+
+        return SUCCESS;
+    }
+
+    public void setMode( String mode )
+    {
+        this.mode = mode;
+    }
+
+    public void setProxy( NetworkProxyConfiguration proxy )
+    {
+        this.proxy = proxy;
+    }
+
+    public void setProxyid( String proxyid )
+    {
+        this.proxyid = proxyid;
+    }
+
+    private void addNetworkProxy( NetworkProxyConfiguration proxy )
+    {
+        archivaConfiguration.getConfiguration().addNetworkProxy( proxy );
+    }
+
+    private NetworkProxyConfiguration findNetworkProxy( String id )
+    {
+        Configuration config = archivaConfiguration.getConfiguration();
+
+        NetworkProxySelectionPredicate selectedProxy = new NetworkProxySelectionPredicate( id );
+
+        return (NetworkProxyConfiguration) CollectionUtils.find( config.getNetworkProxies(), selectedProxy );
+    }
+
+    private void removeNetworkProxy( String id )
+    {
+        NetworkProxySelectionPredicate selectedProxy = new NetworkProxySelectionPredicate( id );
+        NotPredicate notSelectedProxy = new NotPredicate( selectedProxy );
+        CollectionUtils.filter( archivaConfiguration.getConfiguration().getNetworkProxies(), notSelectedProxy );
+    }
+
+    private String saveConfiguration()
+        throws IOException, InvalidConfigurationException, RegistryException
+    {
+        archivaConfiguration.save( archivaConfiguration.getConfiguration() );
+
+        addActionMessage( "Successfully saved configuration" );
+
+        return SUCCESS;
+    }
+}

Propchange: maven/archiva/trunk/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/networkproxies/ConfigureNetworkProxyAction.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/archiva/trunk/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/networkproxies/ConfigureNetworkProxyAction.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: maven/archiva/trunk/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/networkproxies/ConfigureNetworkProxyAction.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: maven/archiva/trunk/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/networkproxies/NetworkProxiesAction.java
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/networkproxies/NetworkProxiesAction.java?view=diff&rev=535999&r1=535998&r2=535999
==============================================================================
--- maven/archiva/trunk/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/networkproxies/NetworkProxiesAction.java (original)
+++ maven/archiva/trunk/archiva-web/archiva-webapp/src/main/java/org/apache/maven/archiva/web/action/admin/networkproxies/NetworkProxiesAction.java Mon May  7 14:30:38 2007
@@ -19,17 +19,17 @@
  * under the License.
  */
 
-import com.opensymphony.webwork.interceptor.ServletRequestAware;
-import com.opensymphony.xwork.ModelDriven;
 import com.opensymphony.xwork.Preparable;
-import com.opensymphony.xwork.Validateable;
 
+import org.apache.maven.archiva.configuration.ArchivaConfiguration;
+import org.apache.maven.archiva.security.ArchivaRoleConstants;
+import org.codehaus.plexus.security.rbac.Resource;
 import org.codehaus.plexus.security.ui.web.interceptor.SecureAction;
 import org.codehaus.plexus.security.ui.web.interceptor.SecureActionBundle;
 import org.codehaus.plexus.security.ui.web.interceptor.SecureActionException;
 import org.codehaus.plexus.xwork.action.PlexusActionSupport;
 
-import javax.servlet.http.HttpServletRequest;
+import java.util.List;
 
 /**
  * NetworkProxiesAction 
@@ -40,34 +40,40 @@
  * @plexus.component role="com.opensymphony.xwork.Action" role-hint="networkProxiesAction"
  */
 public class NetworkProxiesAction
-extends PlexusActionSupport
-implements ModelDriven, Preparable, Validateable, SecureAction, ServletRequestAware
+    extends PlexusActionSupport
+    implements Preparable, SecureAction
 {
+    /**
+     * @plexus.requirement
+     */
+    private ArchivaConfiguration configuration;
 
-    public Object getModel()
-    {
-        // TODO Auto-generated method stub
-        return null;
-    }
+    private List networkProxies;
 
     public void prepare()
         throws Exception
     {
-        // TODO Auto-generated method stub
-        
+        networkProxies = configuration.getConfiguration().getNetworkProxies();
     }
 
     public SecureActionBundle getSecureActionBundle()
         throws SecureActionException
     {
-        // TODO Auto-generated method stub
-        return null;
+        SecureActionBundle bundle = new SecureActionBundle();
+
+        bundle.setRequiresAuthentication( true );
+        bundle.addRequiredAuthorization( ArchivaRoleConstants.OPERATION_MANAGE_CONFIGURATION, Resource.GLOBAL );
+
+        return bundle;
     }
 
-    public void setServletRequest( HttpServletRequest request )
+    public List getNetworkProxies()
     {
-        // TODO Auto-generated method stub
-        
+        return networkProxies;
     }
 
+    public void setNetworkProxies( List networkProxies )
+    {
+        this.networkProxies = networkProxies;
+    }
 }

Modified: maven/archiva/trunk/archiva-web/archiva-webapp/src/main/resources/xwork.xml
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-web/archiva-webapp/src/main/resources/xwork.xml?view=diff&rev=535999&r1=535998&r2=535999
==============================================================================
--- maven/archiva/trunk/archiva-web/archiva-webapp/src/main/resources/xwork.xml (original)
+++ maven/archiva/trunk/archiva-web/archiva-webapp/src/main/resources/xwork.xml Mon May  7 14:30:38 2007
@@ -306,6 +306,30 @@
       <result name="input">/WEB-INF/jsp/admin/networkProxies.jsp</result>
     </action>
     
+    <action name="addNetworkProxy" class="configureNetworkProxyAction" method="add">
+      <result name="input">/WEB-INF/jsp/admin/addNetworkProxy.jsp</result>
+      <result name="success" type="redirect-action">networkProxies</result>
+      <interceptor-ref name="configuredPrepareParamsStack"/>
+    </action>
+    
+    <action name="editNetworkProxy" class="configureNetworkProxyAction" method="edit">
+      <result name="input">/WEB-INF/jsp/admin/editNetworkProxy.jsp</result>
+      <result name="success" type="redirect-action">networkProxies</result>
+      <interceptor-ref name="configuredPrepareParamsStack"/>
+    </action>
+    
+    <action name="saveNetworkProxy" class="configureNetworkProxyAction" method="save">
+      <result name="input">/WEB-INF/jsp/admin/editNetworkProxy.jsp</result>
+      <result name="success" type="redirect-action">networkProxies</result>
+      <interceptor-ref name="configuredPrepareParamsStack"/>
+    </action>
+    
+    <action name="deleteNetworkProxy" class="configureNetworkProxyAction" method="confirm">
+      <result name="input">/WEB-INF/jsp/admin/deleteNetworkProxy.jsp</result>
+      <result name="success" type="redirect-action">networkProxies</result>
+      <interceptor-ref name="configuredPrepareParamsStack"/>
+    </action>
+    
     <!-- .\ REPOSITORY SCANNING \._____________________________________ -->
     
     <action name="repositoryScanning" class="repositoryScanningAction" method="input">

Added: maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/addNetworkProxy.jsp
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/addNetworkProxy.jsp?view=auto&rev=535999
==============================================================================
--- maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/addNetworkProxy.jsp (added)
+++ maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/addNetworkProxy.jsp Mon May  7 14:30:38 2007
@@ -0,0 +1,51 @@
+<%--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  --%>
+
+<%@ taglib prefix="ww" uri="/webwork" %>
+
+<html>
+<head>
+  <title>Admin: Add Network Proxy</title>
+  <ww:head/>
+</head>
+
+<body>
+
+<h1>Admin: Add Network Proxy</h1>
+
+<div id="contentArea">
+
+  <h2>Add Network Proxy</h2>
+
+  <ww:actionmessage/>
+  <ww:form method="post" action="saveNetworkProxy" namespace="/admin" validate="true">
+    <ww:hidden name="mode" value="add"/>
+    <ww:textfield name="proxy.id" label="Identifier" size="10" required="true"/>
+    <%@ include file="/WEB-INF/jsp/admin/include/networkProxyForm.jspf" %>
+    <ww:submit value="Add Network Proxy"/>
+  </ww:form>
+
+  <script type="text/javascript">
+    document.getElementById("saveNetworkProxy_id").focus();
+  </script>
+
+</div>
+
+</body>
+</html>

Propchange: maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/addNetworkProxy.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/addNetworkProxy.jsp
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/deleteNetworkProxy.jsp
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/deleteNetworkProxy.jsp?view=auto&rev=535999
==============================================================================
--- maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/deleteNetworkProxy.jsp (added)
+++ maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/deleteNetworkProxy.jsp Mon May  7 14:30:38 2007
@@ -0,0 +1,51 @@
+<%--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  --%>
+
+<%@ taglib prefix="ww" uri="/webwork" %>
+
+<html>
+<head>
+  <title>Admin: Delete Network Proxy</title>
+  <ww:head/>
+</head>
+
+<body>
+
+<h1>Admin: Delete Network Proxy</h1>
+
+<div id="contentArea">
+
+  <h2>Delete Network Proxy</h2>
+
+  <blockquote>
+    <strong><span class="statusFailed">WARNING:</span> This operation can not be undone.</strong>
+  </blockquote>
+  
+  <p>
+  Are you sure you want to delete network proxy ${proxyid} ?
+  </p>
+
+  <ww:form method="post" action="deleteNetworkProxy!delete" namespace="/admin" validate="true">
+    <ww:hidden name="proxyid"/>
+    <ww:submit value="Delete"/>
+  </ww:form>
+</div>
+
+</body>
+</html>
\ No newline at end of file

Propchange: maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/deleteNetworkProxy.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/deleteNetworkProxy.jsp
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/deleteRepository.jsp
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/deleteRepository.jsp?view=diff&rev=535999&r1=535998&r2=535999
==============================================================================
--- maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/deleteRepository.jsp (original)
+++ maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/deleteRepository.jsp Mon May  7 14:30:38 2007
@@ -21,17 +21,17 @@
 
 <html>
 <head>
-  <title>Configuration</title>
+  <title>Admin: Delete Repository</title>
   <ww:head/>
 </head>
 
 <body>
 
-<h1>Configuration</h1>
+<h1>Admin: Delete Repository</h1>
 
 <div id="contentArea">
 
-  <h2>Delete Managed Repository</h2>
+  <h2>Delete Repository</h2>
 
   <blockquote>
     <strong><span class="statusFailed">WARNING:</span> This operation can not be undone.</strong>

Added: maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/editNetworkProxy.jsp
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/editNetworkProxy.jsp?view=auto&rev=535999
==============================================================================
--- maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/editNetworkProxy.jsp (added)
+++ maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/editNetworkProxy.jsp Mon May  7 14:30:38 2007
@@ -0,0 +1,51 @@
+<%--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  --%>
+
+<%@ taglib prefix="ww" uri="/webwork" %>
+
+<html>
+<head>
+  <title>Admin: Edit Network Proxy</title>
+  <ww:head/>
+</head>
+
+<body>
+
+<h1>Admin: Network Proxy</h1>
+
+<div id="contentArea">
+
+  <h2>Edit Network Proxy</h2>
+
+  <ww:actionmessage/>
+  <ww:form method="post" action="saveNetworkProxy" namespace="/admin" validate="false">
+    <ww:hidden name="mode" value="edit"/>  
+    <ww:hidden name="proxy.id"/>
+    <%@ include file="/WEB-INF/jsp/admin/include/networkProxyForm.jspf" %>
+    <ww:submit value="Save Network Proxy"/>
+  </ww:form>
+
+  <script type="text/javascript">
+    document.getElementById("saveNetworkProxy_host").focus();
+  </script>
+
+</div>
+
+</body>
+</html>
\ No newline at end of file

Propchange: maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/editNetworkProxy.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/editNetworkProxy.jsp
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/include/networkProxyForm.jspf
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/include/networkProxyForm.jspf?view=auto&rev=535999
==============================================================================
--- maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/include/networkProxyForm.jspf (added)
+++ maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/include/networkProxyForm.jspf Mon May  7 14:30:38 2007
@@ -0,0 +1,26 @@
+<%--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  --%>
+<%@ taglib prefix="ww" uri="/webwork" %>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
+
+<ww:textfield name="proxy.protocol" label="Protocol" size="5" required="true"/>
+<ww:textfield name="proxy.host" label="Hostname" size="50" required="true"/>  
+<ww:textfield name="proxy.port" label="Port" size="5" required="true" />
+<ww:textfield name="proxy.username" label="Username" size="25" required="false" />
+<ww:password name="proxy.password" label="Password" size="25" required="false" />

Added: maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/networkProxies.jsp
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/networkProxies.jsp?view=auto&rev=535999
==============================================================================
--- maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/networkProxies.jsp (added)
+++ maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/networkProxies.jsp Mon May  7 14:30:38 2007
@@ -0,0 +1,128 @@
+<%--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  --%>
+
+<%@ taglib prefix="ww" uri="/webwork"%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
+<%@ taglib prefix="pss" uri="/plexusSecuritySystem"%>
+<%@ taglib prefix="archiva" uri="http://maven.apache.org/archiva"%>
+
+<html>
+<head>
+<title>Administration - Network Proxies</title>
+<ww:head />
+</head>
+
+<body>
+
+<h1>Administration - Network Proxies</h1>
+
+<div id="contentArea">
+
+<ww:actionerror /> <ww:actionmessage />
+
+<div class="admin">
+<div class="controls">
+<pss:ifAuthorized
+  permission="archiva-manage-configuration">
+  <ww:url id="addNetworkProxyUrl" action="addNetworkProxy" />
+  <ww:a href="%{addNetworkProxyUrl}">
+    <img src="<c:url value="/images/icons/create.png" />" />
+        Add Network Proxy</ww:a>
+</pss:ifAuthorized></div>
+<h2>Network Proxies</h2>
+
+<c:choose>
+  <c:when test="${empty(networkProxies)}">
+    <%-- No Local Repositories. --%>
+    <strong>There are no network proxies configured yet.</strong>
+  </c:when>
+  <c:otherwise>
+    <%-- Display the repositories. --%>
+
+    <c:forEach items="${networkProxies}" var="proxy" varStatus="i">
+      <c:choose>
+        <c:when test='${(i.index)%2 eq 0}'>
+          <c:set var="rowColor" value="dark" scope="page" />
+        </c:when>
+        <c:otherwise>
+          <c:set var="rowColor" value="lite" scope="page" />
+        </c:otherwise>
+      </c:choose>
+
+      <div class="netproxy ${rowColor}">
+
+      <div class="controls">
+      <pss:ifAnyAuthorized
+        permissions="archiva-manage-configuration">
+        <ww:url id="editNetworkProxyUrl" action="editNetworkProxy">
+          <ww:param name="proxyid" value="%{'${proxy.id}'}" />
+        </ww:url>
+        <ww:url id="deleteNetworkProxyUrl" action="deleteNetworkProxy" method="confirm">
+          <ww:param name="proxyid" value="%{'${proxy.id}'}" />
+        </ww:url>
+        <ww:a href="%{editNetworkProxyUrl}">
+          <img src="<c:url value="/images/icons/edit.png" />" />
+            Edit Network Proxy</ww:a>
+        <ww:a href="%{deleteNetworkProxyUrl}">
+          <img src="<c:url value="/images/icons/delete.gif" />" />
+            Delete Network Proxy</ww:a>
+      </pss:ifAnyAuthorized></div>
+
+      <table class="infoTable">
+        <tr>
+          <th>Identifier</th>
+          <td><code>${proxy.id}</code></td>
+        </tr>
+        <tr>
+          <th>Protocol</th>
+          <td>${proxy.protocol}</td>
+        </tr>
+        <tr>
+          <th>Host</th>
+          <td>${proxy.host}</td>
+        </tr>
+        <tr>
+          <th>Port</th>
+          <td>${proxy.port}</td>
+        </tr>
+        <c:if test="${not empty(proxy.username)}">
+          <tr>
+            <th>Username</th>
+            <td>${proxy.username}</td>
+          </tr>
+          <c:if test="${not empty(proxy.password)}">
+            <tr>
+              <th>Password</th>
+              <td>&#8226;&#8226;&#8226;&#8226;&#8226;&#8226;&#8226;&#8226;</td>
+            </tr>
+          </c:if>
+        </c:if>
+      </table>
+
+      </div>
+    </c:forEach>
+
+  </c:otherwise>
+</c:choose>
+</div>
+
+</div>
+
+</body>
+</html>

Propchange: maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/networkProxies.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/networkProxies.jsp
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/repositories.jsp
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/repositories.jsp?view=diff&rev=535999&r1=535998&r2=535999
==============================================================================
--- maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/repositories.jsp (original)
+++ maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/repositories.jsp Mon May  7 14:30:38 2007
@@ -37,18 +37,16 @@
 <ww:actionerror />
 <ww:actionmessage />
 
-  <div>
-    <div style="float: right">
-      <%-- TODO replace with icons --%>
-      <pss:ifAuthorized permission="archiva-manage-configuration">
-        <ww:url id="addRepositoryUrl" action="addRepository"/>
-        <ww:a href="%{addRepositoryUrl}">
-        <img src="<c:url value="/images/icons/create.png" />" />
-        Add Repository</ww:a>
-      </pss:ifAuthorized>
-    </div>
-    <h2>Local Repositories</h2>
+<div class="admin">
+  <div class="controls">
+    <pss:ifAuthorized permission="archiva-manage-configuration">
+      <ww:url id="addRepositoryUrl" action="addRepository"/>
+      <ww:a href="%{addRepositoryUrl}">
+      <img src="<c:url value="/images/icons/create.png" />" />
+      Add Repository</ww:a>
+    </pss:ifAuthorized>
   </div>
+  <h2>Local Repositories</h2>
 
 <c:choose>
   <c:when test="${empty(managedRepositories)}">
@@ -59,10 +57,18 @@
     <%-- Display the repositories. --%>
     
 	<c:forEach items="${managedRepositories}" var="repository" varStatus="i">
+      <c:choose>
+        <c:when test='${(i.index)%2 eq 0}'>
+          <c:set var="rowColor" value="dark" scope="page" />
+        </c:when>
+        <c:otherwise>
+          <c:set var="rowColor" value="lite" scope="page" />
+        </c:otherwise>
+      </c:choose>
   
-      <div class="repository">
+      <div class="repository ${rowColor}">
 
-        <div style="float: right">
+        <div class="controls">
           <%-- TODO: make some icons --%>
           <pss:ifAnyAuthorized permissions="archiva-manage-configuration">
             <ww:url id="editRepositoryUrl" action="editRepository">
@@ -200,9 +206,18 @@
     <%-- Display the repositories. --%>
     
     <c:forEach items="${remoteRepositories}" var="repository" varStatus="i">
-      <div class="repository">
+      <c:choose>
+        <c:when test='${(i.index)%2 eq 0}'>
+          <c:set var="rowColor" value="dark" scope="page" />
+        </c:when>
+        <c:otherwise>
+          <c:set var="rowColor" value="lite" scope="page" />
+        </c:otherwise>
+      </c:choose>
+      
+      <div class="repository ${rowColor}">
 
-        <div style="float: right">
+        <div class="controls">
           <%-- TODO: make some icons --%>
           <pss:ifAnyAuthorized permissions="archiva-manage-configuration">
             <ww:url id="editRepositoryUrl" action="editRepository">

Modified: maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/css/site.css
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/css/site.css?view=diff&rev=535999&r1=535998&r2=535999
==============================================================================
--- maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/css/site.css (original)
+++ maven/archiva/trunk/archiva-web/archiva-webapp/src/main/webapp/css/site.css Mon May  7 14:30:38 2007
@@ -284,4 +284,27 @@
 
 tr.seperator td {
 	border-top: 1px dashed #dddddd !important;
+}
+
+div.admin div.dark,
+div.admin div.lite {
+	border: 1px solid #aaaaaa;	
+	font-size: 11pt;
+	margin-left: 15px;
+	margin-right: 15px;
+	margin-bottom: 5px;
+	padding: 5px;
+}
+
+div.admin div.lite {
+	background-color: white;
+}
+
+div.admin div.dark {
+	background-color: #eeeeee;
+}
+
+div.admin div.controls {
+	float: right;
+	font-size: 8pt !important;
 }