1 package org.apache.maven.archiva.consumers.core.repository.stubs;
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
23 import java.util.Collection;
25 import junit.framework.Assert;
27 import org.apache.lucene.analysis.Analyzer;
28 import org.apache.lucene.queryParser.QueryParser;
29 import org.apache.lucene.search.Searchable;
30 import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
31 import org.apache.maven.archiva.indexer.RepositoryContentIndex;
32 import org.apache.maven.archiva.indexer.RepositoryIndexException;
33 import org.apache.maven.archiva.indexer.RepositoryIndexSearchException;
34 import org.apache.maven.archiva.indexer.lucene.LuceneEntryConverter;
35 import org.apache.maven.archiva.indexer.lucene.LuceneRepositoryContentRecord;
38 * @author <a href="mailto:oching@apache.org">Maria Odea Ching</a>
41 public class LuceneRepositoryContentIndexStub
42 implements RepositoryContentIndex
45 public void deleteRecords( Collection records )
46 throws RepositoryIndexException
48 // TODO Auto-generated method stub
49 if( records.size() != 0 )
51 Assert.assertEquals( 2, records.size() );
55 public boolean exists()
56 throws RepositoryIndexException
58 // TODO Auto-generated method stub
62 public Collection getAllRecordKeys()
63 throws RepositoryIndexException
65 // TODO Auto-generated method stub
69 public Analyzer getAnalyzer()
71 // TODO Auto-generated method stub
75 public LuceneEntryConverter getEntryConverter()
77 // TODO Auto-generated method stub
83 // TODO Auto-generated method stub
87 public File getIndexDirectory()
89 // TODO Auto-generated method stub
93 public QueryParser getQueryParser()
95 // TODO Auto-generated method stub
99 public ManagedRepositoryConfiguration getRepository()
101 // TODO Auto-generated method stub
105 public Searchable getSearchable()
106 throws RepositoryIndexSearchException
108 // TODO Auto-generated method stub
112 public void indexRecords( Collection records )
113 throws RepositoryIndexException
115 // TODO Auto-generated method stub
119 public void modifyRecord( LuceneRepositoryContentRecord record )
120 throws RepositoryIndexException
122 // TODO Auto-generated method stub
126 public void modifyRecords( Collection records )
127 throws RepositoryIndexException
129 // TODO Auto-generated method stub
133 public void deleteRecord( LuceneRepositoryContentRecord record )
134 throws RepositoryIndexException
136 // TODO Auto-generated method stub