| Line 423... |
Line 423... |
| 423 |
|
423 |
|
| 424 |
private void getEntityMetaKeywordSnippetHtml(ExpandedEntity expEntity, String exportPath) {
|
424 |
private void getEntityMetaKeywordSnippetHtml(ExpandedEntity expEntity, String exportPath) {
|
| 425 |
long catalogId = expEntity.getID();
|
425 |
long catalogId = expEntity.getID();
|
| 426 |
try {
|
426 |
try {
|
| 427 |
expEntity = CreationUtils.getExpandedEntity(catalogId);
|
427 |
expEntity = CreationUtils.getExpandedEntity(catalogId);
|
| - |
|
428 |
String keywords;
|
| - |
|
429 |
if (expEntity.getModelName() != null && !expEntity.getModelName().isEmpty() && (expEntity.getBrand().equals("Samsung") || expEntity.getBrand().equals("Sony Ericsson"))) {
|
| - |
|
430 |
keywords = expEntity.getBrand() + " " + expEntity.getModelName() + ", ";
|
| - |
|
431 |
if (expEntity.getCategory().getParentCategory().getID() == 10001) {
|
| - |
|
432 |
keywords += expEntity.getBrand() + " mobile phones, ";
|
| - |
|
433 |
}
|
| - |
|
434 |
if (expEntity.getCategory().getParentCategory().getID() == 10011) {
|
| - |
|
435 |
keywords += "phone accessories, ";
|
| - |
|
436 |
}
|
| - |
|
437 |
keywords += expEntity.getBrand() + " " + expEntity.getModelName() + " Price, ";
|
| - |
|
438 |
keywords += expEntity.getBrand() + " " + expEntity.getModelName() + " India, ";
|
| - |
|
439 |
if (expEntity.getCategory().getParentCategory().getID() == 10001) {
|
| - |
|
440 |
keywords += expEntity.getBrand() + " " + expEntity.getModelName() + " Review, ";
|
| - |
|
441 |
}
|
| - |
|
442 |
}
|
| - |
|
443 |
else {
|
| 428 |
String keywords = expEntity.getBrand() + " " + expEntity.getModelName() + " " + expEntity.getModelNumber() + ", ";
|
444 |
keywords = expEntity.getBrand() + " " + expEntity.getModelName() + " " + expEntity.getModelNumber() + ", ";
|
| 429 |
if(expEntity.getCategory().getParentCategory().getID() == 10001) {
|
445 |
if(expEntity.getCategory().getParentCategory().getID() == 10001) {
|
| 430 |
keywords += expEntity.getBrand() + " mobile phones, ";
|
446 |
keywords += expEntity.getBrand() + " mobile phones, ";
|
| 431 |
}
|
447 |
}
|
| 432 |
if(expEntity.getCategory().getParentCategory().getID() == 10011) {
|
448 |
if(expEntity.getCategory().getParentCategory().getID() == 10011) {
|
| 433 |
keywords += "phone accessories, ";
|
449 |
keywords += "phone accessories, ";
|
| 434 |
}
|
450 |
}
|
| 435 |
keywords += expEntity.getBrand() + " " + expEntity.getModelName() + " " + expEntity.getModelNumber() + " Price, ";
|
451 |
keywords += expEntity.getBrand() + " " + expEntity.getModelName() + " " + expEntity.getModelNumber() + " Price, ";
|
| 436 |
keywords += expEntity.getBrand() + " " + expEntity.getModelName() + " " + expEntity.getModelNumber() + " India, ";
|
452 |
keywords += expEntity.getBrand() + " " + expEntity.getModelName() + " " + expEntity.getModelNumber() + " India, ";
|
| 437 |
if(expEntity.getCategory().getParentCategory().getID() == 10001) {
|
453 |
if(expEntity.getCategory().getParentCategory().getID() == 10001) {
|
| 438 |
keywords += expEntity.getBrand() + " " + expEntity.getModelName() + " " + expEntity.getModelNumber() + " Review, ";
|
454 |
keywords += expEntity.getBrand() + " " + expEntity.getModelName() + " " + expEntity.getModelNumber() + " Review, ";
|
| - |
|
455 |
}
|
| 439 |
}
|
456 |
}
|
| 440 |
|
457 |
|
| - |
|
458 |
|
| 441 |
String exportFileName = exportPath + catalogId + File.separator + "MetaKeywordsSnippet.html";
|
459 |
String exportFileName = exportPath + catalogId + File.separator + "MetaKeywordsSnippet.html";
|
| 442 |
File exportFile = new File(exportFileName);
|
460 |
File exportFile = new File(exportFileName);
|
| 443 |
if(!exportFile.exists()) {
|
461 |
if(!exportFile.exists()) {
|
| 444 |
exportFile.createNewFile();
|
462 |
exportFile.createNewFile();
|
| 445 |
}
|
463 |
}
|
| Line 676... |
Line 694... |
| 676 |
private void getEntityWidgetSnippetHtml(ExpandedEntity expEntity, List<Item> items, String templateFile, String staticurl, String exportPath) {
|
694 |
private void getEntityWidgetSnippetHtml(ExpandedEntity expEntity, List<Item> items, String templateFile, String staticurl, String exportPath) {
|
| 677 |
long catalogId = expEntity.getID();
|
695 |
long catalogId = expEntity.getID();
|
| 678 |
try {
|
696 |
try {
|
| 679 |
expEntity = CreationUtils.getExpandedEntity(catalogId);
|
697 |
expEntity = CreationUtils.getExpandedEntity(catalogId);
|
| 680 |
String title = expEntity.getBrand() + " " + expEntity.getModelName() + " " + expEntity.getModelNumber();
|
698 |
String title = expEntity.getBrand() + " " + expEntity.getModelName() + " " + expEntity.getModelNumber();
|
| - |
|
699 |
String prodName = title;
|
| - |
|
700 |
if (expEntity.getModelName() != null && !expEntity.getModelName().isEmpty() && (expEntity.getBrand().equals("Samsung") || expEntity.getBrand().equals("Sony Ericsson"))) {
|
| - |
|
701 |
prodName = expEntity.getBrand() + " " + expEntity.getModelName();
|
| - |
|
702 |
}
|
| 681 |
String imagePrefix = getImagePrefix(expEntity);
|
703 |
String imagePrefix = getImagePrefix(expEntity);
|
| 682 |
String url = getEntityURL(expEntity);
|
704 |
String url = getEntityURL(expEntity);
|
| 683 |
|
705 |
|
| 684 |
String tinySnippet = "";
|
706 |
String tinySnippet = "";
|
| 685 |
List<Feature> features = expEntity.getSlide(130054).getFeatures();
|
707 |
List<Feature> features = expEntity.getSlide(130054).getFeatures();
|
| Line 713... |
Line 735... |
| 713 |
if (minPriceItem.getMrp() <= minPriceItem.getSellingPrice()) {
|
735 |
if (minPriceItem.getMrp() <= minPriceItem.getSellingPrice()) {
|
| 714 |
showmrp = false;
|
736 |
showmrp = false;
|
| 715 |
}
|
737 |
}
|
| 716 |
Map<String,String> params = new HashMap<String, String>();
|
738 |
Map<String,String> params = new HashMap<String, String>();
|
| 717 |
params.put("TITLE", title);
|
739 |
params.put("TITLE", title);
|
| - |
|
740 |
params.put("PROD_NAME", prodName);
|
| 718 |
params.put("URL", url);
|
741 |
params.put("URL", url);
|
| 719 |
params.put("IMAGE_PREFIX", imagePrefix);
|
742 |
params.put("IMAGE_PREFIX", imagePrefix);
|
| 720 |
params.put("SELLING_PRICE", ((int)minPriceItem.getSellingPrice())+"");
|
743 |
params.put("SELLING_PRICE", ((int)minPriceItem.getSellingPrice())+"");
|
| 721 |
params.put("MRP", ((int)minPriceItem.getMrp())+"");
|
744 |
params.put("MRP", ((int)minPriceItem.getMrp())+"");
|
| 722 |
params.put("SHOWMRP", showmrp +"");
|
745 |
params.put("SHOWMRP", showmrp +"");
|
| Line 758... |
Line 781... |
| 758 |
Map<String,String> params = new HashMap<String, String>();
|
781 |
Map<String,String> params = new HashMap<String, String>();
|
| 759 |
|
782 |
|
| 760 |
try {
|
783 |
try {
|
| 761 |
expEntity = CreationUtils.getExpandedEntity(catalogId);
|
784 |
expEntity = CreationUtils.getExpandedEntity(catalogId);
|
| 762 |
String title = expEntity.getBrand() + " " + expEntity.getModelName()+ " " + expEntity.getModelNumber();
|
785 |
String title = expEntity.getBrand() + " " + expEntity.getModelName()+ " " + expEntity.getModelNumber();
|
| - |
|
786 |
String prodName = title;
|
| - |
|
787 |
if (expEntity.getModelName() != null && !expEntity.getModelName().isEmpty() && (expEntity.getBrand().equals("Samsung") || expEntity.getBrand().equals("Sony Ericsson"))) {
|
| - |
|
788 |
prodName = expEntity.getBrand() + " " + expEntity.getModelName();
|
| - |
|
789 |
}
|
| 763 |
String url = getEntityURL(expEntity);
|
790 |
String url = getEntityURL(expEntity);
|
| 764 |
String imagePrefix = getImagePrefix(expEntity);
|
791 |
String imagePrefix = getImagePrefix(expEntity);
|
| 765 |
|
792 |
|
| 766 |
catalogServiceClient = new CatalogServiceClient();
|
793 |
catalogServiceClient = new CatalogServiceClient();
|
| 767 |
client = catalogServiceClient.getClient();
|
794 |
client = catalogServiceClient.getClient();
|
| Line 806... |
Line 833... |
| 806 |
if (minPriceItem.getMrp() <= minPriceItem.getSellingPrice()) {
|
833 |
if (minPriceItem.getMrp() <= minPriceItem.getSellingPrice()) {
|
| 807 |
showmrp = false;
|
834 |
showmrp = false;
|
| 808 |
}
|
835 |
}
|
| 809 |
|
836 |
|
| 810 |
params.put("TITLE", title);
|
837 |
params.put("TITLE", title);
|
| - |
|
838 |
params.put("PROD_NAME", prodName);
|
| 811 |
params.put("URL", url);
|
839 |
params.put("URL", url);
|
| 812 |
params.put("IMAGE_PREFIX", imagePrefix);
|
840 |
params.put("IMAGE_PREFIX", imagePrefix);
|
| 813 |
params.put("SELLING_PRICE", ((int)minPriceItem.getSellingPrice())+"");
|
841 |
params.put("SELLING_PRICE", ((int)minPriceItem.getSellingPrice())+"");
|
| 814 |
params.put("MRP", ((int)minPriceItem.getMrp())+"");
|
842 |
params.put("MRP", ((int)minPriceItem.getMrp())+"");
|
| 815 |
params.put("SHOWMRP", showmrp +"");
|
843 |
params.put("SHOWMRP", showmrp +"");
|
| Line 849... |
Line 877... |
| 849 |
long catalogId = expEntity.getID();
|
877 |
long catalogId = expEntity.getID();
|
| 850 |
|
878 |
|
| 851 |
try {
|
879 |
try {
|
| 852 |
expEntity = CreationUtils.getExpandedEntity(catalogId);
|
880 |
expEntity = CreationUtils.getExpandedEntity(catalogId);
|
| 853 |
String title = expEntity.getBrand() + " " + expEntity.getModelName()+ " " + expEntity.getModelNumber();
|
881 |
String title = expEntity.getBrand() + " " + expEntity.getModelName()+ " " + expEntity.getModelNumber();
|
| - |
|
882 |
String prodName = title;
|
| - |
|
883 |
if (expEntity.getModelName() != null && !expEntity.getModelName().isEmpty() && (expEntity.getBrand().equals("Samsung") || expEntity.getBrand().equals("Sony Ericsson"))) {
|
| - |
|
884 |
prodName = expEntity.getBrand() + " " + expEntity.getModelName();
|
| - |
|
885 |
}
|
| 854 |
catalogServiceClient = new CatalogServiceClient();
|
886 |
catalogServiceClient = new CatalogServiceClient();
|
| 855 |
client = catalogServiceClient.getClient();
|
887 |
client = catalogServiceClient.getClient();
|
| 856 |
String url = getEntityURL(expEntity);
|
888 |
String url = getEntityURL(expEntity);
|
| 857 |
String imagePrefix = getImagePrefix(expEntity);
|
889 |
String imagePrefix = getImagePrefix(expEntity);
|
| 858 |
|
890 |
|
| Line 893... |
Line 925... |
| 893 |
boolean showmrp = true;
|
925 |
boolean showmrp = true;
|
| 894 |
if (minPriceItem.getMrp() <= minPriceItem.getSellingPrice()) {
|
926 |
if (minPriceItem.getMrp() <= minPriceItem.getSellingPrice()) {
|
| 895 |
showmrp = false;
|
927 |
showmrp = false;
|
| 896 |
}
|
928 |
}
|
| 897 |
params.put("TITLE", title);
|
929 |
params.put("TITLE", title);
|
| - |
|
930 |
params.put("PROD_NAME", prodName);
|
| 898 |
params.put("URL", url);
|
931 |
params.put("URL", url);
|
| 899 |
params.put("IMAGE_PREFIX", imagePrefix);
|
932 |
params.put("IMAGE_PREFIX", imagePrefix);
|
| 900 |
params.put("SELLING_PRICE", ((int)minPriceItem.getSellingPrice())+"");
|
933 |
params.put("SELLING_PRICE", ((int)minPriceItem.getSellingPrice())+"");
|
| 901 |
params.put("MRP", ((int)minPriceItem.getMrp())+"");
|
934 |
params.put("MRP", ((int)minPriceItem.getMrp())+"");
|
| 902 |
params.put("SHOWMRP", showmrp +"");
|
935 |
params.put("SHOWMRP", showmrp +"");
|
| Line 934... |
Line 967... |
| 934 |
private void getEntityTitleSnippetHtml(ExpandedEntity expEntity, String exportPath) {
|
967 |
private void getEntityTitleSnippetHtml(ExpandedEntity expEntity, String exportPath) {
|
| 935 |
long catalogId = expEntity.getID();
|
968 |
long catalogId = expEntity.getID();
|
| 936 |
|
969 |
|
| 937 |
try {
|
970 |
try {
|
| 938 |
expEntity = CreationUtils.getExpandedEntity(catalogId);
|
971 |
expEntity = CreationUtils.getExpandedEntity(catalogId);
|
| 939 |
String title = expEntity.getBrand() + " " + expEntity.getModelName()+ " "
|
972 |
String title = expEntity.getBrand() + " " + expEntity.getModelName() + " " + expEntity.getModelNumber();
|
| - |
|
973 |
if (expEntity.getModelName() != null && !expEntity.getModelName().isEmpty() && (expEntity.getBrand().equals("Samsung") || expEntity.getBrand().equals("Sony Ericsson"))) {
|
| 940 |
+ expEntity.getModelNumber();
|
974 |
title = expEntity.getBrand() + " " + expEntity.getModelName();
|
| - |
|
975 |
}
|
| 941 |
if(expEntity.getCategory().getParentCategory().getID() == 10001) {
|
976 |
if(expEntity.getCategory().getParentCategory().getID() == 10001) {
|
| 942 |
title += " | " + expEntity.getBrand() + " Mobile Phones";
|
977 |
title += " | " + expEntity.getBrand() + " Mobile Phones";
|
| 943 |
}
|
978 |
}
|
| 944 |
if(expEntity.getCategory().getParentCategory().getID() == 10011) {
|
979 |
if(expEntity.getCategory().getParentCategory().getID() == 10011) {
|
| 945 |
title += " " + expEntity.getCategory().getLabel()
|
980 |
title += " " + expEntity.getCategory().getLabel()
|
| Line 971... |
Line 1006... |
| 971 |
Map<String,String> params = new HashMap<String, String>();
|
1006 |
Map<String,String> params = new HashMap<String, String>();
|
| 972 |
|
1007 |
|
| 973 |
try {
|
1008 |
try {
|
| 974 |
expEntity = CreationUtils.getExpandedEntity(catalogId);
|
1009 |
expEntity = CreationUtils.getExpandedEntity(catalogId);
|
| 975 |
String title = expEntity.getBrand() + " " + expEntity.getModelName()+ " " + expEntity.getModelNumber();
|
1010 |
String title = expEntity.getBrand() + " " + expEntity.getModelName()+ " " + expEntity.getModelNumber();
|
| - |
|
1011 |
String prodName = title;
|
| - |
|
1012 |
if (expEntity.getModelName() != null && !expEntity.getModelName().isEmpty() && (expEntity.getBrand().equals("Samsung") || expEntity.getBrand().equals("Sony Ericsson"))) {
|
| - |
|
1013 |
prodName = expEntity.getBrand() + " " + expEntity.getModelName();
|
| - |
|
1014 |
}
|
| 976 |
|
1015 |
|
| 977 |
String url = getEntityURL(expEntity);
|
1016 |
String url = getEntityURL(expEntity);
|
| 978 |
String imagePrefix = getImagePrefix(expEntity);
|
1017 |
String imagePrefix = getImagePrefix(expEntity);
|
| 979 |
|
1018 |
|
| 980 |
catalogServiceClient = new CatalogServiceClient();
|
1019 |
catalogServiceClient = new CatalogServiceClient();
|
| Line 1018... |
Line 1057... |
| 1018 |
boolean showmrp = true;
|
1057 |
boolean showmrp = true;
|
| 1019 |
if (minPriceItem.getMrp() <= minPriceItem.getSellingPrice()) {
|
1058 |
if (minPriceItem.getMrp() <= minPriceItem.getSellingPrice()) {
|
| 1020 |
showmrp = false;
|
1059 |
showmrp = false;
|
| 1021 |
}
|
1060 |
}
|
| 1022 |
params.put("TITLE", title);
|
1061 |
params.put("TITLE", title);
|
| - |
|
1062 |
params.put("PROD_NAME", prodName);
|
| 1023 |
params.put("URL", url);
|
1063 |
params.put("URL", url);
|
| 1024 |
params.put("IMAGE_PREFIX", imagePrefix);
|
1064 |
params.put("IMAGE_PREFIX", imagePrefix);
|
| 1025 |
params.put("SELLING_PRICE", ((int)minPriceItem.getSellingPrice())+"");
|
1065 |
params.put("SELLING_PRICE", ((int)minPriceItem.getSellingPrice())+"");
|
| 1026 |
params.put("MRP", ((int)minPriceItem.getMrp())+"");
|
1066 |
params.put("MRP", ((int)minPriceItem.getMrp())+"");
|
| 1027 |
params.put("SHOWMRP", showmrp +"");
|
1067 |
params.put("SHOWMRP", showmrp +"");
|
| Line 1062... |
Line 1102... |
| 1062 |
Map<String,String> params = new HashMap<String, String>();
|
1102 |
Map<String,String> params = new HashMap<String, String>();
|
| 1063 |
|
1103 |
|
| 1064 |
try {
|
1104 |
try {
|
| 1065 |
expEntity = CreationUtils.getExpandedEntity(catalogId);
|
1105 |
expEntity = CreationUtils.getExpandedEntity(catalogId);
|
| 1066 |
String title = expEntity.getBrand() + " " + expEntity.getModelName()+ " " + expEntity.getModelNumber();
|
1106 |
String title = expEntity.getBrand() + " " + expEntity.getModelName()+ " " + expEntity.getModelNumber();
|
| - |
|
1107 |
String prodName = title;
|
| - |
|
1108 |
if (expEntity.getModelName() != null && !expEntity.getModelName().isEmpty() && (expEntity.getBrand().equals("Samsung") || expEntity.getBrand().equals("Sony Ericsson"))) {
|
| - |
|
1109 |
prodName = expEntity.getBrand() + " " + expEntity.getModelName();
|
| 1067 |
|
1110 |
}
|
| 1068 |
String url = getEntityURL(expEntity);
|
1111 |
String url = getEntityURL(expEntity);
|
| 1069 |
String imagePrefix = getImagePrefix(expEntity);
|
1112 |
String imagePrefix = getImagePrefix(expEntity);
|
| 1070 |
|
1113 |
|
| 1071 |
catalogServiceClient = new CatalogServiceClient();
|
1114 |
catalogServiceClient = new CatalogServiceClient();
|
| 1072 |
client = catalogServiceClient.getClient();
|
1115 |
client = catalogServiceClient.getClient();
|
| Line 1109... |
Line 1152... |
| 1109 |
boolean showmrp = true;
|
1152 |
boolean showmrp = true;
|
| 1110 |
if (minPriceItem.getMrp() <= minPriceItem.getSellingPrice()) {
|
1153 |
if (minPriceItem.getMrp() <= minPriceItem.getSellingPrice()) {
|
| 1111 |
showmrp = false;
|
1154 |
showmrp = false;
|
| 1112 |
}
|
1155 |
}
|
| 1113 |
params.put("TITLE", title);
|
1156 |
params.put("TITLE", title);
|
| - |
|
1157 |
params.put("PROD_NAME", prodName);
|
| 1114 |
params.put("URL", url);
|
1158 |
params.put("URL", url);
|
| 1115 |
params.put("IMAGE_PREFIX", imagePrefix);
|
1159 |
params.put("IMAGE_PREFIX", imagePrefix);
|
| 1116 |
params.put("SELLING_PRICE", ((int)minPriceItem.getSellingPrice())+"");
|
1160 |
params.put("SELLING_PRICE", ((int)minPriceItem.getSellingPrice())+"");
|
| 1117 |
params.put("MRP", ((int)minPriceItem.getMrp())+"");
|
1161 |
params.put("MRP", ((int)minPriceItem.getMrp())+"");
|
| 1118 |
params.put("SHOWMRP", showmrp +"");
|
1162 |
params.put("SHOWMRP", showmrp +"");
|
| Line 1153... |
Line 1197... |
| 1153 |
Map<String,String> params = new HashMap<String, String>();
|
1197 |
Map<String,String> params = new HashMap<String, String>();
|
| 1154 |
|
1198 |
|
| 1155 |
try {
|
1199 |
try {
|
| 1156 |
expEntity = CreationUtils.getExpandedEntity(catalogId);
|
1200 |
expEntity = CreationUtils.getExpandedEntity(catalogId);
|
| 1157 |
String title = expEntity.getBrand() + " " + expEntity.getModelName()+ " " + expEntity.getModelNumber();
|
1201 |
String title = expEntity.getBrand() + " " + expEntity.getModelName()+ " " + expEntity.getModelNumber();
|
| - |
|
1202 |
String prodName = title;
|
| - |
|
1203 |
if (expEntity.getModelName() != null && !expEntity.getModelName().isEmpty() && (expEntity.getBrand().equals("Samsung") || expEntity.getBrand().equals("Sony Ericsson"))) {
|
| - |
|
1204 |
prodName = expEntity.getBrand() + " " + expEntity.getModelName();
|
| 1158 |
|
1205 |
}
|
| 1159 |
String url = getEntityURL(expEntity);
|
1206 |
String url = getEntityURL(expEntity);
|
| 1160 |
String imagePrefix = getImagePrefix(expEntity);
|
1207 |
String imagePrefix = getImagePrefix(expEntity);
|
| 1161 |
|
1208 |
|
| 1162 |
catalogServiceClient = new CatalogServiceClient();
|
1209 |
catalogServiceClient = new CatalogServiceClient();
|
| 1163 |
client = catalogServiceClient.getClient();
|
1210 |
client = catalogServiceClient.getClient();
|
| Line 1200... |
Line 1247... |
| 1200 |
boolean showmrp = true;
|
1247 |
boolean showmrp = true;
|
| 1201 |
if (minPriceItem.getMrp() <= minPriceItem.getSellingPrice()) {
|
1248 |
if (minPriceItem.getMrp() <= minPriceItem.getSellingPrice()) {
|
| 1202 |
showmrp = false;
|
1249 |
showmrp = false;
|
| 1203 |
}
|
1250 |
}
|
| 1204 |
params.put("TITLE", title);
|
1251 |
params.put("TITLE", title);
|
| - |
|
1252 |
params.put("PROD_NAME", prodName);
|
| 1205 |
params.put("URL", url);
|
1253 |
params.put("URL", url);
|
| 1206 |
params.put("IMAGE_PREFIX", imagePrefix);
|
1254 |
params.put("IMAGE_PREFIX", imagePrefix);
|
| 1207 |
params.put("SELLING_PRICE", ((int)minPriceItem.getSellingPrice())+"");
|
1255 |
params.put("SELLING_PRICE", ((int)minPriceItem.getSellingPrice())+"");
|
| 1208 |
params.put("MRP", ((int)minPriceItem.getMrp())+"");
|
1256 |
params.put("MRP", ((int)minPriceItem.getMrp())+"");
|
| 1209 |
params.put("SHOWMRP", showmrp +"");
|
1257 |
params.put("SHOWMRP", showmrp +"");
|
| Line 1243... |
Line 1291... |
| 1243 |
Map<String,String> params = new HashMap<String, String>();
|
1291 |
Map<String,String> params = new HashMap<String, String>();
|
| 1244 |
|
1292 |
|
| 1245 |
try {
|
1293 |
try {
|
| 1246 |
expEntity = CreationUtils.getExpandedEntity(catalogId);
|
1294 |
expEntity = CreationUtils.getExpandedEntity(catalogId);
|
| 1247 |
String title = expEntity.getBrand() + " " + expEntity.getModelName()+ " " + expEntity.getModelNumber();
|
1295 |
String title = expEntity.getBrand() + " " + expEntity.getModelName()+ " " + expEntity.getModelNumber();
|
| - |
|
1296 |
String prodName = title;
|
| - |
|
1297 |
if (expEntity.getModelName() != null && !expEntity.getModelName().isEmpty() && (expEntity.getBrand().equals("Samsung") || expEntity.getBrand().equals("Sony Ericsson"))) {
|
| - |
|
1298 |
prodName = expEntity.getBrand() + " " + expEntity.getModelName();
|
| - |
|
1299 |
}
|
| 1248 |
String url = getEntityURL(expEntity);
|
1300 |
String url = getEntityURL(expEntity);
|
| - |
|
1301 |
|
| 1249 |
String imagePrefix = getImagePrefix(expEntity);
|
1302 |
String imagePrefix = getImagePrefix(expEntity);
|
| 1250 |
|
1303 |
|
| 1251 |
catalogServiceClient = new CatalogServiceClient();
|
1304 |
catalogServiceClient = new CatalogServiceClient();
|
| 1252 |
client = catalogServiceClient.getClient();
|
1305 |
client = catalogServiceClient.getClient();
|
| 1253 |
|
1306 |
|
| Line 1268... |
Line 1321... |
| 1268 |
|
1321 |
|
| 1269 |
|
1322 |
|
| 1270 |
List<Map<String, String>> itemDetails = new ArrayList<Map<String,String>>();
|
1323 |
List<Map<String, String>> itemDetails = new ArrayList<Map<String,String>>();
|
| 1271 |
|
1324 |
|
| 1272 |
Item minPriceItem = null;
|
1325 |
Item minPriceItem = null;
|
| 1273 |
Date todate = new Date();
|
- |
|
| 1274 |
for(Item item: items){
|
1326 |
for(Item item: items){
|
| 1275 |
Map<String, String> itemDetail = new HashMap<String, String>();
|
1327 |
Map<String, String> itemDetail = new HashMap<String, String>();
|
| 1276 |
if(minPriceItem == null || minPriceItem.getSellingPrice() > item.getSellingPrice()){
|
1328 |
if(minPriceItem == null || minPriceItem.getSellingPrice() > item.getSellingPrice()){
|
| 1277 |
minPriceItem = item;
|
1329 |
minPriceItem = item;
|
| 1278 |
}
|
1330 |
}
|
| Line 1290... |
Line 1342... |
| 1290 |
boolean showmrp = true;
|
1342 |
boolean showmrp = true;
|
| 1291 |
if (minPriceItem.getMrp() <= minPriceItem.getSellingPrice()) {
|
1343 |
if (minPriceItem.getMrp() <= minPriceItem.getSellingPrice()) {
|
| 1292 |
showmrp = false;
|
1344 |
showmrp = false;
|
| 1293 |
}
|
1345 |
}
|
| 1294 |
params.put("TITLE", title);
|
1346 |
params.put("TITLE", title);
|
| - |
|
1347 |
params.put("PROD_NAME", prodName);
|
| 1295 |
params.put("URL", url);
|
1348 |
params.put("URL", url);
|
| 1296 |
params.put("IMAGE_PREFIX", imagePrefix);
|
1349 |
params.put("IMAGE_PREFIX", imagePrefix);
|
| 1297 |
params.put("SELLING_PRICE", ((int)minPriceItem.getSellingPrice())+"");
|
1350 |
params.put("SELLING_PRICE", ((int)minPriceItem.getSellingPrice())+"");
|
| 1298 |
params.put("MRP", ((int)minPriceItem.getMrp())+"");
|
1351 |
params.put("MRP", ((int)minPriceItem.getMrp())+"");
|
| 1299 |
params.put("SHOWMRP", showmrp +"");
|
1352 |
params.put("SHOWMRP", showmrp +"");
|