Subversion Repositories SmartDukaan

Rev

Rev 8396 | Rev 10097 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8396 Rev 8620
Line 4... Line 4...
4
import java.io.File;
4
import java.io.File;
5
import java.io.FileInputStream;
5
import java.io.FileInputStream;
6
import java.io.FileWriter;
6
import java.io.FileWriter;
7
import java.io.IOException;
7
import java.io.IOException;
8
import java.io.InputStream;
8
import java.io.InputStream;
-
 
9
import java.util.Arrays;
9
import java.util.HashMap;
10
import java.util.HashMap;
10
import java.util.List;
11
import java.util.List;
11
import java.util.Map;
12
import java.util.Map;
12
 
13
 
13
import javax.servlet.ServletContext;
14
import javax.servlet.ServletContext;
Line 52... Line 53...
52
import org.slf4j.LoggerFactory;
53
import org.slf4j.LoggerFactory;
53
 
54
 
54
import com.opensymphony.xwork2.ValidationAwareSupport;
55
import com.opensymphony.xwork2.ValidationAwareSupport;
55
 
56
 
56
@SuppressWarnings("serial")
57
@SuppressWarnings("serial")
-
 
58
 
57
@InterceptorRefs({
59
@InterceptorRefs({
58
	@InterceptorRef("defaultStack"),
60
	@InterceptorRef("defaultStack"),
59
	@InterceptorRef("login")
61
	@InterceptorRef("login")
60
})
62
})
61
@Results({
63
@Results({
Line 88... Line 90...
88
	private String fileUploadContentType;
90
	private String fileUploadContentType;
89
	private String suppressMfnPriceUpdate;
91
	private String suppressMfnPriceUpdate;
90
	private String suppressFbaPriceUpdate;
92
	private String suppressFbaPriceUpdate;
91
	private File file;
93
	private File file;
92
	private String errMsg;
94
	private String errMsg;
-
 
95
	private String next;
-
 
96
	private List<Amazonlisted> amazonItems;
-
 
97
	private String searchText;
-
 
98
	private long searchCount;
-
 
99
	private long totalCount;
-
 
100
	private String taxCode;
93
 
101
 
94
	public String index() {
102
	public String index() {
95
		if(!ReportsUtils.canAccessReport((Long)session.getAttribute(ReportsUtils.ROLE), request.getServletPath())) {
103
		if (!ReportsUtils.canAccessReport((Long) session.getAttribute(ReportsUtils.ROLE),request.getServletPath())) {
96
			return "authfail";
104
			return "authfail";
97
		}
105
		}
98
		return "index";
106
		return "index";
99
	}
107
	}
100
 
108
 
101
	public List<Amazonlisted> fetchItems() throws TException {
109
	public String fetchItems() throws TException {
102
		Client CatalogClient = new CatalogClient("catalog_service_server_host_amazon","catalog_service_server_port").getClient();
110
		Client CatalogClient = new CatalogClient("catalog_service_server_host_amazon","catalog_service_server_port").getClient();
-
 
111
		if (searchText.length() == 0) {
-
 
112
			amazonItems = CatalogClient.getAmazonListedItems(Long.valueOf(next), 10);
103
		return CatalogClient.getAllAmazonListedItems();
113
			totalCount = CatalogClient.getCountForAmazonlistedItems();
-
 
114
			setSearchCount(totalCount);
-
 
115
		} else {
-
 
116
			List<String> subString = Arrays.asList(searchText.split(" "));
-
 
117
			amazonItems = CatalogClient.searchAmazonItems(subString,Long.valueOf(next), 10);
-
 
118
			totalCount = CatalogClient.getCountForAmazonlistedItems();
-
 
119
			searchCount = CatalogClient.getAmazonSearchResultCount(subString);
-
 
120
		}
-
 
121
		return "amazon-item-table";
104
	}
122
	}
105
 
123
 
-
 
124
 
106
	public Amazonlisted fetchItemDetail() throws NumberFormatException, TException {
125
	public Amazonlisted fetchItemDetail() throws NumberFormatException, TException {
107
		Client CatalogClient = new CatalogClient("catalog_service_server_host_amazon","catalog_service_server_port").getClient();
126
		Client CatalogClient = new CatalogClient("catalog_service_server_host_amazon","catalog_service_server_port").getClient();
108
		return CatalogClient.getAmazonItemDetails(Long.valueOf(id));
127
		return CatalogClient.getAmazonItemDetails(Long.valueOf(id));
109
	}
128
	}
110
 
129
 
Line 159... Line 178...
159
		}
178
		}
160
		if(amazonlisted.isSuppressFbaPriceUpdate()!=Boolean.valueOf(suppressFbaPriceUpdate)){
179
		if(amazonlisted.isSuppressFbaPriceUpdate()!=Boolean.valueOf(suppressFbaPriceUpdate)){
161
			amazonlisted.setSuppressFbaPriceUpdate(Boolean.valueOf(suppressFbaPriceUpdate));
180
			amazonlisted.setSuppressFbaPriceUpdate(Boolean.valueOf(suppressFbaPriceUpdate));
162
			commit=true;
181
			commit=true;
163
		}
182
		}
-
 
183
 
-
 
184
		if(!StringUtils.equals(amazonlisted.getTaxCode(), taxCode)){
-
 
185
			amazonlisted.setTaxCode(taxCode);
-
 
186
			commit=true;
-
 
187
		}
-
 
188
 
164
		if(commit){
189
		if(commit){
165
			CatalogClient.updateAmazonItemDetails(amazonlisted);
190
			CatalogClient.updateAmazonItemDetails(amazonlisted);
166
		}
191
		}
167
		else{
192
		else{
168
			logger.info("Nothing new to commit");
193
			logger.info("Nothing new to commit");
169
		}
194
		}
170
		//setUrl("/amazon-list/");
-
 
171
		return "index";
195
		return "index";
172
 
196
 
173
	}
197
	}
