View Javadoc
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.indexer.solr.IndexerService;
9   import org.kuali.ole.docstore.model.xmlpojo.ingest.RequestDocument;
10  
11  import java.io.File;
12  import java.io.IOException;
13  import java.util.ArrayList;
14  import java.util.List;
15  
16  /**
17   * Created by IntelliJ IDEA.
18   * User: ND6967
19   * Date: 3/14/12
20   * Time: 7:34 PM
21   * To change this template use File | Settings | File Templates.
22   */
23  public class DummyIndexerServiceImpl
24          implements IndexerService {
25      private static DummyIndexerServiceImpl genericIndexerServiceImpl = new DummyIndexerServiceImpl();
26  
27      private DummyIndexerServiceImpl() {
28  
29      }
30  
31      public static DummyIndexerServiceImpl getInstance() {
32          System.out.println("in DummyIndexerServiceImpl");
33          return genericIndexerServiceImpl;
34      }
35  
36      @Override
37      public String deleteDocuments(String s, List<String> strings) {
38          return SUCCESS;  //To change body of implemented methods use File | Settings | File Templates.
39      }
40  
41      @Override
42      public String deleteDocument(String s, String s1) {
43          return SUCCESS;  //To change body of implemented methods use File | Settings | File Templates.
44      }
45  
46      @Override
47      public String indexDocumentsFromFileBySolrDoc(String s, String s1, String s2, String s3) {
48          return SUCCESS;  //To change body of implemented methods use File | Settings | File Templates.
49      }
50  
51      @Override
52      public String indexDocumentsFromDirBySolrDoc(String s, String s1, String s2, String s3) {
53          return null;  //To change body of implemented methods use File | Settings | File Templates.
54      }
55  
56      @Override
57      public String indexDocumentsFromStringBySolrDoc(String s, String s1, String s2, String s3) throws IOException {
58          return null;  //To change body of implemented methods use File | Settings | File Templates.
59      }
60  
61      @Override
62      public String indexDocumentsFromFiles(String s, String s1, String s2, List<File> files) {
63          return null;  //To change body of implemented methods use File | Settings | File Templates.
64      }
65  
66      @Override
67      public List<SolrDocument> getSolrDocumentBySolrId(String s) {
68          return new ArrayList<SolrDocument>();  //To change body of implemented methods use File | Settings | File Templates.
69      }
70  
71  //    @Override
72  //    public List<SolrDocument> getSolrDocumentBySolrId(String uniqueId, String docType) {
73  //        return null;  //To change body of implemented methods use File | Settings | File Templates.
74  //    }
75  
76      @Override
77      public List<SolrDocument> getSolrDocument(String s, String s1) {
78          return new ArrayList<SolrDocument>();  //To change body of implemented methods use File | Settings | File Templates.
79      }
80  
81      @Override
82      public QueryResponse searchBibRecord(String s, String s1, String s2, String s3, String s4, String s5) {
83          return new QueryResponse();  //To change body of implemented methods use File | Settings | File Templates.
84      }
85  
86      @Override
87      public void cleanupDiscoveryData() throws IOException, SolrServerException {
88          //To change body of implemented methods use File | Settings | File Templates.
89      }
90  
91      @Override
92      public String bind(List<RequestDocument> requestDocument) throws Exception, IOException {
93          return null;  //To change body of implemented methods use File | Settings | File Templates.
94      }
95  
96      @Override
97      public String bind(RequestDocument requestDocument) throws Exception {
98          return null;  //To change body of implemented methods use File | Settings | File Templates.
99      }
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 }