Changeset 509 for tapas


Ignore:
Timestamp:
05/15/12 17:59:42 (12 years ago)
Author:
rboipsl
Message:

correction structure fichier xml
creation repertoire user
v2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tapas/service/implementation/com/ether/TapasServiceImpl.java

    r507 r509  
    2020import org.springframework.transaction.annotation.Transactional; 
    2121 
    22  
    23 import java.io.File; 
    24 import java.io.FileInputStream; 
    2522import java.io.FileOutputStream; 
    2623import java.io.IOException; 
    27 import java.lang.reflect.Array; 
    28 //import java.sql.Date; 
    2924import java.text.ParseException; 
    3025import java.text.SimpleDateFormat; 
    31 import java.util.Date; 
    32  
    3326import java.util.ArrayList; 
    3427import java.util.Calendar; 
     28import java.util.Date; 
    3529import java.util.List; 
    3630import java.util.Properties; 
    37 import java.util.StringTokenizer; 
     31 
     32//import java.sql.Date; 
    3833 
    3934/** 
     
    300295 
    301296        String commandePath = servicePath+"/"+fTapas.getId(); 
    302         createXMLFile( document, commandePath, prop ); 
    303  
    304  
    305     } 
     297        createXMLFile( document, commandePath,prop ); 
     298 
     299 
     300    } 
     301 
    306302 
    307303    @Transactional(readOnly = true) 
     
    324320        EtherHelper.pause(4000); 
    325321 
    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(); 
    327324 
    328325        try 
     
    334331 
    335332        } 
     333 
     334        EtherHelper.pause(4000); 
    336335 
    337336    } 
     
    356355        } 
    357356 
    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 
    361363        try 
    362364        { 
     
    366368        { 
    367369 
    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 
    373376        try 
    374377        { 
     
    385388        commande = commandePath+"/"+prop.getProperty( "process_name" )+" -f request.xml"+" -m "+user.getEmail(); 
    386389 
     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 
    387406        try 
    388407        { 
     
    394413        } 
    395414 
    396        //EtherHelper.pause(7000); 
     415       EtherHelper.pause(7000); 
    397416 
    398417       return true; 
     
    468487            try 
    469488            { 
    470                 EtherHelper.execProcess( "mkdir -p "+commandePath+" ; chown "+prop.getProperty( "chown_user" )+" "+commandePath  ); 
     489                EtherHelper.execProcess( "mkdir -p "+commandePath); 
    471490            } 
    472491            catch( FormattedException e ) 
     
    475494            } 
    476495 
    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            } */ 
    478507 
    479508            final String fichier = commandePath+"/"+"request.xml"; 
     
    485514            sortie.output( document, new FileOutputStream( fichier ) ); 
    486515 
    487             try 
     516            /*try 
    488517            { 
    489518                EtherHelper.execProcess( "chmod 755 "+commandePath+"/"+"request.xml" ); 
     
    495524 
    496525            EtherHelper.pause(7000); 
    497  
    498         } 
    499         catch( java.io.IOException ignored ) 
     526            */ 
     527 
     528        } 
     529        catch( IOException ignored ) 
    500530        { 
    501531        } 
Note: See TracChangeset for help on using the changeset viewer.