private static final Set repositories = new HashSet();
+ private static final Set proxyConnectors = new HashSet();
+
static
{
repositories.add( "repositories" );
repositoryScanning.add( "goodConsumer" );
repositoryScanning.add( "badConsumers" );
repositoryScanning.add( "badConsumer" );
+
+ proxyConnectors.add( "proxyConnectors" );
+ proxyConnectors.add( "proxyConnector" );
+ proxyConnectors.add( "sourceRepoId" );
+ proxyConnectors.add( "targetRepoId" );
+ proxyConnectors.add( "proxyId" );
+ proxyConnectors.add( "snapshotsPolicy" );
+ proxyConnectors.add( "releasePolicy" );
+ proxyConnectors.add( "checksumPolicy" );
+ proxyConnectors.add( "whiteListPatterns" );
+ proxyConnectors.add( "whiteListPattern" );
+ proxyConnectors.add( "blackListPatterns" );
+ proxyConnectors.add( "blackListPattern" );
}
public static boolean isNetworkProxy( String propertyName )
return repositoryScanning.contains( propertyName );
}
-
+
public static boolean isRepositories( String propertyName )
{
- if( empty(propertyName))
+ if ( empty( propertyName ) )
{
return false;
}
-
+
return repositories.contains( propertyName );
}
+ public static boolean isProxyConnector( String propertyName )
+ {
+ if ( empty( propertyName ) )
+ {
+ return false;
+ }
+
+ return proxyConnectors.contains( propertyName );
+ }
+
private static boolean empty( String name )
{
if ( name == null )
--- /dev/null
+package org.apache.maven.archiva.reporting;
+
+/*
+ * 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.codehaus.plexus.logging.AbstractLogEnabled;
+
+import java.util.Map;
+
+/**
+ * DefaultReportingManager
+ *
+ * @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
+ * @version $Id$
+ */
+public class DefaultReportingManager
+ extends AbstractLogEnabled
+ implements ReportingManager
+{
+ /**
+ * @plexus.requirement role="org.apache.maven.archiva.reporting.DynamicReportSource"
+ */
+ private Map reportSourceMap;
+
+ public DynamicReportSource getReport( String id )
+ {
+ return (DynamicReportSource) reportSourceMap.get( id );
+ }
+
+ public Map getAvailableReports()
+ {
+ return reportSourceMap;
+ }
+}
--- /dev/null
+package org.apache.maven.archiva.reporting;
+
+/*
+ * 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 java.util.Map;
+
+/**
+ * ReportingManager
+ *
+ * @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
+ * @version $Id$
+ */
+public interface ReportingManager
+{
+ public DynamicReportSource getReport( String id );
+
+ public Map /*<String,DynamicReportSource>*/getAvailableReports();
+}
* under the License.
*/
-import org.apache.maven.archiva.reporting.database.ReportingDatabase;
+import org.apache.maven.archiva.reporting.ReportingManager;
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.SecureActionException;
import org.codehaus.plexus.xwork.action.PlexusActionSupport;
+import java.util.ArrayList;
import java.util.List;
/**
/**
* @plexus.requirement
*/
- private ReportingDatabase database;
+ private ReportingManager reportingManager;
- private List reports;
+ private List reports = new ArrayList();
public String execute()
throws Exception
{
- reports = database.getArtifactDatabase().getAllArtifactResults();
-
+ reports.clear();
+ reports.addAll( reportingManager.getAvailableReports().values() );
+
return SUCCESS;
}