174
 
198
 
175
	public void upload() throws IOException, TException {
199
	public void upload() throws IOException, TException {
Line 192... Line 216...
192
		}
216
		}
193
		TransactionClient tcl = new TransactionClient();
217
		TransactionClient tcl = new TransactionClient();
194
		tcl.getClient().updateTimestampForAmazonOrder(amazonOrderMap);
218
		tcl.getClient().updateTimestampForAmazonOrder(amazonOrderMap);
195
	}
219
	}
196
 
220
 
-
 
221
 
-
 
222
 
197
	private void changeItemInventory() throws NumberFormatException, TException {
223
	private void changeItemInventory() throws NumberFormatException, TException {
198
		Client CatalogClient = new CatalogClient("catalog_service_server_host_amazon","catalog_service_server_port").getClient();
224
		Client CatalogClient = new CatalogClient("catalog_service_server_host_amazon","catalog_service_server_port").getClient();
199
 
225
 
200
		if (StringUtils.isEmpty(holdInventory)) {
226
		if (StringUtils.isEmpty(holdInventory)) {
201
			holdInventory = "0";
227
			holdInventory = "0";
Line 236... Line 262...
236
		catch (Exception e){
262
		catch (Exception e){
237
			return null;
263
			return null;
238
		}
264
		}
239
	}
265
	}
240
 
266
 
-
 
267
	public long getFbaInventoryForAmazonItem(String itemId) throws NumberFormatException, TException {
-
 
268
		InventoryClient inventoryServiceClient = new InventoryClient();
-
 
269
		try { 
-
 
270
			return inventoryServiceClient.getClient().getAmazonFbaItemInventory(Long.valueOf(itemId));
-
 
271
		}
-
 
272
		catch (Exception e){
-
 
273
			return 0;
-
 
274
		}
-
 
275
	}
-
 
276
 
241
	public Long getTimetoShip(String itemId) throws LogisticsServiceException, TException{
277
	public Long getTimetoShip(String itemId) throws LogisticsServiceException, TException{
242
		LogisticsClient logisticsClient = new LogisticsClient();
278
		LogisticsClient logisticsClient = new LogisticsClient();
243
		return logisticsClient.getClient().getLogisticsInfo("110001", Long.valueOf(itemId), DeliveryType.COD, PickUpType.COURIER).getShippingTime();
279
		return logisticsClient.getClient().getLogisticsInfo("110001", Long.valueOf(itemId), DeliveryType.COD, PickUpType.COURIER).getShippingTime();
244
 
280
 
245
	}
281
	}
246
 
282
 
247
	public  Map<Long, Item> getAliveItemMap() throws TTransportException, InterruptedException{
-
 
248
		List<Item> itemList = null;
-
 
249
		int retry=0;
-
 
250
		while(true){
-
 
251
			try {
-
 
252
				if (retry==3)
-
 
253
					break;
-
 
254
				Client CatalogClient = new CatalogClient("catalog_service_server_host_amazon","catalog_service_server_port").getClient();
-
 
255
				itemList = CatalogClient.getAllAliveItems();
-
 
256
				break;
-
 
257
			} catch ( NullPointerException e) {
-
 
258
				retry++;
-
 
259
				System.out.println("Unable to fetch alive items.Retrying");
-
 
260
				Thread.sleep(3000);
-
 
261
				e.printStackTrace();
-
 
262
			} catch (TException e) {
-
 
263
				retry++;
-
 
264
				System.out.println("Unable to fetch alive items.Retrying");
-
 
265
				Thread.sleep(3000);
-
 
266
				e.printStackTrace();
-
 
267
			}
-
 
268
		}
-
 
269
		Map<Long, Item> itemMap = new HashMap<Long, Item>();
-
 
270
		for (Item o : itemList) {
-
 
271
			itemMap.put((Long) o.getId(), o);
-
 
272
		}
-
 
273
		return itemMap;
-
 
274
	}
-
 
275
 
-
 
276
	public String runAsinJob() throws IOException, InterruptedException {
283
	public String runAsinJob() throws IOException, InterruptedException {
277
		if(!ReportsUtils.canAccessReport((Long)session.getAttribute(ReportsUtils.ROLE), request.getRequestURI().substring(request.getContextPath().length()).split("/")[1].split("!")[0])) {
284
		if(!ReportsUtils.canAccessReport((Long)session.getAttribute(ReportsUtils.ROLE), request.getRequestURI().substring(request.getContextPath().length()).split("/")[1].split("!")[0])) {
278
			logger.info(request.getRequestURI().substring(request.getContextPath().length()).split("/")[1].split("!")[0]);
285
			logger.info(request.getRequestURI().substring(request.getContextPath().length()).split("/")[1].split("!")[0]);
279
			return "authfail";
286
			return "authfail";
280
		}
287
		}
Line 286... Line 293...
286
		process.waitFor();
293
		process.waitFor();
287
		logger.info(String.valueOf(process.exitValue()));
294
		logger.info(String.valueOf(process.exitValue()));
288
		return "asinjob";
295
		return "asinjob";
289
 
296
 
290
	}
297
	}
291
	
298
 
292
	public String runFbaListingJob() throws IOException, InterruptedException {
299
	public String runFbaListingJob() throws IOException, InterruptedException {
293
		if(!ReportsUtils.canAccessReport((Long)session.getAttribute(ReportsUtils.ROLE), request.getRequestURI().substring(request.getContextPath().length()).split("/")[1].split("!")[0])) {
300
		if(!ReportsUtils.canAccessReport((Long)session.getAttribute(ReportsUtils.ROLE), request.getRequestURI().substring(request.getContextPath().length()).split("/")[1].split("!")[0])) {
294
			logger.info(request.getRequestURI().substring(request.getContextPath().length()).split("/")[1].split("!")[0]);
301
			logger.info(request.getRequestURI().substring(request.getContextPath().length()).split("/")[1].split("!")[0]);
295
			return "authfail";
302
			return "authfail";
296
		}
303
		}
Line 301... Line 308...
301
		Process process = testProcess.start();
308
		Process process = testProcess.start();
302
		process.waitFor();
309
		process.waitFor();
303
		logger.info(String.valueOf(process.exitValue()));
310
		logger.info(String.valueOf(process.exitValue()));
304
		return "asinjob";
311
		return "asinjob";
305
	}
312
	}
306
	
313
 
307
	public String runNonFbaListingJob() throws IOException, InterruptedException {
314
	public String runNonFbaListingJob() throws IOException, InterruptedException {
308
		if(!ReportsUtils.canAccessReport((Long)session.getAttribute(ReportsUtils.ROLE), request.getRequestURI().substring(request.getContextPath().length()).split("/")[1].split("!")[0])) {
315
		if(!ReportsUtils.canAccessReport((Long)session.getAttribute(ReportsUtils.ROLE), request.getRequestURI().substring(request.getContextPath().length()).split("/")[1].split("!")[0])) {
309
			logger.info(request.getRequestURI().substring(request.getContextPath().length()).split("/")[1].split("!")[0]);
316
			logger.info(request.getRequestURI().substring(request.getContextPath().length()).split("/")[1].split("!")[0]);
310
			return "authfail";
317
			return "authfail";
311
		}
318
		}
Line 317... Line 324...
317
		process.waitFor();
324
		process.waitFor();
318
		logger.info(String.valueOf(process.exitValue()));
325
		logger.info(String.valueOf(process.exitValue()));
319
		return "asinjob";
326
		return "asinjob";
320
	}
327
	}
321
 
328
 
-
 
329
	public void uploadAsinFile() throws IOException, TException{
-
 
330
		File fileToCreate = new File("/tmp/", "Amazon-asin-upload.xls");
-
 
331
		FileUtils.copyFile(this.file, fileToCreate);
-
 
332
		FileInputStream iFile = new FileInputStream(new File(file.getAbsolutePath()));
-
 
333
		HSSFWorkbook workbook = new HSSFWorkbook(iFile);
-
 
334
		HSSFSheet sheet = workbook.getSheetAt(0);
-
 
335
		Map<Long,Item> amazonAsin = new HashMap<Long,Item>();
-
 
336
		StringBuilder sb =new StringBuilder();
-
 
337
		Client CatalogClient=null;
-
 
338
		try {
-
 
339
			CatalogClient = new CatalogClient("catalog_service_server_host_amazon","catalog_service_server_port").getClient();
-
 
340
		} catch (TTransportException e) {
-
 
341
			e.printStackTrace();
-
 
342
		}
-
 
343
		for (int iterator=(sheet.getFirstRowNum()+1);iterator<=sheet.getLastRowNum();iterator++){
-
 
344
			Item item=null;
-
 
345
			Long sku;
-
 
346
			String asin;
-
 
347
			if (checkEmptyString(sheet.getRow(iterator).getCell(0))){
-
 
348
				continue;
-
 
349
			}
-
 
350
			else {
-
 
351
				sku=(long) sheet.getRow(iterator).getCell(0).getNumericCellValue();
-
 
352
				try {
-
 
353
					item = CatalogClient.getItem(sku);
-
 
354
				} catch (Exception e) {
-
 
355
					logger.info("Unable to fetch item details ID= "+sku);
-
 
356
					logger.info("Unable to fetch item. "+e);
-
 
357
					sb.append("Service exception ItemId not updated Id= "+sku+"\n");
-
 
358
					continue;
-
 
359
				} 
-
 
360
			}
-
 
361
 
-
 
362
			if(item.getId() == 0){
-
 
363
				logger.info("Item Id doesn't exist in catalog Id= "+sku);
-
 
364
				sb.append("Item Id doesn't exist in catalog Id= "+sku+"\n");
-
 
365
				continue;
-
 
366
			}
-
 
367
 
-
 
368
			if (!checkEmptyString(sheet.getRow(iterator).getCell(1))){
-
 
369
				asin = sheet.getRow(iterator).getCell(1).getStringCellValue();
-
 
370
				item.setAsin(asin);
-
 
371
			}
-
 
372
 
-
 
373
			if (!checkEmptyString(sheet.getRow(iterator).getCell(2))){
-
 
374
				long virtualInventory =(long) sheet.getRow(iterator).getCell(2).getNumericCellValue();
-
 
375
				item.setDefaultInventory(virtualInventory);
-
 
376
			}
-
 
377
 
-
 
378
			if (!checkEmptyString(sheet.getRow(iterator).getCell(3))){
-
 
379
				long riskyInventory =(long) sheet.getRow(iterator).getCell(3).getNumericCellValue();
-
 
380
				item.setHoldInventory(riskyInventory);
-
 
381
			}
-
 
382
 
-
 
383
			amazonAsin.put(sku, item);
-
 
384
		}
-
 
385
		CatalogClient.updateAsin(amazonAsin);
-
 
386
		
-
 
387
		logger.info("Amazon Asin Map "+amazonAsin.toString());
-
 
388
		CatalogClient = new CatalogClient("catalog_service_server_host_amazon","catalog_service_server_port").getClient();
-
 
389
		CatalogClient.updateAsin(amazonAsin);
-
 
390
		File file = new File("/tmp/asinfile");
-
 
391
		FileWriter writer = new FileWriter(file);
-
 
392
		writer.append(sb.toString());
-
 
393
		writer.close();
-
 
394
		byte[] buffer = new byte[(int)file.length()];
-
 
395
		InputStream input = null;
-
 
396
		try {
-
 
397
			int totalBytesRead = 0;
-
 
398
			input = new BufferedInputStream(new FileInputStream(file));
-
 
399
			while(totalBytesRead < buffer.length){
-
 
400
				int bytesRemaining = buffer.length - totalBytesRead;
-
 
401
				int bytesRead = input.read(buffer, totalBytesRead, bytesRemaining); 
-
 
402
				if (bytesRead > 0){
-
 
403
					totalBytesRead = totalBytesRead + bytesRead;
-
 
404
				}
-
 
405
			}
-
 
406
		}
-
 
407
		finally {
-
 
408
			input.close();
-
 
409
			file.delete();
-
 
410
		}
-
 
411
 
-
 
412
		response.setHeader("Content-Type", "text/javascript");
-
 
413
 
-
 
414
		ServletOutputStream sos;
-
 
415
		try {
-
 
416
			sos = response.getOutputStream();
-
 
417
			sos.write(buffer);
-
 
418
			sos.flush();
-
 
419
		} catch (IOException e) {
-
 
420
			System.out.println("Unable to stream the manifest file");
-
 
421
		}   
-
 
422
	}
-
 
423
 
322
	public void uploadBulkFile() throws IOException, TException{
424
	public void uploadBulkFile() throws IOException, TException{
323
		File fileToCreate = new File("/tmp/", "Amazon-bulk-upload.xls");
425
		File fileToCreate = new File("/tmp/", "Amazon-bulk-upload.xls");
324
		FileUtils.copyFile(this.file, fileToCreate);
426
		FileUtils.copyFile(this.file, fileToCreate);
325
		FileInputStream iFile = new FileInputStream(new File(file.getAbsolutePath()));
427
		FileInputStream iFile = new FileInputStream(new File(file.getAbsolutePath()));
326
		HSSFWorkbook workbook = new HSSFWorkbook(iFile);
428
		HSSFWorkbook workbook = new HSSFWorkbook(iFile);
Line 348... Line 450...
348
					logger.info("Unable to fetch item details ID= "+sku);
450
					logger.info("Unable to fetch item details ID= "+sku);
349
					sb.append("Service exception ItemId not updated Id= "+sku+"\n");
451
					sb.append("Service exception ItemId not updated Id= "+sku+"\n");
350
					continue;
452
					continue;
351
				}
453
				}
352
			}
454
			}
