1 package org.apache.maven.archiva.reporting.executor;
4 * Copyright 2005-2006 The Apache Software Foundation.
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
19 import org.apache.maven.archiva.discoverer.DiscovererException;
20 import org.apache.maven.archiva.reporting.group.ReportGroup;
21 import org.apache.maven.archiva.reporting.store.ReportingStoreException;
22 import org.apache.maven.archiva.reporting.database.ReportingDatabase;
23 import org.apache.maven.artifact.repository.ArtifactRepository;
24 import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
26 import java.util.List;
29 * Executes a report or report group.
31 public interface ReportExecutor
34 * Plexus component role name.
36 String ROLE = ReportExecutor.class.getName();
39 * Run reports on a set of metadata.
41 * @param reportGroup the report set to run
42 * @param metadata the RepositoryMetadata objects to report on
43 * @param repository the repository that they come from
44 * @throws org.apache.maven.archiva.reporting.store.ReportingStoreException if there is a problem reading/writing the report database
46 public void runMetadataReports( ReportGroup reportGroup, List metadata, ArtifactRepository repository )
47 throws ReportingStoreException;
50 * Run reports on a set of artifacts.
52 * @param reportGroup the report set to run
53 * @param artifacts the Artifact objects to report on
54 * @param repository the repository that they come from
55 * @throws ReportingStoreException if there is a problem reading/writing the report database
57 public void runArtifactReports( ReportGroup reportGroup, List artifacts, ArtifactRepository repository )
58 throws ReportingStoreException;
61 * Get the report database in use for a given repository.
63 * @param repository the repository
64 * @param reportGroup the report set to run
65 * @return the report database
66 * @throws ReportingStoreException if there is a problem reading the report database
68 ReportingDatabase getReportDatabase( ArtifactRepository repository, ReportGroup reportGroup )
69 throws ReportingStoreException;
72 * Run the artifact and metadata reports for the repository. The artifacts and metadata will be discovered.
74 * @param repository the repository to run from
75 * @param blacklistedPatterns the patterns to exclude during discovery
76 * @param filter the filter to use during discovery to get a consistent list of artifacts
77 * @param reportGroup the report set to run
78 * @throws ReportingStoreException if there is a problem reading/writing the report database
79 * @throws org.apache.maven.archiva.discoverer.DiscovererException
80 * if there is a problem finding the artifacts and metadata to report on
82 public void runReports( ReportGroup reportGroup, ArtifactRepository repository, List blacklistedPatterns,
83 ArtifactFilter filter )
84 throws DiscovererException, ReportingStoreException;