Author: tchemit Date: 2011-11-26 11:50:09 +0100 (Sat, 26 Nov 2011) New Revision: 132 Url: http://forge.codelutin.com/repositories/revision/echobase/132 Log: - usage of EchoBaseServiceSupport when possible - rename import package to importData (there will be a importacces package as well) - change voyage to mission in import data - remove log4j file (see the env directory) Added: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureMission.java trunk/echobase-ui/src/main/resources/config/struts-importData.xml trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureMission-validation.xml trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureFiles.jsp trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureMission.jsp trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/importProgress.jsp trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/importResult.jsp Removed: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureVoyage.java trunk/echobase-ui/src/main/resources/config/struts-import.xml trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureVoyage-validation.xml trunk/echobase-ui/src/main/resources/log4j.properties trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/configureFiles.jsp trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/configureVoyage.jsp trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/import.jsp trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/importProgress.jsp trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/importResult.jsp Modified: trunk/echobase-ui/src/main/env/dev/resources/log4j.properties trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/export/CreateEmbeddedApplication.java trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureFiles.java trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ImportMode.java trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchImport.java trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureFiles-validation.xml trunk/echobase-ui/src/main/resources/i18n/echobase-ui_fr_FR.properties trunk/echobase-ui/src/main/resources/struts.xml trunk/echobase-ui/src/main/webapp/WEB-INF/includes/header.jsp Modified: trunk/echobase-ui/src/main/env/dev/resources/log4j.properties =================================================================== --- trunk/echobase-ui/src/main/env/dev/resources/log4j.properties 2011-11-26 10:46:13 UTC (rev 131) +++ trunk/echobase-ui/src/main/env/dev/resources/log4j.properties 2011-11-26 10:50:09 UTC (rev 132) @@ -31,6 +31,5 @@ # package level log4j.logger.fr.ifremer.echobase=INFO -log4j.logger.fr.ifremer.echobase.services.ioc=WARN log4j.logger.org.nuiton=WARN log4j.logger.org.nuiton.topia.migration=INFO Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/export/CreateEmbeddedApplication.java =================================================================== --- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/export/CreateEmbeddedApplication.java 2011-11-26 10:46:13 UTC (rev 131) +++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/export/CreateEmbeddedApplication.java 2011-11-26 10:50:09 UTC (rev 132) @@ -25,7 +25,7 @@ import fr.ifremer.echobase.EchoBaseConfiguration; import fr.ifremer.echobase.entities.data.Voyage; -import fr.ifremer.echobase.services.VoyageService; +import fr.ifremer.echobase.services.EchoBaseServiceSupport; import fr.ifremer.echobase.ui.actions.EchoBaseActionSupport; import org.nuiton.util.Version; @@ -72,7 +72,8 @@ @Override public String execute() throws Exception { - VoyageService service = newService(VoyageService.class); + EchoBaseServiceSupport service = + newService(EchoBaseServiceSupport.class); List<Voyage> allVoyages = service.getEntities(Voyage.class); voyages = sortAndDecorate(allVoyages, null); Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureFiles.java =================================================================== --- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureFiles.java 2011-11-26 10:46:13 UTC (rev 131) +++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureFiles.java 2011-11-26 10:50:09 UTC (rev 132) @@ -25,9 +25,9 @@ import com.opensymphony.xwork2.Preparable; import fr.ifremer.echobase.InputFile; -import fr.ifremer.echobase.entities.data.Voyage; +import fr.ifremer.echobase.entities.references.Mission; +import fr.ifremer.echobase.services.EchoBaseServiceSupport; import fr.ifremer.echobase.services.ImportDataConfiguration; -import fr.ifremer.echobase.services.VoyageService; import fr.ifremer.echobase.ui.actions.EchoBaseActionSupport; import org.apache.commons.io.FileUtils; import org.apache.commons.logging.Log; @@ -54,10 +54,10 @@ protected ImportDataConfiguration model; /** Id of selected voyage used in import. */ - protected String voyageId; + protected String missionId; - public void setVoyageId(String voyageId) { - this.voyageId = voyageId; + public void setMissionId(String missionId) { + this.missionId = missionId; } public void setAcoustic(File file) { @@ -120,8 +120,8 @@ getModel().getTypeEchoSpeciesFile().setFileName(fileName); } - public String getVoyageId() { - return voyageId; + public String getMissionId() { + return missionId; } public ImportDataConfiguration getModel() { @@ -145,7 +145,9 @@ ImportDataConfiguration importModel = getModel(); File tempDirectory = FileUtils.getTempDirectory(); - File dataDirectory = new File(tempDirectory, "echobase-import" + System.currentTimeMillis()); + File dataDirectory = new File( + tempDirectory, + "echobase-import" + System.currentTimeMillis()); FileUtil.createDirectoryIfNecessary(dataDirectory); if (log.isInfoEnabled()) { log.info("Temporary directory to use : " + dataDirectory); @@ -163,13 +165,15 @@ @Override public void prepare() throws Exception { - VoyageService service = newService(VoyageService.class); + EchoBaseServiceSupport service = + newService(EchoBaseServiceSupport.class); - Voyage voyage = service.getEntityById(Voyage.class, voyageId); - getModel().setVoyage(voyage); + Mission mission = service.getEntityById(Mission.class, missionId); + getModel().setMission(mission); } - protected void copyFile(InputFile inputFile, File dataDirectory) throws IOException { + protected void copyFile(InputFile inputFile, + File dataDirectory) throws IOException { File source = inputFile.getFile(); if (source != null) { Copied: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureMission.java (from rev 127, trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureVoyage.java) =================================================================== --- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureMission.java (rev 0) +++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureMission.java 2011-11-26 10:50:09 UTC (rev 132) @@ -0,0 +1,125 @@ +/* + * #%L + * EchoBase :: UI + * + * $Id$ + * $HeadURL$ + * %% + * Copyright (C) 2011 Ifremer, Codelutin + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * #L% + */ +package fr.ifremer.echobase.ui.actions.importData; + +import com.google.common.collect.Maps; +import com.opensymphony.xwork2.interceptor.annotations.InputConfig; +import fr.ifremer.echobase.entities.references.Mission; +import fr.ifremer.echobase.entities.references.MissionImpl; +import fr.ifremer.echobase.services.EchoBaseServiceSupport; +import fr.ifremer.echobase.services.ImportDataService; +import fr.ifremer.echobase.ui.actions.EchoBaseActionSupport; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import java.util.List; +import java.util.Map; + +/** + * Configure the mission to use in the data import. + * + * @author tchemit <chemit@codelutin.com> + * @since 0.2 + */ +public class ConfigureMission extends EchoBaseActionSupport { + + private static final long serialVersionUID = 1L; + + /** Logger. */ + private static final Log log = LogFactory.getLog(ConfigureMission.class); + + /** Universe of existing missions. */ + protected Map<String, String> missions; + + /** Universe of possible import modes. */ + protected Map<String, String> importModes; + + /** Selected import mode. */ + protected ImportMode importMode; + + /** mission to use. */ + protected Mission mission; + + public Mission getMission() { + if (mission == null) { + mission = new MissionImpl(); + } + return mission; + } + + public Map<String, String> getImportModes() { + return importModes; + } + + public Map<String, String> getMissions() { + return missions; + } + + public ImportMode getImportMode() { + return importMode; + } + + public void setImportMode(ImportMode importMode) { + this.importMode = importMode; + } + + @Override + public String input() throws Exception { + importModes = Maps.newLinkedHashMap(); + for (ImportMode mode : ImportMode.values()) { + importModes.put(mode.name(), _(mode.getI18nKey())); + } + + if (importMode == null) { + importMode = ImportMode.USE_EXISTING_MISSION; + } + + EchoBaseServiceSupport service = + newService(EchoBaseServiceSupport.class); + + List<Mission> allMissions = service.getEntities(Mission.class); + missions = sortAndDecorate(allMissions, null); + + if (log.isInfoEnabled()) { + log.info("File errors : " + getFieldErrors()); + } + return INPUT; + } + + @InputConfig(methodName = "input") + @Override + public String execute() throws Exception { + + if (importMode == ImportMode.CREATE_NEW_MISSION) { + + // create voyage in db + ImportDataService service = newService(ImportDataService.class); + Mission missionToCreate = getMission(); + + mission = service.createMission(missionToCreate); + } + return SUCCESS; + } + +} Property changes on: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureMission.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Deleted: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureVoyage.java =================================================================== --- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureVoyage.java 2011-11-26 10:46:13 UTC (rev 131) +++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ConfigureVoyage.java 2011-11-26 10:50:09 UTC (rev 132) @@ -1,170 +0,0 @@ -/* - * #%L - * EchoBase :: UI - * - * $Id$ - * $HeadURL$ - * %% - * Copyright (C) 2011 Ifremer, Codelutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - * #L% - */ -package fr.ifremer.echobase.ui.actions.importData; - -import com.google.common.collect.Maps; -import com.opensymphony.xwork2.interceptor.annotations.InputConfig; -import fr.ifremer.echobase.entities.data.Voyage; -import fr.ifremer.echobase.entities.data.VoyageImpl; -import fr.ifremer.echobase.entities.references.AreaOfOperation; -import fr.ifremer.echobase.entities.references.Mission; -import fr.ifremer.echobase.services.VoyageService; -import fr.ifremer.echobase.ui.actions.EchoBaseActionSupport; -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import java.util.List; -import java.util.Map; - -/** - * Configure the step 1 of import data (says which campagne to use). - * - * @author tchemit <chemit@codelutin.com> - * @since 0.2 - */ -public class ConfigureVoyage extends EchoBaseActionSupport { - - private static final long serialVersionUID = 1L; - - /** Logger. */ - private static final Log log = LogFactory.getLog(ConfigureVoyage.class); - - /** Universe of existing voyages. */ - protected Map<String, String> voyages; - - /** Universe of existing missions. */ - protected Map<String, String> missions; - - /** Universe of existing areaOfOperations. */ - protected Map<String, String> areaOfOperations; - - /** Universe of possible import modes. */ - protected Map<String, String> importModes; - - /** Selected import mode. */ - protected ImportMode importMode; - - /** Voyage to use. */ - protected Voyage voyage; - - /** Mission selected id. */ - protected String missionId; - - /** Area of operation selected id. */ - protected String areaOfOperationId; - - public Voyage getVoyage() { - if (voyage == null) { - voyage = new VoyageImpl(); - } - return voyage; - } - - public Map<String, String> getImportModes() { - return importModes; - } - - public Map<String, String> getVoyages() { - return voyages; - } - - public Map<String, String> getMissions() { - return missions; - } - - public Map<String, String> getAreaOfOperations() { - return areaOfOperations; - } - - public ImportMode getImportMode() { - return importMode; - } - - public void setMissionId(String missionId) { - this.missionId = missionId; - } - - public void setAreaOfOperationId(String areaOfOperationId) { - this.areaOfOperationId = areaOfOperationId; - } - - public void setImportMode(ImportMode importMode) { - this.importMode = importMode; - } - - @Override - public String input() throws Exception { - importModes = Maps.newLinkedHashMap(); - for (ImportMode mode : ImportMode.values()) { - importModes.put(mode.name(), _(mode.getI18nKey())); - } - - if (importMode == null) { - importMode = ImportMode.USE_EXISTING_VOYAGE; - } - - VoyageService service = newService(VoyageService.class); - List<Voyage> allVoyages = service.getEntities(Voyage.class); - voyages = sortAndDecorate(allVoyages, null); - - List<Mission> allMissions = service.getEntities(Mission.class); - missions = sortAndDecorate(allMissions, null); - - List<AreaOfOperation> allAreaOfOperations = - service.getEntities(AreaOfOperation.class); - areaOfOperations = sortAndDecorate(allAreaOfOperations, null); - if (log.isInfoEnabled()) { - log.info("File errors : "+getFieldErrors()); - } - return INPUT; - } - - @InputConfig(methodName = "input") - @Override - public String execute() throws Exception { - - if (importMode == ImportMode.CREATE_NEW_VOYAGE) { - - // create voyage in db - VoyageService service = newService(VoyageService.class); - Voyage voyageToCreate = getVoyage(); - //TODO Remove this test when references will be ok - if (StringUtils.isNotEmpty(missionId)) { - Mission mission = - service.getEntityById(Mission.class, missionId); - voyage.setMission(mission); - } - //TODO Remove this test when references will be ok - if (StringUtils.isNotEmpty(areaOfOperationId)) { - AreaOfOperation area = service.getEntityById(AreaOfOperation.class, - areaOfOperationId); - voyage.setAreaOfOperation(area); - } - voyage = service.createVoyage(voyageToCreate); - } - return SUCCESS; - } - -} Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ImportMode.java =================================================================== --- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ImportMode.java 2011-11-26 10:46:13 UTC (rev 131) +++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ImportMode.java 2011-11-26 10:50:09 UTC (rev 132) @@ -33,8 +33,8 @@ */ public enum ImportMode { - CREATE_NEW_VOYAGE(n_("echobase.common.importMode.createNewVoyage")), - USE_EXISTING_VOYAGE(n_("echobase.common.importMode.useExistingVoyage")); + CREATE_NEW_MISSION(n_("echobase.common.importMode.createNewMission")), + USE_EXISTING_MISSION(n_("echobase.common.importMode.useExistingMission")); private final String i18nKey; Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchImport.java =================================================================== --- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchImport.java 2011-11-26 10:46:13 UTC (rev 131) +++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/LaunchImport.java 2011-11-26 10:50:09 UTC (rev 132) @@ -66,7 +66,7 @@ public void prepare() throws Exception { model = getEchoBaseSession().getImportDataConfiguration(); - + service = newService(ImportDataService.class); } @@ -75,8 +75,8 @@ try { if (log.isInfoEnabled()) { - log.info("Start imports with voyage " + - model.getVoyage().getVoyageName()); + log.info("Start imports with mission " + + model.getMission().getMissionName()); } importResult = service.startImport(model); Deleted: trunk/echobase-ui/src/main/resources/config/struts-import.xml =================================================================== --- trunk/echobase-ui/src/main/resources/config/struts-import.xml 2011-11-26 10:46:13 UTC (rev 131) +++ trunk/echobase-ui/src/main/resources/config/struts-import.xml 2011-11-26 10:50:09 UTC (rev 132) @@ -1,72 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<!-- - #%L - EchoBase :: UI - - $Id$ - $HeadURL$ - %% - Copyright (C) 2011 Ifremer, Codelutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% - --> - - -<!DOCTYPE struts PUBLIC - "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" - "http://struts.apache.org/dtds/struts-2.1.7.dtd"> - -<struts> - - <package name="import" extends="loggued" namespace="/import"> - - <!-- Configure import voyage --> - <action name="configureVoyage" - class="fr.ifremer.echobase.ui.actions.importData.ConfigureVoyage"> - <interceptor-ref name="paramsPrepareParamsStackLoggued"/> - <result name="input">/WEB-INF/jsp/import/configureVoyage.jsp</result> - <result type="redirectAction"> - <param name="namespace">/import</param> - <param name="actionName">configureFiles</param> - <param name="method">input</param> - <param name="voyageId">${voyage.topiaId}</param> - </result> - </action> - - <!-- Configure import files --> - <action name="configureFiles" - class="fr.ifremer.echobase.ui.actions.importData.ConfigureFiles"> - <interceptor-ref name="paramsPrepareParamsStackLoggued"/> - <result name="input">/WEB-INF/jsp/import/configureFiles.jsp</result> - <result type="redirectAction"> - <param name="namespace">/import</param> - <param name="actionName">doImport</param> - </result> - </action> - - <!-- Starts import --> - <action name="doImport" - class="fr.ifremer.echobase.ui.actions.importData.LaunchImport" - method="execute"> - <interceptor-ref name="basicStackLoggued"/> - <interceptor-ref name="execAndWait"/> - <result name="wait">/WEB-INF/jsp/import/importProgress.jsp</result> - <result>/WEB-INF/jsp/import/importResult.jsp</result> - </action> - - </package> - -</struts> - Copied: trunk/echobase-ui/src/main/resources/config/struts-importData.xml (from rev 127, trunk/echobase-ui/src/main/resources/config/struts-import.xml) =================================================================== --- trunk/echobase-ui/src/main/resources/config/struts-importData.xml (rev 0) +++ trunk/echobase-ui/src/main/resources/config/struts-importData.xml 2011-11-26 10:50:09 UTC (rev 132) @@ -0,0 +1,72 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!-- + #%L + EchoBase :: UI + + $Id$ + $HeadURL$ + %% + Copyright (C) 2011 Ifremer, Codelutin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + #L% + --> + + +<!DOCTYPE struts PUBLIC + "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" + "http://struts.apache.org/dtds/struts-2.1.7.dtd"> + +<struts> + + <package name="import" extends="loggued" namespace="/importData"> + + <!-- Configure import mission --> + <action name="configureMission" + class="fr.ifremer.echobase.ui.actions.importData.ConfigureMission"> + <interceptor-ref name="paramsPrepareParamsStackLoggued"/> + <result name="input">/WEB-INF/jsp/importData/configureMission.jsp</result> + <result type="redirectAction"> + <param name="namespace">/importData</param> + <param name="actionName">configureFiles</param> + <param name="method">input</param> + <param name="missionId">${mission.topiaId}</param> + </result> + </action> + + <!-- Configure import files --> + <action name="configureFiles" + class="fr.ifremer.echobase.ui.actions.importData.ConfigureFiles"> + <interceptor-ref name="paramsPrepareParamsStackLoggued"/> + <result name="input">/WEB-INF/jsp/importData/configureFiles.jsp</result> + <result type="redirectAction"> + <param name="namespace">/importData</param> + <param name="actionName">doImport</param> + </result> + </action> + + <!-- Starts import --> + <action name="doImport" + class="fr.ifremer.echobase.ui.actions.importData.LaunchImport" + method="execute"> + <interceptor-ref name="basicStackLoggued"/> + <interceptor-ref name="execAndWait"/> + <result name="wait">/WEB-INF/jsp/importData/importProgress.jsp</result> + <result>/WEB-INF/jsp/importData/importResult.jsp</result> + </action> + + </package> + +</struts> + Property changes on: trunk/echobase-ui/src/main/resources/config/struts-importData.xml ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Modified: trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureFiles-validation.xml =================================================================== --- trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureFiles-validation.xml 2011-11-26 10:46:13 UTC (rev 131) +++ trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureFiles-validation.xml 2011-11-26 10:50:09 UTC (rev 132) @@ -26,7 +26,7 @@ "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd"> <validators> - <field name="voyageId"> + <field name="missionId"> <field-validator type="requiredstring"> <message key="echobase.error.import.voyage.required"/> </field-validator> Copied: trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureMission-validation.xml (from rev 127, trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureVoyage-validation.xml) =================================================================== --- trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureMission-validation.xml (rev 0) +++ trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureMission-validation.xml 2011-11-26 10:50:09 UTC (rev 132) @@ -0,0 +1,56 @@ +<!-- + #%L + EchoBase :: UI + + $Id $ + $HeadURL $ + %% + Copyright (C) 2011 Ifremer, Codelutin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + #L% + --> +<!DOCTYPE validators PUBLIC + "-//OpenSymphony Group//XWork Validator 1.0.2//EN" + "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd"> +<validators> + + <field name="importMode"> + <field-validator type="required"> + <message key="echobase.error.import.importMode.required"/> + </field-validator> + </field> + + <field name="mission.topiaId"> + <field-validator type="requiredstring"> + <param name="skip">importMode.name() != "USE_EXISTING_MISSION"</param> + <message key="echobase.error.import.mission.required"/> + </field-validator> + </field> + + <field name="mission.missionName"> + <field-validator type="requiredstring"> + <param name="skip">importMode.name() != "CREATE_NEW_MISSION"</param> + <message key="echobase.error.import.missionName.required"/> + </field-validator> + </field> + + <field name="mission.missionAbstract"> + <field-validator type="requiredstring"> + <param name="skip">importMode.name() != "CREATE_NEW_MISSION"</param> + <message key="echobase.error.import.missionAbstract.required"/> + </field-validator> + </field> + +</validators> \ No newline at end of file Property changes on: trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureMission-validation.xml ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Deleted: trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureVoyage-validation.xml =================================================================== --- trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureVoyage-validation.xml 2011-11-26 10:46:13 UTC (rev 131) +++ trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/importData/ConfigureVoyage-validation.xml 2011-11-26 10:50:09 UTC (rev 132) @@ -1,92 +0,0 @@ -<!-- - #%L - EchoBase :: UI - - $Id $ - $HeadURL $ - %% - Copyright (C) 2011 Ifremer, Codelutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% - --> -<!DOCTYPE validators PUBLIC - "-//OpenSymphony Group//XWork Validator 1.0.2//EN" - "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd"> -<validators> - - <field name="importMode"> - <field-validator type="required"> - <message key="echobase.error.import.importMode.required"/> - </field-validator> - </field> - - <field name="voyage.topiaId"> - <field-validator type="requiredstring"> - <param name="skip">importMode.name() != "USE_EXISTING_VOYAGE"</param> - <message key="echobase.error.import.voyage.required"/> - </field-validator> - </field> - - <field name="voyage.voyageName"> - <field-validator type="requiredstring"> - <param name="skip">importMode.name() != "CREATE_NEW_VOYAGE"</param> - <message key="echobase.error.import.voyageName.required"/> - </field-validator> - </field> - - <field name="voyage.datum"> - <field-validator type="requiredstring"> - <param name="skip">importMode.name() != "CREATE_NEW_VOYAGE"</param> - <message key="echobase.error.import.datum.required"/> - </field-validator> - </field> - - <field name="voyage.voyageDescription"> - <field-validator type="requiredstring"> - <param name="skip">importMode.name() != "CREATE_NEW_VOYAGE"</param> - <message key="echobase.error.import.voyageDescription.required"/> - </field-validator> - </field> - - <!-- TODO Reput this when references are in db --> - <!--field name="missionId"> - <field-validator type="requiredstring"> - <param name="skip">${importMode.name} != "CREATE_NEW_VOYAGE"</param> - <message key="echobase.error.import.missionId.required"/> - </field-validator> - </field--> - - <!--field name="areaOfOperationId"> - <field-validator type="requiredstring"> - <param name="skip">importMode.name() != "CREATE_NEW_VOYAGE"</param> - <message key="echobase.error.import.areaOfOperationId.required"/> - </field-validator> - </field--> - - <field name="voyage.voyageStartDate"> - <field-validator type="required"> - <param name="skip">importMode.name() != "CREATE_NEW_VOYAGE"</param> - <message key="echobase.error.import.voyageStartDate.required"/> - </field-validator> - </field> - - <field name="voyage.voyageEndDate"> - <field-validator type="required"> - <param name="skip">importMode.name() != "CREATE_NEW_VOYAGE"</param> - <message key="echobase.error.import.voyageEndDate.required"/> - </field-validator> - </field> - -</validators> \ No newline at end of file Modified: trunk/echobase-ui/src/main/resources/i18n/echobase-ui_fr_FR.properties =================================================================== --- trunk/echobase-ui/src/main/resources/i18n/echobase-ui_fr_FR.properties 2011-11-26 10:46:13 UTC (rev 131) +++ trunk/echobase-ui/src/main/resources/i18n/echobase-ui_fr_FR.properties 2011-11-26 10:50:09 UTC (rev 132) @@ -18,14 +18,14 @@ echobase.action.return=Retour echobase.action.save=Sauvegarder echobase.action.saveSqlQuery=Enregistrer la requête -echobase.action.validateImportVoyage=Valider la campagne +echobase.action.validateImportMission=Valider la mission echobase.common.admin=Administrateur echobase.common.comment=Commentaire echobase.common.email=Email echobase.common.entityType=Type d'entité -echobase.common.importMode=Type de campagne -echobase.common.importMode.createNewVoyage=Créer une nouvelle campagne -echobase.common.importMode.useExistingVoyage=Utiliser une campagne existante +echobase.common.importMode=Type de mission +echobase.common.importMode.createNewMission=Créer une nouvelle mission +echobase.common.importMode.useExistingMission=Utiliser une mission existante echobase.common.jdbcLogin=Login de connexion echobase.common.jdbcPassword=Mot de passe echobase.common.jdbcUrl=Url de connexion @@ -37,9 +37,12 @@ echobase.error.export.name.requiredstring=Le nom de l'export est obligatoire echobase.error.export.sqlQuery.requiredstring=La requête de l'export est obligatoire echobase.error.export.sqlQuery.wrongformat=La requêtes n'est pas valide -echobase.error.fileDontExist= -echobase.error.fileNotFound= -echobase.error.import.selectedVoyageOrAccessImport.required=Merci de selectionner un campagne +echobase.error.fileDontExist=Fichier inexistant +echobase.error.fileNotFound=Fichier non trouvé +echobase.error.import.importMode.required=Le mode d'import est obligatoire +echobase.error.import.mission.required=La sélection d'une mission est obligatoire +echobase.error.import.missionAbstract.required=Le résumé de la mission est obligatoire +echobase.error.import.missionName.required=Le nom de la mission est obligatoire echobase.error.importArgument= echobase.error.importFile.required=Fichier d'import obligatoire echobase.error.login.password.requiredstring=Le mot de passe est obligatoire @@ -83,8 +86,8 @@ echobase.legend.embeddedApplication.configuration=Configuration de l'application embarquée echobase.legend.import=Import configuration echobase.legend.import.configuration.files=Choix des fichiers d'import -echobase.legend.import.configuration.voyage=Configurer la campagne -echobase.legend.import.configuration.voyage.resume=Résumé de la campagne à utiliser +echobase.legend.import.configuration.mission=Configurer la mission +echobase.legend.import.configuration.mission.resume=Résumé de la mission à utiliser echobase.legend.importFileResult=Résultat de l'import %s echobase.legend.sqlQuery.configuration=Configuration de la requête echobase.legend.sqlQuery.result=Résultats de la requête Deleted: trunk/echobase-ui/src/main/resources/log4j.properties =================================================================== --- trunk/echobase-ui/src/main/resources/log4j.properties 2011-11-26 10:46:13 UTC (rev 131) +++ trunk/echobase-ui/src/main/resources/log4j.properties 2011-11-26 10:50:09 UTC (rev 132) @@ -1,35 +0,0 @@ -### -# #%L -# EchoBase :: UI -# -# $Id$ -# $HeadURL$ -# %% -# Copyright (C) 2011 Ifremer, Codelutin -# %% -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see <http://www.gnu.org/licenses/>. -# #L% -### -# Default to info level output; this is very handy if you eventually use Hibernate as well. -log4j.rootCategory=WARN, A1 - -# A1 is set to be a ConsoleAppender. -log4j.appender.A1=org.apache.log4j.ConsoleAppender - -# A1 uses PatternLayout. -log4j.appender.A1.layout=org.apache.log4j.PatternLayout -log4j.appender.A1.layout.ConversionPattern=%d %5p [%t] (%F:%L) %M - %m%n - -# Toute l'application -log4j.logger.fr.ifremer.echobase=INFO \ No newline at end of file Modified: trunk/echobase-ui/src/main/resources/struts.xml =================================================================== --- trunk/echobase-ui/src/main/resources/struts.xml 2011-11-26 10:46:13 UTC (rev 131) +++ trunk/echobase-ui/src/main/resources/struts.xml 2011-11-26 10:50:09 UTC (rev 132) @@ -131,7 +131,7 @@ <include file="config/struts-dbeditor.xml"/> <include file="config/struts-user.xml"/> - <include file="config/struts-import.xml"/> + <include file="config/struts-importData.xml"/> <include file="config/struts-export.xml"/> </struts> Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/includes/header.jsp =================================================================== --- trunk/echobase-ui/src/main/webapp/WEB-INF/includes/header.jsp 2011-11-26 10:46:13 UTC (rev 131) +++ trunk/echobase-ui/src/main/webapp/WEB-INF/includes/header.jsp 2011-11-26 10:50:09 UTC (rev 132) @@ -55,7 +55,7 @@ <div class="cleanBoth"> <ul> <li> - <s:a action="configureVoyage" namespace="/import" method="input"> + <s:a action="configureMission" namespace="/importData" method="input"> <s:text name="echobase.menu.import"/></s:a> </li> <li> Deleted: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/configureFiles.jsp =================================================================== --- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/configureFiles.jsp 2011-11-26 10:46:13 UTC (rev 131) +++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/configureFiles.jsp 2011-11-26 10:50:09 UTC (rev 132) @@ -1,71 +0,0 @@ -<%-- - #%L - EchoBase :: UI - - $Id$ - $HeadURL$ - %% - Copyright (C) 2011 Ifremer, Codelutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% - --%> -<%@page contentType="text/html" pageEncoding="UTF-8" %> -<%@ taglib prefix="s" uri="/struts-tags" %> - -<title><s:text name="echobase.title.import"/></title> - -<s:form namespace="/import" method="POST" enctype="multipart/form-data"> - - <fieldset> - <legend> - <s:text name="echobase.legend.import.configuration.voyage.resume"/> - </legend> - <s:label value="%{model.voyage.voyageName}" - key='echobase.common.voyageName'/> - - <s:label value="%{model.voyage.voyageDescription}" - key='echobase.common.voyageDescription'/> - </fieldset> - - <hr/> - <fieldset> - <legend> - <s:text name="echobase.legend.import.configuration.files"/> - </legend> - - <s:hidden key="voyageId" label=''/> - - <s:file name="acoustic" - key="echobase.label.import.accoustique"/> - - <s:file name="capture" - key="echobase.label.import.pecherie"/> - - <s:file name="lectureAgeGen" - key="echobase.label.import.lectureAgeGen"/> - - <s:file name="events" - key="echobase.label.import.events"/> - - <s:file name="typeEchoSpecies" - key="echobase.label.import.typeEchoSpecies"/> - - </fieldset> - <br/> - <s:submit id="addFilesSubmit" action="configureFiles" - value='%{getText("echobase.action.import")}'/> - - -</s:form> \ No newline at end of file Deleted: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/configureVoyage.jsp =================================================================== --- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/configureVoyage.jsp 2011-11-26 10:46:13 UTC (rev 131) +++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/configureVoyage.jsp 2011-11-26 10:50:09 UTC (rev 132) @@ -1,127 +0,0 @@ -<%-- - #%L - EchoBase :: UI - - $Id$ - $HeadURL$ - %% - Copyright (C) 2011 Ifremer, Codelutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% - --%> -<%@page contentType="text/html" pageEncoding="UTF-8" %> -<%@ taglib prefix="s" uri="/struts-tags" %> -<%@ taglib prefix="sj" uri="/struts-jquery-tags" %> - -<script type="text/javascript"> - - jQuery(document).ready(function () { - - var importMode = $('[name="importMode"]'); - importMode.change(function(event) { - $('[class="importMode"]').hide(); - $('#' + this.value).show(); - }); - var val = $('[name="importMode"][checked="checked"]').val(); - $('[class="importMode"]').hide(); - $("#"+val).show(); - }); -</script> -<title><s:text name="echobase.title.import.configuration"/></title> - -<s:form id="importForm" namespace="/import" method="POST"> - - <fieldset> - <legend> - <s:text name="echobase.legend.import.configuration.voyage"/> - </legend> - - <s:radio key='importMode' list="importModes" - label='%{getText("echobase.common.importMode")}' - required="true" /> - - <hr/> - - <div id='USE_EXISTING_VOYAGE' class='importMode'> - <s:select name="voyage.topiaId" value="''" - label='%{getText("echobase.common.voyage")}' - list="voyages" headerKey="" headerValue=""/> - </div> - - <div id='CREATE_NEW_VOYAGE' class='importMode'> - - <%-- - String PROPERTY_VOYAGE_NAME = "voyageName"; - - String PROPERTY_VOYAGE_START_DATE = "voyageStartDate"; - - String PROPERTY_VOYAGE_END_DATE = "voyageEndDate"; - - String PROPERTY_VOYAGE_START_HARBOUR = "voyageStartHarbour"; - - String PROPERTY_VOYAGE_END_HARBOUR = "voyageEndHarbour"; - - String PROPERTY_VOYAGE_DESCRIPTION = "voyageDescription"; - - String PROPERTY_DATUM = "datum"; - - String PROPERTY_MISSION = "mission"; - - String PROPERTY_AREA_OF_OPERATION = "areaOfOperation"; - - String PROPERTY_TRANSIT = "transit"; - - String PROPERTY_ECHOTYPE = "echotype"; - --%> - - <s:textfield key="voyage.voyageName" - label='%{getText("echobase.common.voyageName")}'/> - - <s:textfield key="voyage.voyageStartHarbour" - label='%{getText("echobase.common.voyageStartHarbour")}'/> - - <s:textfield key="voyage.voyageEndHarbour" - label='%{getText("echobase.common.voyageEndHarbour")}'/> - - <s:textfield key="voyage.datum" - label='%{getText("echobase.common.datum")}'/> - - <s:textarea key="voyage.voyageDescription" - label='%{getText("echobase.common.voyageDescription")}'/> - - <s:select name="missionId" value="''" - label='%{getText("echobase.common.mission")}' - list="missions" headerKey="" headerValue=""/> - - <s:select name="areaOfOperationId" value="''" - label='%{getText("echobase.common.areaOfOperation")}' - list="areaOfOperations" headerKey="" headerValue=""/> - - <sj:datepicker key="voyage.voyageStartDate" - label='%{getText("echobase.common.voyageStartDate")}' - value="%{new java.util.Date()}" - displayFormat="dd/mm/yy"/> - - <sj:datepicker key="voyage.voyageEndDate" - label='%{getText("echobase.common.voyageEndDate")}' - value="%{new java.util.Date()}" - displayFormat="dd/mm/yy"/> - </div> - - </fieldset> - <br/> - <s:submit value='%{getText("echobase.action.validateImportVoyage")}' - action="configureVoyage" /> -</s:form> \ No newline at end of file Deleted: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/import.jsp =================================================================== --- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/import.jsp 2011-11-26 10:46:13 UTC (rev 131) +++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/import.jsp 2011-11-26 10:50:09 UTC (rev 132) @@ -1,61 +0,0 @@ -<%-- - #%L - EchoBase :: UI - - $Id$ - $HeadURL$ - %% - Copyright (C) 2011 Ifremer, Codelutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% - --%> -<%@page contentType="text/html" pageEncoding="UTF-8" %> -<%@ taglib prefix="s" uri="/struts-tags" %> - -<title><s:text name="echobase.title.import"/></title> - -<s:form id="importForm" action="doImport" namespace="/import" method="POST" - enctype="multipart/form-data"> - - <fieldset> - <legend> - <s:text name="echobase.legend.import"/> - </legend> - <s:select key="selectedVoyageId" - label='%{getText("echobase.common.voyage")}' - list="voyages" - emptyOption="true" - headerKey="-1" - headerValue='%{getText("echobase.header.voyageSelect")}' /> - - <s:file name="importModel.accessImport" - key="echobase.label.import.access"/> - <s:file name="importModel.accousticImport" - key="echobase.label.import.accoustique"/> - <s:file name="importModel.pecherieImport" - key="echobase.label.import.pecherie"/> - <s:file name="importModel.lectureAgeGenImport" - key="echobase.label.import.lectureAgeGen"/> - <s:file name="importModel.eventsImport" - key="echobase.label.import.events"/> - <s:file name="importModel.typeEchoSpeciesImport" - key="echobase.label.import.typeEchoSpecies"/> - - <s:textarea name="importModel.comment" rows="4" cols="50" key="echobase.common.comment"/> - - </fieldset> - <br/> - <s:submit id="addFilesSubmit" value='%{getText("echobase.action.import")}'/> -</s:form> \ No newline at end of file Deleted: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/importProgress.jsp =================================================================== --- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/importProgress.jsp 2011-11-26 10:46:13 UTC (rev 131) +++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/importProgress.jsp 2011-11-26 10:50:09 UTC (rev 132) @@ -1,40 +0,0 @@ -<%-- - #%L - EchoBase :: UI - - $Id$ - $HeadURL$ - %% - Copyright (C) 2011 Ifremer, Codelutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% - --%> -<%@page contentType="text/html" pageEncoding="UTF-8" %> -<%@ taglib prefix="s" uri="/struts-tags" %> -<%@ taglib prefix="sj" uri="/struts-jquery-tags" %> - -<s:url id="url" action="doImport" namespace="/import"/> -<meta http-equiv="refresh" content="1;url=${url}"/> - -<title><s:text name="echobase.title.importProgress"/></title> - -<%-- TODO letellier 20111104 : Add warn icon --%> -<p><s:text name="echobase.message.warnImportInProgress"/></p> - -<br/> - -<div> - <sj:progressbar value="%{model.progression}"/> -</div> \ No newline at end of file Deleted: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/importResult.jsp =================================================================== --- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/importResult.jsp 2011-11-26 10:46:13 UTC (rev 131) +++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/importResult.jsp 2011-11-26 10:50:09 UTC (rev 132) @@ -1,48 +0,0 @@ -<%-- - #%L - EchoBase :: UI - - $Id$ - $HeadURL$ - %% - Copyright (C) 2011 Ifremer, Codelutin - %% - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - #L% - --%> -<%@page contentType="text/html" pageEncoding="UTF-8" %> -<%@ taglib prefix="s" uri="/struts-tags" %> - -<title><s:text name="echobase.title.importResult"/></title> - -<s:iterator value="importResult" var="entry"> - <s:set var="inputFile" value="%{#entry.key}"/> - <s:set var="result" value="%{#entry.value}"/> - <fieldset> - <legend> - <s:text name="echobase.legend.importFileResult"> - <s:param><strong><s:property value="%{#inputFile.label}"/></strong></s:param> - </s:text> - </legend> - - <s:label value="%{#inputFile.fileName}" - label="%{getText('echobase.label.importFile')}"/> - - <s:label value="%{#result.numberCreated}" - label="%{getText('echobase.label.numberOfCreatedEntities')}"/> - - <s:label value="%{#result.numberUpdated}" - label="%{getText('echobase.label.numberOfUpdatedEntities')}"/> - </fieldset> -</s:iterator> Copied: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureFiles.jsp (from rev 127, trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/configureFiles.jsp) =================================================================== --- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureFiles.jsp (rev 0) +++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureFiles.jsp 2011-11-26 10:50:09 UTC (rev 132) @@ -0,0 +1,71 @@ +<%-- + #%L + EchoBase :: UI + + $Id$ + $HeadURL$ + %% + Copyright (C) 2011 Ifremer, Codelutin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + #L% + --%> +<%@page contentType="text/html" pageEncoding="UTF-8" %> +<%@ taglib prefix="s" uri="/struts-tags" %> + +<title><s:text name="echobase.title.import"/></title> + +<s:form namespace="/importData" method="POST" enctype="multipart/form-data"> + + <fieldset> + <legend> + <s:text name="echobase.legend.import.configuration.mission.resume"/> + </legend> + <s:label value="%{model.mission.missionName}" + key='echobase.common.missionName'/> + + <s:label value="%{model.mission.missionAbstract}" + key='echobase.common.missionAbstract'/> + </fieldset> + + <hr/> + <fieldset> + <legend> + <s:text name="echobase.legend.import.configuration.files"/> + </legend> + + <s:hidden key="voyageId" label=''/> + + <s:file name="acoustic" + key="echobase.label.import.accoustique"/> + + <s:file name="capture" + key="echobase.label.import.pecherie"/> + + <s:file name="lectureAgeGen" + key="echobase.label.import.lectureAgeGen"/> + + <s:file name="events" + key="echobase.label.import.events"/> + + <s:file name="typeEchoSpecies" + key="echobase.label.import.typeEchoSpecies"/> + + </fieldset> + <br/> + <s:submit id="addFilesSubmit" action="configureFiles" + value='%{getText("echobase.action.import")}'/> + + +</s:form> \ No newline at end of file Property changes on: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureFiles.jsp ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Copied: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureMission.jsp (from rev 127, trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/configureVoyage.jsp) =================================================================== --- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureMission.jsp (rev 0) +++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureMission.jsp 2011-11-26 10:50:09 UTC (rev 132) @@ -0,0 +1,156 @@ +<%-- + #%L + EchoBase :: UI + + $Id$ + $HeadURL$ + %% + Copyright (C) 2011 Ifremer, Codelutin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + #L% + --%> +<%@page contentType="text/html" pageEncoding="UTF-8" %> +<%@ taglib prefix="s" uri="/struts-tags" %> +<%@ taglib prefix="sj" uri="/struts-jquery-tags" %> + +<script type="text/javascript"> + + jQuery(document).ready(function () { + + $('[name="importMode"]').change(function(event) { + $('[class="importMode"]').hide(); + $('#' + this.value).show(); + }); + var val = $('[name="importMode"][checked="checked"]').val(); + $('[class="importMode"]').hide(); + $("#" + val).show(); + }); +</script> +<title><s:text name="echobase.title.import.configuration"/></title> + +<s:form id="importForm" namespace="/importData" method="POST"> + + <fieldset> + <legend> + <s:text name="echobase.legend.import.configuration.mission"/> + </legend> + + <s:radio key='importMode' list="importModes" + label='%{getText("echobase.common.importMode")}' + required="true"/> + + <hr/> + + <div id='USE_EXISTING_MISSION' class='importMode'> + <s:select name="mission.topiaId" value="''" + label='%{getText("echobase.common.mission")}' + list="missions" headerKey="" headerValue=""/> + </div> + + <div id='CREATE_NEW_MISSION' class='importMode'> + + <%-- + String PROPERTY_MISSION_NAME = "missionName"; + + String PROPERTY_LITTERATURE_REFERENCES = "litteratureReferences"; + + String PROPERTY_MISSION_ABSTRACT = "missionAbstract"; + + String PROPERTY_PROJECT = "project"; + + String PROPERTY_PLATFORM = "platform"; + + String PROPERTY_INSTITUTION = "institution"; + + String PROPERTY_KEYWORDS = "keywords"; + + String PROPERTY_DATA_CENTRE = "dataCentre"; + + String PROPERTY_DATA_CENTRE_EMAIL = "dataCentreEmail"; + + String PROPERTY_AUTHOR = "author"; + + String PROPERTY_AUTHOR_EMAIL = "authorEmail"; + + String PROPERTY_PRINCIPAL_INVESTIGATOR = "principalInvestigator"; + + String PROPERTY_PRINCIPAL_INVESTIGATOR_EMAIL = "principalInvestigatorEmail"; + + String PROPERTY_ORGANISATION_REFERENCES = "organisationReferences"; + + String PROPERTY_DISTRIBUTION_STATEMENT = "distributionStatement"; + + String PROPERTY_ORGANISATION_LEVEL_ACKNOWLEDGEMENTS = "organisationLevelAcknowledgements"; + + String PROPERTY_SOURCE = "source"; + --%> + + <s:textfield key="mission.missionName" size="40" required="true" + label='%{getText("echobase.common.missionName")}'/> + + <s:textfield key="mission.missionAbstract" size="40" required="true" + label='%{getText("echobase.common.missionAbstract")}'/> + + <s:textfield key="mission.litteratureReferences" size="40" + label='%{getText("echobase.common.litteratureReferences")}'/> + + <s:textfield key="mission.project" + label='%{getText("echobase.common.project")}'/> + + <s:textfield key="mission.platform" + label='%{getText("echobase.common.platform")}'/> + + <s:textfield key="mission.institution" + label='%{getText("echobase.common.institution")}'/> + + <s:textfield key="mission.keywords" + label='%{getText("echobase.common.keywords")}'/> + + <s:textfield key="mission.dataCentre" + label='%{getText("echobase.common.dataCentre")}'/> + + <s:textfield key="mission.dataCentreEmail" + label='%{getText("echobase.common.dataCentreEmail")}'/> + + <s:textfield key="mission.author" + label='%{getText("echobase.common.author")}'/> + + <s:textfield key="mission.authorEmail" + label='%{getText("echobase.common.authorEmail")}'/> + + <s:textfield key="mission.principalInvestigator" + label='%{getText("echobase.common.principalInvestigator")}'/> + + <s:textfield key="mission.principalInvestigatorEmail" + label='%{getText("echobase.common.principalInvestigatorEmail")}'/> + + <s:textfield key="mission.organisationReferences" + label='%{getText("echobase.common.organisationReferences")}'/> + + <s:textfield key="mission.distributionStatement" + label='%{getText("echobase.common.distributionStatement")}'/> + + <s:textfield key="mission.organisationLevelAcknowledgements" + label='%{getText("echobase.common.organisationLevelAcknowledgements")}'/> + + <s:textfield key="mission.source" + label='%{getText("echobase.common.source")}'/> + </div> + + </fieldset> + <br/> + <s:submit value='%{getText("echobase.action.validateImportMission")}' + action="configureMission"/> +</s:form> \ No newline at end of file Property changes on: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/configureMission.jsp ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Copied: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/importProgress.jsp (from rev 127, trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/importProgress.jsp) =================================================================== --- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/importProgress.jsp (rev 0) +++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/importProgress.jsp 2011-11-26 10:50:09 UTC (rev 132) @@ -0,0 +1,40 @@ +<%-- + #%L + EchoBase :: UI + + $Id$ + $HeadURL$ + %% + Copyright (C) 2011 Ifremer, Codelutin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + #L% + --%> +<%@page contentType="text/html" pageEncoding="UTF-8" %> +<%@ taglib prefix="s" uri="/struts-tags" %> +<%@ taglib prefix="sj" uri="/struts-jquery-tags" %> + +<s:url id="url" action="doImport" namespace="/importData"/> +<meta http-equiv="refresh" content="1;url=${url}"/> + +<title><s:text name="echobase.title.importProgress"/></title> + +<%-- TODO letellier 20111104 : Add warn icon --%> +<p><s:text name="echobase.message.warnImportInProgress"/></p> + +<br/> + +<div> + <sj:progressbar value="%{model.progression}"/> +</div> \ No newline at end of file Property changes on: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/importProgress.jsp ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native Copied: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/importResult.jsp (from rev 127, trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/import/importResult.jsp) =================================================================== --- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/importResult.jsp (rev 0) +++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/importResult.jsp 2011-11-26 10:50:09 UTC (rev 132) @@ -0,0 +1,48 @@ +<%-- + #%L + EchoBase :: UI + + $Id$ + $HeadURL$ + %% + Copyright (C) 2011 Ifremer, Codelutin + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + #L% + --%> +<%@page contentType="text/html" pageEncoding="UTF-8" %> +<%@ taglib prefix="s" uri="/struts-tags" %> + +<title><s:text name="echobase.title.importResult"/></title> + +<s:iterator value="importResult" var="entry"> + <s:set var="inputFile" value="%{#entry.key}"/> + <s:set var="result" value="%{#entry.value}"/> + <fieldset> + <legend> + <s:text name="echobase.legend.importFileResult"> + <s:param><strong><s:property value="%{#inputFile.label}"/></strong></s:param> + </s:text> + </legend> + + <s:label value="%{#inputFile.fileName}" + label="%{getText('echobase.label.importFile')}"/> + + <s:label value="%{#result.numberCreated}" + label="%{getText('echobase.label.numberOfCreatedEntities')}"/> + + <s:label value="%{#result.numberUpdated}" + label="%{getText('echobase.label.numberOfUpdatedEntities')}"/> + </fieldset> +</s:iterator> Property changes on: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/importData/importResult.jsp ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision HeadURL Added: svn:eol-style + native