1 package org.apache.maven.repository.indexing;
4 * Copyright 2001-2005 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
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
20 import org.apache.maven.artifact.factory.ArtifactFactory;
21 import org.apache.maven.artifact.repository.ArtifactRepository;
22 import org.apache.maven.repository.digest.Digester;
25 * @author Edwin Punzalan
26 * @plexus.component role="org.apache.maven.repository.indexing.RepositoryIndexingFactory"
28 public class DefaultRepositoryIndexingFactory
29 implements RepositoryIndexingFactory
34 private Digester digester;
39 private ArtifactFactory artifactFactory;
42 * @see RepositoryIndexingFactory#createArtifactRepositoryIndex(String, org.apache.maven.artifact.repository.ArtifactRepository)
44 public ArtifactRepositoryIndex createArtifactRepositoryIndex( String indexPath, ArtifactRepository repository )
45 throws RepositoryIndexException
47 return new ArtifactRepositoryIndex( indexPath, repository, digester );
51 * @see RepositoryIndexingFactory#createPomRepositoryIndex(String, org.apache.maven.artifact.repository.ArtifactRepository)
53 public PomRepositoryIndex createPomRepositoryIndex( String indexPath, ArtifactRepository repository )
54 throws RepositoryIndexException
56 return new PomRepositoryIndex( indexPath, repository, digester, artifactFactory );
60 * @see RepositoryIndexingFactory#createMetadataRepositoryIndex(String, org.apache.maven.artifact.repository.ArtifactRepository)
62 public MetadataRepositoryIndex createMetadataRepositoryIndex( String indexPath, ArtifactRepository repository )
63 throws RepositoryIndexException
65 return new MetadataRepositoryIndex( indexPath, repository );
69 * @see RepositoryIndexingFactory#createGeneralRepositoryIndexSearcher(RepositoryIndex)
71 public GeneralRepositoryIndexSearcher createGeneralRepositoryIndexSearcher( RepositoryIndex index )
73 return new GeneralRepositoryIndexSearcher( index, artifactFactory );
77 * @see RepositoryIndexingFactory#createDefaultRepositoryIndexSearcher(RepositoryIndex)
79 public DefaultRepositoryIndexSearcher createDefaultRepositoryIndexSearcher( RepositoryIndex index )
81 return new DefaultRepositoryIndexSearcher( index, artifactFactory );