Subversion Repositories SmartDukaan

Rev

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

Rev 8029 Rev 8070
Line 222... Line 222...
222
		for (Item o : itemList) {
222
		for (Item o : itemList) {
223
			itemMap.put((Long) o.getId(), o);
223
			itemMap.put((Long) o.getId(), o);
224
		}
224
		}
225
		return itemMap;
225
		return itemMap;
226
	}
226
	}
-
 
227
	
-
 
228
	public String runAsinJob() throws IOException, InterruptedException {
-
 
229
		ProcessBuilder testProcess = new ProcessBuilder("/bin/bash");
-
 
230
		String[] command = {"/bin/bash", "-c", "sudo /root/code/trunk/AmazonFeeds/Test.sh &"};
-
 
231
	    testProcess.command(command);
-
 
232
	    logger.info(testProcess.command().toString());
-
 
233
	    Process process = testProcess.start();
-
 
234
	    process.waitFor();
-
 
235
	    logger.info(String.valueOf(process.exitValue()));
-
 
236
	    return "asinjob";
-
 
237
 
-
 
238
	}
227
 
239
 
228
	public String edit() {
240
	public String edit() {
229
		if(!ReportsUtils.canAccessReport((Long)session.getAttribute(ReportsUtils.ROLE), request.getRequestURI().substring(request.getContextPath().length()).split("/")[1])) {
241
		if(!ReportsUtils.canAccessReport((Long)session.getAttribute(ReportsUtils.ROLE), request.getRequestURI().substring(request.getContextPath().length()).split("/")[1])) {
230
			return "authfail";
242
			return "authfail";
231
		}
243
		}
Line 379... Line 391...
379
	public void setServletRequest(HttpServletRequest req) {
391
	public void setServletRequest(HttpServletRequest req) {
380
		this.request = req;
392
		this.request = req;
381
		this.session = req.getSession();        
393
		this.session = req.getSession();        
382
	}
394
	}
383
 
395
 
384
	public static void main(String[] args) throws NumberFormatException, InventoryServiceException, TException {
396
	public static void main(String[] args) throws NumberFormatException, InventoryServiceException, TException, IOException {
385
		AmazonListController call = new AmazonListController();
397
		AmazonListController call = new AmazonListController();
386
		System.out.println(call.getInventoryForAmazonItem("5"));
398
		//System.out.println(call.runAsinJob());
387
	}
399
	}
388
}
400
}