| Line 45... |
Line 45... |
| 45 |
public PriceInsertor() throws TTransportException{
|
45 |
public PriceInsertor() throws TTransportException{
|
| 46 |
csc = new CatalogClient();
|
46 |
csc = new CatalogClient();
|
| 47 |
client = csc.getClient();
|
47 |
client = csc.getClient();
|
| 48 |
}
|
48 |
}
|
| 49 |
|
49 |
|
| - |
|
50 |
public void copySolrSchemaFiles() throws IOException{
|
| - |
|
51 |
String source = Utils.EXPORT_PATH + "xml/final/irmetadata_solrschema.xml";
|
| - |
|
52 |
String destination = Utils.EXPORT_PATH + "solr/irmetadata_solrschema.xml";
|
| - |
|
53 |
FileUtils.copyFile(new File(source), new File(destination));
|
| - |
|
54 |
|
| - |
|
55 |
source = Utils.EXPORT_PATH + "xml/final/irmetadata_catchall.xml";
|
| - |
|
56 |
destination = Utils.EXPORT_PATH + "solr/irmetadata_catchall.xml";
|
| - |
|
57 |
FileUtils.copyFile(new File(source), new File(destination));
|
| - |
|
58 |
}
|
| - |
|
59 |
|
| 50 |
public void insertPriceInSolrData(long catalogId, String priceString) throws IOException{
|
60 |
public void insertPriceInSolrData(long catalogId, String priceString) throws IOException{
|
| 51 |
String irSolrFilename = Utils.EXPORT_PATH + "xml/final/" + catalogId + "_irdata_solr.xml";
|
61 |
String irSolrFilename = Utils.EXPORT_PATH + "xml/final/" + catalogId + "_irdata_solr.xml";
|
| 52 |
String finalFile = Utils.EXPORT_PATH + "solr/" + catalogId + "_irdata_solr.xml";
|
62 |
String finalFile = Utils.EXPORT_PATH + "solr/" + catalogId + "_irdata_solr.xml";
|
| 53 |
File f = new File(irSolrFilename);
|
63 |
File f = new File(irSolrFilename);
|
| 54 |
String s = FileUtils.readFileToString(f);
|
64 |
String s = FileUtils.readFileToString(f);
|