353
			
455
 
354
			if(amazonlisted.getItemid() == 0){
456
			if(amazonlisted.getItemid() == 0){
355
				logger.info("Item Id doesn't exist in amazonlisted Id= "+sku);
457
				logger.info("Item Id doesn't exist in amazonlisted Id= "+sku);
356
				sb.append("Item Id doesn't exist in amazonlisted Id= "+sku+"\n");
458
				sb.append("Item Id doesn't exist in amazonlisted Id= "+sku+"\n");
357
				continue;
459
				continue;
358
			}
460
			}
Line 407... Line 509...
407
				}
509
				}
408
				if ((long)sheet.getRow(iterator).getCell(7).getNumericCellValue()==0){
510
				if ((long)sheet.getRow(iterator).getCell(7).getNumericCellValue()==0){
409
					amazonlisted.setSuppressFbaPriceUpdate(false);
511
					amazonlisted.setSuppressFbaPriceUpdate(false);
410
				}
512
				}
411
			}
513
			}
-
 
514
 
-
 
515
			if (!checkEmptyString(sheet.getRow(iterator).getCell(8))){
-
 
516
				String taxCode = sheet.getRow(iterator).getCell(8).getStringCellValue();
-
 
517
				amazonlisted.setTaxCode(taxCode);
-
 
518
			}
