| Line 1... |
Line 1... |
| 1 |
package in.shop2020.ui.util;
|
1 |
package in.shop2020.ui.util;
|
| 2 |
|
2 |
|
| 3 |
import in.shop2020.model.v1.catalog.Category;
|
3 |
import in.shop2020.metamodel.definitions.Category;
|
| - |
|
4 |
import in.shop2020.metamodel.definitions.DefinitionsContainer;
|
| - |
|
5 |
import in.shop2020.model.v1.catalog.InventoryService.Client;
|
| 4 |
import in.shop2020.model.v1.catalog.InventoryServiceException;
|
6 |
import in.shop2020.model.v1.catalog.InventoryServiceException;
|
| 5 |
import in.shop2020.model.v1.catalog.Item;
|
7 |
import in.shop2020.model.v1.catalog.Item;
|
| 6 |
import in.shop2020.model.v1.catalog.Source;
|
8 |
import in.shop2020.model.v1.catalog.Source;
|
| 7 |
import in.shop2020.model.v1.catalog.InventoryService.Client;
|
- |
|
| 8 |
import in.shop2020.model.v1.catalog.SourceItemPricing;
|
9 |
import in.shop2020.model.v1.catalog.SourceItemPricing;
|
| 9 |
import in.shop2020.thrift.clients.CatalogClient;
|
10 |
import in.shop2020.thrift.clients.CatalogClient;
|
| 10 |
import in.shop2020.util.Utils;
|
11 |
import in.shop2020.util.Utils;
|
| 11 |
import in.shop2020.utils.CategoryManager;
|
- |
|
| 12 |
|
12 |
|
| 13 |
import java.io.BufferedWriter;
|
13 |
import java.io.BufferedWriter;
|
| 14 |
import java.io.File;
|
14 |
import java.io.File;
|
| 15 |
import java.io.FileOutputStream;
|
15 |
import java.io.FileOutputStream;
|
| 16 |
import java.io.IOException;
|
16 |
import java.io.IOException;
|
| Line 159... |
Line 159... |
| 159 |
filenames.add("SlideGuide");
|
159 |
filenames.add("SlideGuide");
|
| 160 |
filenames.add("ProductPropertiesSnippet");
|
160 |
filenames.add("ProductPropertiesSnippet");
|
| 161 |
filenames.add("MyResearchSnippet");
|
161 |
filenames.add("MyResearchSnippet");
|
| 162 |
filenames.add("AfterSales");
|
162 |
filenames.add("AfterSales");
|
| 163 |
|
163 |
|
| 164 |
Category category = CategoryManager.getCategoryManager().getCategory(items.get(0).getCategory());
|
164 |
Category category = new DefinitionsContainer().getCategory(items.get(0).getCategory());
|
| 165 |
if(category!=null){
|
165 |
if(category!=null){
|
| 166 |
if(category.getParent_category_id() != Utils.MOBILE_ACCESSORIES_CATEGORY) {
|
166 |
Category parentCategory = category.getParentCategory();
|
| 167 |
|
167 |
|
| 168 |
if(category.getId() != Utils.LAPTOPS_CATEGORY) {
|
168 |
if(parentCategory.getID() == Utils.MOBILE_PHONES_CATAGORY) {
|
| 169 |
filenames.add("PhonesIOwnSnippet");
|
169 |
filenames.add("PhonesIOwnSnippet");
|
| - |
|
170 |
}
|
| - |
|
171 |
if(parentCategory.isHasAccessories()){
|
| 170 |
filenames.add("RelatedAccessories");
|
172 |
filenames.add("RelatedAccessories");
|
| - |
|
173 |
}
|
| - |
|
174 |
if(parentCategory.isComparable()) {
|
| 171 |
filenames.add("MostComparedProducts");
|
175 |
filenames.add("MostComparedProducts");
|
| 172 |
}
|
- |
|
| 173 |
filenames.add("CompareProductSnippet");
|
176 |
filenames.add("CompareProductSnippet");
|
| 174 |
filenames.add("ComparisonSnippet");
|
177 |
filenames.add("ComparisonSnippet");
|
| 175 |
filenames.add("CompareProductSummarySnippet");
|
178 |
filenames.add("CompareProductSummarySnippet");
|
| 176 |
filenames.add("SlideNamesSnippet");
|
179 |
filenames.add("SlideNamesSnippet");
|
| 177 |
}
|
180 |
}
|