1 package org.apache.maven.repository.indexing;
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.artifact.factory.ArtifactFactory;
20 import org.apache.maven.artifact.repository.ArtifactRepository;
21 import org.apache.maven.repository.digest.Digester;
24 * @author Edwin Punzalan
25 * @plexus.component role="org.apache.maven.repository.indexing.RepositoryIndexingFactory"
27 public class DefaultRepositoryIndexingFactory
28 implements RepositoryIndexingFactory
33 private Digester digester;
38 private ArtifactFactory artifactFactory;
41 * @see RepositoryIndexingFactory#createArtifactRepositoryIndex(String, org.apache.maven.artifact.repository.ArtifactRepository)
43 public ArtifactRepositoryIndex createArtifactRepositoryIndex( String indexPath, ArtifactRepository repository )
44 throws RepositoryIndexException
46 return new ArtifactRepositoryIndex( indexPath, repository, digester );
50 * @see RepositoryIndexingFactory#createPomRepositoryIndex(String, org.apache.maven.artifact.repository.ArtifactRepository)
52 public PomRepositoryIndex createPomRepositoryIndex( String indexPath, ArtifactRepository repository )
53 throws RepositoryIndexException
55 return new PomRepositoryIndex( indexPath, repository, digester, artifactFactory );
59 * @see RepositoryIndexingFactory#createMetadataRepositoryIndex(String, org.apache.maven.artifact.repository.ArtifactRepository)
61 public MetadataRepositoryIndex createMetadataRepositoryIndex( String indexPath, ArtifactRepository repository )
62 throws RepositoryIndexException
64 return new MetadataRepositoryIndex( indexPath, repository );
68 * @see RepositoryIndexingFactory#createRepositoryIndexSearchLayer(RepositoryIndex)
70 public RepositoryIndexSearchLayer createRepositoryIndexSearchLayer( RepositoryIndex index )
72 return new RepositoryIndexSearchLayer( index, artifactFactory );
76 * @see RepositoryIndexingFactory#createDefaultRepositoryIndexSearcher(RepositoryIndex)
78 public DefaultRepositoryIndexSearcher createDefaultRepositoryIndexSearcher( RepositoryIndex index )
80 return new DefaultRepositoryIndexSearcher( index, artifactFactory );