412
			amazonBulkUpdate.put(sku, amazonlisted);
519
			amazonBulkUpdate.put(sku, amazonlisted);
413
		}
520
		}
414
		logger.info("Amazon Bulk Map "+amazonBulkUpdate.toString());
521
		logger.info("Amazon Bulk Map "+amazonBulkUpdate.toString());
415
		CatalogClient = new CatalogClient("catalog_service_server_host_amazon","catalog_service_server_port").getClient();
522
		CatalogClient = new CatalogClient("catalog_service_server_host_amazon","catalog_service_server_port").getClient();
416
		CatalogClient.updateAmazonAttributesInBulk(amazonBulkUpdate);
523
		CatalogClient.updateAmazonAttributesInBulk(amazonBulkUpdate);
417
		File file = new File("/tmp/temp");
524
		File file = new File("/tmp/amazonbulk");
418
		FileWriter writer = new FileWriter(file);
525
		FileWriter writer = new FileWriter(file);
419
		writer.append(sb.toString());
526
		writer.append(sb.toString());
420
		writer.close();
527
		writer.close();
421
		byte[] buffer = new byte[(int)file.length()];
528
		byte[] buffer = new byte[(int)file.length()];
422
		InputStream input = null;
529
		InputStream input = null;
Line 447... Line 554...
447
			System.out.println("Unable to stream the manifest file");
