From: Brett Porter Date: Fri, 18 Apr 2008 10:40:45 +0000 (+0000) Subject: [MRM-694] display the groups in the repositories page X-Git-Tag: archiva-r676265~176 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=3d13eda595c0e4f3a29524590db775c6f955ec79;p=archiva.git [MRM-694] display the groups in the repositories page git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@649453 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo b/archiva-modules/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo index 041e3b8f2..57770b885 100644 --- a/archiva-modules/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo +++ b/archiva-modules/archiva-base/archiva-configuration/src/main/mdo/configuration.mdo @@ -160,6 +160,37 @@ + + 1.2.0+ + > repositoryToGroupMap; + + public java.util.Map> getRepositoryToGroupMap() + { + if ( repositoryToGroupMap == null ) + { + java.util.Map> map = new java.util.HashMap>(); + + for ( RepositoryGroupConfiguration group : (java.util.List) repositoryGroups ) + { + for ( String repositoryId : (java.util.List) group.getRepositories() ) + { + java.util.List groups = map.get( repositoryId ); + if ( groups == null ) + { + groups = new java.util.ArrayList(); + map.put( repositoryId, groups ); + } + groups.add( group.getId() ); + } + } + + repositoryToGroupMap = map; + } + return repositoryToGroupMap; + } + ]]> + 1.0.0+ remoteRepositories; private Map repositoryStatistics; + + private Map> repositoryToGroupMap; /** * @plexus.requirement role-hint="jdo" @@ -99,6 +101,7 @@ public class RepositoriesAction remoteRepositories = new ArrayList( config.getRemoteRepositories() ); managedRepositories = new ArrayList( config.getManagedRepositories() ); + repositoryToGroupMap = config.getRepositoryToGroupMap(); Collections.sort( managedRepositories, new RepositoryConfigurationComparator() ); Collections.sort( remoteRepositories, new RepositoryConfigurationComparator() ); @@ -134,4 +137,9 @@ public class RepositoriesAction { return baseUrl; } + + public Map> getRepositoryToGroupMap() + { + return repositoryToGroupMap; + } } diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/repositories.jsp b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/repositories.jsp index fcd72989a..eb77e6f48 100644 --- a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/repositories.jsp +++ b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/jsp/admin/repositories.jsp @@ -116,10 +116,12 @@ Directory ${repository.location} - - Index Directory - ${repository.indexDir} - + + + Index Directory + ${repository.indexDir} + + WebDAV URL ${baseUrl}/${repository.id}/ @@ -138,6 +140,16 @@ + + + Groups + + + ${group}, + + + + Releases Included