Subversion Repositories SmartDukaan

Rev

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

Rev 8967 Rev 8968
Line 114... Line 114...
114
			return "flipkart-options";
114
			return "flipkart-options";
115
		}
115
		}
116
 
116
 
117
		return "id";
117
		return "id";
118
	}
118
	}
-
 
119
	@SuppressWarnings("unused")
119
	public void uploadOrdersFile() throws IOException, CatalogServiceException, TException{
120
	public void uploadOrdersFile() throws IOException, CatalogServiceException, TException{
120
		File fileToCreate = new File("/tmp/", "Flipkart-Orders.csv");
121
		File fileToCreate = new File("/tmp/", "Flipkart-Orders.csv");
121
		FileUtils.copyFile(this.file, fileToCreate);
122
		FileUtils.copyFile(this.file, fileToCreate);
122
		FileInputStream iFile = new FileInputStream(new File(file.getAbsolutePath()));
123
		FileInputStream iFile = new FileInputStream(new File(file.getAbsolutePath()));
123
		CSVReader orderfilereader = null;
124
		CSVReader orderfilereader = null;
Line 549... Line 550...
549
			response.setHeader("Content-Type", "text/javascript");
550
			response.setHeader("Content-Type", "text/javascript");
550
 
551
 
551
			ServletOutputStream sos;
552
			ServletOutputStream sos;
552
			try {
553
			try {
553
				sos = response.getOutputStream();
554
				sos = response.getOutputStream();
-
 
555
				if(sb!=null){
554
				sos.write(sb.toString().getBytes());
556
					sos.write(sb.toString().getBytes());
-
 
557
				}
-
 
558
				else{
-
 
559
					sos.write("Orders uploaded successfully".toString().getBytes());
-
 
560
				}
555
				sos.flush();
561
				sos.flush();
556
			} catch (IOException e) {
562
			} catch (IOException e) {
557
				System.out.println("Unable to stream the manifest file");
563
				System.out.println("Unable to stream the manifest file");
558
			}   
564
			}   
559
 
565