554
			System.out.println("Unable to stream the manifest file");
448
		}   
555
		}   
449
	}
556
	}
450
 
557
 
451
 
558
 
-
 
559
 
-
 
560
 
452
	public boolean checkEmptyString(Cell cell){
561
	public boolean checkEmptyString(Cell cell){
453
		if (cell==null){
562
		if (cell==null){
454
			return true;
563
			return true;
455
		}
564
		}
456
		return false;
565
		return false;
Line 462... Line 571...
462
			return "authfail";
571
			return "authfail";
463
		}
572
		}
464
		return "amazon-shipping-upload";
573
		return "amazon-shipping-upload";
465
	}
574
	}
466
 
575
 
-
 
576
	public String uploadAsin(){
-
 
577
		if(!ReportsUtils.canAccessReport((Long)session.getAttribute(ReportsUtils.ROLE), request.getRequestURI().substring(request.getContextPath().length()).split("/")[1].split("!")[0])) {
-
 
578
			logger.info(request.getRequestURI().substring(request.getContextPath().length()).split("/")[1].split("!")[0]);
-
 
579
			return "authfail";
-
 
580
		}
-
 
581
		return "amazon-asin-upload";
-
 
582
	}
-
 
583
 
467
	public String uploadBulkSheet(){
584
	public String uploadBulkSheet(){
468
		if(!ReportsUtils.canAccessReport((Long)session.getAttribute(ReportsUtils.ROLE), request.getRequestURI().substring(request.getContextPath().length()).split("/")[1].split("!")[0])) {
585
		if(!ReportsUtils.canAccessReport((Long)session.getAttribute(ReportsUtils.ROLE), request.getRequestURI().substring(request.getContextPath().length()).split("/")[1].split("!")[0])) {
469
			logger.info(request.getRequestURI().substring(request.getContextPath().length()).split("/")[1].split("!")[0]);
586
			logger.info(request.getRequestURI().substring(request.getContextPath().length()).split("/")[1].split("!")[0]);
470
			return "authfail";
587
			return "authfail";
471
		}
588
		}
Line 487... Line 604...
487
		}
604
		}
