1 package org.kuali.ole.solr;
2
3 import org.apache.solr.client.solrj.SolrServerException;
4 import org.apache.solr.client.solrj.response.QueryResponse;
5 import org.apache.solr.common.SolrDocument;
6
7 import org.apache.solr.common.SolrInputDocument;
8 import org.kuali.ole.docstore.discovery.service.IndexerService;
9 import org.kuali.ole.docstore.discovery.service.IndexerServiceImpl;
10 import org.kuali.ole.docstore.model.xmlpojo.ingest.RequestDocument;
11
12 import java.io.File;
13 import java.io.IOException;
14 import java.util.ArrayList;
15 import java.util.List;
16
17
18
19
20
21
22
23
24 public class DummyIndexerServiceImpl
25 implements IndexerService {
26 private static DummyIndexerServiceImpl genericIndexerServiceImpl = new DummyIndexerServiceImpl();
27
28 private DummyIndexerServiceImpl() {
29
30 }
31
32 public static DummyIndexerServiceImpl getInstance() {
33 System.out.println("in DummyIndexerServiceImpl");
34 return genericIndexerServiceImpl;
35 }
36
37 @Override
38 public String deleteDocuments(String s, List<String> strings) {
39 return IndexerServiceImpl.SUCCESS;
40 }
41
42 @Override
43 public String deleteDocument(String s, String s1) {
44 return IndexerServiceImpl.SUCCESS;
45 }
46
47 @Override
48 public String indexDocumentsFromFileBySolrDoc(String s, String s1, String s2, String s3) {
49 return IndexerServiceImpl.SUCCESS;
50 }
51
52 @Override
53 public String indexDocumentsFromDirBySolrDoc(String s, String s1, String s2, String s3) {
54 return null;
55 }
56
57 @Override
58 public String indexDocumentsFromStringBySolrDoc(String s, String s1, String s2, String s3) throws IOException {
59 return null;
60 }
61
62 @Override
63 public String indexDocumentsFromFiles(String s, String s1, String s2, List<File> files) {
64 return null;
65 }
66
67 @Override
68 public List<SolrDocument> getSolrDocumentBySolrId(String s) {
69 return new ArrayList<SolrDocument>();
70 }
71
72 @Override
73 public List<SolrDocument> getSolrDocument(String s, String s1) {
74 return new ArrayList<SolrDocument>();
75 }
76
77 @Override
78 public QueryResponse searchBibRecord(String s, String s1, String s2, String s3, String s4, String s5) {
79 return new QueryResponse();
80 }
81
82 @Override
83 public void cleanupDiscoveryData() throws IOException, SolrServerException {
84
85 }
86
87 @Override
88 public String bulkIndexDocuments(List<RequestDocument> requestDocumentList, boolean isCommit) {
89 return IndexerServiceImpl.SUCCESS;
90 }
91
92 @Override
93 public String indexDocument(RequestDocument requestDocument) {
94 return IndexerServiceImpl.SUCCESS;
95 }
96
97 @Override
98 public String indexDocument(RequestDocument requestDocument, boolean commit) {
99 return IndexerServiceImpl.SUCCESS;
100 }
101
102 @Override
103 public String indexDocuments(List<RequestDocument> requestDocumentList) {
104 return IndexerServiceImpl.SUCCESS;
105 }
106
107 @Override
108 public String indexDocuments(List<RequestDocument> requestDocumentList, boolean commit) {
109 return IndexerServiceImpl.SUCCESS;
110 }
111
112 @Override
113 public String indexSolrDocuments(List<SolrInputDocument> solrDocs) {
114 return IndexerServiceImpl.SUCCESS;
115 }
116
117 @Override
118 public void commit() throws Exception {
119 }
120
121 @Override
122 public void rollback() throws Exception {
123 }
124 }