Changeset 528
- Timestamp:
- 06/22/12 15:29:46 (12 years ago)
- Location:
- ether_megapoli/trunk
- Files:
-
- 16 edited
- 3 copied
Legend:
- Unmodified
- Added
- Removed
-
ether_megapoli/trunk/common/implementation/com/ether/WebHelper.java
r520 r528 9 9 import javax.servlet.http.HttpServletRequest; 10 10 import javax.servlet.http.HttpServletResponse; 11 import java.io.File; 12 import java.io.FileInputStream; 11 13 import java.io.IOException; 12 14 import java.io.PrintWriter; 13 15 import java.security.InvalidParameterException; 14 16 import java.util.Locale; 17 import java.util.Properties; 15 18 import java.util.ResourceBundle; 16 19 … … 19 22 private WebHelper() 20 23 { 24 } 25 26 /** 27 * Returns the property writed in a properties file 28 * 29 * @param pathFile 30 * @param fileName 31 * @param property @return 32 * @throws IOException 33 */ 34 public static String getProperty( @NotNull final String pathFile, final String fileName, @NotNull final String property ) 35 throws IOException 36 { 37 final Properties prop = new Properties(); 38 prop.load( new FileInputStream( pathFile + File.separatorChar + fileName ) ); 39 return prop.getProperty( property ); 21 40 } 22 41 -
ether_megapoli/trunk/service/implementation/com/medias/integration/principal/Principal.java
r520 r528 33 33 import com.medias.integration.vues.ValeurModele; 34 34 import com.medias.utils.hibernate.CommunicationBD; 35 import org.hibernate.exception.GenericJDBCException; 35 36 import org.jetbrains.annotations.NotNull; 36 37 … … 51 52 */ 52 53 54 /** 55 * @Deprecated No more use. Because of connection problem. 56 */ 53 57 public class Principal 54 58 { … … 317 321 catch( Exception e ) 318 322 { 319 throw new ServiceException( ServiceException.ServiceCode.ERROR_INSERT_PRINCIPAL, e ); 323 String messageException = e.getCause().getLocalizedMessage(); 324 try 325 { 326 messageException = ( (GenericJDBCException) e ).getSQLException().getLocalizedMessage() + "<BR/>" + ( (GenericJDBCException) e ).getSQL(); 327 } 328 catch( Exception ee ) 329 { 330 throw new ServiceException( ServiceException.ServiceCode.ERROR_INSERT_PRINCIPAL, messageException, ServiceException.getExceptionThrowable() ); 331 } 332 333 throw new ServiceException( ServiceException.ServiceCode.ERROR_INSERT_PRINCIPAL, messageException, ServiceException.getExceptionThrowable() ); 320 334 } 321 335 } -
ether_megapoli/trunk/service/interface/com/ether/ServiceException.java
r520 r528 30 30 } 31 31 32 public ServiceException( final Enum<? extends Code> code, final String message, final Throwable exceptionThrowable ) 33 { 34 super( code, message, exceptionThrowable ); 35 } 36 32 37 public static enum ServiceCode 33 38 implements Code -
ether_megapoli/trunk/web/WEB-INF/megapoli.properties
r522 r528 1 1 #les path d'acces aux données 2 data.upload.root=/home /www/megapoli_data/data/upload3 data.access.root=/home /www/megapoli_data/data/download4 data.upload.desc=/home /www/megapoli_data/data/xml/uploadHierarchie.xml5 data.access.desc=/home /www/megapoli_data/data/xml/accessHierarchie.xml6 annuaire=/ usr/local/megapoli/annuaire.xml2 data.upload.root=/home_local/PROJETS/MEGAPOLI/megapoli/data/upload 3 data.access.root=/home_local/PROJETS/MEGAPOLI/megapoli/data/download 4 data.upload.desc=/home_local/PROJETS/MEGAPOLI/megapoli/data/xml/uploadHierarchie.xml 5 data.access.desc=/home_local/PROJETS/MEGAPOLI/megapoli/data/xml/accessHierarchie.xml 6 annuaire=/home_local/PROJETS/MEGAPOLI/megapoli/data/xml/annuaire.xml 7 7 8 8 #le path d'accÚs aux images 9 data.img=/home /www/megapoli_data/data/images9 data.img=/home_local/PROJETS/MEGAPOLI/megapoli/data/images 10 10 11 11 #le serveur mail 12 12 mail.host=mailhost.ipsl.jussieu.fr 13 mail.webmaster= megapoli-admin@ipsl.jussieu.fr14 mail.PI= Matthias.Beekmann@lisa.u-pec.fr15 url.upload=http:// vador.private.ipsl.fr:8080/megapoli/InitLogon.do16 url.extractcgi=http:// vador.private.ipsl.fr/cgi-bin/megapoli_extract.cgi13 mail.webmaster=vmipsl@ipsl.jussieu.fr 14 mail.PI=vanessa.maigne@ipsl.jussieu.fr 15 url.upload=http://localhost:8080/megapoli/InitLogon.do 16 url.extractcgi=http://localhost:8080/megapoli_data/cgi-bin/megapoli_extract.cgi 17 17 18 18 #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 23 23 data.upload.tree.view=/data/upload/arborescence.jsp 24 24 data.upload.files.view=/data/upload/files.jsp 25 data.access.tree.view=/data/access/arborescence.jsp26 data.access.files.view=/data/access/files.jsp25 #data.access.tree.view=/data/access/arborescence.jsp 26 #data.access.files.view=/data/access/files.jsp 27 27 28 28 #Fichiers de configuration "caches" : places dans le WEB-INF … … 33 33 34 34 # ParamÚtres pour l'insertion des jeux de données 35 data.output=/home/www/megapoli_data/data/output 36 data.upload=/home/www/megapoli_data/data/upload 37 data.metadata=/home/www/megapoli_data/data/metadata 38 data.model=/home/www/megapoli_data/data/models 39 data.download=/home/www/megapoli_data/data/download 35 data.output=/home_local/PROJETS/MEGAPOLI/megapoli/data/output 36 data.upload=/home_local/PROJETS/MEGAPOLI/megapoli/data/upload 37 data.metadata=/home_local/PROJETS/MEGAPOLI/megapoli/data/metadata 38 data.model=/home_local/PROJETS/MEGAPOLI/megapoli/data/models 39 data.download=/home_local/PROJETS/MEGAPOLI/megapoli/data/download 40 41 # ParamÚtres pour la simulation 42 directory.simulation=/home_local/Simulations -
ether_megapoli/trunk/web/WEB-INF/megapoli_prod.properties
r522 r528 33 33 34 34 # ParamÚtres pour l'insertion des jeux de données 35 data.output=/home/www/megapoli_data/data/output36 data.upload=/home/www/megapoli_data/data/upload37 data.metadata=/home/www/megapoli_data/data/metadata38 data.model=/home/www/megapoli_data/data/models39 data.download=/home/www/megapoli_data/data/download35 #data.output=/home/www/megapoli_data/data/output 36 #data.upload=/home/www/megapoli_data/data/upload 37 #data.metadata=/home/www/megapoli_data/data/metadata 38 #data.model=/home/www/megapoli_data/data/models 39 #data.download=/home/www/megapoli_data/data/download -
ether_megapoli/trunk/web/backoffice/dataInsertion-script.jsp
r521 r528 315 315 showErrors: function( result ) 316 316 { 317 this.loadingDataset.hide();318 this.loadingInsert.hide();319 this.loadingRemove.hide();320 317 var context = this[0] ? this[0] : this; 321 318 var text = this[1]; 319 context.loadingDataset.hide(); 320 context.loadingInsert.hide(); 321 context.loadingRemove.hide(); 322 322 context.containerErrors.show(); 323 323 if( text ) -
ether_megapoli/trunk/web/backoffice/dataInsertion.jsp
r520 r528 107 107 <bean:message key="bo.version"/> : <input id="versionInsert"> 108 108 109 <div style="float:right"> 110 <button id="insert" class="small positive"><bean:message key="bo.insert"/></button> 111 </div> 109 <bean:message key="bo.insert.text"/> 110 111 <%--<div style="float:right">--%> 112 <%--<button id="insert" class="small positive"><bean:message key="bo.insert"/></button>--%> 113 <%--</div>--%> 112 114 <BR/><BR/> 113 115 <div id="containerInsert"></div> -
ether_megapoli/trunk/web/backoffice/simulation-script.jsp
r521 r528 1 <%@ page import="com.medias.Context" %>2 1 <%@ page import="java.io.File" %> 3 2 <script type="text/javascript"> 4 3 var interfaceBODataInsertion = Class.create( { 5 4 6 initialize: function( datasetNumber, jSonDatasets )5 initialize: function( pathSimulationFiles ) 7 6 { 8 7 // Values 9 this.jSonDatasets = jSonDatasets || null; 10 this.dataset = false; 11 this.nbDatasets = datasetNumber || false; 12 this.downloadDirectory = '<%=Context.getProperty(request, "accessDir")%>'; 13 this.uploadDirectory = '<%=Context.getProperty(request, "uploadDir")%>'; 8 this.files = pathSimulationFiles || null; 14 9 15 10 // Containers 16 this.generalContainerDatasets = $( "#generalContainerDatasets" ); 17 this.containerDatasetsNumber = $( "#nbResults" ); 11 this.containerFileList_left = $( "#fileList_left" ); 12 this.containerFileList_right = $( "#fileList_right" ); 13 this.generalContainerSimulations = $( "#generalContainerSimulations" ); 14 // this.containerDatasetsNumber = $( "#nbResults" ); 18 15 this.containerErrors = $( "#errors" ); 19 this.containerDatasets = $( "#containerDataSets" );20 this.containerResultRemove = $( "#containerResultRemove" );21 this.containerMove = $( "#containerMove" );22 this.containerResultMove = $( "#containerResultMove" );23 this.containerInsert = $( "#containerInsert" );24 this.containerResultInsert = $( "#containerResultInsert" );25 26 this.containerSorts = $( "#containerSorts" );27 this.containerSortsDisplay = $( "#containerSorts_display" );28 this.containerPage = $( "#page" );29 this.containerMaxPage = $( "#maxPages" );16 // this.containerDatasets = $( "#containerDataSets" ); 17 // this.containerResultRemove = $( "#containerResultRemove" ); 18 // this.containerMove = $( "#containerMove" ); 19 // this.containerResultMove = $( "#containerResultMove" ); 20 // this.containerInsert = $( "#containerInsert" ); 21 // this.containerResultInsert = $( "#containerResultInsert" ); 22 // 23 // this.containerSorts = $( "#containerSorts" ); 24 // this.containerSortsDisplay = $( "#containerSorts_display" ); 25 // this.containerPage = $( "#page" ); 26 // this.containerMaxPage = $( "#maxPages" ); 30 27 31 28 /** *********** LOADING *********** **/ 32 // Create loading object for users29 // Create loading object for simulations 33 30 var param = new Object(); 34 31 param.id = "loadingForDataset"; 35 param.parent = this.generalContainer Datasets;32 param.parent = this.generalContainerSimulations; 36 33 this.loadingDataset = new Loading( param ); 37 34 this.loadingDataset.display(); 38 35 39 var param = new Object(); 40 param.id = "loadingForDatasetRemove"; 41 param.parent = this.generalContainerDatasets; 42 param.className = "loading-data"; 43 this.loadingRemove = new Loading( param ); 44 45 var param = new Object(); 46 param.id = "loadingForDatasetInsert"; 47 param.parent = this.containerInsert; 48 param.className = "loading-data"; 49 this.loadingInsert = new Loading( param ); 50 51 this.containerErrors.hide(); 52 this.displaySorts(); 53 this.managePagination(); 54 this.displayDatasets(); 36 this.containerErrors.hide(); 37 this.displayFiles(); 38 // this.displaySorts(); 39 // this.managePagination(); 40 // this.displayDatasets(); 55 41 56 42 // Bind buttons 57 $( "#insert" ).bind( 'click', this, jQuery.proxy( this.onClickInsert, this ) );58 $( "#cleanLocalisationAndFlagButton" ).bind( 'click', this, jQuery.proxy( this.onClickCleanLocalisationAndFlag, this ) );43 // $( "#insert" ).bind( 'click', this, jQuery.proxy( this.onClickInsert, this ) ); 44 // $( "#cleanLocalisationAndFlagButton" ).bind( 'click', this, jQuery.proxy( this.onClickCleanLocalisationAndFlag, this ) ); 59 45 }, 60 46 61 47 // REQUESTS ******************************************************** 62 requestRemoveDataset: function()63 {64 this.loadingRemove.display();65 if( this.dataset )66 $.ajax( {67 url: "backoffice?methodName=removeJeu&id=" + this.dataset.id,68 success:jQuery.proxy( this.handleRemoveDataset, this ),69 error: jQuery.proxy( this.showErrors, [this] )70 } );71 },72 73 48 requestSortDataset: function() 74 49 { … … 83 58 }, 84 59 85 requestFilesMove: function()86 {87 if( this.dataset )88 $.ajax( {89 url: "backoffice?methodName=moveJeu&name=" + this.dataset.name + "&category=" + this.dataset.categoryName,90 success:jQuery.proxy( this.handleFilesMove, this ),91 error: jQuery.proxy( this.showErrors, [this] )92 } );93 },94 95 requestDatasetInsert: function()96 {97 this.loadingInsert.display();98 if( "" != $( "#categoryNameInsert" ).val() && "" != $( "#datasetNameInsert" ).val() && "" != $( "#versionInsert" ).val() )99 $.ajax( {100 url: "backoffice?methodName=insertJeu&category=" + $( "#categoryNameInsert" ).val() + "&name=" + $( "#datasetNameInsert" ).val() + "&version=" + $( "#versionInsert" ).val() ,101 success:jQuery.proxy( this.handleDatasetInsert, this ),102 error: jQuery.proxy( this.showErrors, [this] )103 } );104 },105 106 requestCleanLocalisationAndFlag: function()107 {108 this.loadingRemove.display();109 $.ajax( {110 url: "backoffice?methodName=cleanLocalisationAndFlagTables",111 success:jQuery.proxy( this.handleCleanLocalisationAndFlag, this ),112 error: jQuery.proxy( this.showErrors, [this] )113 } );114 },115 60 116 61 // HANDLES ******************************************************** 117 handleRemoveDataset: function( result )118 {119 this.loadingRemove.hide();120 this.containerResultRemove.html( jQuery.parseJSON( result ).success + " " + this.dataset.categoryName + " / " + this.dataset.name + " _ id : " + this.dataset.id );121 this.containerResultRemove.removeClass( "disable" );122 this.containerResultRemove.show();123 this.requestSortDataset();124 },125 126 62 handleSortDataset: function( result ) 127 63 { … … 131 67 }, 132 68 133 handleFilesMove: function( result )134 {135 this.containerResultMove.html( jQuery.parseJSON( result ).success );136 this.containerResultMove.removeClass( "disable" );137 this.containerResultMove.show();138 },139 140 handleDatasetInsert: function( result )141 {142 this.loadingInsert.hide();143 this.containerResultInsert.html( jQuery.parseJSON( result ).success + " " + this.dataset.categoryName + " / " + this.dataset.name );144 this.containerResultInsert.show();145 this.requestSortDataset();146 },147 148 handleCleanLocalisationAndFlag: function( result )149 {150 this.loadingRemove.hide();151 this.containerResultRemove.html( jQuery.parseJSON( result ).success );152 this.containerResultRemove.show();153 this.requestSortDataset();154 },155 156 69 // DISPLAYS ******************************************************** 70 displayFiles: function() 71 { 72 var number = this.files.length; 73 jQuery.each( this.files, jQuery.proxy( function( i, file ) 74 { 75 if( (number / 2) > i ) 76 this.containerFileList_left.append( " - " + file + "<BR/>" ); 77 else 78 this.containerFileList_right.append( " - " + file + "<BR/>" ); 79 }, this ) ); 80 81 }, 82 157 83 displayTRForDataset: function( dataset ) 158 84 { … … 315 241 showErrors: function( result ) 316 242 { 317 this.loadingDataset.hide();318 this.loadingInsert.hide();319 this.loadingRemove.hide();320 243 var context = this[0] ? this[0] : this; 321 244 var text = this[1]; 245 context.loadingDataset.hide(); 246 context.loadingInsert.hide(); 247 context.loadingRemove.hide(); 322 248 context.containerErrors.show(); 323 249 if( text ) -
ether_megapoli/trunk/web/backoffice/simulation.jsp
r520 r528 1 <%@ page import="com.ether.WebException" %>2 1 <%@ page language="java" contentType="text/html; charset=UTF-8" %> 3 2 <%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %> … … 13 12 <tiles:put name="insertJsOrJsp" type="string"> 14 13 <ether:htmlJs jsFile="classesForJQuery/etherClasses"/> 15 <ether:htmlJsp jspFile=" dataInsertion-script"/>14 <ether:htmlJsp jspFile="simulation-script"/> 16 15 <ether:htmlJs jsFile="classesForJQuery/Loading"/> 17 16 <ether:htmlJs jsFile="classesForJQuery/Select"/> … … 20 19 21 20 22 <tiles:put name="title" type="string"><bean:message key="app.title"/> - <bean:message key="bo. data.insertion"/></tiles:put>21 <tiles:put name="title" type="string"><bean:message key="app.title"/> - <bean:message key="bo.simulation"/></tiles:put> 23 22 24 23 25 24 <%-- ****************** CONTENT ****************** --%> 26 <tiles:put name="bodytitle" type="string"><bean:message key="bo. data.insertion"/></tiles:put>25 <tiles:put name="bodytitle" type="string"><bean:message key="bo.simulation"/></tiles:put> 27 26 28 27 <tiles:put name="body" type="string"> 29 <%-- ****************** DATASETS REMOVE****************** --%>30 <div class=" title2">1st <bean:message key="bo.step"/>. <bean:message key="bo.dataset.remove"/> :</div>31 <BR/>28 <%-- ******************* LIST OF FILES ******************* --%> 29 <div class="containerBackofficeSimulation"> 30 <div class="title2"><bean:message key="bo.simulation.directory"/> :</div> 32 31 33 <%-- ****************** SORTS ****************** --%> 34 <div class="containerSortsAndSearch"> 35 <div class="containerSorts"> 36 <div style="float:left"><bean:message key="bo.sort.asc"/> : </div> 37 <div id="containerSorts" style="float:left"></div> 32 <bean:message key="bo.simulation.path"/> : ${pathSimulation}<BR/> 33 <bean:message key="bo.simulation.file.list"/> :<BR/> 34 35 <div id="fileList_left" style="float:left"></div> 36 <div id="fileList_right" style="float:right"></div> 37 </div> 38 39 <div class="containerBackofficeSimulation"> 40 <HR width="50%"> 41 <%-- ******************** SIMULATIONS ******************** --%> 42 <div class="title2"><bean:message key="bo.simulation.database"/> :</div> 43 <BR/> 44 45 <%-- ****************** SORTS ****************** --%> 46 <div class="containerSortsAndSearch"> 47 <div class="containerSorts"> 48 <div style="float:left"><bean:message key="bo.sort.asc"/> : </div> 49 <div id="containerSorts" style="float:left"></div> 50 </div> 51 52 <div class="containerSorts"> 53 <div style="float:left"><bean:message key="bo.searchBy"/> : </div> 54 <div id="containerSearch" style="float:left"><input type="text" id="search_text" size="20"></div> 55 </div> 56 57 <div class="containerSorts"> 58 <div style="float:left"><bean:message key="bo.viewBy"/> : </div> 59 <div id="containerSorts_display" style="float:left"></div> 60 </div> 61 62 <div class="containerSorts"> 63 <button id="sortButton" class="small positive" style="float:left"><bean:message key="bo.go"/></button> 64 </div> 65 66 </div> 67 <BR/> 68 69 <bean:message key="bo.simulation.list"/> 70 <div id="generalContainerSimulations"> 71 <table class="roundTable" border="1"> 72 <tr> 73 <th><bean:message key="bo.id"/></th> 74 <th><bean:message key="bo.category"/></th> 75 <th><bean:message key="bo.name"/></th> 76 <th><bean:message key="bo.user.creationDate"/></th> 77 <th><bean:message key="bo.action"/></th> 78 </tr> 79 <tbody id="containerDataSets"></tbody> 80 </table> 81 <BR/> 38 82 </div> 39 83 40 <div class="containerSorts"> 41 <div style="float:left"><bean:message key="bo.searchBy"/> : </div> 42 <div id="containerSearch" style="float:left"><input type="text" id="search_text" size="20"></div> 84 <div id="containerResultRemove" class="containerInfos"></div> 85 86 <div style="float:left"><bean:message key="bo.total.number"/> : 87 <div id="nbResults" style="float:right"></div> 43 88 </div> 44 89 45 <div class="containerSorts">46 <div style="float:left"><bean:message key="bo.viewBy"/> : </div>47 < div id="containerSorts_display" style="float:left"></div>90 <%-- ****************** PAGINATION ****************** --%> 91 <div style="float:right"> 92 <button id="next" class="small"><bean:message key="bo.next"/></button> 48 93 </div> 49 50 <div class="containerSorts"> 51 <button id="sortButton" class="small positive" style="float:left"><bean:message key="bo.go"/></button> 52 </div> 53 54 <div> 55 <button id="cleanLocalisationAndFlagButton" class="small negative" style="float:right"><bean:message key="bo.cleanTables"/></button> 94 <div style="float:right"><span id="page">1</span>/<span id="maxPages">0</span> </div> 95 <div style="float:right"> 96 <button id="previous" class="small"><bean:message key="bo.previous"/></button> 56 97 </div> 57 98 58 99 </div> 59 100 <BR/> 60 61 <bean:message key="bo.dataset.list"/> 62 <div id="generalContainerDatasets"> 63 <table class="roundTable" border="1"> 64 <tr> 65 <th><bean:message key="bo.id"/></th> 66 <th><bean:message key="bo.category"/></th> 67 <th><bean:message key="bo.name"/></th> 68 <th><bean:message key="bo.user.creationDate"/></th> 69 <th><bean:message key="bo.action"/></th> 70 </tr> 71 <tbody id="containerDataSets"></tbody> 72 </table> 73 <BR/> 74 </div> 75 76 <div id="containerResultRemove" class="containerInfos"></div> 77 78 <div style="float:left"><bean:message key="bo.total.number"/> : 79 <div id="nbResults" style="float:right"></div> 80 </div> 81 82 <%-- ****************** PAGINATION ****************** --%> 83 <div style="float:right"> 84 <button id="next" class="small"><bean:message key="bo.next"/></button> 85 </div> 86 <div style="float:right"><span id="page">1</span>/<span id="maxPages">0</span> </div> 87 <div style="float:right"> 88 <button id="previous" class="small"><bean:message key="bo.previous"/></button> 89 </div> 90 91 <BR/> 92 <HR width="50%"> 101 <%--<HR width="50%">--%> 93 102 <%-- ****************** FILES MOVE ****************** --%> 94 <div class="title2">2nd <bean:message key="bo.step"/>. <bean:message key="bo.file.move"/> :</div>95 <BR/>96 97 <div id="containerMove"></div>98 <div id="containerResultMove" class="containerInfos"></div>99 <BR/>100 <HR width="50%">101 102 <%-- ****************** DATASETS INSERTION ****************** --%>103 <div class="title2">3rd <bean:message key="bo.step"/>.<bean:message key="bo.dataset.insert"/> :</div>104 <BR/>105 <bean:message key="bo.category"/> : <input id="categoryNameInsert"> 106 <bean:message key="bo.name"/> : <input id="datasetNameInsert"> 107 <bean:message key="bo.version"/> : <input id="versionInsert">108 109 <div style="float:right">110 <button id="insert" class="small positive"><bean:message key="bo.insert"/></button>111 </div>112 <BR/><BR/>113 <div id="containerInsert"></div>114 <div id="containerResultInsert" class="containerInfos"></div>115 <BR/>116 103 117 104 <div id="errors"></div> … … 119 106 <script type="text/javascript"> 120 107 var interfaceTexts = $A( "" ); 121 interfaceTexts["bo.noDataset"] = '<bean:message key="bo.noDataset"/>';122 interfaceTexts["bo.remove"] = '<bean:message key="bo.remove"/>';123 interfaceTexts["bo.dataset.remove.confirm"] = '<bean:message key="bo.dataset.remove.confirm"/>';124 interfaceTexts["bo.id"] = '<bean:message key="bo.id"/>';125 interfaceTexts["bo.category"] = '<bean:message key="bo.category"/>';126 interfaceTexts["bo.name"] = '<bean:message key="bo.name"/>';127 interfaceTexts["bo.user.creationDate"] = '<bean:message key="bo.user.creationDate"/>';128 interfaceTexts["bo.all"] = '<bean:message key="bo.all"/>';129 interfaceTexts["bo.go"] = '<bean:message key="bo.go"/>';130 interfaceTexts["bo.move"] = '<bean:message key="bo.move"/>';131 interfaceTexts["bo.dataset.fields"] = '<bean:message key="bo.dataset.fields"/>';132 interfaceTexts["bo.cleanTables.confirm"] = '<bean:message key="bo.cleanTables.confirm"/>';133 108 134 interfaceTexts["<%=WebException.WebCode.DOWNLOAD_DIRECTORY_DOESNOT_EXISTS%>"] = "<bean:message key="bo.DOWNLOAD_DIRECTORY_DOESNOT_EXISTS"/>"; 135 136 new interfaceBODataInsertion( ${datasetNumber}, ${jSonDatasets} ); 109 new interfaceBODataInsertion( ${pathSimulationFiles} ); 137 110 </script> 138 111 -
ether_megapoli/trunk/web/resources/css/megapoli.css
r482 r528 238 238 #containerMobilePlateforms { 239 239 padding-bottom: 117px; 240 } 241 242 .containerBackofficeSimulation { 243 float: left; 244 width: 950px; 245 margin-bottom: 10px; 240 246 } 241 247 -
ether_megapoli/trunk/web/resources/templates/templateBackoffice.jsp
r473 r528 106 106 templateTexts["bo.mco"] = '<bean:message key="bo.mco"/>'; 107 107 templateTexts["bo.data.insertion"] = '<bean:message key="bo.data.insertion"/>'; 108 templateTexts["bo.simulation"] = '<bean:message key="bo.simulation"/>'; 108 109 109 110 // Needed texts if you use the library LoginButton.js -
ether_megapoli/trunk/web/resources/templates/templateBackoffice_script.jsp
r473 r528 54 54 createMenu: function() 55 55 { 56 var usersButton = new Button( {value:templateTexts["bo.user"], parent:this.containerMenu, id:"button_home", className: "gray_button", classNameText:"blue_button_text", onClick:this.onClickUser} ); 57 var mcoButton = new Button( {value:templateTexts["bo.mco"], parent:this.containerMenu, id:"button_home", className: "gray_button", classNameText:"blue_button_text", onClick:this.onClickMco} ); 58 var insertionDataButton = new Button( {value:templateTexts["bo.data.insertion"], parent:this.containerMenu, id:"button_home", className: "gray_button", classNameText:"blue_button_text", onClick:this.onClickDataInsertion} ); 56 var usersButton = new Button( {value:templateTexts["bo.user"], parent:this.containerMenu, className: "gray_button", classNameText:"blue_button_text", onClick:this.onClickUser} ); 57 var mcoButton = new Button( {value:templateTexts["bo.mco"], parent:this.containerMenu, className: "gray_button", classNameText:"blue_button_text", onClick:this.onClickMco} ); 58 var insertionDataButton = new Button( {value:templateTexts["bo.data.insertion"], parent:this.containerMenu, className: "gray_button", classNameText:"blue_button_text", onClick:this.onClickDataInsertion} ); 59 var simulationDataButton = new Button( {value:templateTexts["bo.simulation"], parent:this.containerMenu, className: "gray_button", classNameText:"blue_button_text", onClick:this.onClickSimulation} ); 59 60 }, 60 61 … … 85 86 }, 86 87 88 onClickSimulation: function() 89 { 90 document.location.href = "backoffice?methodName=viewSimulation"; 91 }, 92 87 93 /** 88 94 * This method display a small Ether logo if the screen is too small to contain the big one -
ether_megapoli/trunk/web/resources/templates/templateMegapoli.jsp
r366 r528 113 113 <ul> 114 114 <li><html:link page="/visualization?methodName=viewParametersByPlateform"><span><bean:message key="visualization"/></span></html:link></li> 115 <li><html:link page="/visualization?methodName=view InWork"><span><bean:message key="simulation.visualization"/></span></html:link></li>115 <li><html:link page="/visualization?methodName=viewSimulation"><span><bean:message key="simulation.visualization"/></span></html:link></li> 116 116 </ul> 117 117 </div> -
ether_megapoli/trunk/web/src/ApplicationResources.properties
r430 r528 532 532 ################################################################ 533 533 simulation.visualization=Simulations 534 simulation.title=Visualisation des simulations 534 535 535 536 ################################################################ -
ether_megapoli/trunk/web/src/ApplicationResources_en.properties
r520 r528 533 533 ################################################################ 534 534 simulation.visualization=Simulations 535 simulation.title=Simulations visualisation 535 536 536 537 ################################################################ … … 648 649 649 650 bo.DOWNLOAD_DIRECTORY_DOESNOT_EXISTS=The download directory doesn't exists ! No move available 651 652 bo.insert.text=<ul><li>Modify the database connection in the file hibernate.properties (src/megapoli_insert/src).</li><li>Modify the file build.xml (src/megapoli_insert).</li><li>Launch the command ant exec (src/megapoli_insert).</li></ul> 653 654 bo.simulation=Simulation 655 bo.simulation.directory=Simulations in directory 656 bo.simulation.path=Simulations files path 657 bo.simulation.file.list=List of simulations files 658 bo.simulation.database=Simulations in database 659 bo.simulation.list=List of simulations -
ether_megapoli/trunk/web/src/com/ether/ControllerBackoffice.java
r520 r528 12 12 import com.ether.user.UserState; 13 13 import com.medias.database.objects.Jeu; 14 import com.medias.integration.principal.Principal;15 14 import com.medias.mail.Mail; 16 15 import com.medias.mail.MailFactory; … … 30 29 import java.util.List; 31 30 import java.util.Map; 32 import java.util.Properties;33 31 34 32 /** … … 80 78 { 81 79 return sortJeu( "jeuId", null, 5, 1 ); 80 } 81 82 @ControllerMethod(view = VIEW_BO_SIMULATION, backofficeMethod = true, defaultView = VIEW_BO_INDEX) 83 public JSONObject viewSimulation() 84 throws WebException 85 { 86 final JSONObject jsonObject = new JSONObject(); 87 final String pathSimulation = getProperty( "directory.simulation" ); 88 final File directory = new File( pathSimulation ); 89 jsonObject.put( "pathSimulation", pathSimulation ); 90 jsonObject.put( "pathSimulationFiles", directory.list() ); 91 return jsonObject; 82 92 } 83 93 … … 533 543 } 534 544 535 @ControllerMethod(jsonResult = true)536 public JSONObject insertJeu( @NotNull @ParamName(ParameterConstants.PARAMETER_CATEGORY) final String categoryName,537 @NotNull @ParamName(ParameterConstants.PARAMETER_NAME) final String jeuName,538 @NotNull @ParamName(ParameterConstants.PARAMETER_VERSION) final String version )539 throws WebException540 {541 try542 {543 final Properties propertiesFile = getPropertiesFile();544 545 Principal.main( propertiesFile, categoryName, jeuName, version );546 547 final JSONObject result = new JSONObject();548 result.put( "success", "Dataset saved in database !" );549 return result;550 }551 catch( ServiceException e )552 {553 if( e.getCause() instanceof Throwable )554 throw new WebException( e.getLocalizedMessage(), WebException.getExceptionThrowable() );555 else556 throw new WebException( WebException.WebCode.ERROR_NO_JEU_FOUND, e );557 }558 }545 // @ControllerMethod(jsonResult = true) 546 // public JSONObject insertJeu( @NotNull @ParamName(ParameterConstants.PARAMETER_CATEGORY) final String categoryName, 547 // @NotNull @ParamName(ParameterConstants.PARAMETER_NAME) final String jeuName, 548 // @NotNull @ParamName(ParameterConstants.PARAMETER_VERSION) final String version ) 549 // throws WebException 550 // { 551 // try 552 // { 553 // final Properties propertiesFile = getPropertiesFile(); 554 // 555 // Principal.main( propertiesFile, categoryName, jeuName, version ); 556 // 557 // final JSONObject result = new JSONObject(); 558 // result.put( "success", "Dataset saved in database !" ); 559 // return result; 560 // } 561 // catch( ServiceException e ) 562 // { 563 // if( e.getCause() instanceof Throwable ) 564 // throw new WebException( e.getLocalizedMessage(), WebException.getExceptionThrowable() ); 565 // else 566 // throw new WebException( WebException.WebCode.ERROR_NO_JEU_FOUND, e ); 567 // } 568 // } 559 569 560 570 /** … … 693 703 private static final String VIEW_BO_MCO = "backoffice/mco"; 694 704 private static final String VIEW_BO_DATA_INSERTION = "backoffice/dataInsertion"; 705 private static final String VIEW_BO_SIMULATION = "backoffice/simulation"; 695 706 } -
ether_megapoli/trunk/web/src/com/ether/ControllerEther.java
r520 r528 59 59 prop.load( new FileInputStream( webInfPath + File.separatorChar + WebHelper.PROPERTIES_FILE ) ); 60 60 return prop; 61 } 62 catch( IOException e ) 63 { 64 throw new WebException( WebException.WebCode.ERROR_TO_READ_FILE_PROPERTIES, e ); 65 } 66 } 67 68 /** 69 * This method returns a property writed in the properties file 70 * 71 * @return 72 * @throws WebException 73 */ 74 public String getProperty( @NotNull final String property ) 75 throws WebException 76 { 77 try 78 { 79 final String webInfPath = getServletContext().getRealPath( "WEB-INF" ); 80 return WebHelper.getProperty( webInfPath, WebHelper.PROPERTIES_FILE, property ); 61 81 } 62 82 catch( IOException e ) -
ether_megapoli/trunk/web/src/com/ether/ControllerVisualization.java
r306 r528 82 82 } 83 83 84 @ControllerMethod(view = VIEW_SIMULATION) 85 public Map<String, Object> viewSimulation() 86 throws ServiceException 87 { 88 final Map<String, Object> model = new HashMap<String, Object>(); 89 return model; 90 } 91 84 92 /** *********************************************************** **/ 85 93 /** *********************** CALLS ***************************** **/ … … 254 262 private static final String VIEW_VISUALIZATION_PARAMETER_BY_PLATEFORM = "visualization/visu_parameter_by_pf"; 255 263 private static final String VIEW_DOWNLOAD_OK = "data/access/extract3"; 264 private static final String VIEW_SIMULATION = "visualization/visu_simulation"; 256 265 257 266 private static final String FORMAT_DEFAULT = "NASA-AMES"; -
ether_megapoli/trunk/web/visualization/visu_simulation.jsp
r423 r528 27 27 </tiles:put> 28 28 29 <tiles:put name="title" type="string"><bean:message key="app.title"/> - <bean:message key=" visualization.title"/></tiles:put>29 <tiles:put name="title" type="string"><bean:message key="app.title"/> - <bean:message key="simulation.title"/></tiles:put> 30 30 <tiles:put name="nav" type="string"> 31 31 <html:link page="/index.jsp"><bean:message key="app.home"/></html:link> > … … 36 36 37 37 <%--****************** CONTENT ****************** --%> 38 <tiles:put name="bodytitle" type="string"><bean:message key=" visualization.title"/></tiles:put>38 <tiles:put name="bodytitle" type="string"><bean:message key="simulation.title"/></tiles:put> 39 39 40 40 <tiles:put name="body" type="string">
Note: See TracChangeset
for help on using the changeset viewer.