diff options
author | Joakim Erdfelt <joakime@apache.org> | 2007-05-16 01:59:20 +0000 |
---|---|---|
committer | Joakim Erdfelt <joakime@apache.org> | 2007-05-16 01:59:20 +0000 |
commit | 966e374f6cd73c34b6703e7e998544dcee5eef46 (patch) | |
tree | 819c1685a518b7a568831e191fe7b0adda756b8a /archiva-base/archiva-configuration | |
parent | 6dd144c706106bff330e291d4e6b944ddd8194d1 (diff) | |
download | archiva-966e374f6cd73c34b6703e7e998544dcee5eef46.tar.gz archiva-966e374f6cd73c34b6703e7e998544dcee5eef46.zip |
[MRM-336]: Repository Admin - "Index Repository" appears to not do anything.
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@538404 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-base/archiva-configuration')
-rw-r--r-- | archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/functors/RepositoryConfigurationToMapClosure.java | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/functors/RepositoryConfigurationToMapClosure.java b/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/functors/RepositoryConfigurationToMapClosure.java new file mode 100644 index 000000000..08ed11559 --- /dev/null +++ b/archiva-base/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/functors/RepositoryConfigurationToMapClosure.java @@ -0,0 +1,52 @@ +package org.apache.maven.archiva.configuration.functors; + +/* + * 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.Closure; +import org.apache.maven.archiva.configuration.RepositoryConfiguration; + +import java.util.HashMap; +import java.util.Map; + +/** + * RepositoryConfigurationToMapClosure + * + * @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a> + * @version $Id$ + */ +public class RepositoryConfigurationToMapClosure + implements Closure +{ + private Map map = new HashMap(); + + public void execute( Object input ) + { + if ( input instanceof RepositoryConfiguration ) + { + RepositoryConfiguration repo = (RepositoryConfiguration) input; + map.put( repo.getId(), repo ); + } + } + + public Map getMap() + { + return map; + } +} |