1 package org.apache.maven.archiva.reporting.executor;
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with the License. You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 * KIND, either express or implied. See the License for the
18 * specific language governing permissions and limitations
22 import org.apache.maven.archiva.discoverer.DiscovererException;
23 import org.apache.maven.archiva.reporting.database.ReportingDatabase;
24 import org.apache.maven.archiva.reporting.group.ReportGroup;
25 import org.apache.maven.archiva.reporting.store.ReportingStoreException;
26 import org.apache.maven.artifact.repository.ArtifactRepository;
27 import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
29 import java.util.List;
32 * Executes a report or report group.
34 public interface ReportExecutor
37 * Plexus component role name.
39 String ROLE = ReportExecutor.class.getName();
42 * Run reports on a set of metadata.
44 * @param reportGroup the report set to run
45 * @param metadata the RepositoryMetadata objects to report on
46 * @param repository the repository that they come from
47 * @throws org.apache.maven.archiva.reporting.store.ReportingStoreException
48 * if there is a problem reading/writing the report database
50 public void runMetadataReports( ReportGroup reportGroup, List metadata, ArtifactRepository repository )
51 throws ReportingStoreException;
54 * Run reports on a set of artifacts.
56 * @param reportGroup the report set to run
57 * @param artifacts the Artifact objects to report on
58 * @param repository the repository that they come from
59 * @throws ReportingStoreException if there is a problem reading/writing the report database
61 public void runArtifactReports( ReportGroup reportGroup, List artifacts, ArtifactRepository repository )
62 throws ReportingStoreException;
65 * Get the report database in use for a given repository.
67 * @param repository the repository
68 * @param reportGroup the report set to run
69 * @return the report database
70 * @throws ReportingStoreException if there is a problem reading the report database
72 ReportingDatabase getReportDatabase( ArtifactRepository repository, ReportGroup reportGroup )
73 throws ReportingStoreException;
76 * Run the artifact and metadata reports for the repository. The artifacts and metadata will be discovered.
78 * @param repository the repository to run from
79 * @param blacklistedPatterns the patterns to exclude during discovery
80 * @param filter the filter to use during discovery to get a consistent list of artifacts
81 * @param reportGroup the report set to run
82 * @throws ReportingStoreException if there is a problem reading/writing the report database
83 * @throws org.apache.maven.archiva.discoverer.DiscovererException
84 * if there is a problem finding the artifacts and metadata to report on
86 public void runReports( ReportGroup reportGroup, ArtifactRepository repository, List blacklistedPatterns,
87 ArtifactFilter filter )
88 throws DiscovererException, ReportingStoreException;