1 package org.apache.maven.archiva.discoverer;
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.artifact.repository.ArtifactRepository;
25 import java.util.List;
28 * Discoverer - generic discoverer of content in an ArtifactRepository.
30 * @author <a href="mailto:joakime@apache.org">Joakim Erdfelt</a>
33 public interface Discoverer
35 public static final String ROLE = Discoverer.class.getName();
38 * Walk the repository, and report to the consumers the files found.
40 * Report changes to the appropriate Consumer.
42 * This is just a convenience method to {@link #walkRepository(ArtifactRepository, List, boolean, long, List, List)}
43 * equivalent to calling <code>walkRepository( repository, consumers, includeSnapshots, 0, null, null );</code>
45 * @param repository the repository to change.
46 * @param consumers use the provided list of consumers.
47 * @param includeSnapshots true to include snapshots in the walking of this repository.
48 * @return the statistics for this scan.
49 * @throws DiscovererException if there was a fundamental problem with getting the discoverer started.
51 public DiscovererStatistics walkRepository( ArtifactRepository repository, List consumers, boolean includeSnapshots )
52 throws DiscovererException;
55 * Walk the repository, and report to the consumers the files found.
57 * Report changes to the appropriate Consumer.
59 * @param repository the repository to change.
60 * @param consumers use the provided list of consumers.
61 * @param includeSnapshots true to include snapshots in the scanning of this repository.
62 * @param onlyModifiedAfterTimestamp Only report to the consumers, files that have a {@link File#lastModified()})
63 * after the provided timestamp.
64 * @param extraFileExclusions an optional list of file exclusions on the walk.
65 * @param extraFileInclusions an optional list of file inclusions on the walk.
66 * @return the statistics for this scan.
67 * @throws DiscovererException if there was a fundamental problem with getting the discoverer started.
69 public DiscovererStatistics walkRepository( ArtifactRepository repository, List consumers,
70 boolean includeSnapshots, long onlyModifiedAfterTimestamp,
71 List extraFileExclusions, List extraFileInclusions )
72 throws DiscovererException;