488
 
605
 
489
		if (StringUtils.equals(id, "options")){
606
		if (StringUtils.equals(id, "options")){
490
			return "options";
607
			return "options";
491
		}
608
		}
-
 
609
 
-
 
610
		if (StringUtils.equals(id, "item-table")){
-
 
611
			return "amazon-item-table";
-
 
612
		}
-
 
613
 
492
		return "id";
614
		return "id";
493
	}
615
	}
494
 
616
 
495
	public String editNew() {
617
	public String editNew() {
496
		return "editNew";
618
		return "editNew";
Line 568... Line 690...
568
	public String getSaholicPrice() {
690
	public String getSaholicPrice() {
569
		return saholicPrice;
691
		return saholicPrice;
570
	}
692
	}
571
 
693
 
572
	public void setIsTime(String isTime){
694
	public void setIsTime(String isTime){
-
 
695
		logger.info("set istime"+isTime);
573
		this.isTime = isTime;
696
		this.isTime = isTime;
574
	}
697
	}
575
 
698
 
576
	public String getIsTime(){
699
	public String getIsTime(){
577
		return isTime;
700
		return isTime;
Line 584... Line 707...
584
	public String getHandlingTime(){
707
	public String getHandlingTime(){
585
		return handlingTime;
708
		return handlingTime;
586
	}
709
	}
587
 
710
 
588
	public void setCustomHandlingTime(String customHandlingTime){
711
	public void setCustomHandlingTime(String customHandlingTime){
-
 
712
		logger.info("set custom handling time"+customHandlingTime);
589
		this.customHandlingTime = customHandlingTime;
713
		this.customHandlingTime = customHandlingTime;
590
	}
714
	}
591
 
715
 
592
	public String getCustomHandlingTime(){
716
	public String getCustomHandlingTime(){
593
		return customHandlingTime;
717
		return customHandlingTime;
Line 636... Line 760...
636
	public void setServletRequest(HttpServletRequest req) {
760
	public void setServletRequest(HttpServletRequest req) {
637
		this.request = req;
761
		this.request = req;
638
		this.session = req.getSession();        
762
		this.session = req.getSession();        
639
	}
763
	}
640
 
764
 
641
	public static void main(String[] args) throws NumberFormatException, InventoryServiceException, TException, IOException {
-
 
642
		AmazonListController call = new AmazonListController();
-
 
643
		//System.out.println(call.runAsinJob());
-
 
644
	}
-
 
645
 
-
 
646
	@Override
765
	@Override
647
	public void setServletContext(ServletContext arg0) {
766
	public void setServletContext(ServletContext arg0) {
648
		// TODO Auto-generated method stub
767
		// TODO Auto-generated method stub
649
 
768
 
650
	}
769
	}
Line 671... Line 790...
671
	}
790
	}
672
 
791
 
673
	public String getErrMsg() {
792
	public String getErrMsg() {
674
		return errMsg;
793
		return errMsg;
675
	}
794
	}
676
	
795
 
677
	public void setServletResponse(HttpServletResponse response) {
796
	public void setServletResponse(HttpServletResponse response) {
678
		this.response = response;
797
		this.response = response;
679
	}
798
	}
680
 
799
 
-
 
800
	public void setNext(String next) {
-
 
801
		logger.info("next is"+next);
-
 
802
		this.next = next;
-
 
803
	}
-
 
804
 
-
 
805
	public String getNext() {
-
 
806
		return next;
-
 
807
	}
-
 
808
 
-
 
809
	public void setAmazonItems(List<Amazonlisted> amazonItems) {
-
 
810
		this.amazonItems = amazonItems;
-
 
811
	}
-
 
812
 
-
 
813
	public List<Amazonlisted> getAmazonItems() {
-
 
814
		return amazonItems;
-
 
815
	}
-
 
816
 
-
 
817
	public void setSearchText(String searchText) {
-
 
818
		this.searchText = searchText;
-
 
819
	}
-
 
820
 
-
 
821
	public String getSearchText() {
-
 
822
		return searchText;
-
 
823
	}
-
 
824
 
-
 
825
	public long getSearchCount() {
-
 
826
		return searchCount;
-
 
827
	}
-
 
828
 
-
 
829
	public long getTotalCount() {
-
 
830
		return totalCount;
-
 
831
	}
-
 
832
 
-
 
833
	public void setSearchCount(long count) {
-
 
834
		this.searchCount = count;
-
 
835
	}
-
 
836
 
-
 
837
	public void setTaxCode(String taxCode) {
-
 
838
		this.taxCode = taxCode;
-
 
839
	}
-
 
840
 
-
 
841
	public String getTaxCode() {
-
 
842
		return taxCode;
-
 
843
	}
-
 
844
 
681
}
845
}