001package org.kuali.ole.solr; 002 003import org.apache.solr.client.solrj.SolrServerException; 004import org.apache.solr.client.solrj.response.QueryResponse; 005import org.apache.solr.common.SolrDocument; 006 007import org.apache.solr.common.SolrInputDocument; 008import org.kuali.ole.docstore.indexer.solr.IndexerService; 009import org.kuali.ole.docstore.model.xmlpojo.ingest.RequestDocument; 010 011import java.io.File; 012import java.io.IOException; 013import java.util.ArrayList; 014import java.util.List; 015 016/** 017 * Created by IntelliJ IDEA. 018 * User: ND6967 019 * Date: 3/14/12 020 * Time: 7:34 PM 021 * To change this template use File | Settings | File Templates. 022 */ 023public class DummyIndexerServiceImpl 024 implements IndexerService { 025 private static DummyIndexerServiceImpl genericIndexerServiceImpl = new DummyIndexerServiceImpl(); 026 027 private DummyIndexerServiceImpl() { 028 029 } 030 031 public static DummyIndexerServiceImpl getInstance() { 032 System.out.println("in DummyIndexerServiceImpl"); 033 return genericIndexerServiceImpl; 034 } 035 036 @Override 037 public String deleteDocuments(String s, List<String> strings) { 038 return SUCCESS; //To change body of implemented methods use File | Settings | File Templates. 039 } 040 041 @Override 042 public String deleteDocument(String s, String s1) { 043 return SUCCESS; //To change body of implemented methods use File | Settings | File Templates. 044 } 045 046 @Override 047 public String indexDocumentsFromFileBySolrDoc(String s, String s1, String s2, String s3) { 048 return SUCCESS; //To change body of implemented methods use File | Settings | File Templates. 049 } 050 051 @Override 052 public String indexDocumentsFromDirBySolrDoc(String s, String s1, String s2, String s3) { 053 return null; //To change body of implemented methods use File | Settings | File Templates. 054 } 055 056 @Override 057 public String indexDocumentsFromStringBySolrDoc(String s, String s1, String s2, String s3) throws IOException { 058 return null; //To change body of implemented methods use File | Settings | File Templates. 059 } 060 061 @Override 062 public String indexDocumentsFromFiles(String s, String s1, String s2, List<File> files) { 063 return null; //To change body of implemented methods use File | Settings | File Templates. 064 } 065 066 @Override 067 public List<SolrDocument> getSolrDocumentBySolrId(String s) { 068 return new ArrayList<SolrDocument>(); //To change body of implemented methods use File | Settings | File Templates. 069 } 070 071// @Override 072// public List<SolrDocument> getSolrDocumentBySolrId(String uniqueId, String docType) { 073// return null; //To change body of implemented methods use File | Settings | File Templates. 074// } 075 076 @Override 077 public List<SolrDocument> getSolrDocument(String s, String s1) { 078 return new ArrayList<SolrDocument>(); //To change body of implemented methods use File | Settings | File Templates. 079 } 080 081 @Override 082 public QueryResponse searchBibRecord(String s, String s1, String s2, String s3, String s4, String s5) { 083 return new QueryResponse(); //To change body of implemented methods use File | Settings | File Templates. 084 } 085 086 @Override 087 public void cleanupDiscoveryData() throws IOException, SolrServerException { 088 //To change body of implemented methods use File | Settings | File Templates. 089 } 090 091 @Override 092 public String bind(List<RequestDocument> requestDocument) throws Exception, IOException { 093 return null; //To change body of implemented methods use File | Settings | File Templates. 094 } 095 096 @Override 097 public String bind(RequestDocument requestDocument) throws Exception { 098 return null; //To change body of implemented methods use File | Settings | File Templates. 099 } 100 101 @Override 102 public String unbind(List<RequestDocument> requestDocuments) throws Exception { 103 return null; //To change body of implemented methods use File | Settings | File Templates. 104 } 105 106 @Override 107 public void transferInstances(List<RequestDocument> requestDocuments) throws Exception { 108 System.out.println("DummyIndexerServiceImpl : transferInstances "); 109 } 110 111 @Override 112 public void transferItems(List<RequestDocument> requestDocuments) throws Exception { 113 System.out.println("DummyIndexerServiceImpl : transferItems "); 114 } 115 116 @Override 117 public String delete(List<RequestDocument> requestDocuments) throws Exception { 118 return null; //To change body of implemented methods use File | Settings | File Templates. 119 } 120 121 @Override 122 public String delete(RequestDocument requestDocument) throws SolrServerException, Exception { 123 return null; //To change body of implemented methods use File | Settings | File Templates. 124 } 125 126 @Override 127 public String buildUuid() { 128 return null; //To change body of implemented methods use File | Settings | File Templates. 129 } 130 131 @Override 132 public String bulkIndexDocuments(List<RequestDocument> requestDocumentList, boolean isCommit) { 133 return SUCCESS; //To change body of implemented methods use File | Settings | File Templates. 134 } 135 136 @Override 137 public String indexDocument(RequestDocument requestDocument) { 138 return SUCCESS; //To change body of implemented methods use File | Settings | File Templates. 139 } 140 141 @Override 142 public String indexDocument(RequestDocument requestDocument, boolean commit) { 143 return SUCCESS; //To change body of implemented methods use File | Settings | File Templates. 144 } 145 146 @Override 147 public String indexDocuments(List<RequestDocument> requestDocumentList) { 148 return SUCCESS; //To change body of implemented methods use File | Settings | File Templates. 149 } 150 151 @Override 152 public String indexDocuments(List<RequestDocument> requestDocumentList, boolean commit) { 153 return SUCCESS; //To change body of implemented methods use File | Settings | File Templates. 154 } 155 156 @Override 157 public String indexSolrDocuments(List<SolrInputDocument> solrDocs) { 158 return SUCCESS; //To change body of implemented methods use File | Settings | File Templates. 159 } 160 161 @Override 162 public void commit() throws Exception { 163 } 164 165 @Override 166 public void rollback() throws Exception { 167 } 168}