- Timestamp:
- 05/15/12 17:59:42 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tapas/service/implementation/com/ether/TapasServiceImpl.java
r507 r509 20 20 import org.springframework.transaction.annotation.Transactional; 21 21 22 23 import java.io.File;24 import java.io.FileInputStream;25 22 import java.io.FileOutputStream; 26 23 import java.io.IOException; 27 import java.lang.reflect.Array;28 //import java.sql.Date;29 24 import java.text.ParseException; 30 25 import java.text.SimpleDateFormat; 31 import java.util.Date;32 33 26 import java.util.ArrayList; 34 27 import java.util.Calendar; 28 import java.util.Date; 35 29 import java.util.List; 36 30 import java.util.Properties; 37 import java.util.StringTokenizer; 31 32 //import java.sql.Date; 38 33 39 34 /** … … 300 295 301 296 String commandePath = servicePath+"/"+fTapas.getId(); 302 createXMLFile( document, commandePath, prop ); 303 304 305 } 297 createXMLFile( document, commandePath,prop ); 298 299 300 } 301 306 302 307 303 @Transactional(readOnly = true) … … 324 320 EtherHelper.pause(4000); 325 321 326 commande = "chown -R "+prop.getProperty( "chown_user" )+" "+usersPath+"/"+user.getEmail(); 322 //commande = "chown -R "+prop.getProperty( "chown_user" )+" "+usersPath+"/"+user.getEmail(); 323 commande = "chmod 777 "+prop.getProperty( "chown_user" )+" "+usersPath+"/"+user.getEmail(); 327 324 328 325 try … … 334 331 335 332 } 333 334 EtherHelper.pause(4000); 336 335 337 336 } … … 356 355 } 357 356 358 EtherHelper.pause(5000); 359 360 commande="chown "+prop.getProperty( "chown_user" )+" "+prop.getProperty( "src_path" )+"/"+prop.getProperty( "process_name" ); 357 EtherHelper.pause(7000); 358 359 //final String fichier = commandePath+"commande.txt"; 360 361 /*commande="chown -R www:www "+commandePath; 362 361 363 try 362 364 { … … 366 368 { 367 369 368 } 369 370 EtherHelper.pause(5000); 371 372 commande="chmod 755 "+prop.getProperty( "src_path" )+"/"+prop.getProperty( "process_name" ); 370 }*/ 371 372 EtherHelper.pause(7000); 373 374 commande="chmod 777 -R "+commandePath; 375 373 376 try 374 377 { … … 385 388 commande = commandePath+"/"+prop.getProperty( "process_name" )+" -f request.xml"+" -m "+user.getEmail(); 386 389 390 /*PrintWriter out = null; 391 try 392 { 393 out = new PrintWriter(new FileWriter(fichier)); 394 out.println(commande); 395 out.close(); 396 } 397 catch( IOException e ) 398 { 399 e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates. 400 } */ 401 402 403 /*commande = commandePath+"/"+prop.getProperty( "process_name" ); 404 commande = "cd "+commandePath;*/ 405 387 406 try 388 407 { … … 394 413 } 395 414 396 //EtherHelper.pause(7000);415 EtherHelper.pause(7000); 397 416 398 417 return true; … … 468 487 try 469 488 { 470 EtherHelper.execProcess( "mkdir -p "+commandePath +" ; chown "+prop.getProperty( "chown_user" )+" "+commandePath);489 EtherHelper.execProcess( "mkdir -p "+commandePath); 471 490 } 472 491 catch( FormattedException e ) … … 475 494 } 476 495 477 EtherHelper.pause(7000); 496 EtherHelper.pause(5000); 497 498 499 /*try 500 { 501 EtherHelper.execProcess( "chown "+prop.getProperty( "chown_user" )+" "+commandePath); 502 } 503 catch( FormattedException e ) 504 { 505 506 } */ 478 507 479 508 final String fichier = commandePath+"/"+"request.xml"; … … 485 514 sortie.output( document, new FileOutputStream( fichier ) ); 486 515 487 try516 /*try 488 517 { 489 518 EtherHelper.execProcess( "chmod 755 "+commandePath+"/"+"request.xml" ); … … 495 524 496 525 EtherHelper.pause(7000); 497 498 } 499 catch( java.io.IOException ignored ) 526 */ 527 528 } 529 catch( IOException ignored ) 500 530 { 501 531 }
Note: See TracChangeset
for help on using the changeset viewer.