Changeset 504
- Timestamp:
- 05/11/12 12:34:56 (12 years ago)
- Location:
- tapas
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
tapas/common/implementation/com/ether/EtherHelper.java
r446 r504 245 245 } 246 246 247 248 public static void pause( long millisecondes ) 249 { 250 try 251 { 252 Thread.sleep( millisecondes ); 253 } 254 catch( InterruptedException e ) 255 { 256 257 } 258 } 259 247 260 } -
tapas/domain/interface/com/ether/tapas/Observatory.java
r422 r504 63 63 } 64 64 65 @NotNull 66 public String getShortName() 67 { 68 return _shortName; 69 70 } 71 72 public void setShortName( @NotNull final String shortName ) 73 { 74 _shortName = shortName; 75 } 76 77 65 78 private Integer _id; 66 79 @NotNull … … 72 85 @NotNull 73 86 private Double _altitude; 87 @NotNull 88 private String _shortName; 89 90 74 91 } -
tapas/persistence/implementation/com/ether/dao/Observatory.hbm.xml
r420 r504 31 31 </property> 32 32 33 <property name="shortName"> 34 <column name="observatory_court"/> 35 </property> 36 33 37 </class> 34 38 -
tapas/service/implementation/com/ether/TapasServiceImpl.java
r490 r504 26 26 import java.io.IOException; 27 27 import java.lang.reflect.Array; 28 //import java.sql.Date; 29 import java.text.ParseException; 30 import java.text.SimpleDateFormat; 31 import java.util.Date; 32 33 import java.util.ArrayList; 34 import java.util.Calendar; 28 35 import java.util.List; 29 36 import java.util.Properties; … … 47 54 final String dataPath = prop.getProperty( "data_path" ); 48 55 49 50 56 final String userPath = ""; 51 52 57 final String fichier = servicePath+"/"+user.getLastName()+"/"+"request.xml"; 53 54 58 final Element tapas = new Element( "tapas" ); 55 final Element request = new Element( "request");59 final List<Element> listRequest = new ArrayList<Element>(fTapas.getRequests().size()); 56 60 57 61 //On crée un nouveau Document JDOM basé sur la racine que l'on vient de créer … … 69 73 for( final Request iRequest : requests ) 70 74 { 75 76 final Element request = new Element( "request" ); 71 77 // Id de la request 72 78 final Attribute idR = new Attribute( "Id", iRequest.getId().toString() ); … … 75 81 // PREFERENCES 76 82 final Element preferences = new Element( "preferences" ); 83 77 84 78 85 //format … … 83 90 format.setText( iRequest.getPreference().getFormat().getSecondValue() ); 84 91 preferences.addContent( format ); 92 85 93 86 94 //rayleighExtinction … … 204 212 for( i = 0; i <= tabMess.length - 1; i++ ) //final String mess : tabMess ) 205 213 { 206 207 214 if( i == tabMess.length - 1 ) 208 215 chValid += EtherHelper.getMessage( "label.spectralUnit." + tabMess[i], null ); … … 258 265 259 266 260 261 String fileArletty = "", fileECMWF = ""; 262 fileArletty = dataPath + "/" + createFileName( iRequest.getObservation().getDate(), "arletty" ); 263 fileECMWF = dataPath + "/" + createFileName( iRequest.getObservation().getDate(), "ecmwf" ); 267 String fileArletty = "", fileECMWF = "", shortName=""; 268 //rajouter annee/mois 269 270 shortName = obs.getShortName(); 271 272 fileArletty = dataPath + "/" + createFileName( iRequest.getObservation().getDate(), "arletty",shortName ); 273 fileECMWF = dataPath + "/" + createFileName( iRequest.getObservation().getDate(), "ecmwf", shortName ); 264 274 265 275 final Element arlettyFile = new Element( "arletty_file" ); … … 271 281 atmosphere.addContent( ecmwfFile ); 272 282 273 tapas.addContent( request ); 274 } 283 listRequest.add( request ); 284 } 285 286 tapas.addContent( listRequest ); 275 287 276 288 String commandePath = servicePath+"/"+user.getLastName()+"/"+fTapas.getId(); … … 282 294 283 295 284 public boolean execAppelQSub( final String commandePath, User user, Properties prop )296 public boolean execAppelQSub( final String repCommande, User user, Properties prop ) 285 297 throws ServiceException 286 298 { 287 299 String commande=""; 300 String commandePath=prop.getProperty( "service_path" )+"/"+user.getLastName()+"/"+repCommande+"/"; 301 288 302 //copie run qsub dans repertoire commande 289 303 commande = "cp "+prop.getProperty( "src_path" )+"/"+prop.getProperty( "process_name" )+" "+commandePath; … … 298 312 } 299 313 314 EtherHelper.pause(7000); 315 300 316 //execution qsub pour la commande en cours 301 317 commande = commandePath+"/"+prop.getProperty( "process_name" )+" -f request.xml"+" -m "+user.getEmail(); … … 310 326 } 311 327 312 return true; 328 //EtherHelper.pause(7000); 329 330 return true; 313 331 } 314 332 … … 325 343 } */ 326 344 327 public String createFileName( String date, String type ) 328 { 329 330 String fileName = "test_"+type+"_"+date+".txt"; 331 332 333 /*String heure = date.substring( 4, 6 ); 334 335 int iheure = Math.abs( Integer.parseInt( heure ) ); 336 345 public String createFileName( String date, String type, String nomCourt ) 346 { 347 String fileName = ""; 348 349 String annee = date.substring( 0, 4 ); 350 //String mois = String.valueOf( Integer.parseInt(date.substring(5,7))-1); 351 String mois = date.substring(5,7); 352 String heure = date.substring(11,13); 353 String jour = date.substring(8,10); 354 String ind=""; 355 356 Calendar cal = Calendar.getInstance(); 357 358 try { 359 Date dd = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss").parse(jour+"/"+mois+"/"+annee+" "+heure+":00:00"); 360 cal.setTime(dd); 361 } 362 catch( ParseException e ) { 363 364 } 365 366 int iheure = cal.get(Calendar.HOUR_OF_DAY); 337 367 338 368 if( iheure < 3) ind = "00"; 339 369 else if ( iheure >= 21) { 340 370 ind = "00"; 371 cal.add(Calendar.DAY_OF_MONTH, +1); 341 372 } 342 373 else if( Math.abs(6-iheure) < 3) ind = "06"; … … 344 375 else if( Math.abs(18 - iheure) < 3 ) ind = "18"; 345 376 346 347 if( type == "arletty" ) fileName = "arletty_" + date + ".txt"; 348 else if( type == "ecmwf" ) fileName = "ecmwf_" + date + ".txt"; 349 */ 350 377 //+1 sur le mois pour recuperer le numero correct du mois considere 378 if (cal.get(Calendar.MONTH)+1 <10) mois="0"+String.valueOf(cal.get(Calendar.MONTH)+1); 379 else mois=""+String.valueOf(cal.get(Calendar.MONTH)+1); 380 381 if (cal.get(Calendar.DAY_OF_MONTH) <10) jour="0"+ cal.get(Calendar.DAY_OF_MONTH); 382 else jour=""+cal.get(Calendar.DAY_OF_MONTH); 383 384 annee=""+cal.get(Calendar.YEAR); 385 386 fileName = "/"+annee+"/"+mois+"/"+jour+"/"+nomCourt+"_"+annee+mois+jour+ind; 387 388 if( type == "arletty" ) fileName = fileName+".arl"; 389 else if ( type == "ecmwf" ) fileName = fileName+"_qo3.txt"; 351 390 352 391 return fileName; … … 368 407 } 369 408 409 EtherHelper.pause(7000); 410 370 411 final String fichier = commandePath+"/"+"request.xml"; 371 412 … … 375 416 //avec en argument le nom du fichier pour effectuer la sérialisation. 376 417 sortie.output( document, new FileOutputStream( fichier ) ); 418 419 //EtherHelper.pause(7000); 420 377 421 } 378 422 catch( java.io.IOException ignored ) … … 434 478 435 479 436 // recuperation infos observatoire avec l e nom480 // recuperation infos observatoire avec l'id 437 481 @Nullable 438 482 @Transactional(readOnly = true) -
tapas/service/interface/com/ether/TapasService.java
r490 r504 31 31 public Long getNumRequest() throws ServiceException; 32 32 33 public String createFileName(String date, String type ) throws ServiceException;33 public String createFileName(String date, String type, String shortName) throws ServiceException; 34 34 35 35 public boolean execAppelQSub( final String commandePath, @NotNull final User user, @NotNull final Properties prop ) throws ServiceException; -
tapas/web/project/formTapas.jsp
r500 r504 40 40 <div class="containerForm" id="formulaire"></div> 41 41 42 <div id="errForm" class="errorsForm"></div>43 42 44 43 <script type="text/javascript"> … … 99 98 100 99 tapasTexts["label.delButton"] = "<spring:message code="label.delButton"/>"; 100 tapasTexts["label.confirm.del"] = "<spring:message code="label.confirm.del"/>"; 101 tapasTexts["text.erreur.saisie"] = "<spring:message code="text.erreur.saisie"/>"; 102 tapasTexts["label.title.add"] = "<spring:message code="label.title.add"/>"; 103 tapasTexts["label.title.del"] = "<spring:message code="label.title.del"/>"; 101 104 102 105 var interfaceTapas = new InterfaceTapas( ${jSonFileFormats}, ${jSonYesNos}, ${jSonObservatories}, ${jSonSpectralUnits}, ${jSonInstrumentalFunctions}, ${jSonClimatoReferences} ); -
tapas/web/project/formTapas_script.jsp
r503 r504 7 7 /** *********** CONTAINERS *********** **/ 8 8 this.containerForm = $( "#formulaire" ); 9 this.containerErrors = $( "#errForm" ); 9 //this.containerErrors = $( "#errForm" ); 10 //this.divE= $( "#divErreurs"); 10 11 this.containerCenter = $( "#containerCenter" ); 11 12 this.containerTabs = $( "#tab" ); … … 36 37 // Buttons 37 38 var submitButton = new Button( {value:tapasTexts["label.submitButton"], parent:this.containerCenter, id:"button_submit", className: "red_button", classNameText:"red_button_text", onClick:jQuery.proxy( this.onClickSubmit, this )} ); 38 this.addRequestButton = new Button( { value:tapasTexts["label.addButton"], parent:this.containerCenter, id:"button_add", className: "positive", onClick:jQuery.proxy( this.onClickAdd, this )} );39 this.delRequestButton = new Button( { value:tapasTexts["label.delButton"], parent:this.containerCenter, id:"button_del", className: "negative", onClick:jQuery.proxy( this.onClickDel, this )} );39 this.addRequestButton = new Button( {title:tapasTexts["label.title.add"],value:tapasTexts["label.addButton"], parent:this.containerCenter, id:"button_add", className: "positive", onClick:jQuery.proxy( this.onClickAdd, this )} ); 40 this.delRequestButton = new Button( {title:tapasTexts["label.title.del"],value:tapasTexts["label.delButton"], parent:this.containerCenter, id:"button_del", className: "negative", onClick:jQuery.proxy( this.onClickDel, this )} ); 40 41 this.delRequestButton.disable(); 41 42 42 43 this.createForm(); 43 44 this.tabActive = this.createTab(); 44 45 this.containerErrors.hide(); 46 }, 47 45 this.divE = $( document.createElement( "div" ) ); 46 this.divE.attr( {id:"divErrors", class:"errorsForm"} ); 47 /*var fieldSetE = $( document.createElement( "fieldset" ) ); 48 fieldSetE.addClass( "cfs3" ); 49 this.divE.append( fieldSetE );*/ 50 51 this.containerForm.append( this.divE ); 52 //this.containerErrors.hide(); 53 this.divE.hide(); 54 55 56 }, 48 57 49 58 … … 90 99 if( !currentDate ) 91 100 currentDate = new Date(); 101 92 102 $( "#" + inputDateId ).val( this.calendarConverter.format( currentDate ) ); 93 103 $( "#" + inputDateId ).addClass( "calendar" ); … … 254 264 error: jQuery.proxy( this.showErrors, this ) 255 265 } ); 266 256 267 }, 257 268 … … 260 271 handleCreateXML: function( result ) 261 272 { 262 // TODO : gérer le bob ?? 263 var bob = jQuery.parseJSON( result ).result; 264 alert( bob ); 273 var res = jQuery.parseJSON( result ).result; 274 alert( res ); 265 275 }, 266 276 … … 269 279 onClickSubmit: function() 270 280 { 271 // if( this.validFields() ) 272 // { 273 // if( confirm( tapasTexts["confirm"] ) ) 274 // { 275 // this.containerErrors.hide(); 276 this.requestCreateXML(); 277 // } 278 // } 281 if( this.validFields() ) 282 { 283 this.divE.hide(); 284 if( confirm( tapasTexts["confirm"] ) ) 285 this.requestCreateXML(); 286 } 279 287 }, 280 288 … … 282 290 onClickAdd: function() 283 291 { 284 this. containerErrors.hide();292 this.divE.hide(); 285 293 this.nbRequest++; 286 294 … … 300 308 onClickDel: function() 301 309 { 302 // TODO : enlever le pouet 303 if( confirm( "pouet" ) ) 310 if( confirm( tapasTexts["label.confirm.del"] ) ) 304 311 { 305 312 var numCurrent = this.numRequest; … … 458 465 createForm: function() 459 466 { 460 this.divErreurs = $( document.createElement( "div" ) );461 this.divErreurs.addClass( "errorsForm" );462 this.divErreurs.hide();463 467 464 468 var divAll = $( document.createElement( "div" ) ); … … 514 518 515 519 this.containerForm.append( divAll ); 516 this.containerForm.append( this.divE rreurs);520 this.containerForm.append( this.divE ); 517 521 //this.tabInput = new Array(3); 518 522 … … 653 657 validFields: function() 654 658 { 655 var testOk = isSup( this.selectObservatories.getValue(), 0 ); 656 if( !testOk ) 659 for( var i = 1; i <= this.nbRequest; i++ ) 657 660 { 658 this.containerErrors.html( tapasTexts["label.observatory"] + " : " + tapasTexts["text.toselect"] ); 659 this.containerErrors.show(); 660 return false; 661 662 var chaine = tapasTexts["text.erreur.saisie"] + " " + i + "<br>"; 663 var testOk = isSup( this.selectObservatoriesList[i].getValue(), 0 ); 664 if( !testOk ) 665 { 666 this.divE.html( chaine + tapasTexts["label.observatory"] + " : " + tapasTexts["text.toselect"] ); 667 this.divE.show(); 668 return false; 669 } 670 671 testOk = isDiff( this.selectSpectralUnitsList[i].getValue(), -1 ); 672 if( !testOk ) 673 { 674 this.divE.html( chaine + tapasTexts["label.spectralUnit"] + " : " + tapasTexts["text.toselect"] ); 675 this.divE.show(); 676 return false; 677 } 678 679 testOk = isValidRange( $( "#iminspectral_ranger_" + i ).val(), $( "#imaxspectral_ranger_" + i ).val(), this.selectSpectralUnitsList[i].getValue() ); 680 if( !testOk ) 681 { 682 this.divE.html( chaine + tapasTexts["label.spectralRange"] + " : " + tapasTexts["text.badvalue"] ); 683 this.divE.show(); 684 return false; 685 } 686 687 testOk = isDeg( $( "#ide_" + i ).val() ); 688 if( !testOk ) 689 { 690 this.divE.html( chaine + tapasTexts["label.ide"] + " : " + tapasTexts["text.badvalue"] ); 691 this.divE.show(); 692 return false; 693 } 694 695 testOk = isValidNum( $( "#iza_" + i ).val() ); 696 if( !testOk ) 697 { 698 this.divE.html( chaine + tapasTexts["label.iza"] + " : " + tapasTexts["text.badvalue"] ); 699 this.divE.show(); 700 return false; 701 } 702 703 testOk = isBetween( $( "#iza_" + i ).val(), 0, 90 ); 704 if( !testOk ) 705 { 706 this.divE.html( chaine + tapasTexts["label.iza"] + " : " + tapasTexts["text.badvalue"] ); 707 this.divE.show(); 708 return false; 709 } 710 711 testOk = isValidNum( $( "#irp_" + i ).val() ); 712 if( !testOk ) 713 { 714 this.divE.html( chaine + tapasTexts["label.resolution"] + " : " + tapasTexts["text.badvalue"] ); 715 this.divE.show(); 716 return false; 717 } 718 719 testOk = isSup( $( "#irp_" + i ).val(), 1 ); 720 if( !testOk ) 721 { 722 this.divE.html( chaine + tapasTexts["label.resolution"] + " : " + tapasTexts["text.badvalue"] ); 723 this.divE.show(); 724 return false; 725 } 726 727 testOk = isValidNum( $( "#isr_" + i ).val() ); 728 if( !testOk ) 729 { 730 this.divE.html( chaine + tapasTexts["label.ratio"] + " : " + tapasTexts["text.badvalue"] ); 731 this.divE.show(); 732 return false; 733 } 734 735 testOk = isSup( $( "#isr_" + i ).val(), 1 ); 736 if( !testOk ) 737 { 738 this.divE.html( chaine + tapasTexts["label.ratio"] + " : " + tapasTexts["text.badvalue"] ); 739 this.divE.show(); 740 return false; 741 } 661 742 } 662 743 663 testOk = isDiff( this.selectSpectralUnits.getValue(), -1 ); 664 if( !testOk ) 665 { 666 this.containerErrors.html( tapasTexts["label.spectralUnit"] + " : " + tapasTexts["text.toselect"] ); 667 this.containerErrors.show(); 668 return false; 669 } 670 671 testOk = isValidRange( $( "#iminspectral_ranger" ).val(), $( "#imaxspectral_ranger" ).val(), this.selectSpectralUnits.getValue() ); 672 if( !testOk ) 673 { 674 this.containerErrors.html( tapasTexts["label.spectralRange"] + " : " + tapasTexts["text.badvalue"] ); 675 this.containerErrors.show(); 676 return false; 677 } 678 679 testOk = isDeg( $( "#ide" ).val() ); 680 if( !testOk ) 681 { 682 this.containerErrors.html( tapasTexts["label.ide"] + " : " + tapasTexts["text.badvalue"] ); 683 this.containerErrors.show(); 684 return false; 685 } 686 687 testOk = isValidNum( $( "#iza" ).val() ); 688 if( !testOk ) 689 { 690 this.containerErrors.html( tapasTexts["label.iza"] + " : " + tapasTexts["text.badvalue"] ); 691 this.containerErrors.show(); 692 return false; 693 } 694 695 testOk = isBetween( $( "#iza" ).val(), 0, 90 ); 696 if( !testOk ) 697 { 698 this.containerErrors.html( tapasTexts["label.iza"] + " : " + tapasTexts["text.badvalue"] ); 699 this.containerErrors.show(); 700 return false; 701 } 702 703 testOk = isValidNum( $( "#irp" ).val() ); 704 if( !testOk ) 705 { 706 this.containerErrors.html( tapasTexts["label.resolution"] + " : " + tapasTexts["text.badvalue"] ); 707 this.containerErrors.show(); 708 return false; 709 } 710 711 testOk = isSup( $( "#irp" ).val(), 1 ); 712 if( !testOk ) 713 { 714 this.containerErrors.html( tapasTexts["label.resolution"] + " : " + tapasTexts["text.badvalue"] ); 715 this.containerErrors.show(); 716 return false; 717 } 718 719 testOk = isValidNum( $( "#isr" ).val() ); 720 if( !testOk ) 721 { 722 this.containerErrors.html( tapasTexts["label.ratio"] + " : " + tapasTexts["text.badvalue"] ); 723 this.containerErrors.show(); 724 return false; 725 } 726 727 testOk = isSup( $( "#isr" ).val(), 1 ); 728 if( !testOk ) 729 { 730 this.containerErrors.html( tapasTexts["label.ratio"] + " : " + tapasTexts["text.badvalue"] ); 731 this.containerErrors.show(); 732 return false; 733 } 744 return true; 734 745 }, 735 746 … … 741 752 this.delRequestButton.disable(); 742 753 743 if( 9<= this.nbRequest )754 if( 10 <= this.nbRequest ) 744 755 this.addRequestButton.disable(); 745 756 else -
tapas/web/resources/css/mainEther.css
r481 r504 13 13 14 14 .pageWrapper { 15 width: 980px; /*text-align: left;*/15 width: 1047px; /*text-align: left;*/ 16 16 margin: auto; 17 17 margin-top: -15px; -
tapas/web/resources/css/tapas.css
r497 r504 19 19 20 20 float: right; 21 font-weight:bold; 22 //font-size:12px; 21 23 } 22 24 … … 56 58 margin-left: -10px; 57 59 padding-bottom: 30px; 60 width:650px; 58 61 } 59 62 … … 63 66 -webkit-border-radius: 8px; 64 67 border-radius: 8px; 65 padding-right: 40px;68 padding-right: 30px; 66 69 padding-bottom: 30px; 67 70 margin-right: 0px; 68 margin-left: -30px; 69 padding-left: 30px 70 } 71 margin-left: -65px; 72 padding-left: 20px 73 } 74 75 71 76 72 77 .containerForm { 73 78 74 79 float: left; 75 width: 10 00px;80 width: 1070px; 76 81 height: 400px; 77 82 … … 159 164 color: white; 160 165 font-weight: bold; 161 162 166 text-align: center; 163 167 } … … 169 173 -webkit-box-shadow: 2px 3px 7px rgba(0, 0, 0, 0.3); 170 174 box-shadow: 2px 3px 7px rgba(0, 0, 0, 0.3); 171 width: 980px;175 width: 1047px; 172 176 float: left; 173 177 margin-bottom: 10px; … … 227 231 .containerMenu { 228 232 float: right; 233 margin-left:171px; 229 234 } 230 235 … … 251 256 float: left; 252 257 position: relative; 253 width: 1 50px;258 width: 141px; 254 259 height: 26px; 255 260 color: white; … … 281 286 top: -32px; 282 287 padding: 10px; 283 width: 960px;288 width: 1028px; 284 289 } 285 290 … … 294 299 position: relative; 295 300 top: -32px; 296 width: 972px;301 width: 1040px; 297 302 } 298 303 … … 312 317 313 318 .errorsForm { 314 background: white; 315 -moz-border-radius: 4px 4px 4px 4px; 316 -webkit-border-radius: 4px 4px 4px 4px; 317 border: 1px solid #574176; 318 color: red; 319 padding: 10px; 320 margin-left: 640px; 321 margin-top: -131px; 319 320 -moz-border-radius: 8px; 321 -webkit-border-radius: 8px; 322 border: 2px solid #cc0000 ; 323 color: #cc0000; 324 //padding-right: 284px; 325 //padding-bottom:60px; 326 padding:10px; 327 margin-left: 776px; 328 //margin-right: 0px; 329 margin-top: -121px; 322 330 text-align: left; 323 331 font-weight: bold; 324 332 float: left; 325 min-height: 50px; 326 min-width: 260px; 327 } 333 background:white; 334 } 335 Spectral unit : must be selected 336 Observatory : must be selected 337 338 .cfs3 { 339 /* border: 2px solid red; 340 -moz-border-radius: 8px; 341 -webkit-border-radius: 8px; 342 border-radius: 8px; 343 padding-right: 40px; 344 padding-bottom: 30px; 345 margin-right: 0px; 346 margin-left: 30px; 347 padding-left: 30px ; 348 background: white;*/ 349 } 350 351 /*.errorsForm { 352 -moz-border-radius: 8px 8px 8px 8px; 353 border: 2px solid white; 354 //margin-left: 648px; 355 margin-right: 1500; 356 padding-bottom: 30px; 357 //padding-left: 30px; 358 //padding-right: 40px; 359 360 } */ 328 361 329 362 .containerErrors { -
tapas/web/resources/js/tools/controls.js
r497 r504 91 91 function isValidRange( val1, val2, unit ) 92 92 { 93 /*alert("val1 : "+val1); 94 alert("val2 : "+val2); 95 alert("unit : "+unit);*/ 96 93 97 if( 'NM_VACUUM' == unit || 'NM_STANDARD' == unit ) 94 98 { 95 99 if( isFloat( val1 ) && isFloat( val2 ) && 350 <= parseFloat( val1 ) && 2500 >= parseFloat( val2 ) && parseFloat( val1 ) <= parseFloat( val2 ) ) return true; 96 else 97 return false; 100 else return false; 98 101 } 102 else return 'Unit unknown'; 103 99 104 } -
tapas/web/resources/templates/templateEther_script.jsp
r490 r504 71 71 onClickLanguage: function() 72 72 { 73 this.requestChangeLocale(); 73 if (confirm("This action will cancel all your selection.")) 74 this.requestChangeLocale(); 74 75 }, 75 76 -
tapas/web/src/com/ether/Controller.java
r496 r504 11 11 import org.apache.commons.logging.Log; 12 12 import org.apache.commons.logging.LogFactory; 13 import org.jetbrains.annotations.NotNull; 13 14 14 15 import java.io.FileInputStream; … … 36 37 * @throws WebException 37 38 */ 38 @ControllerMethod(view = VIEW_FORM_TAPAS, loginMandatory = false, defaultView = VIEW_INDEX)39 @ControllerMethod(view = VIEW_FORM_TAPAS, loginMandatory = true, defaultView = VIEW_INDEX) 39 40 public JSONObject viewForm() 40 41 throws WebException … … 72 73 * @throws WebException 73 74 */ 74 //@ControllerMethod(jsonResult = true, userMandatory = true, defaultView = VIEW_INDEX)75 @ControllerMethod(jsonResult = true, userMandatory = false, defaultView = VIEW_INDEX)76 //public JSONObject createUserRequest( @ParamName("jsonTapas") @Mandatory @UseJSON final Tapas javaTapas, @NotNull final User user )77 public JSONObject createUserRequest( @ParamName("jsonTapas") @Mandatory @UseJSON final Tapas javaTapas )75 @ControllerMethod(jsonResult = true, userMandatory = true, defaultView = VIEW_INDEX) 76 //@ControllerMethod(jsonResult = true, userMandatory = false, defaultView = VIEW_INDEX) 77 public JSONObject createUserRequest( @ParamName("jsonTapas") @Mandatory @UseJSON final Tapas javaTapas, @NotNull final User user ) 78 //public JSONObject createUserRequest( @ParamName("jsonTapas") @Mandatory @UseJSON final Tapas javaTapas ) 78 79 throws WebException 79 80 { 80 81 81 82 /***********/ 82 final User user = new User();83 /* final User user = new User(); 83 84 user.setId( 12 ); 84 85 user.setLastName( "tamere" ); 85 86 user.setEmail( "rbopipsl@ipsl.jussieu.fr" ); 86 87 user.setCreationDate( new Date() ); 87 user.setPassword( "pif" ); 88 user.setPassword( "pif" );*/ 88 89 /******/ 89 90 … … 101 102 } 102 103 103 //TODO recuperer le USER via ControllerEther104 105 104 // creation fichier requete xml 106 105 try … … 126 125 try 127 126 { 128 getTapasService().execAppelQSub( "popo", user, prop );127 getTapasService().execAppelQSub( javaTapas.getId(), user, prop ); 129 128 } 130 129 catch( ServiceException e ) -
tapas/web/src/messages_en.properties
r490 r504 31 31 text.badvalue=bad value 32 32 text.toselect=must be selected 33 text.erreur.saisie=Error form request 33 34 34 label.delButton=CANCEL 35 35 36 36 37 … … 51 52 label.backoffice=Backoffice 52 53 label.form=Request form 54 label.confirm.del=Do you really want to remove this request ? 55 label.success=Your request was taken into account. You will receive by email the access result files. 53 56 54 57 label.role.administrator=Administrateur … … 58 61 59 62 label.submitButton=EXECUTE 60 label.addButton=ADD REQUEST 61 label.confirm=ARE YOU SURE YOU WANT TO SEND THIS REQUEST ? 63 label.addButton=+ 64 label.delButton=x 65 label.title.add=ADD A NEW REQUEST 66 label.title.del=REMOVE CURRENT REQUEST 67 label.confirm=SEND THE REQUEST PROCESSING ? 62 68 label.requete=Request 63 69 -
tapas/web/src/messages_fr.properties
r490 r504 26 26 label.observatory=Observatoire 27 27 label.preferences=Préférences 28 label.confirm.del=Voulez-vous vraiment supprimer cette requête ? 29 label.success=Votre requête a été prise en compte. Vous allez recevoir par email l'accés aux fichiers résultats. 28 30 29 label.delButton=ANNULER30 31 31 32 text.validnum=doit être numérique … … 34 35 text.NONE=Aucune 35 36 text.toselect=à sélectionner 37 text.erreur.saisie=Erreur saisie requête 36 38 37 39 … … 56 58 label.role.user=User 57 59 58 label.confirm= CONFIRMEZ-VOUS L'ENREGISTREMENT DE CETTE REQUETE ?60 label.confirm=ENVOYER LA DEMANDE ? 59 61 60 62 error.ERROR_JSON_TAPAS_IS_NULL=Erreur de création du formulaire Tapas 61 63 62 64 label.submitButton=EXECUTER 63 label.addButton=ENREGISTRER 65 label.addButton=+ 66 label.delButton=x 67 label.title.add=AJOUTER UNE NOUVELLE REQUETE 68 label.title.del=SUPPRIMER LA REQUETE COURANTE 64 69 label.requete=Requete 65 70
Note: See TracChangeset
for help on using the changeset viewer.