Echobase-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- 1820 discussions
Author: tchemit
Date: 2014-02-14 11:27:22 +0100 (Fri, 14 Feb 2014)
New Revision: 933
Url: http://forge.codelutin.com/projects/echobase/repository/revisions/933
Log:
javaee-api is not provided
Modified:
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2014-02-14 09:47:32 UTC (rev 932)
+++ trunk/pom.xml 2014-02-14 10:27:22 UTC (rev 933)
@@ -350,7 +350,6 @@
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0</version>
- <scope>provided</scope>
</dependency>
<!--dependency>
1
0
Author: tchemit
Date: 2014-02-14 10:47:32 +0100 (Fri, 14 Feb 2014)
New Revision: 932
Url: http://forge.codelutin.com/projects/echobase/repository/revisions/932
Log:
back to last stable topia version
Modified:
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2014-02-13 17:14:15 UTC (rev 931)
+++ trunk/pom.xml 2014-02-14 09:47:32 UTC (rev 932)
@@ -138,7 +138,7 @@
<!-- libraries version -->
- <topiaVersion>3.0-SNAPSHOT</topiaVersion>
+ <topiaVersion>3.0-alpha-10</topiaVersion>
<nuitonUtilsVersion>3.0-rc-2</nuitonUtilsVersion>
<nuitonI18nVersion>3.0</nuitonI18nVersion>
<nuitonWebVersion>1.15-alpha-3</nuitonWebVersion>
@@ -277,7 +277,7 @@
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
- <version>4.3.1.Final</version>
+ <version>4.2.5.Final</version>
</dependency>
<!-- base postgres -->
1
0
13 Feb '14
Author: tchemit
Date: 2014-02-13 18:14:15 +0100 (Thu, 13 Feb 2014)
New Revision: 931
Url: http://forge.codelutin.com/projects/echobase/repository/revisions/931
Log:
fixes #4445: Erreur ?\195?\160 la cr?\195?\169ation d'une nouvelle mission
Modified:
trunk/echobase-ui/src/main/resources/config/struts-importData.xml
Modified: trunk/echobase-ui/src/main/resources/config/struts-importData.xml
===================================================================
--- trunk/echobase-ui/src/main/resources/config/struts-importData.xml 2014-02-12 13:40:05 UTC (rev 930)
+++ trunk/echobase-ui/src/main/resources/config/struts-importData.xml 2014-02-13 17:14:15 UTC (rev 931)
@@ -90,7 +90,7 @@
<result name="input">/WEB-INF/jsp/importData/createMission.jsp</result>
<result type="redirectAction">
<param name="namespace">/importData</param>
- <param name="actionName">configureCommonData</param>
+ <param name="actionName">configureCommon</param>
<param name="method">input</param>
</result>
</action>
1
0
Jenkins build became unstable: echobase » EchoBase :: Services #468
by admin+hudson@codelutin.com 12 Feb '14
by admin+hudson@codelutin.com 12 Feb '14
12 Feb '14
Jenkins build became unstable: echobase-release » EchoBase :: Services #93
by admin+hudson@codelutin.com 12 Feb '14
by admin+hudson@codelutin.com 12 Feb '14
12 Feb '14
12 Feb '14
12 Feb '14
Author: tchemit
Date: 2014-02-12 14:40:05 +0100 (Wed, 12 Feb 2014)
New Revision: 930
Url: http://forge.codelutin.com/projects/echobase/repository/revisions/930
Log:
fixes #4061: Updates mavenpom to 4.7
fixes #4425: Updates I18n to 3.0 and all the nuiton-xxx libs
fixes licenses
Modified:
trunk/LICENSE.txt
trunk/echobase-domain/LICENSE.txt
trunk/echobase-domain/pom.xml
trunk/echobase-domain/src/main/java/fr/ifremer/echobase/config/EchoBaseApplicationConfigProvider.java
trunk/echobase-domain/src/main/java/fr/ifremer/echobase/config/EchoBaseConfigurationOption.java
trunk/echobase-domain/src/main/java/fr/ifremer/echobase/entities/DriverType.java
trunk/echobase-domain/src/main/java/fr/ifremer/echobase/entities/ImportType.java
trunk/echobase-services/LICENSE.txt
trunk/echobase-services/pom.xml
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/DbEditorService.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/DecoratorService.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/exportdb/ExportDbMode.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/AbstractImportDataService.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/AcousticImportConfiguration.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/AcousticImportService.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/CatchesImportConfiguration.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/CatchesImportService.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/CellPositionReference.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/CommonImportConfiguration.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/CommonTransectImportService.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/CommonVoyageImportService.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/ImportException.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/OperationImportConfiguration.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/ResultsImportConfiguration.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdb/ImportDbConfiguration.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdb/ImportDbMode.java
trunk/echobase-ui/LICENSE.txt
trunk/echobase-ui/pom.xml
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/exportDb/Export.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/workingDb/DashBoard.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/interceptors/CheckWorkingDbSelected.java
trunk/pom.xml
Modified: trunk/LICENSE.txt
===================================================================
--- trunk/LICENSE.txt 2014-01-22 21:32:46 UTC (rev 929)
+++ trunk/LICENSE.txt 2014-02-12 13:40:05 UTC (rev 930)
@@ -658,4 +658,4 @@
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
-<http://www.gnu.org/licenses/>.
\ No newline at end of file
+<http://www.gnu.org/licenses/>.
Modified: trunk/echobase-domain/LICENSE.txt
===================================================================
--- trunk/echobase-domain/LICENSE.txt 2014-01-22 21:32:46 UTC (rev 929)
+++ trunk/echobase-domain/LICENSE.txt 2014-02-12 13:40:05 UTC (rev 930)
@@ -658,4 +658,4 @@
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
-<http://www.gnu.org/licenses/>.
\ No newline at end of file
+<http://www.gnu.org/licenses/>.
Modified: trunk/echobase-domain/pom.xml
===================================================================
--- trunk/echobase-domain/pom.xml 2014-01-22 21:32:46 UTC (rev 929)
+++ trunk/echobase-domain/pom.xml 2014-02-12 13:40:05 UTC (rev 930)
@@ -5,7 +5,7 @@
<parent>
<groupId>fr.ifremer</groupId>
<artifactId>echobase</artifactId>
- <version>2.5.2-SNAPSHOT</version>
+ <version>2.6-SNAPSHOT</version>
</parent>
<groupId>fr.ifremer.echobase</groupId>
@@ -73,25 +73,6 @@
</goals>
</execution>
</executions>
- <dependencies>
- <dependency>
- <groupId>org.nuiton.topia</groupId>
- <artifactId>topia-persistence</artifactId>
- <version>${topiaVersion}</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.nuiton.topia</groupId>
- <artifactId>topia-templates</artifactId>
- <version>${topiaVersion}</version>
- </dependency>
- <dependency>
- <groupId>org.nuiton</groupId>
- <artifactId>nuiton-utils</artifactId>
- <version>${nuitonUtilsVersion}</version>
- <scope>compile</scope>
- </dependency>
- </dependencies>
</plugin>
<plugin>
Modified: trunk/echobase-domain/src/main/java/fr/ifremer/echobase/config/EchoBaseApplicationConfigProvider.java
===================================================================
--- trunk/echobase-domain/src/main/java/fr/ifremer/echobase/config/EchoBaseApplicationConfigProvider.java 2014-01-22 21:32:46 UTC (rev 929)
+++ trunk/echobase-domain/src/main/java/fr/ifremer/echobase/config/EchoBaseApplicationConfigProvider.java 2014-02-12 13:40:05 UTC (rev 930)
@@ -29,7 +29,7 @@
import java.util.Locale;
-import static org.nuiton.i18n.I18n.l_;
+import static org.nuiton.i18n.I18n.l;
/**
* To generate configuration report.
@@ -46,7 +46,7 @@
@Override
public String getDescription(Locale locale) {
- return l_(locale, "echobase.configuration.description");
+ return l(locale, "echobase.configuration.description");
}
@Override
Modified: trunk/echobase-domain/src/main/java/fr/ifremer/echobase/config/EchoBaseConfigurationOption.java
===================================================================
--- trunk/echobase-domain/src/main/java/fr/ifremer/echobase/config/EchoBaseConfigurationOption.java 2014-01-22 21:32:46 UTC (rev 929)
+++ trunk/echobase-domain/src/main/java/fr/ifremer/echobase/config/EchoBaseConfigurationOption.java 2014-02-12 13:40:05 UTC (rev 930)
@@ -28,7 +28,7 @@
import java.io.File;
import java.net.URL;
-import static org.nuiton.i18n.I18n.n_;
+import static org.nuiton.i18n.I18n.n;
/**
* All EchoBase configuration options.
@@ -40,42 +40,42 @@
/** Main directory where to put echobase data (logs, and others...). */
DATA_DIRECTORY("echobase.data.directory",
- n_("echobase.config.data.directory.description"),
+ n("echobase.config.data.directory.description"),
"/var/local/echobase/data",
File.class),
LIBRARY_DIRECTORY("echobase.lib.directory",
- n_("echobase.config.lib.directory.description"),
+ n("echobase.config.lib.directory.description"),
"${echobase.data.directory}/lib",
File.class),
INTERNAL_DB_DIRECTORY(
"echobase.internal.db.directory",
- n_("echobase.config.internal.db.directory.description"),
+ n("echobase.config.internal.db.directory.description"),
"${echobase.data.directory}/internaldb", File.class),
EMBEDDED("echobase.embedded",
- n_("echobase.config.embedded.description"),
+ n("echobase.config.embedded.description"),
"false", boolean.class),
VERSION("echobase.version",
- n_("echobase.config.version.description"),
+ n("echobase.config.version.description"),
"", Version.class),
H2_VERSION("echobase.h2Version",
- n_("echobase.config.h2Version.description"),
+ n("echobase.config.h2Version.description"),
"", String.class),
POSTGRESQL_VERSION("echobase.postgresqlVersion",
- n_("echobase.config.postgresqlVersion.description"),
+ n("echobase.config.postgresqlVersion.description"),
"", String.class),
CSV_SEPARATOR("echobase.csv.separator",
- n_("echobase.config.csv.separator.description"),
+ n("echobase.config.csv.separator.description"),
";", char.class),
WAR_LOCATION("echobase.war.location",
- n_("echobase.config.war.location.description"),
+ n("echobase.config.war.location.description"),
"${echobase.lib.directory}/echobase-embedded-${echobase.version}.war",
File.class),
LOG_CONFIG_FILE("echobase.log.config.file",
- n_("echobase.config.log.config.file.description"),
+ n("echobase.config.log.config.file.description"),
"${echobase.data.directory}/echobase-log.config",
File.class),
DOCUMENTATION_URL("echobase.documentationUrl",
- n_("echobase.config.documentationUrl.description"),
+ n("echobase.config.documentationUrl.description"),
"http://maven-site.forge.codelutin.com/echobase",
URL.class);
Modified: trunk/echobase-domain/src/main/java/fr/ifremer/echobase/entities/DriverType.java
===================================================================
--- trunk/echobase-domain/src/main/java/fr/ifremer/echobase/entities/DriverType.java 2014-01-22 21:32:46 UTC (rev 929)
+++ trunk/echobase-domain/src/main/java/fr/ifremer/echobase/entities/DriverType.java 2014-02-12 13:40:05 UTC (rev 930)
@@ -28,7 +28,7 @@
import org.hibernate.dialect.H2Dialect;
import org.hibernate.dialect.PostgreSQL82Dialect;
-import static org.nuiton.i18n.I18n.n_;
+import static org.nuiton.i18n.I18n.n;
/**
* To define a type of driver (h2 or postgres for the moment).
@@ -40,7 +40,7 @@
H2(org.h2.Driver.class,
H2Dialect.class,
- n_("echobase.common.driverType.h2")) {
+ n("echobase.common.driverType.h2")) {
@Override
public String getPilotVersion(EchoBaseConfiguration config) {
String version = config.getH2Version();
@@ -49,7 +49,7 @@
},
POSTGRESQL(org.postgresql.Driver.class,
PostgreSQL82Dialect.class,
- n_("echobase.common.driverType.postgres")) {
+ n("echobase.common.driverType.postgres")) {
@Override
public String getPilotVersion(EchoBaseConfiguration config) {
String version = config.getPostgresqlVersion();
Modified: trunk/echobase-domain/src/main/java/fr/ifremer/echobase/entities/ImportType.java
===================================================================
--- trunk/echobase-domain/src/main/java/fr/ifremer/echobase/entities/ImportType.java 2014-01-22 21:32:46 UTC (rev 929)
+++ trunk/echobase-domain/src/main/java/fr/ifremer/echobase/entities/ImportType.java 2014-02-12 13:40:05 UTC (rev 930)
@@ -25,7 +25,7 @@
import fr.ifremer.echobase.I18nAble;
-import static org.nuiton.i18n.I18n.n_;
+import static org.nuiton.i18n.I18n.n;
/**
* Define what import has been done.
@@ -36,56 +36,56 @@
public enum ImportType implements I18nAble {
/** Import a voyage with all his data. */
- VOYAGE(n_("echobase.common.importType.voyage"),
- n_("echobase.common.importType.voyage.short")),
+ VOYAGE(n("echobase.common.importType.voyage"),
+ n("echobase.common.importType.voyage.short")),
/** Import Voyage / Transit / Transect. */
- COMMON_ALL(n_("echobase.common.importType.commonDataAll"),
- n_("echobase.common.importType.commonDataAll.short")),
+ COMMON_ALL(n("echobase.common.importType.commonDataAll"),
+ n("echobase.common.importType.commonDataAll.short")),
/** Import Voyage. */
- COMMON_VOYAGE(n_("echobase.common.importType.commonDataVoyage"),
- n_("echobase.common.importType.commonDataVoyage.short")),
+ COMMON_VOYAGE(n("echobase.common.importType.commonDataVoyage"),
+ n("echobase.common.importType.commonDataVoyage.short")),
/** Import Transit. */
- COMMON_TRANSIT(n_("echobase.common.importType.commonDataTransit"),
- n_("echobase.common.importType.commonDataTransit.short")),
+ COMMON_TRANSIT(n("echobase.common.importType.commonDataTransit"),
+ n("echobase.common.importType.commonDataTransit.short")),
/** Import Transect. */
- COMMON_TRANSECT(n_("echobase.common.importType.commonDataTransect"),
- n_("echobase.common.importType.commonDataTransect.short")),
+ COMMON_TRANSECT(n("echobase.common.importType.commonDataTransect"),
+ n("echobase.common.importType.commonDataTransect.short")),
/** Import Operations. */
- OPERATION(n_("echobase.common.importType.operation"),
- n_("echobase.common.importType.operation.short")),
+ OPERATION(n("echobase.common.importType.operation"),
+ n("echobase.common.importType.operation.short")),
/** Import Catches (unsorted, total, but no individual ones). */
- CATCHES(n_("echobase.common.importType.catches"),
- n_("echobase.common.importType.catches.short")),
+ CATCHES(n("echobase.common.importType.catches"),
+ n("echobase.common.importType.catches.short")),
/** Import accoustic data (Cells ESDU and Elementary). */
- ACOUSTIC(n_("echobase.common.importType.acoustic"),
- n_("echobase.common.importType.acoustic.short")),
+ ACOUSTIC(n("echobase.common.importType.acoustic"),
+ n("echobase.common.importType.acoustic.short")),
/** Import results at voyage level. */
- RESULT_VOYAGE(n_("echobase.common.importType.resultsVoyage"),
- n_("echobase.common.importType.resultsVoyage.short")),
+ RESULT_VOYAGE(n("echobase.common.importType.resultsVoyage"),
+ n("echobase.common.importType.resultsVoyage.short")),
/** Import esdu results by echotype. */
- RESULT_ESDU(n_("echobase.common.importType.resultsEsdu"),
- n_("echobase.common.importType.resultsEsdu.short")),
+ RESULT_ESDU(n("echobase.common.importType.resultsEsdu"),
+ n("echobase.common.importType.resultsEsdu.short")),
/** Import cells Region. */
- RESULT_REGION(n_("echobase.common.importType.resultsRegion"),
- n_("echobase.common.importType.resultsRegion.short")),
+ RESULT_REGION(n("echobase.common.importType.resultsRegion"),
+ n("echobase.common.importType.resultsRegion.short")),
/** Import cells Map Fish. */
- RESULT_MAP_FISH(n_("echobase.common.importType.resultsMapFish"),
- n_("echobase.common.importType.resultsMapFish.short")),
+ RESULT_MAP_FISH(n("echobase.common.importType.resultsMapFish"),
+ n("echobase.common.importType.resultsMapFish.short")),
/** Import cells Map Other. */
- RESULT_MAP_OTHER(n_("echobase.common.importType.resultsMapOther"),
- n_("echobase.common.importType.resultsMapOther.short"));
+ RESULT_MAP_OTHER(n("echobase.common.importType.resultsMapOther"),
+ n("echobase.common.importType.resultsMapOther.short"));
/**
* All common import types.
Modified: trunk/echobase-services/LICENSE.txt
===================================================================
--- trunk/echobase-services/LICENSE.txt 2014-01-22 21:32:46 UTC (rev 929)
+++ trunk/echobase-services/LICENSE.txt 2014-02-12 13:40:05 UTC (rev 930)
@@ -658,4 +658,4 @@
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
-<http://www.gnu.org/licenses/>.
\ No newline at end of file
+<http://www.gnu.org/licenses/>.
Modified: trunk/echobase-services/pom.xml
===================================================================
--- trunk/echobase-services/pom.xml 2014-01-22 21:32:46 UTC (rev 929)
+++ trunk/echobase-services/pom.xml 2014-02-12 13:40:05 UTC (rev 930)
@@ -6,7 +6,7 @@
<parent>
<groupId>fr.ifremer</groupId>
<artifactId>echobase</artifactId>
- <version>2.5.2-SNAPSHOT</version>
+ <version>2.6-SNAPSHOT</version>
</parent>
<groupId>fr.ifremer.echobase</groupId>
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/DbEditorService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/DbEditorService.java 2014-01-22 21:32:46 UTC (rev 929)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/DbEditorService.java 2014-02-12 13:40:05 UTC (rev 930)
@@ -68,7 +68,7 @@
import java.util.Locale;
import java.util.Map;
-import static org.nuiton.i18n.I18n.l_;
+import static org.nuiton.i18n.I18n.l;
/**
* Service to edit the database.
@@ -450,7 +450,7 @@
if (monitor == null) {
// no monitor, means this is a creation of an object
- buffer.append(l_(l, "echobase.info.newEntityCreated", topiaId));
+ buffer.append(l(l, "echobase.info.newEntityCreated", topiaId));
} else {
PropertyDiff[] propertyDiffs = monitor.getPropertyDiffs();
@@ -464,10 +464,10 @@
}
if (length == 1) {
- buffer.append(l_(l, "echobase.info.onePropertyModified"));
+ buffer.append(l(l, "echobase.info.onePropertyModified"));
} else {
buffer.append(
- l_(l, "echobase.info.somePropertiesModified", length));
+ l(l, "echobase.info.somePropertiesModified", length));
}
for (PropertyDiff diff : propertyDiffs) {
@@ -490,7 +490,7 @@
}
buffer.append("\n ");
buffer.append(
- l_(l, "echobase.info.modifiedProperty", propertyName,
+ l(l, "echobase.info.modifiedProperty", propertyName,
sourceValue,
targetValue));
}
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/DecoratorService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/DecoratorService.java 2014-01-22 21:32:46 UTC (rev 929)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/DecoratorService.java 2014-02-12 13:40:05 UTC (rev 930)
@@ -99,7 +99,7 @@
import java.util.Locale;
import java.util.Map;
-import static org.nuiton.i18n.I18n._;
+import static org.nuiton.i18n.I18n.t;
/**
* Service to decorate entities.
@@ -139,7 +139,7 @@
public final <E extends Enum<E> & I18nAble> Map<String, String> decorateEnums(E... enumValues) {
Map<String, String> result = Maps.newLinkedHashMap();
for (E enumValue : enumValues) {
- result.put(enumValue.name(), _(enumValue.getI18nKey()));
+ result.put(enumValue.name(), t(enumValue.getI18nKey()));
}
return result;
}
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/exportdb/ExportDbMode.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/exportdb/ExportDbMode.java 2014-01-22 21:32:46 UTC (rev 929)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/exportdb/ExportDbMode.java 2014-02-12 13:40:05 UTC (rev 930)
@@ -25,7 +25,7 @@
import fr.ifremer.echobase.I18nAble;
-import static org.nuiton.i18n.I18n.n_;
+import static org.nuiton.i18n.I18n.n;
/**
* Db export mode.
@@ -36,13 +36,13 @@
public enum ExportDbMode implements I18nAble {
/** Export only referential. */
- REFERENTIAL(n_("echobase.common.exportDbMode.referential"), true, false),
+ REFERENTIAL(n("echobase.common.exportDbMode.referential"), true, false),
/** Export selected data + referential. */
- REFERENTIAL_AND_DATA(n_("echobase.common.exportDbMode.referentialAndData"), true, true),
+ REFERENTIAL_AND_DATA(n("echobase.common.exportDbMode.referentialAndData"), true, true),
/** Export all the db. */
- ALL(n_("echobase.common.exportDbMode.all"), true, true);
+ ALL(n("echobase.common.exportDbMode.all"), true, true);
private final String i18nKey;
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/AbstractImportDataService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/AbstractImportDataService.java 2014-01-22 21:32:46 UTC (rev 929)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/AbstractImportDataService.java 2014-02-12 13:40:05 UTC (rev 930)
@@ -68,7 +68,7 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import static org.nuiton.i18n.I18n.l_;
+import static org.nuiton.i18n.I18n.l;
/**
* Abstract data import service.
@@ -209,7 +209,7 @@
protected final String getImportLabel(M configuration) {
Locale locale = getLocale();
- String result = l_(locale, configuration.getImportType().getI18nKey());
+ String result = l(locale, configuration.getImportType().getI18nKey());
return result;
}
@@ -238,7 +238,7 @@
}
protected String getImportMessage(M configuration, InputFile inputFile) {
- String message = l_(getLocale(), "echobase.importLabel.withFile",
+ String message = l(getLocale(), "echobase.importLabel.withFile",
getImportLabel(configuration), inputFile.getFileName());
return message;
}
@@ -382,7 +382,7 @@
DataMetadata dataMetadata = dataMetadataMap.get(metadataName);
if (dataMetadata == null) {
throw new ImportRuntimeException(
- l_(locale, "echobase.importError.dataMetadata.notFound",
+ l(locale, "echobase.importError.dataMetadata.notFound",
metadataName,
dataMetadataMap.keySet()));
}
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/AcousticImportConfiguration.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/AcousticImportConfiguration.java 2014-01-22 21:32:46 UTC (rev 929)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/AcousticImportConfiguration.java 2014-02-12 13:40:05 UTC (rev 930)
@@ -28,7 +28,7 @@
import java.util.Locale;
-import static org.nuiton.i18n.I18n.l_;
+import static org.nuiton.i18n.I18n.l;
/**
* Configuration of a "accoustic datas" import.
@@ -96,7 +96,7 @@
public AcousticImportConfiguration(Locale locale) {
- moviesFile = InputFile.newFile(l_(locale, "echobase.common.moviesFile"));
+ moviesFile = InputFile.newFile(l(locale, "echobase.common.moviesFile"));
importType = ImportType.ACOUSTIC;
}
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/AcousticImportService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/AcousticImportService.java 2014-01-22 21:32:46 UTC (rev 929)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/AcousticImportService.java 2014-02-12 13:40:05 UTC (rev 930)
@@ -60,7 +60,7 @@
import java.util.Map;
import java.util.Set;
-import static org.nuiton.i18n.I18n.l_;
+import static org.nuiton.i18n.I18n.l;
/**
* Service to launch a "acoustic data" import.
@@ -200,7 +200,7 @@
// can not find correct transit
throw new ImportException(
- l_(locale, "echobase.importError.transit.notfound",
+ l(locale, "echobase.importError.transit.notfound",
voyage.getName(),
startDate,
rowNumber));
@@ -211,7 +211,7 @@
// can not find correct transect
throw new ImportException(
- l_(locale, "echobase.importError.transect.notfound",
+ l(locale, "echobase.importError.transect.notfound",
voyage.getName(),
startDate,
vessel.getName(),
@@ -238,7 +238,7 @@
// means miss a esdu cell
// can not find correct transect
throw new ImportException(
- l_(locale, "echobase.importError.esduCell.notfound",
+ l(locale, "echobase.importError.esduCell.notfound",
voyage.getName(),
vessel.getName(),
instrument.getId(),
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/CatchesImportConfiguration.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/CatchesImportConfiguration.java 2014-01-22 21:32:46 UTC (rev 929)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/CatchesImportConfiguration.java 2014-02-12 13:40:05 UTC (rev 930)
@@ -28,7 +28,7 @@
import java.util.Locale;
-import static org.nuiton.i18n.I18n.l_;
+import static org.nuiton.i18n.I18n.l;
/**
* Configuration of a "catches data import".
@@ -51,11 +51,11 @@
public CatchesImportConfiguration(Locale locale) {
totalSampleFile = InputFile.newFile(
- l_(locale, "echobase.common.totalSampleFile"));
+ l(locale, "echobase.common.totalSampleFile"));
subSampleFile = InputFile.newFile(
- l_(locale, "echobase.common.subSampleFile"));
+ l(locale, "echobase.common.subSampleFile"));
biometrySampleFile = InputFile.newFile(
- l_(locale, "echobase.common.biometrySampleFile"));
+ l(locale, "echobase.common.biometrySampleFile"));
importType = ImportType.CATCHES;
}
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/CatchesImportService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/CatchesImportService.java 2014-01-22 21:32:46 UTC (rev 929)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/CatchesImportService.java 2014-02-12 13:40:05 UTC (rev 930)
@@ -59,7 +59,7 @@
import java.util.Locale;
import java.util.Map;
-import static org.nuiton.i18n.I18n.l_;
+import static org.nuiton.i18n.I18n.l;
/**
* Service to launch a "catches sample data" import.
@@ -215,7 +215,7 @@
// can not have twice same sample
throw new ImportException(
- l_(locale, "echobase.importError.duplicate.sample",
+ l(locale, "echobase.importError.duplicate.sample",
operation.getId(),
sampleType.getName(),
species.getBaracoudaCode(),
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/CellPositionReference.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/CellPositionReference.java 2014-01-22 21:32:46 UTC (rev 929)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/CellPositionReference.java 2014-02-12 13:40:05 UTC (rev 930)
@@ -25,7 +25,7 @@
import fr.ifremer.echobase.I18nAble;
-import static org.nuiton.i18n.I18n.n_;
+import static org.nuiton.i18n.I18n.n;
/**
* To define cell position reference in acoustic import.
@@ -36,7 +36,7 @@
public enum CellPositionReference implements I18nAble {
/** Begin. */
- START(n_("echobase.common.cellPositionReference.start")) {
+ START(n("echobase.common.cellPositionReference.start")) {
@Override
public String getMetadataNameSuffix() {
return "Start";
@@ -44,7 +44,7 @@
},
/** Mid. */
- MID(n_("echobase.common.cellPositionReference.mid")) {
+ MID(n("echobase.common.cellPositionReference.mid")) {
@Override
public String getMetadataNameSuffix() {
return "Bary";
@@ -52,7 +52,7 @@
},
/** End. */
- END(n_("echobase.common.cellPositionReference.end")) {
+ END(n("echobase.common.cellPositionReference.end")) {
@Override
public String getMetadataNameSuffix() {
return "End";
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/CommonImportConfiguration.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/CommonImportConfiguration.java 2014-01-22 21:32:46 UTC (rev 929)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/CommonImportConfiguration.java 2014-02-12 13:40:05 UTC (rev 930)
@@ -27,7 +27,7 @@
import java.util.Locale;
-import static org.nuiton.i18n.I18n.l_;
+import static org.nuiton.i18n.I18n.l;
/**
* Configuration of a "common data complete" import.
@@ -74,11 +74,11 @@
public CommonImportConfiguration(Locale locale) {
voyageFile = InputFile.newFile(
- l_(locale, "echobase.common.voyageFile"));
+ l(locale, "echobase.common.voyageFile"));
transitFile = InputFile.newFile(
- l_(locale, "echobase.common.transitFile"));
+ l(locale, "echobase.common.transitFile"));
transectFile = InputFile.newFile(
- l_(locale, "echobase.common.transectFile"));
+ l(locale, "echobase.common.transectFile"));
}
public String getMissionId() {
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/CommonTransectImportService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/CommonTransectImportService.java 2014-01-22 21:32:46 UTC (rev 929)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/CommonTransectImportService.java 2014-02-12 13:40:05 UTC (rev 930)
@@ -44,7 +44,7 @@
import java.util.Date;
import java.util.Map;
-import static org.nuiton.i18n.I18n.l_;
+import static org.nuiton.i18n.I18n.l;
/**
* Service to launch a "common transect data" import.
@@ -124,7 +124,7 @@
timeCoverageEnd);
if (transit == null) {
throw new ImportException(
- l_(getLocale(), "echobase.importError.no.transit.between.date",
+ l(getLocale(), "echobase.importError.no.transit.between.date",
voyage.getName(), timeCoverageStart, timeCoverageEnd));
}
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/CommonVoyageImportService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/CommonVoyageImportService.java 2014-01-22 21:32:46 UTC (rev 929)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/CommonVoyageImportService.java 2014-02-12 13:40:05 UTC (rev 930)
@@ -39,7 +39,7 @@
import java.io.Reader;
import java.util.Locale;
-import static org.nuiton.i18n.I18n.l_;
+import static org.nuiton.i18n.I18n.l;
/**
* Service to launch a "common voyage data" import.
@@ -110,7 +110,7 @@
// this means a voyage file with more than one row not possible...
throw new ImportException(
- l_(locale, "echobase.importError.can.only.import.one.voyage.atime"));
+ l(locale, "echobase.importError.can.only.import.one.voyage.atime"));
}
// collect id of the import
@@ -119,7 +119,7 @@
if (newVoyage == null) {
throw new ImportException(
- l_(locale, "echobase.importError.no.voyage.imported"));
+ l(locale, "echobase.importError.no.voyage.imported"));
}
// push back to id of the voyage in configuration for next imports
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/ImportException.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/ImportException.java 2014-01-22 21:32:46 UTC (rev 929)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/ImportException.java 2014-02-12 13:40:05 UTC (rev 930)
@@ -27,7 +27,7 @@
import java.util.Locale;
-import static org.nuiton.i18n.I18n.l_;
+import static org.nuiton.i18n.I18n.l;
/**
* Exception when a import new data failed.
@@ -48,7 +48,7 @@
}
public ImportException(Locale locale, InputFile inputfile, Exception importError) {
- this(l_(locale, "echobase.importError.fromFile",
+ this(l(locale, "echobase.importError.fromFile",
inputfile.getFile().getName(),
importError.getMessage()), importError);
}
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/OperationImportConfiguration.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/OperationImportConfiguration.java 2014-01-22 21:32:46 UTC (rev 929)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/OperationImportConfiguration.java 2014-02-12 13:40:05 UTC (rev 930)
@@ -28,7 +28,7 @@
import java.util.Locale;
-import static org.nuiton.i18n.I18n.l_;
+import static org.nuiton.i18n.I18n.l;
/**
* Configuration of a "operation" import.
@@ -51,11 +51,11 @@
public OperationImportConfiguration(Locale locale) {
operationFile = InputFile.newFile(
- l_(locale, "echobase.common.operationFile"));
+ l(locale, "echobase.common.operationFile"));
operationMetadataFile = InputFile.newFile(
- l_(locale, "echobase.common.operationMetadataFile"));
+ l(locale, "echobase.common.operationMetadataFile"));
gearMetadataFile = InputFile.newFile(
- l_(locale, "echobase.common.gearMetadataFile"));
+ l(locale, "echobase.common.gearMetadataFile"));
importType = ImportType.OPERATION;
}
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/ResultsImportConfiguration.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/ResultsImportConfiguration.java 2014-01-22 21:32:46 UTC (rev 929)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdata/ResultsImportConfiguration.java 2014-02-12 13:40:05 UTC (rev 930)
@@ -27,7 +27,7 @@
import java.util.Locale;
-import static org.nuiton.i18n.I18n.l_;
+import static org.nuiton.i18n.I18n.l;
/**
* Configuration of a "results" import.
@@ -83,27 +83,27 @@
public ResultsImportConfiguration(Locale locale) {
regionsFile = InputFile.newFile(
- l_(locale, "echobase.common.cellRegionsFile"));
+ l(locale, "echobase.common.cellRegionsFile"));
regionAssociationFile = InputFile.newFile(
- l_(locale, "echobase.common.cellRegionAssociationFile"));
+ l(locale, "echobase.common.cellRegionAssociationFile"));
regionResultFile = InputFile.newFile(
- l_(locale, "echobase.common.cellRegionResultFile"));
+ l(locale, "echobase.common.cellRegionResultFile"));
mapsFile = InputFile.newFile(
- l_(locale, "echobase.common.cellMapsFile"));
+ l(locale, "echobase.common.cellMapsFile"));
echotypeFile = InputFile.newFile(
- l_(locale, "echobase.common.echotypeFile"));
+ l(locale, "echobase.common.echotypeFile"));
lengthAgeKeyFile = InputFile.newFile(
- l_(locale, "echobase.common.lengthAgeKeyFile"));
+ l(locale, "echobase.common.lengthAgeKeyFile"));
lengthWeightKeyFile = InputFile.newFile(
- l_(locale, "echobase.common.lengthWeightKeyFile"));
+ l(locale, "echobase.common.lengthWeightKeyFile"));
esduByEchotypeFile = InputFile.newFile(
- l_(locale, "echobase.common.esduByEchotypeFile"));
+ l(locale, "echobase.common.esduByEchotypeFile"));
esduByEchotypeAndSpeciesCategoryFile = InputFile.newFile(
- l_(locale, "echobase.common.esduByEchotypeAndSpeciesCategoryFile"));
+ l(locale, "echobase.common.esduByEchotypeAndSpeciesCategoryFile"));
esduBySpeciesAndSizeCategoryFile = InputFile.newFile(
- l_(locale, "echobase.common.esduBySpeciesAndSizeCategoryFile"));
+ l(locale, "echobase.common.esduBySpeciesAndSizeCategoryFile"));
esduBySpeciesAndAgeCategoryFile = InputFile.newFile(
- l_(locale, "echobase.common.esduBySpeciesAndAgeCategoryFile"));
+ l(locale, "echobase.common.esduBySpeciesAndAgeCategoryFile"));
}
public String getVesselId() {
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdb/ImportDbConfiguration.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdb/ImportDbConfiguration.java 2014-01-22 21:32:46 UTC (rev 929)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdb/ImportDbConfiguration.java 2014-02-12 13:40:05 UTC (rev 930)
@@ -32,7 +32,7 @@
import java.io.IOException;
import java.util.Locale;
-import static org.nuiton.i18n.I18n.l_;
+import static org.nuiton.i18n.I18n.l;
/**
* Configuration of a import db operation.
@@ -57,11 +57,11 @@
public ImportDbConfiguration(ProgressModel progressModel,
Locale locale) {
super(progressModel);
- input = InputFile.newFile(l_(locale, "echobase.common.importDbFile"));
+ input = InputFile.newFile(l(locale, "echobase.common.importDbFile"));
}
public ImportDbConfiguration(Locale locale) {
- input = InputFile.newFile(l_(locale, "echobase.common.importDbFile"));
+ input = InputFile.newFile(l(locale, "echobase.common.importDbFile"));
}
public File getWorkingDirectory() {
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdb/ImportDbMode.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdb/ImportDbMode.java 2014-01-22 21:32:46 UTC (rev 929)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/importdb/ImportDbMode.java 2014-02-12 13:40:05 UTC (rev 930)
@@ -25,7 +25,7 @@
import fr.ifremer.echobase.I18nAble;
-import static org.nuiton.i18n.I18n.n_;
+import static org.nuiton.i18n.I18n.n;
/**
* Select import db mode.
@@ -36,10 +36,10 @@
public enum ImportDbMode implements I18nAble {
/** Import only referential. */
- REFERENTIAL(n_("echobase.common.importDbMode.referential")),
+ REFERENTIAL(n("echobase.common.importDbMode.referential")),
/** Import what you want. */
- FREE(n_("echobase.common.importDbMode.free"));
+ FREE(n("echobase.common.importDbMode.free"));
private final String i18nKey;
Modified: trunk/echobase-ui/LICENSE.txt
===================================================================
--- trunk/echobase-ui/LICENSE.txt 2014-01-22 21:32:46 UTC (rev 929)
+++ trunk/echobase-ui/LICENSE.txt 2014-02-12 13:40:05 UTC (rev 930)
@@ -658,4 +658,4 @@
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
-<http://www.gnu.org/licenses/>.
\ No newline at end of file
+<http://www.gnu.org/licenses/>.
Modified: trunk/echobase-ui/pom.xml
===================================================================
--- trunk/echobase-ui/pom.xml 2014-01-22 21:32:46 UTC (rev 929)
+++ trunk/echobase-ui/pom.xml 2014-02-12 13:40:05 UTC (rev 930)
@@ -7,7 +7,7 @@
<parent>
<groupId>fr.ifremer</groupId>
<artifactId>echobase</artifactId>
- <version>2.5.2-SNAPSHOT</version>
+ <version>2.6-SNAPSHOT</version>
</parent>
<groupId>fr.ifremer.echobase</groupId>
Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/exportDb/Export.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/exportDb/Export.java 2014-01-22 21:32:46 UTC (rev 929)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/exportDb/Export.java 2014-02-12 13:40:05 UTC (rev 930)
@@ -29,6 +29,8 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import static org.nuiton.i18n.I18n.t;
+
/**
* Launch the complete db export.
*
@@ -58,23 +60,23 @@
@Override
protected String getSuccesMessage() {
- return _("echobase.info.exportDb.succeded");
+ return t("echobase.info.exportDb.succeded");
}
@Override
protected String getErrorMessage() {
- return _("echobase.info.exportDb.failed");
+ return t("echobase.info.exportDb.failed");
}
@Override
public String getActionResumeTitle() {
- return _("echobase.legend.exportDb.resume");
+ return t("echobase.legend.exportDb.resume");
}
@Override
protected String getResultMessage(ExportDbConfiguration model) {
- String exportType = _(model.getExportDbMode().getI18nKey());
- String result = _("echobase.message.exportDb.result",
+ String exportType = t(model.getExportDbMode().getI18nKey());
+ String result = t("echobase.message.exportDb.result",
exportType,
model.getFileName(),
model.getActionTime());
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 2014-01-22 21:32:46 UTC (rev 929)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/importData/ImportMode.java 2014-02-12 13:40:05 UTC (rev 930)
@@ -26,7 +26,7 @@
import fr.ifremer.echobase.I18nAble;
import fr.ifremer.echobase.entities.ImportType;
-import static org.nuiton.i18n.I18n.n_;
+import static org.nuiton.i18n.I18n.n;
/**
* To define the mode of import data (says files to be imported).
@@ -37,7 +37,7 @@
public enum ImportMode implements I18nAble {
/** Import Voyage / Transit / Transect. */
- Common(n_("echobase.common.importType.common")),
+ Common(n("echobase.common.importType.common")),
/** Import operations common data. */
Operation(ImportType.OPERATION.getI18nKey()),
@@ -49,7 +49,7 @@
Acoustic(ImportType.ACOUSTIC.getI18nKey()),
/** Import results. */
- Results(n_("echobase.common.importType.results"));
+ Results(n("echobase.common.importType.results"));
private final String i18nKey;
Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/workingDb/DashBoard.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/workingDb/DashBoard.java 2014-01-22 21:32:46 UTC (rev 929)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/workingDb/DashBoard.java 2014-02-12 13:40:05 UTC (rev 930)
@@ -30,6 +30,8 @@
import java.io.Serializable;
import java.util.List;
+import static org.nuiton.i18n.I18n.t;
+
/**
* DashBoard of existing voyages.
*
@@ -53,8 +55,8 @@
for (ImportType importType : ImportType.values()) {
ImportTypeEntry entry = new ImportTypeEntry(
importType.name(),
- _(importType.getShortI18nKey()),
- _(importType.getI18nKey())
+ t(importType.getShortI18nKey()),
+ t(importType.getI18nKey())
);
importTypes.add(entry);
}
Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/interceptors/CheckWorkingDbSelected.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/interceptors/CheckWorkingDbSelected.java 2014-01-22 21:32:46 UTC (rev 929)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/interceptors/CheckWorkingDbSelected.java 2014-02-12 13:40:05 UTC (rev 930)
@@ -29,7 +29,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import static org.nuiton.i18n.I18n.l_;
+import static org.nuiton.i18n.I18n.l;
/**
* Checks that a working db was selected, otherwise redirect to home.
@@ -54,7 +54,7 @@
invocation.getInvocationContext());
boolean dbSelected = echoBaseSession.isWorkingDbSelected();
if (!dbSelected) {
- action.addFlashMessage(l_(action.getLocale(),
+ action.addFlashMessage(l(action.getLocale(),
"echobase.info.no.workingDb.selected"));
if (log.isDebugEnabled()) {
log.debug("No working db selected, will redirect to home");
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2014-01-22 21:32:46 UTC (rev 929)
+++ trunk/pom.xml 2014-02-12 13:40:05 UTC (rev 930)
@@ -11,7 +11,7 @@
<groupId>fr.ifremer</groupId>
<artifactId>echobase</artifactId>
- <version>2.5.2-SNAPSHOT</version>
+ <version>2.6-SNAPSHOT</version>
<modules>
<module>echobase-domain</module>
@@ -139,9 +139,9 @@
<!-- libraries version -->
<topiaVersion>3.0-SNAPSHOT</topiaVersion>
- <nuitonI18nVersion>2.5.2</nuitonI18nVersion>
- <nuitonWebVersion>1.15-SNAPSHOT</nuitonWebVersion>
- <nuitonUtilsVersion>2.7.1</nuitonUtilsVersion>
+ <nuitonUtilsVersion>3.0-rc-2</nuitonUtilsVersion>
+ <nuitonI18nVersion>3.0</nuitonI18nVersion>
+ <nuitonWebVersion>1.15-alpha-3</nuitonWebVersion>
<struts2Version>2.3.15.3</struts2Version>
<jqueryPluginVersion>3.6.1</jqueryPluginVersion>
<h2Version>1.3.174</h2Version>
@@ -204,26 +204,26 @@
<dependency>
<groupId>org.nuiton</groupId>
<artifactId>nuiton-config</artifactId>
- <version>3.0-alpha-1</version>
+ <version>3.0-alpha-2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.nuiton</groupId>
<artifactId>nuiton-decorator</artifactId>
- <version>3.0-alpha-2</version>
+ <version>3.0-alpha-3</version>
</dependency>
<dependency>
<groupId>org.nuiton</groupId>
<artifactId>nuiton-validator</artifactId>
- <version>3.0-alpha-2</version>
+ <version>3.0-alpha-3</version>
</dependency>
<dependency>
<groupId>org.nuiton</groupId>
<artifactId>nuiton-csv</artifactId>
- <version>3.0-alpha-1</version>
+ <version>3.0-alpha-2</version>
</dependency>
<dependency>
@@ -277,7 +277,7 @@
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
- <version>4.2.5.Final</version>
+ <version>4.3.1.Final</version>
</dependency>
<!-- base postgres -->
@@ -414,7 +414,26 @@
<plugin>
<groupId>org.nuiton.eugene</groupId>
<artifactId>eugene-maven-plugin</artifactId>
- <version>2.7.3</version>
+ <version>2.7.4</version>
+ <dependencies>
+ <dependency>
+ <groupId>org.nuiton.topia</groupId>
+ <artifactId>topia-persistence</artifactId>
+ <version>${topiaVersion}</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.nuiton.topia</groupId>
+ <artifactId>topia-templates</artifactId>
+ <version>${topiaVersion}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.nuiton</groupId>
+ <artifactId>nuiton-utils</artifactId>
+ <version>${nuitonUtilsVersion}</version>
+ <scope>compile</scope>
+ </dependency>
+ </dependencies>
</plugin>
<plugin>
1
0
See <http://ci-ng.codelutin.com/jenkins/job/echobase/2/>
------------------------------------------
[...truncated 1982 lines...]
[INFO] [03:40:07.935] Sensor InitialOpenIssuesSensor...
[INFO] [03:40:08.003] Sensor InitialOpenIssuesSensor done: 68 ms
[INFO] [03:40:08.003] Sensor ProfileSensor...
[INFO] [03:40:08.139] Sensor ProfileSensor done: 136 ms
[INFO] [03:40:08.139] Sensor ProfileEventsSensor...
[INFO] [03:40:08.161] Sensor ProfileEventsSensor done: 22 ms
[INFO] [03:40:08.161] Sensor ProjectLinksSensor...
[INFO] [03:40:08.253] Sensor ProjectLinksSensor done: 92 ms
[INFO] [03:40:08.253] Sensor VersionEventsSensor...
[INFO] [03:40:08.262] Sensor VersionEventsSensor done: 9 ms
[INFO] [03:40:08.262] Sensor FileHashSensor...
[INFO] [03:40:08.265] Sensor FileHashSensor done: 3 ms
[INFO] [03:40:08.265] Sensor Maven dependencies...
[INFO] [03:40:09.004] Sensor Maven dependencies done: 739 ms
[INFO] [03:40:09.004] Sensor JaCoCoSensor...
[INFO] [03:40:09.007] Analysing <http://ci-ng.codelutin.com/jenkins/job/echobase/ws/trunk/echobase-domain/ta…>
[INFO] [03:40:09.785] No information about coverage per test.
[INFO] [03:40:09.785] Sensor JaCoCoSensor done: 781 ms
[INFO] [03:40:10.190] Execute decorators...
[INFO] [03:40:12.138] ------------- Scan EchoBase :: Services
[INFO] [03:40:12.139] Load module settings
[INFO] [03:40:12.284] Quality profile : [name=Sonar way,language=java]
[INFO] [03:40:12.284] Excluded tests:
[INFO] [03:40:12.284] **/package-info.java
[INFO] [03:40:12.289] Index files
[INFO] [03:40:12.428] 154 files indexed
[INFO] [03:40:12.438] Configure Maven plugins
[INFO] [03:40:12.458] JVM options: -javaagent:/tmp/jacocoagent4674134979362089121.jar=destfile=target/jacoco.exec,excludes=*_javassist_* -Xms512m -Xmx1512m
[INFO] [03:40:12.482] Initializer FindbugsMavenInitializer...
[INFO] [03:40:12.482] Initializer FindbugsMavenInitializer done: 0 ms
[INFO] [03:40:12.482] Execute maven plugin maven-surefire-plugin...
[INFO] [03:40:12.482] Execute org.apache.maven.plugins:maven-surefire-plugin:2.16:test...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building EchoBase :: Services 2.5.2-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 32.424s
[INFO] Finished at: Thu Feb 06 03:40:12 CET 2014
[INFO] Final Memory: 77M/546M
[INFO] ------------------------------------------------------------------------
[INFO] [03:40:12.728] Execute org.apache.maven.plugins:maven-surefire-plugin:2.16:test done: 246 ms
[ERROR] Unable to execute maven plugin
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] EchoBase .......................................... FAILURE [22.142s]
[INFO] EchoBase :: Domain ................................ SUCCESS [1.213s]
[INFO] EchoBase :: Services .............................. FAILURE [0.018s]
[INFO] EchoBase :: UI .................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 32.822s
[INFO] Finished at: Thu Feb 06 03:40:12 CET 2014
[INFO] Final Memory: 37M/546M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project echobase-services: Could not resolve dependencies for project fr.ifremer.echobase:echobase-services:jar:2.5.2-SNAPSHOT: Failure to find fr.ifremer.echobase:echobase-domain:jar:2.5.2-SNAPSHOT in http://nexus.nuiton.org/nexus/content/repositories/snapshots was cached in the local repository, resolution will not be reattempted until the update interval of snapshots has elapsed or updates are forced -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project echobase-services: Could not resolve dependencies for project fr.ifremer.echobase:echobase-services:jar:2.5.2-SNAPSHOT: Failure to find fr.ifremer.echobase:echobase-domain:jar:2.5.2-SNAPSHOT in http://nexus.nuiton.org/nexus/content/repositories/snapshots was cached in the local repository, resolution will not be reattempted until the update interval of snapshots has elapsed or updates are forced
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:220)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.resolveProjectDependencies(LifecycleDependencyResolver.java:127)
at org.apache.maven.lifecycle.internal.MojoExecutor.ensureDependenciesAreResolved(MojoExecutor.java:257)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:200)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:85)
at org.sonar.plugins.maven.DefaultMavenPluginExecutor.concreteExecuteMaven3(DefaultMavenPluginExecutor.java:123)
at org.sonar.plugins.maven.DefaultMavenPluginExecutor.concreteExecute(DefaultMavenPluginExecutor.java:107)
at org.sonar.plugins.maven.DefaultMavenPluginExecutor.execute(DefaultMavenPluginExecutor.java:71)
at org.sonar.plugins.maven.DefaultMavenPluginExecutor.execute(DefaultMavenPluginExecutor.java:58)
at org.sonar.batch.phases.InitializersExecutor.executeMavenPlugin(InitializersExecutor.java:86)
at org.sonar.batch.phases.InitializersExecutor.execute(InitializersExecutor.java:66)
at org.sonar.batch.phases.PhaseExecutor.executeInitializersPhase(PhaseExecutor.java:162)
at org.sonar.batch.phases.PhaseExecutor.execute(PhaseExecutor.java:109)
at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:150)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:211)
at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:206)
at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:204)
at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:199)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:58)
at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:45)
at org.sonar.batch.bootstrap.TaskContainer.doAfterStart(TaskContainer.java:82)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at org.sonar.batch.bootstrap.BootstrapContainer.executeTask(BootstrapContainer.java:144)
at org.sonar.batch.bootstrap.BootstrapContainer.doAfterStart(BootstrapContainer.java:132)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:92)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:74)
at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
at org.sonar.runner.api.Runner.execute(Runner.java:90)
at org.sonar.maven.SonarMojo.execute(SonarMojo.java:173)
at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:104)
at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:67)
at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:109)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.project.DependencyResolutionException: Could not resolve dependencies for project fr.ifremer.echobase:echobase-services:jar:2.5.2-SNAPSHOT: Failure to find fr.ifremer.echobase:echobase-domain:jar:2.5.2-SNAPSHOT in http://nexus.nuiton.org/nexus/content/repositories/snapshots was cached in the local repository, resolution will not be reattempted until the update interval of snapshots has elapsed or updates are forced
at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:198)
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:195)
... 75 more
Caused by: org.eclipse.aether.resolution.DependencyResolutionException: Failure to find fr.ifremer.echobase:echobase-domain:jar:2.5.2-SNAPSHOT in http://nexus.nuiton.org/nexus/content/repositories/snapshots was cached in the local repository, resolution will not be reattempted until the update interval of snapshots has elapsed or updates are forced
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:384)
at org.apache.maven.project.DefaultProjectDependenciesResolver.resolve(DefaultProjectDependenciesResolver.java:192)
... 76 more
Caused by: org.eclipse.aether.resolution.ArtifactResolutionException: Failure to find fr.ifremer.echobase:echobase-domain:jar:2.5.2-SNAPSHOT in http://nexus.nuiton.org/nexus/content/repositories/snapshots was cached in the local repository, resolution will not be reattempted until the update interval of snapshots has elapsed or updates are forced
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:459)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:262)
at org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveDependencies(DefaultRepositorySystem.java:367)
... 77 more
Caused by: org.eclipse.aether.transfer.ArtifactNotFoundException: Failure to find fr.ifremer.echobase:echobase-domain:jar:2.5.2-SNAPSHOT in http://nexus.nuiton.org/nexus/content/repositories/snapshots was cached in the local repository, resolution will not be reattempted until the update interval of snapshots has elapsed or updates are forced
at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.newException(DefaultUpdateCheckManager.java:232)
at org.eclipse.aether.internal.impl.DefaultUpdateCheckManager.checkArtifact(DefaultUpdateCheckManager.java:177)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.gatherDownloads(DefaultArtifactResolver.java:599)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.performDownloads(DefaultArtifactResolver.java:518)
at org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:436)
... 79 more
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.2:sonar (default-cli) on project echobase: Can not execute SonarQube analysis: Unable to execute maven plugin: Exception during execution of org.apache.maven.plugins:maven-surefire-plugin:2.16:test -> [Help 2]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.2:sonar (default-cli) on project echobase: Can not execute SonarQube analysis
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Can not execute SonarQube analysis
at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:109)
at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:67)
at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:109)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 more
Caused by: org.apache.maven.plugin.MojoExecutionException: Unable to execute maven plugin
at org.sonar.maven.ExceptionHandling.handle(ExceptionHandling.java:37)
at org.sonar.maven.SonarMojo.execute(SonarMojo.java:175)
at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:104)
... 23 more
Caused by: org.sonar.api.utils.SonarException: Unable to execute maven plugin
at org.sonar.plugins.maven.DefaultMavenPluginExecutor.execute(DefaultMavenPluginExecutor.java:73)
at org.sonar.plugins.maven.DefaultMavenPluginExecutor.execute(DefaultMavenPluginExecutor.java:58)
at org.sonar.batch.phases.InitializersExecutor.executeMavenPlugin(InitializersExecutor.java:86)
at org.sonar.batch.phases.InitializersExecutor.execute(InitializersExecutor.java:66)
at org.sonar.batch.phases.PhaseExecutor.executeInitializersPhase(PhaseExecutor.java:162)
at org.sonar.batch.phases.PhaseExecutor.execute(PhaseExecutor.java:109)
at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:150)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:211)
at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:206)
at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:204)
at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:199)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:58)
at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:45)
at org.sonar.batch.bootstrap.TaskContainer.doAfterStart(TaskContainer.java:82)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at org.sonar.batch.bootstrap.BootstrapContainer.executeTask(BootstrapContainer.java:144)
at org.sonar.batch.bootstrap.BootstrapContainer.doAfterStart(BootstrapContainer.java:132)
at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:92)
at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:77)
at org.sonar.batch.bootstrapper.Batch.startBatch(Batch.java:92)
at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:74)
at org.sonar.runner.batch.IsolatedLauncher.execute(IsolatedLauncher.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.sonar.runner.impl.BatchLauncher$1.delegateExecution(BatchLauncher.java:87)
at org.sonar.runner.impl.BatchLauncher$1.run(BatchLauncher.java:75)
at java.security.AccessController.doPrivileged(Native Method)
at org.sonar.runner.impl.BatchLauncher.doExecute(BatchLauncher.java:69)
at org.sonar.runner.impl.BatchLauncher.execute(BatchLauncher.java:50)
at org.sonar.runner.api.EmbeddedRunner.doExecute(EmbeddedRunner.java:102)
at org.sonar.runner.api.Runner.execute(Runner.java:90)
at org.sonar.maven.SonarMojo.execute(SonarMojo.java:173)
... 24 more
Caused by: org.sonar.api.utils.SonarException: Exception during execution of org.apache.maven.plugins:maven-surefire-plugin:2.16:test
at org.sonar.plugins.maven.DefaultMavenPluginExecutor.concreteExecuteMaven3(DefaultMavenPluginExecutor.java:125)
at org.sonar.plugins.maven.DefaultMavenPluginExecutor.concreteExecute(DefaultMavenPluginExecutor.java:107)
at org.sonar.plugins.maven.DefaultMavenPluginExecutor.execute(DefaultMavenPluginExecutor.java:71)
... 62 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionExcept…
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :echobase-services
Sonar analysis completed: FAILURE
Build step 'Sonar' changed build result to FAILURE
Build step 'Sonar' marked build as failure
1
1
22 Jan '14
Author: tchemit
Date: 2014-01-22 22:32:46 +0100 (Wed, 22 Jan 2014)
New Revision: 929
Url: http://forge.codelutin.com/projects/echobase/repository/revisions/929
Log:
refs #4194: Visualisation des donn?\195?\169es spatiales (preparation de la configuration)
Removed:
trunk/echobase-domain/src/main/java/fr/ifremer/echobase/entities/spatial/CellPoint.java
trunk/echobase-domain/src/main/java/fr/ifremer/echobase/entities/spatial/SpatialData.java
trunk/echobase-domain/src/main/java/fr/ifremer/echobase/entities/spatial/SpatialDataCache.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/spatial/AbstractGetVoyage.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/spatial/GeoJsonObject.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/spatial/GetSpatialData.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/spatial/GetVoyageEchotype.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/spatial/GetVoyageSpecies.java
Modified:
trunk/echobase-domain/src/main/java/fr/ifremer/echobase/EchoBaseFunctions.java
trunk/echobase-domain/src/main/java/fr/ifremer/echobase/entities/data/CellTopiaDao.java
trunk/echobase-domain/src/main/java/fr/ifremer/echobase/entities/spatial/SpatialConfiguration.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/UserDbPersistenceService.java
trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/spatial/SpatialService.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/spatial/GetVoyageDataMetadata.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/spatial/ShowSpatialData.java
trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/spatial/ShowSpatialModel.java
trunk/echobase-ui/src/main/resources/config/struts-spatial.xml
trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/spatial/ShowSpatialData-validation.xml
trunk/echobase-ui/src/main/resources/i18n/echobase-ui_en_GB.properties
trunk/echobase-ui/src/main/resources/i18n/echobase-ui_fr_FR.properties
trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/spatial/showData.jsp
trunk/echobase-ui/src/main/webapp/js/gridHelper.js
Modified: trunk/echobase-domain/src/main/java/fr/ifremer/echobase/EchoBaseFunctions.java
===================================================================
--- trunk/echobase-domain/src/main/java/fr/ifremer/echobase/EchoBaseFunctions.java 2014-01-22 14:01:35 UTC (rev 928)
+++ trunk/echobase-domain/src/main/java/fr/ifremer/echobase/EchoBaseFunctions.java 2014-01-22 21:32:46 UTC (rev 929)
@@ -26,7 +26,6 @@
import fr.ifremer.echobase.entities.ImportLog;
import fr.ifremer.echobase.entities.ImportType;
import fr.ifremer.echobase.entities.data.Cell;
-import fr.ifremer.echobase.entities.spatial.CellPoint;
import fr.ifremer.echobase.entities.data.DataProcessing;
import fr.ifremer.echobase.entities.data.Echotype;
import fr.ifremer.echobase.entities.data.Operation;
@@ -333,13 +332,6 @@
}
};
- public static final Function<CellPoint,String> CELL_POINT_CELL_ID_FUNCTION = new Function<CellPoint, String>() {
- @Override
- public String apply(CellPoint input) {
- return input.getCellId();
- }
- };
-
public static String getSpeciesCategoryKey(Species species, SizeCategory sizeCategory, SexCategory sexCategory) {
String key = species.getBaracoudaCode();
if (sizeCategory != null) {
Modified: trunk/echobase-domain/src/main/java/fr/ifremer/echobase/entities/data/CellTopiaDao.java
===================================================================
--- trunk/echobase-domain/src/main/java/fr/ifremer/echobase/entities/data/CellTopiaDao.java 2014-01-22 14:01:35 UTC (rev 928)
+++ trunk/echobase-domain/src/main/java/fr/ifremer/echobase/entities/data/CellTopiaDao.java 2014-01-22 21:32:46 UTC (rev 929)
@@ -23,10 +23,7 @@
* #L%
*/
-import com.google.common.collect.Lists;
import fr.ifremer.echobase.csv.CellValueParser;
-import fr.ifremer.echobase.entities.references.CellType;
-import fr.ifremer.echobase.entities.spatial.CellPoint;
import org.nuiton.csv.ValueParser;
import org.nuiton.topia.persistence.TopiaException;
import org.nuiton.topia.persistence.support.TopiaSqlQuery;
@@ -39,21 +36,6 @@
public class CellTopiaDao extends AbstractCellTopiaDao<Cell> {
- public List<CellPoint> getVoyageCellPoints(Voyage voyage, CellType cellType) {
-
- List<CellPoint> result = Lists.newArrayList();
-
- String voyageId = voyage.getTopiaId();
- String cellTypeId = cellType == null ? null : cellType.getTopiaId();
-
- TopiaSqlQuery<CellPoint> queryPoint = newLatLongSqlQuery(voyageId, cellTypeId);
- TopiaSqlQuery<CellPoint> queryPoint3D = newLatLongDepthSqlQuery(voyageId, cellTypeId);
-
- result.addAll(topiaSqlSupport.findMultipleResult(queryPoint));
- result.addAll(topiaSqlSupport.findMultipleResult(queryPoint3D));
- return result;
- }
-
public long countVoyageOrphanCells(Voyage voyage) {
TopiaSqlQuery<Long> query = newCountVoyageOrphanCellsQuery(voyage);
Long result = topiaSqlSupport.findSingleResult(query);
@@ -83,49 +65,6 @@
return new CellValueParser(voyage, this);
}
- protected TopiaSqlQuery<CellPoint> newLatLongSqlQuery(final String voyageId, final String cellTypeId) {
- return new TopiaSqlQuery<CellPoint>() {
- @Override
- public PreparedStatement prepareQuery(Connection connection) throws SQLException {
-
- PreparedStatement ps = connection.prepareStatement("SELECT cellId, ST_Y(ST_ASTEXT(coordinate)), ST_X(ST_ASTEXT(coordinate)) FROM echobase_cell_spatial WHERE coordinate IS NOT NULL AND voyageId = ? AND celltypeid = ?");
- ps.setString(1, voyageId);
- ps.setString(2, cellTypeId);
- return ps;
- }
-
- @Override
- public CellPoint prepareResult(ResultSet set) throws SQLException {
- String cellId = set.getString(1);
- Double latitude = set.getDouble(2);
- Double longitude = set.getDouble(3);
- return new CellPoint(cellId, latitude, longitude, 0d);
- }
- };
- }
-
- protected TopiaSqlQuery<CellPoint> newLatLongDepthSqlQuery(final String voyageId, final String cellTypeId) {
- return new TopiaSqlQuery<CellPoint>() {
- @Override
- public PreparedStatement prepareQuery(Connection connection) throws SQLException {
-
- PreparedStatement ps = connection.prepareStatement("SELECT cellId, ST_Y(ST_ASTEXT(coordinate3D)), ST_X(ST_ASTEXT(coordinate3D)) , ST_Y(ST_ASTEXT(coordinate3D)) FROM echobase_cell_spatial WHERE coordinate3D IS NOT NULL AND voyageId = ? AND celltypeid = ?");
- ps.setString(1, voyageId);
- ps.setString(2, cellTypeId);
- return ps;
- }
-
- @Override
- public CellPoint prepareResult(ResultSet set) throws SQLException {
- String cellId = set.getString(1);
- Double latitude = set.getDouble(2);
- Double longitude = set.getDouble(3);
- Double depth = set.getDouble(4);
- return new CellPoint(cellId, latitude, longitude, depth);
- }
- };
- }
-
protected TopiaSqlQuery<Long> newCountVoyageOrphanCellsQuery(final Voyage voyage) {
return new TopiaSqlQuery<Long>() {
@Override
Deleted: trunk/echobase-domain/src/main/java/fr/ifremer/echobase/entities/spatial/CellPoint.java
===================================================================
--- trunk/echobase-domain/src/main/java/fr/ifremer/echobase/entities/spatial/CellPoint.java 2014-01-22 14:01:35 UTC (rev 928)
+++ trunk/echobase-domain/src/main/java/fr/ifremer/echobase/entities/spatial/CellPoint.java 2014-01-22 21:32:46 UTC (rev 929)
@@ -1,64 +0,0 @@
-package fr.ifremer.echobase.entities.spatial;
-
-/*
- * #%L
- * EchoBase :: Domain
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2011 - 2013 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%
- */
-
-import java.io.Serializable;
-
-/**
- * TODO
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 2.2
- */
-public class CellPoint implements Serializable {
-
- private static final long serialVersionUID = 1L;
-
- protected final String cellId;
-
- protected final double x, y, z;
-
- public CellPoint(String cellId, double x, double y, double z) {
- this.cellId = cellId;
- this.x = x;
- this.y = y;
- this.z = z;
- }
-
- public String getCellId() {
- return cellId;
- }
-
- public double getX() {
- return x;
- }
-
- public double getY() {
- return y;
- }
-
- public double getZ() {
- return z;
- }
-}
Modified: trunk/echobase-domain/src/main/java/fr/ifremer/echobase/entities/spatial/SpatialConfiguration.java
===================================================================
--- trunk/echobase-domain/src/main/java/fr/ifremer/echobase/entities/spatial/SpatialConfiguration.java 2014-01-22 14:01:35 UTC (rev 928)
+++ trunk/echobase-domain/src/main/java/fr/ifremer/echobase/entities/spatial/SpatialConfiguration.java 2014-01-22 21:32:46 UTC (rev 929)
@@ -23,6 +23,8 @@
* #L%
*/
+import org.apache.commons.lang3.StringUtils;
+
import java.io.Serializable;
/**
@@ -41,18 +43,48 @@
/** Selected voyage id (can't be null). */
protected String voyageId;
- /** Selected data metadata id (can't be null). */
- protected String dataMetadataId;
+ protected String dataMetadataIdForEsduData;
- /** Selected data cell type id (can't be null). */
- protected String cellTypeId;
+ protected String dataMetadataIdForEsduResult;
- /** Selected species id (can be null). */
- protected String speciesId;
+ protected String dataMetadataIdForMapData;
- /** Selected echotype id (can be null). */
- protected String echotypeId;
+ protected String dataMetadataIdForMapResult;
+ protected boolean showOperationLayer;
+
+ protected boolean showCellEsduDataLayer;
+
+ protected boolean showCellEsduResultLayer;
+
+ protected boolean showCellMapDataLayer;
+
+ protected boolean showCellMapResultLayer;
+
+ public boolean isAtLeastOneLayerSelected() {
+ return showOperationLayer ||
+ showCellEsduDataLayer ||
+ showCellEsduResultLayer ||
+ showCellMapDataLayer ||
+ showCellMapResultLayer;
+ }
+
+ public boolean isEsduDataLayerSane() {
+ return !showCellEsduDataLayer || StringUtils.isNotBlank(dataMetadataIdForEsduData);
+ }
+
+ public boolean isEsduResultLayerSane() {
+ return !showCellEsduResultLayer || StringUtils.isNotBlank(dataMetadataIdForEsduResult);
+ }
+
+ public boolean isMapDataLayerSane() {
+ return !showCellMapDataLayer || StringUtils.isNotBlank(dataMetadataIdForMapData);
+ }
+
+ public boolean isMapResultLayerSane() {
+ return !showCellMapResultLayer || StringUtils.isNotBlank(dataMetadataIdForMapResult);
+ }
+
public String getJdbcUrl() {
return jdbcUrl;
}
@@ -69,61 +101,75 @@
this.voyageId = voyageId;
}
- public String getDataMetadataId() {
- return dataMetadataId;
+ public String getDataMetadataIdForEsduData() {
+ return dataMetadataIdForEsduData;
}
- public void setDataMetadataId(String dataMetadataId) {
- this.dataMetadataId = dataMetadataId;
+ public void setDataMetadataIdForEsduData(String dataMetadataIdForEsduData) {
+ this.dataMetadataIdForEsduData = dataMetadataIdForEsduData;
}
- public String getCellTypeId() {
- return cellTypeId;
+ public String getDataMetadataIdForEsduResult() {
+ return dataMetadataIdForEsduResult;
}
- public void setCellTypeId(String cellTypeId) {
- this.cellTypeId = cellTypeId;
+ public void setDataMetadataIdForEsduResult(String dataMetadataIdForEsduResult) {
+ this.dataMetadataIdForEsduResult = dataMetadataIdForEsduResult;
}
- public String getSpeciesId() {
- return speciesId;
+ public String getDataMetadataIdForMapData() {
+ return dataMetadataIdForMapData;
}
- public void setSpeciesId(String speciesId) {
- this.speciesId = speciesId;
+ public void setDataMetadataIdForMapData(String dataMetadataIdForMapData) {
+ this.dataMetadataIdForMapData = dataMetadataIdForMapData;
}
- public String getEchotypeId() {
- return echotypeId;
+ public String getDataMetadataIdForMapResult() {
+ return dataMetadataIdForMapResult;
}
- public void setEchotypeId(String echotypeId) {
- this.echotypeId = echotypeId;
+ public void setDataMetadataIdForMapResult(String dataMetadataIdForMapResult) {
+ this.dataMetadataIdForMapResult = dataMetadataIdForMapResult;
}
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (!(o instanceof SpatialConfiguration)) return false;
+ public boolean isShowOperationLayer() {
+ return showOperationLayer;
+ }
- SpatialConfiguration that = (SpatialConfiguration) o;
+ public void setShowOperationLayer(boolean showOperationLayer) {
+ this.showOperationLayer = showOperationLayer;
+ }
- return !(jdbcUrl != null ? !jdbcUrl.equals(that.jdbcUrl) : that.jdbcUrl != null) &&
- !(dataMetadataId != null ? !dataMetadataId.equals(that.dataMetadataId) : that.dataMetadataId != null) &&
- !(cellTypeId != null ? !cellTypeId.equals(that.cellTypeId) : that.cellTypeId!= null) &&
- !(echotypeId != null ? !echotypeId.equals(that.echotypeId) : that.echotypeId != null) &&
- !(speciesId != null ? !speciesId.equals(that.speciesId) : that.speciesId != null) &&
- !(voyageId != null ? !voyageId.equals(that.voyageId) : that.voyageId != null);
+ public boolean isShowCellEsduDataLayer() {
+ return showCellEsduDataLayer;
}
- @Override
- public int hashCode() {
- int result = jdbcUrl == null ? 0 : jdbcUrl.hashCode();
- result = 31 * result + (voyageId == null ? 0 : voyageId.hashCode());
- result = 31 * result + (dataMetadataId == null ? 0 : dataMetadataId.hashCode());
- result = 31 * result + (cellTypeId == null ? 0 : cellTypeId.hashCode());
- result = 31 * result + (speciesId == null ? 0 : speciesId.hashCode());
- result = 31 * result + (echotypeId == null ? 0 : echotypeId.hashCode());
- return result;
+ public void setShowCellEsduDataLayer(boolean showCellEsduDataLayer) {
+ this.showCellEsduDataLayer = showCellEsduDataLayer;
}
+
+ public boolean isShowCellEsduResultLayer() {
+ return showCellEsduResultLayer;
+ }
+
+ public void setShowCellEsduResultLayer(boolean showCellEsduResultLayer) {
+ this.showCellEsduResultLayer = showCellEsduResultLayer;
+ }
+
+ public boolean isShowCellMapDataLayer() {
+ return showCellMapDataLayer;
+ }
+
+ public void setShowCellMapDataLayer(boolean showCellMapDataLayer) {
+ this.showCellMapDataLayer = showCellMapDataLayer;
+ }
+
+ public boolean isShowCellMapResultLayer() {
+ return showCellMapResultLayer;
+ }
+
+ public void setShowCellMapResultLayer(boolean showCellMapResultLayer) {
+ this.showCellMapResultLayer = showCellMapResultLayer;
+ }
}
\ No newline at end of file
Deleted: trunk/echobase-domain/src/main/java/fr/ifremer/echobase/entities/spatial/SpatialData.java
===================================================================
--- trunk/echobase-domain/src/main/java/fr/ifremer/echobase/entities/spatial/SpatialData.java 2014-01-22 14:01:35 UTC (rev 928)
+++ trunk/echobase-domain/src/main/java/fr/ifremer/echobase/entities/spatial/SpatialData.java 2014-01-22 21:32:46 UTC (rev 929)
@@ -1,82 +0,0 @@
-package fr.ifremer.echobase.entities.spatial;
-
-/*
- * #%L
- * EchoBase :: Domain
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2011 - 2013 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%
- */
-
-
-import fr.ifremer.echobase.entities.data.Cell;
-import fr.ifremer.echobase.entities.data.Result;
-import fr.ifremer.echobase.entities.references.DataMetadata;
-
-import java.io.Serializable;
-
-/**
- * TODO
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 2.2
- */
-public class SpatialData implements Serializable {
-
- private static final long serialVersionUID = 1L;
-
- protected CellPoint point;
-
- protected Result result;
-
- public void setPoint(CellPoint point) {
- this.point = point;
- }
-
- public void setResult(Result result) {
- this.result = result;
- }
-
- public double getLatitude() {
- return point.getY();
- }
-
- public double getLongitude() {
- return point.getX();
- }
-
- public double getDepth() {
- return point.getZ();
- }
-
- public DataMetadata getDataMetadata() {
- return result.getDataMetadata();
- }
-
- public Serializable getDataValue() {
- return result.getResultValue();
- }
-
- public String getId() {
- return result.getTopiaId();
- }
-
- public Cell getCell() {
- return result.getCell();
- }
-}
Deleted: trunk/echobase-domain/src/main/java/fr/ifremer/echobase/entities/spatial/SpatialDataCache.java
===================================================================
--- trunk/echobase-domain/src/main/java/fr/ifremer/echobase/entities/spatial/SpatialDataCache.java 2014-01-22 14:01:35 UTC (rev 928)
+++ trunk/echobase-domain/src/main/java/fr/ifremer/echobase/entities/spatial/SpatialDataCache.java 2014-01-22 21:32:46 UTC (rev 929)
@@ -1,95 +0,0 @@
-package fr.ifremer.echobase.entities.spatial;
-
-/*
- * #%L
- * EchoBase :: Domain
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2011 - 2013 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%
- */
-
-import com.google.common.collect.Maps;
-import com.google.common.collect.Sets;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import java.io.Serializable;
-import java.util.Collections;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * TODO
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 2.2
- */
-public class SpatialDataCache implements Serializable {
-
- private static final long serialVersionUID = 1L;
-
- /** Logger. */
- private static final Log log = LogFactory.getLog(SpatialDataCache.class);
-
- protected final Map<SpatialConfiguration, Set<SpatialData>> cache =
- Maps.newHashMap();
-
-
- public Set<SpatialData> get(SpatialConfiguration configuration) {
- return cache.get(configuration);
- }
-
- public void put(SpatialConfiguration configuration, Set<SpatialData> data) {
- cache.put(configuration, Collections.unmodifiableSet(data));
- }
-
- public void onDbChanged(String jdbcUrl) {
-
- if (log.isInfoEnabled()) {
- log.info("Revoking spatial data cache for db: " + jdbcUrl);
- }
-
- Set<SpatialConfiguration> keys = Sets.newHashSet(cache.keySet());
- for (SpatialConfiguration key : keys) {
- if (jdbcUrl.equals(key.getJdbcUrl())) {
- cache.remove(key);
- }
- }
- }
-
- public void onVoyageChanged(String jdbcUrl, String voyageId) {
-
- if (log.isInfoEnabled()) {
- log.info("Revoking spatial data cache for db/voyage: " + jdbcUrl +
- "/" + voyageId);
- }
-
- Set<SpatialConfiguration> keys = Sets.newHashSet(cache.keySet());
- for (SpatialConfiguration key : keys) {
- if (jdbcUrl.equals(key.getJdbcUrl()) &&
- voyageId.equals(key.getVoyageId())) {
- cache.remove(key);
- }
- }
- }
-
- public void clear() {
- cache.clear();
- }
-
-}
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/UserDbPersistenceService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/UserDbPersistenceService.java 2014-01-22 14:01:35 UTC (rev 928)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/UserDbPersistenceService.java 2014-01-22 21:32:46 UTC (rev 929)
@@ -63,7 +63,6 @@
import fr.ifremer.echobase.entities.references.Species;
import fr.ifremer.echobase.entities.references.SpeciesCategory;
import fr.ifremer.echobase.entities.references.Vessel;
-import fr.ifremer.echobase.entities.spatial.CellPoint;
import fr.ifremer.echobase.services.EchoBaseServiceSupport;
import org.nuiton.csv.ValueParser;
import org.nuiton.topia.persistence.TopiaDao;
@@ -202,10 +201,6 @@
return persistenceContext.getCellDao().getVoyageCellIds(voyage);
}
- public List<CellPoint> getVoyageCellPoints(Voyage voyage, CellType cellType) {
- return persistenceContext.getCellDao().getVoyageCellPoints(voyage, cellType);
- }
-
public ValueParser<Cell> newCellValueParser(Voyage voyage) {
return persistenceContext.getCellDao().newCellValueParser(voyage);
}
Modified: trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/spatial/SpatialService.java
===================================================================
--- trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/spatial/SpatialService.java 2014-01-22 14:01:35 UTC (rev 928)
+++ trunk/echobase-services/src/main/java/fr/ifremer/echobase/services/service/spatial/SpatialService.java 2014-01-22 21:32:46 UTC (rev 929)
@@ -23,40 +23,15 @@
* #L%
*/
-import com.google.common.base.Function;
-import com.google.common.base.Optional;
-import com.google.common.base.Preconditions;
-import com.google.common.base.Predicate;
-import com.google.common.base.Predicates;
-import com.google.common.collect.Iterables;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-import com.google.common.collect.Sets;
-import fr.ifremer.echobase.EchoBaseFunctions;
import fr.ifremer.echobase.EchoBaseTechnicalException;
-import fr.ifremer.echobase.entities.data.Category;
-import fr.ifremer.echobase.entities.data.Echotype;
-import fr.ifremer.echobase.entities.data.Result;
-import fr.ifremer.echobase.entities.data.Voyage;
-import fr.ifremer.echobase.entities.references.CellType;
-import fr.ifremer.echobase.entities.references.DataMetadata;
-import fr.ifremer.echobase.entities.references.Species;
-import fr.ifremer.echobase.entities.spatial.CellPoint;
-import fr.ifremer.echobase.entities.spatial.SpatialConfiguration;
-import fr.ifremer.echobase.entities.spatial.SpatialData;
import fr.ifremer.echobase.io.EchoBaseIOUtil;
import fr.ifremer.echobase.services.EchoBaseServiceSupport;
import fr.ifremer.echobase.services.service.UserDbPersistenceService;
-import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.nuiton.topia.persistence.TopiaEntities;
import org.nuiton.util.TimeLog;
import javax.inject.Inject;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
/**
* Spatial service.
@@ -78,12 +53,6 @@
@Inject
private UserDbPersistenceService persistenceService;
-// @Override
-// public void setServiceContext(EchoBaseServiceContext serviceContext) {
-// super.setServiceContext(serviceContext);
-// persistenceService = serviceContext.newService(UserDbPersistenceService.class);
-// }
-
public void addSpatialSupport() {
// add spatial structure
@@ -96,59 +65,6 @@
persistenceService.commit();
}
- public Set<SpatialData> getSpatialData(SpatialConfiguration model) {
-
- Set<SpatialData> result;
-
- String voyageId = model.getVoyageId();
-
- String dataMetadataId = model.getDataMetadataId();
- String cellTypeId = model.getCellTypeId();
-
- String speciesId = model.getSpeciesId();
- String echotypeId = model.getEchotypeId();
-
- Voyage voyage = persistenceService.getVoyage(voyageId);
-
- Preconditions.checkNotNull(
- voyage,
- "Could not find voyage with id " + voyageId);
-
- DataMetadata dataMetadata =
- persistenceService.getDataMetadata(dataMetadataId);
-
- Preconditions.checkNotNull(
- dataMetadata,
- "Could not find dataMetadata with id " + dataMetadataId);
-
- CellType cellType =
- persistenceService.getCellType(cellTypeId);
-
- Preconditions.checkNotNull(
- cellType,
- "Could not find cellType with id " + cellTypeId);
-
- Optional<Species> species =
- persistenceService.getOptionalSpecies(speciesId);
-
- Optional<Echotype> echotype =
- persistenceService.getOptionalEchotype(echotypeId);
-
- List<Predicate<Category>> predicates = Lists.newArrayList();
- if (species.isPresent()) {
- predicates.add(newSpeciesCategoryPredicate(species.get()));
- }
- if (echotype.isPresent()) {
- predicates.add(newEchotypeCategoryPredicate(echotype.get()));
- }
-
- Predicate<Category> acceptPredicate = Predicates.or(predicates);
-
- result = getSpatialData(voyage, dataMetadata, cellType, acceptPredicate);
-
- return result;
- }
-
protected void executeSqlScript(String scriptPath) {
// get sql script
@@ -166,88 +82,7 @@
}
}
- protected Set<SpatialData> getSpatialData(Voyage voyage,
- DataMetadata requiredDataMetadata,
- CellType cellType,
- Predicate<Category> acceptPredicate) {
- long s0 = TimeLog.getTime();
-
- // get possible category
- List<String> categoryIds = Lists.newArrayList(
- Iterables.transform(persistenceService.getCategories(acceptPredicate),
- TopiaEntities.getTopiaIdFunction()));
-
-
- boolean filterByCategory = CollectionUtils.isNotEmpty(categoryIds);
-
- // get all cell with spatial points
- List<CellPoint> voyageCellPoints = persistenceService.getVoyageCellPoints(voyage, cellType);
-
- int nbCells = voyageCellPoints.size();
- s0 = TILE_LOG.log(s0, String.format("Get cell points (%s)", nbCells));
-
- final Map<String, CellPoint> cellPointById = Maps.uniqueIndex(voyageCellPoints, EchoBaseFunctions.CELL_POINT_CELL_ID_FUNCTION);
-
- Set<String> cellIds = Sets.newHashSet(cellPointById.keySet());
-
- s0 = TILE_LOG.log(s0, String.format("Get cell points list and map (%s)", nbCells));
-
- List<Result> results;
-
- if (filterByCategory) {
- results = persistenceService.getAllWithCategoryCellAndDataMetadata(
- cellIds,
- requiredDataMetadata,
- categoryIds);
- } else {
- results = persistenceService.getAllWithNoCategoryCellAndDataMetadata(
- cellIds,
- requiredDataMetadata);
- }
-
-
- s0 = TILE_LOG.log(s0, String.format("Get all matching results (%s)", results.size()));
-
- Set<SpatialData> result = Sets.newHashSet(
- Iterables.transform(
- results, new Function<Result, SpatialData>() {
- @Override
- public SpatialData apply(Result input) {
- SpatialData data = new SpatialData();
- data.setResult(input);
- CellPoint cellPoint = cellPointById.get(input.getCell().getTopiaId());
- data.setPoint(cellPoint);
- return data;
- }
- }));
-
- TILE_LOG.log(s0, String.format("Loaded %s result of cell points (%s)", result.size(), nbCells));
-
- return result;
- }
-
-
- protected Predicate<Category> newSpeciesCategoryPredicate(final Species species) {
- Predicate<Category> speciesPredicate = new Predicate<Category>() {
- @Override
- public boolean apply(Category input) {
- return input.getSpeciesCategory() != null && species.equals(input.getSpeciesCategory().getSpecies());
- }
- };
- return speciesPredicate;
- }
-
- protected Predicate<Category> newEchotypeCategoryPredicate(final Echotype echotype) {
- Predicate<Category> speciesPredicate = new Predicate<Category>() {
- @Override
- public boolean apply(Category input) {
- return echotype.equals(input.getEchotype());
- }
- };
- return speciesPredicate;
- }
-
public boolean isSpatialAware() {
boolean result = persistenceService.isSpatialAware();
return result;
Deleted: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/spatial/AbstractGetVoyage.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/spatial/AbstractGetVoyage.java 2014-01-22 14:01:35 UTC (rev 928)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/spatial/AbstractGetVoyage.java 2014-01-22 21:32:46 UTC (rev 929)
@@ -1,90 +0,0 @@
-package fr.ifremer.echobase.ui.actions.spatial;
-
-/*
- * #%L
- * EchoBase :: UI
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2011 - 2013 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%
- */
-
-import com.google.common.base.Preconditions;
-import com.google.common.collect.Maps;
-import fr.ifremer.echobase.entities.data.Voyage;
-import fr.ifremer.echobase.services.service.UserDbPersistenceService;
-import fr.ifremer.echobase.services.service.spatial.SpatialService;
-import fr.ifremer.echobase.ui.actions.EchoBaseActionSupport;
-import org.apache.commons.lang3.StringUtils;
-
-import javax.inject.Inject;
-import java.util.Map;
-
-/**
- * Abstract action to obtain some data linked with a given voyage id.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 2.2
- */
-public abstract class AbstractGetVoyage extends EchoBaseActionSupport {
-
- private static final long serialVersionUID = 1L;
-
- /** Selected voyage id. */
- protected String voyageId;
-
- public void setVoyageId(String voyageId) {
- this.voyageId = voyageId;
- }
-
- /** Universe of result. */
- protected Map<String, String> data;
-
- protected abstract Map<String, String> buildData(SpatialService service,
- Voyage voyage);
-
- public abstract Map<String, String> getData();
-
- @Override
- public String execute() throws Exception {
-
- if (StringUtils.isEmpty(voyageId)) {
- data = Maps.newLinkedHashMap();
-
- } else {
-
- Voyage voyage = userDbPersistenceService.getVoyage(voyageId);
-
- Preconditions.checkNotNull(
- voyage,
- "Could not find voyage with id " + voyageId);
-
- data = buildData(spatialService, voyage);
- }
-
- return SUCCESS;
- }
-
- //------------------------------------------------------------------------//
- //-- Injected objects //
- //------------------------------------------------------------------------//
-
- @Inject
- protected transient UserDbPersistenceService userDbPersistenceService;
- @Inject
- protected transient SpatialService spatialService;
-}
\ No newline at end of file
Deleted: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/spatial/GeoJsonObject.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/spatial/GeoJsonObject.java 2014-01-22 14:01:35 UTC (rev 928)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/spatial/GeoJsonObject.java 2014-01-22 21:32:46 UTC (rev 929)
@@ -1,153 +0,0 @@
-package fr.ifremer.echobase.ui.actions.spatial;
-
-/*
- * #%L
- * EchoBase :: UI
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2011 - 2013 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%
- */
-
-import com.google.common.base.Preconditions;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Maps;
-
-import java.io.Serializable;
-import java.util.List;
-import java.util.Map;
-
-/**
- * TODO
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 2.2
- */
-public class GeoJsonObject implements Serializable {
-
- private static final long serialVersionUID = 1L;
-
-
- public static GeoJsonObjectBuilder newBuilder(String type) {
- return new GeoJsonObjectBuilder(type);
- }
-
- public static class GeoJsonObjectBuilder {
-
- GeoJsonObject result = new GeoJsonObject();
-
- GeoJsonFeature feature;
-
- public GeoJsonObjectBuilder(String type) {
- result.type = type;
- }
-
- public GeoJsonObjectBuilder newFeature(String type,
- String id,
- String geometryType) {
- feature = new GeoJsonFeature(type, id);
- result.features.add(feature);
- feature.geometry = new GeoJsonGeometry(geometryType);
- return this;
- }
-
- public GeoJsonObjectBuilder addFeatureProperty(String key, Serializable value) {
- Preconditions.checkNotNull(feature, "No feature (use before newFeature method)");
- feature.getProperties().put(key, value);
- return this;
- }
-
- public GeoJsonObjectBuilder addFeatureGeometryPoint(double latitude, double longitude) {
- Preconditions.checkNotNull(feature, "No feature (use before newFeature method)");
- feature.geometry.coordinates = new double[]{latitude, longitude};
- return this;
- }
-
- public GeoJsonObject flush() {
- return result;
- }
- }
-
- protected String type;
-
- protected final List<GeoJsonFeature> features = Lists.newArrayList();
-
- public String getType() {
- return type;
- }
-
- public List<GeoJsonFeature> getFeatures() {
- return features;
- }
-
- public static class GeoJsonFeature implements Serializable {
-
- private static final long serialVersionUID = 1L;
-
- protected String type;
-
- protected String id;
-
- protected final Map<String, Serializable> properties =
- Maps.newLinkedHashMap();
-
- protected GeoJsonGeometry geometry;
-
- public GeoJsonFeature(String type, String id) {
- this.type = type;
- this.id = id;
- }
-
- public String getType() {
- return type;
- }
-
- public String getId() {
- return id;
- }
-
- public Map<String, Serializable> getProperties() {
- return properties;
- }
-
- public GeoJsonGeometry getGeometry() {
- return geometry;
- }
- }
-
- public static class GeoJsonGeometry implements Serializable {
-
- private static final long serialVersionUID = 1L;
-
- protected String type;
-
- protected double[] coordinates;
-
- public GeoJsonGeometry(String type) {
- this.type = type;
- }
-
- public String getType() {
- return type;
- }
-
- public double[] getCoordinates() {
- return coordinates;
- }
- }
-
-}
Deleted: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/spatial/GetSpatialData.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/spatial/GetSpatialData.java 2014-01-22 14:01:35 UTC (rev 928)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/spatial/GetSpatialData.java 2014-01-22 21:32:46 UTC (rev 929)
@@ -1,80 +0,0 @@
-package fr.ifremer.echobase.ui.actions.spatial;
-
-/*
- * #%L
- * EchoBase :: UI
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2011 - 2013 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%
- */
-
-import fr.ifremer.echobase.entities.spatial.SpatialData;
-import fr.ifremer.echobase.services.service.spatial.SpatialService;
-import fr.ifremer.echobase.ui.actions.EchoBaseActionSupport;
-
-import javax.inject.Inject;
-import java.util.Set;
-
-/**
- * Obtain all spatial data used for a given voyage.
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 2.2
- */
-public class GetSpatialData extends EchoBaseActionSupport {
-
- private static final long serialVersionUID = 1L;
-
- protected final ShowSpatialModel model = new ShowSpatialModel();
-
- protected GeoJsonObject data;
-
- public ShowSpatialModel getModel() {
- return model;
- }
-
- public GeoJsonObject getData() {
- return data;
- }
-
- @Override
- public String execute() throws Exception {
-
- Set<SpatialData> spatialData = spatialService.getSpatialData(model);
-
- GeoJsonObject.GeoJsonObjectBuilder builder =
- GeoJsonObject.newBuilder("Feature");
-
- for (SpatialData s : spatialData) {
- builder.newFeature("Feature", s.getId(), "Point")
- .addFeatureProperty("name", s.getCell().getName())
- .addFeatureProperty(s.getDataMetadata().getName(), s.getDataValue())
- .addFeatureGeometryPoint(s.getLongitude(), s.getLatitude());
- }
- data = builder.flush();
-
- return SUCCESS;
- }
-
- //------------------------------------------------------------------------//
- //-- Injected objects //
- //------------------------------------------------------------------------//
-
- @Inject
- protected transient SpatialService spatialService;
-}
\ No newline at end of file
Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/spatial/GetVoyageDataMetadata.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/spatial/GetVoyageDataMetadata.java 2014-01-22 14:01:35 UTC (rev 928)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/spatial/GetVoyageDataMetadata.java 2014-01-22 21:32:46 UTC (rev 929)
@@ -23,10 +23,16 @@
* #L%
*/
+import com.google.common.base.Preconditions;
+import com.google.common.collect.Maps;
import fr.ifremer.echobase.entities.data.Voyage;
import fr.ifremer.echobase.entities.references.DataMetadata;
+import fr.ifremer.echobase.services.service.UserDbPersistenceService;
import fr.ifremer.echobase.services.service.spatial.SpatialService;
+import fr.ifremer.echobase.ui.actions.EchoBaseActionSupport;
+import org.apache.commons.lang3.StringUtils;
+import javax.inject.Inject;
import java.util.Map;
/**
@@ -35,19 +41,51 @@
* @author tchemit <chemit(a)codelutin.com>
* @since 2.2
*/
-public class GetVoyageDataMetadata extends AbstractGetVoyage {
+public class GetVoyageDataMetadata extends EchoBaseActionSupport {
private static final long serialVersionUID = 1L;
- @Override
+ /** Selected voyage id. */
+ protected String voyageId;
+
+ /** Universe of result. */
+ protected Map<String, String> data;
+
+ public void setVoyageId(String voyageId) {
+ this.voyageId = voyageId;
+ }
+
public Map<String, String> getData() {
return data;
}
@Override
- protected Map<String, String> buildData(SpatialService service,
- Voyage voyage) {
- Map<String, String> result = userDbPersistenceService.loadSortAndDecorate(DataMetadata.class);
- return result;
+ public String execute() throws Exception {
+
+ if (StringUtils.isEmpty(voyageId)) {
+ data = Maps.newLinkedHashMap();
+
+ } else {
+
+ Voyage voyage = userDbPersistenceService.getVoyage(voyageId);
+
+ Preconditions.checkNotNull(
+ voyage,
+ "Could not find voyage with id " + voyageId);
+
+ data = userDbPersistenceService.loadSortAndDecorate(DataMetadata.class);
+ }
+
+ return SUCCESS;
}
+
+ //------------------------------------------------------------------------//
+ //-- Injected objects //
+ //------------------------------------------------------------------------//
+
+ @Inject
+ protected transient UserDbPersistenceService userDbPersistenceService;
+
+ @Inject
+ protected transient SpatialService spatialService;
}
\ No newline at end of file
Deleted: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/spatial/GetVoyageEchotype.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/spatial/GetVoyageEchotype.java 2014-01-22 14:01:35 UTC (rev 928)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/spatial/GetVoyageEchotype.java 2014-01-22 21:32:46 UTC (rev 929)
@@ -1,54 +0,0 @@
-package fr.ifremer.echobase.ui.actions.spatial;
-
-/*
- * #%L
- * EchoBase :: UI
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2011 - 2013 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%
- */
-
-import fr.ifremer.echobase.entities.data.Echotype;
-import fr.ifremer.echobase.entities.data.Voyage;
-import fr.ifremer.echobase.services.service.spatial.SpatialService;
-
-import java.util.Map;
-
-/**
- * TODO
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 2.2
- */
-public class GetVoyageEchotype extends AbstractGetVoyage {
-
- private static final long serialVersionUID = 1L;
-
- @Override
- public Map<String, String> getData() {
- return data;
- }
-
- @Override
- protected Map<String, String> buildData(SpatialService service,
- Voyage voyage) {
-
- Map<String, String> result = userDbPersistenceService.loadSortAndDecorate(Echotype.class);
- return result;
- }
-}
Deleted: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/spatial/GetVoyageSpecies.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/spatial/GetVoyageSpecies.java 2014-01-22 14:01:35 UTC (rev 928)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/spatial/GetVoyageSpecies.java 2014-01-22 21:32:46 UTC (rev 929)
@@ -1,54 +0,0 @@
-package fr.ifremer.echobase.ui.actions.spatial;
-
-/*
- * #%L
- * EchoBase :: UI
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2011 - 2013 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%
- */
-
-import fr.ifremer.echobase.entities.data.Voyage;
-import fr.ifremer.echobase.entities.references.Species;
-import fr.ifremer.echobase.services.service.spatial.SpatialService;
-
-import java.util.Map;
-
-/**
- * TODO
- *
- * @author tchemit <chemit(a)codelutin.com>
- * @since 2.2
- */
-public class GetVoyageSpecies extends AbstractGetVoyage {
-
- private static final long serialVersionUID = 1L;
-
- @Override
- public Map<String, String> getData() {
- return data;
- }
-
- @Override
- protected Map<String, String> buildData(SpatialService service,
- Voyage voyage) {
-
- Map<String, String> result = userDbPersistenceService.loadSortAndDecorate(Species.class);
- return result;
- }
-}
Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/spatial/ShowSpatialData.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/spatial/ShowSpatialData.java 2014-01-22 14:01:35 UTC (rev 928)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/spatial/ShowSpatialData.java 2014-01-22 21:32:46 UTC (rev 929)
@@ -26,7 +26,6 @@
import com.opensymphony.xwork2.Preparable;
import com.opensymphony.xwork2.interceptor.annotations.InputConfig;
import fr.ifremer.echobase.entities.data.Voyage;
-import fr.ifremer.echobase.entities.references.CellType;
import fr.ifremer.echobase.services.service.UserDbPersistenceService;
import fr.ifremer.echobase.services.service.spatial.SpatialService;
import fr.ifremer.echobase.ui.actions.EchoBaseActionSupport;
@@ -59,13 +58,6 @@
return voyages;
}
- /** Universe of existing cell types. */
- protected Map<String, String> cellTypes;
-
- public Map<String, String> getCellTypes() {
- return cellTypes;
- }
-
public boolean isCanAddSpatial() {
return canAddSpatial;
}
@@ -73,7 +65,6 @@
@Override
public void prepare() throws Exception {
voyages = userDbPersistenceService.loadSortAndDecorate(Voyage.class);
- cellTypes = userDbPersistenceService.loadSortAndDecorate(CellType.class);
model.setJdbcUrl(getServiceContext().getUserDbUrl());
model.setWithSpatial(spatialService.isSpatialAware());
@@ -104,6 +95,7 @@
@Inject
protected transient UserDbPersistenceService userDbPersistenceService;
+
@Inject
protected transient SpatialService spatialService;
}
Modified: trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/spatial/ShowSpatialModel.java
===================================================================
--- trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/spatial/ShowSpatialModel.java 2014-01-22 14:01:35 UTC (rev 928)
+++ trunk/echobase-ui/src/main/java/fr/ifremer/echobase/ui/actions/spatial/ShowSpatialModel.java 2014-01-22 21:32:46 UTC (rev 929)
@@ -24,10 +24,8 @@
*/
import fr.ifremer.echobase.entities.spatial.SpatialConfiguration;
-import fr.ifremer.echobase.entities.spatial.SpatialData;
import java.io.Serializable;
-import java.util.Set;
/**
* TODO
@@ -40,11 +38,6 @@
private static final long serialVersionUID = 1L;
/**
- * Loaded spatial data.
- */
- protected Set<SpatialData> spatialData;
-
- /**
* Can we use spatial data (means is the database is spatial?).
*/
protected boolean withSpatial;
Modified: trunk/echobase-ui/src/main/resources/config/struts-spatial.xml
===================================================================
--- trunk/echobase-ui/src/main/resources/config/struts-spatial.xml 2014-01-22 14:01:35 UTC (rev 928)
+++ trunk/echobase-ui/src/main/resources/config/struts-spatial.xml 2014-01-22 21:32:46 UTC (rev 929)
@@ -70,9 +70,9 @@
<result>/WEB-INF/jsp/spatial/showDataMap.jsp</result>
</action>
- <!-- Get json data -->
- <action name="get*"
- class="fr.ifremer.echobase.ui.actions.spatial.Get{1}">
+ <!-- Get medata for the selected voyage -->
+ <action name="getVoyageDataMetadata"
+ class="fr.ifremer.echobase.ui.actions.spatial.GetVoyageDataMetadata">
<interceptor-ref name="basicStackLogguedWithdb"/>
<result type="json"/>
</action>
Modified: trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/spatial/ShowSpatialData-validation.xml
===================================================================
--- trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/spatial/ShowSpatialData-validation.xml 2014-01-22 14:01:35 UTC (rev 928)
+++ trunk/echobase-ui/src/main/resources/fr/ifremer/echobase/ui/actions/spatial/ShowSpatialData-validation.xml 2014-01-22 21:32:46 UTC (rev 929)
@@ -30,39 +30,39 @@
</field-validator>
</field>
- <field name="model.dataMetadataId">
- <field-validator type="nrequiredstring">
- <message key="echobase.error.showData.dataMetadata.required"/>
+ <field name="model.showOperationLayer">
+ <field-validator type="fieldexpression">
+ <param name="expression"><![CDATA[model.atLeastOneLayerSelected]]></param>
+ <message key="echobase.error.showData.noLayer.selected"/>
</field-validator>
</field>
- <field name="model.cellTypeId">
- <field-validator type="nrequiredstring">
- <message key="echobase.error.showData.cellType.required"/>
+ <field name="model.dataMetadataIdForEsduData">
+ <field-validator type="fieldexpression">
+ <param name="expression"><![CDATA[ model.esduDataLayerSane ]]></param>
+ <message key="echobase.error.showData.dataMetadataIdForLayer.required"/>
</field-validator>
</field>
- <field name="model.echotypeId">
+ <field name="model.dataMetadataIdForEsduResult">
<field-validator type="fieldexpression">
- <param name="expression">
- <![CDATA[
- !(model.echotypeId == null && model.speciesId == null)
- ]]>
- </param>
- <message key="echobase.error.showData.echoTypeOrSpecies.required"/>
+ <param name="expression"><![CDATA[ model.esduResultLayerSane ]]></param>
+ <message key="echobase.error.showData.dataMetadataIdForLayer.required"/>
</field-validator>
</field>
- <field name="model.speciesId">
+ <field name="model.dataMetadataIdForMapData">
<field-validator type="fieldexpression">
- <param name="expression">
- <![CDATA[
- !(model.echotypeId == null && model.speciesId == null)
- ]]>
- </param>
- <message key="echobase.error.showData.echoTypeOrSpecies.required"/>
+ <param name="expression"><![CDATA[ model.mapDataLayerSane ]]></param>
+ <message key="echobase.error.showData.dataMetadataIdForLayer.required"/>
</field-validator>
</field>
+ <field name="model.dataMetadataIdForMapResult">
+ <field-validator type="fieldexpression">
+ <param name="expression"><![CDATA[ model.mapResultLayerSane ]]></param>
+ <message key="echobase.error.showData.dataMetadataIdForLayer.required"/>
+ </field-validator>
+ </field>
</validators>
\ No newline at end of file
Modified: trunk/echobase-ui/src/main/resources/i18n/echobase-ui_en_GB.properties
===================================================================
--- trunk/echobase-ui/src/main/resources/i18n/echobase-ui_en_GB.properties 2014-01-22 14:01:35 UTC (rev 928)
+++ trunk/echobase-ui/src/main/resources/i18n/echobase-ui_en_GB.properties 2014-01-22 21:32:46 UTC (rev 929)
@@ -67,6 +67,10 @@
echobase.common.dataCentre=Data center
echobase.common.dataCentreEmail=Data center email
echobase.common.dataMetadata=Data Metadata
+echobase.common.dataMetadata.forEsduDataLayer=Data Metadata for Esdu - Data layer
+echobase.common.dataMetadata.forEsduResultLayer=Data Metadata for Esdu - Result layer
+echobase.common.dataMetadata.forMapDataLayer=Data Metadata for Map - Data layer
+echobase.common.dataMetadata.forMapResultLayer=Data Metadata for Map - Result layer
echobase.common.dataProcessing=DataProcessing
echobase.common.dataProcessingNotes=Data processing notes
echobase.common.datum=Datum
@@ -136,6 +140,11 @@
echobase.common.processingTemplate=Data processing template
echobase.common.project=Project
echobase.common.resultLabel=Results label
+echobase.common.showCellEsduDataLayer=
+echobase.common.showCellEsduResultLayer=
+echobase.common.showCellMapDataLayer=
+echobase.common.showCellMapResultLayer=
+echobase.common.showOperationLayer=
echobase.common.soundSpeedCalculationsER60=Sound speed calculations method (ER60 instrument)
echobase.common.soundSpeedCalculationsME70=Sound speed calculation method (ME70 instrument)
echobase.common.sounderConstant=Sounder constant (if relevant)
@@ -229,7 +238,9 @@
echobase.error.required.password=Password is required
echobase.error.showData.cellType.required=CellType required
echobase.error.showData.dataMetadata.required=DataMetadata required
+echobase.error.showData.dataMetadataIdForLayer.required=Il faut sélectionner la méta-donnée à utiliser sur la couche
echobase.error.showData.echoTypeOrSpecies.required=Echotype or (and) Species is required
+echobase.error.showData.noLayer.selected=Aucune couche de présentation sélectionnée
echobase.error.showData.voyage.required=Voyage required
echobase.error.warlocation.notFound=Database .war file not found at location %s
echobase.error.workingDbConfiguration.couldNotConnect=Could not connect to database (%s)
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 2014-01-22 14:01:35 UTC (rev 928)
+++ trunk/echobase-ui/src/main/resources/i18n/echobase-ui_fr_FR.properties 2014-01-22 21:32:46 UTC (rev 929)
@@ -67,6 +67,10 @@
echobase.common.dataCentre=Centre de données
echobase.common.dataCentreEmail=Courriel du centre de données
echobase.common.dataMetadata=Type de donnée
+echobase.common.dataMetadata.forEsduDataLayer=Méta data à utiliser pour la couche Esdu - Data
+echobase.common.dataMetadata.forEsduResultLayer=Méta data à utiliser pour la couche Esdu - Result
+echobase.common.dataMetadata.forMapDataLayer=Méta data à utiliser pour la couche Map - Data
+echobase.common.dataMetadata.forMapResultLayer=Méta data à utiliser pour la couche Map - Result
echobase.common.dataProcessing=DataProcessing
echobase.common.dataProcessingNotes=Notes sur le pré-traitement des données
echobase.common.datum=Référenciel
@@ -136,6 +140,11 @@
echobase.common.processingTemplate=Intitulé de la méthode de pré-traitement des données
echobase.common.project=Projet
echobase.common.resultLabel=Intitulé des résultats
+echobase.common.showCellEsduDataLayer=Voir la couche Esdu - Data
+echobase.common.showCellEsduResultLayer=Voir la couche Esdu - Result
+echobase.common.showCellMapDataLayer=Voir la couche Map - Data
+echobase.common.showCellMapResultLayer=Voir la couche Map - Result
+echobase.common.showOperationLayer=Voir la couche Operation
echobase.common.soundSpeedCalculationsER60=Méthode de calcul de la célérité du son (ER60)
echobase.common.soundSpeedCalculationsME70=Méthode de calcul de la célérité du son (ME70)
echobase.common.sounderConstant=Constante sondeur (si besoin)
@@ -229,7 +238,9 @@
echobase.error.required.password=Le mot de passe est obligatoire
echobase.error.showData.cellType.required=La sélection d'un type de cellule est obligatoire
echobase.error.showData.dataMetadata.required=La sélection d'un type de donnée est obligatoire
+echobase.error.showData.dataMetadataIdForLayer.required=Il faut sélectionner la méta-donnée à utiliser sur la couche
echobase.error.showData.echoTypeOrSpecies.required=La sélection d'un echotype ou (et) d'une espèces est obligatoire
+echobase.error.showData.noLayer.selected=Aucune couche de présentation sélectionnée
echobase.error.showData.voyage.required=La sélection d'une campagne est obligatoire
echobase.error.warlocation.notFound=L'application n'a pas été trouvée à l'emplacement suivant %s
echobase.error.workingDbConfiguration.couldNotConnect=Impossible de se connecter (%s)
Modified: trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/spatial/showData.jsp
===================================================================
--- trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/spatial/showData.jsp 2014-01-22 14:01:35 UTC (rev 928)
+++ trunk/echobase-ui/src/main/webapp/WEB-INF/jsp/spatial/showData.jsp 2014-01-22 21:32:46 UTC (rev 929)
@@ -40,43 +40,82 @@
$.autoSelectVoyageAndDataMetadata(
getVoyage,
- $('[name="model.dataMetadataId"]'),
+ $('[name="model.dataMetadataIdForEsduData"]'),
'<s:url action="getVoyageDataMetadata" namespace="/spatial"/>',
'<s:property value="model.voyageId"/>',
- '<s:property value="model.dataMetadataId"/>'
+ '<s:property value="model.dataMetadataIdForEsduData"/>'
);
- $.autoSelectVoyageAndSpecies(
+ $.autoSelectVoyageAndDataMetadata(
getVoyage,
- $('[name="model.speciesId"]'),
- '<s:url action="getVoyageSpecies" namespace="/spatial"/>',
+ $('[name="model.dataMetadataIdForEsduResult"]'),
+ '<s:url action="getVoyageDataMetadata" namespace="/spatial"/>',
'<s:property value="model.voyageId"/>',
- '<s:property value="model.speciesId"/>'
+ '<s:property value="model.dataMetadataIdForEsduResult"/>'
);
- $.autoSelectVoyageAndEchotype(
+ $.autoSelectVoyageAndDataMetadata(
getVoyage,
- $('[name="model.echotypeId"]'),
- '<s:url action="getVoyageEchotype" namespace="/spatial"/>',
+ $('[name="model.dataMetadataIdForMapData"]'),
+ '<s:url action="getVoyageDataMetadata" namespace="/spatial"/>',
'<s:property value="model.voyageId"/>',
- '<s:property value="model.echotypeId"/>'
+ '<s:property value="model.dataMetadataIdForMapData"/>'
);
+ $.autoSelectVoyageAndDataMetadata(
+ getVoyage,
+ $('[name="model.dataMetadataIdForMapResult"]'),
+ '<s:url action="getVoyageDataMetadata" namespace="/spatial"/>',
+ '<s:property value="model.voyageId"/>',
+ '<s:property value="model.dataMetadataIdForMapResult"/>'
+ );
+
+ $.showSpatialLayer("model.showCellEsduDataLayer", "cellEsduDataLayer", "model.dataMetadataIdForEsduData", <s:property value="model.showCellEsduDataLayer"/>);
+ $.showSpatialLayer("model.showCellEsduResultLayer", "cellEsduResultLayer", "model.dataMetadataIdForEsduResult", <s:property value="model.showCellEsduResultLayer"/>);
+ $.showSpatialLayer("model.showCellMapDataLayer", "cellMapDataLayer", "model.dataMetadataIdForMapData", <s:property value="model.showCellMapDataLayer"/>);
+ $.showSpatialLayer("model.showCellMapResultLayer", "cellMapResultLayer", "model.dataMetadataIdForMapResult", <s:property value="model.showCellMapResultLayer"/>);
+
+ var showOptions = function(show) {
+
+ var config = $('#withSelectedVoyage');
+
+ if (show!='') {
+ config.show();
+ } else {
+ config.hide();
+ }
+ };
+
+ getVoyage.change(function () {
+ showOptions(this.value);
+ });
+
+ showOptions('<s:property value="model.voyageId"/>');
+
+
<s:if test="model.withData">
+
+ console.info("LOAD DATA!");
+ /*
jQuery.get(
'<s:url action="displaySpatial" namespace="/spatial"/>',
{
"model.voyageId": '<s:property value="model.voyageId"/>',
- "model.dataMetadataId": '<s:property value="model.dataMetadataId"/>',
- "model.cellTypeId": '<s:property value="model.cellTypeId"/>',
- "model.speciesId": '<s:property value="model.speciesId"/>',
- "model.echotypeId": '<s:property value="model.echotypeId"/>'
+ "model.dataMetadataIdForEsduData": '<s:property value="model.dataMetadataIdForEsduData"/>',
+ "model.dataMetadataIdForEsduResult": '<s:property value="model.dataMetadataIdForEsduResult"/>',
+ "model.dataMetadataIdForMapData": '<s:property value="model.dataMetadataIdForMapData"/>',
+ "model.dataMetadataIdForMapResult": '<s:property value="model.dataMetadataIdForMapResult"/>',
+ "model.showOperationLayer": '<s:property value="model.showOperationLayer"/>',
+ "model.showCellEsduDataLayer": '<s:property value="model.showCellEsduDataLayer"/>',
+ "model.showCellEsduResultLayer": '<s:property value="model.showCellEsduResultLayer"/>',
+ "model.showCellMapDataLayer": '<s:property value="model.showCellMapDataLayer"/>',
+ "model.showCellMapResultLayer": '<s:property value="model.showCellMapResultLayer"/>'
},
function (result) {
// inject result
$('#dataPanel').html(result);
- });
+ });*/
</s:if>
});
</script>
@@ -99,22 +138,38 @@
label='%{getText("echobase.common.voyage")}'
list="voyages" headerKey="" headerValue=""/>
- <sj:select key="model.dataMetadataId" requiredLabel="true"
- label='%{getText("echobase.common.dataMetadata")}'
- headerKey="" headerValue=""/>
+ <div id="withSelectedVoyage">
+ <s:checkbox key="model.showOperationLayer" label='%{getText("echobase.common.showOperationLayer")}'/>
- <s:select key="model.cellTypeId" requiredLabel="true"
- label='%{getText("echobase.common.cellType")}'
- list="cellTypes" headerKey="" headerValue=""/>
+ <s:checkbox key="model.showCellEsduDataLayer" label='%{getText("echobase.common.showCellEsduDataLayer")}'/>
+ <div class="cellEsduDataLayer">
+ <sj:select key="model.dataMetadataIdForEsduData" requiredLabel="true"
+ label='%{getText("echobase.common.dataMetadata.forEsduDataLayer")}'
+ headerKey="" headerValue=""/>
+ </div>
- <sj:select key="model.speciesId" requiredLabel="false"
- label='%{getText("echobase.common.species")}'
- headerKey="" headerValue=""/>
+ <s:checkbox key="model.showCellEsduResultLayer" label='%{getText("echobase.common.showCellEsduResultLayer")}'/>
+ <div class="cellEsduResultLayer">
+ <sj:select key="model.dataMetadataIdForEsduResult" requiredLabel="true"
+ label='%{getText("echobase.common.dataMetadata.forEsduResultLayer")}'
+ headerKey="" headerValue=""/>
+ </div>
- <sj:select key="model.echotypeId" requiredLabel="false"
- label='%{getText("echobase.common.echotype")}'
- headerKey="" headerValue=""/>
+ <s:checkbox key="model.showCellMapDataLayer" label='%{getText("echobase.common.showCellMapDataLayer")}'/>
+ <div class="cellMapDataLayer">
+ <sj:select key="model.dataMetadataIdForMapData" requiredLabel="true"
+ label='%{getText("echobase.common.dataMetadata.forMapDataLayer")}'
+ headerKey="" headerValue=""/>
+ </div>
+ <s:checkbox key="model.showCellMapResultLayer" label='%{getText("echobase.common.showCellMapResultLayer")}'/>
+ <div class="cellMapResultLayer">
+ <sj:select key="model.dataMetadataIdForMapResult" requiredLabel="true"
+ label='%{getText("echobase.common.dataMetadata.forMapResultLayer")}'
+ headerKey="" headerValue=""/>
+ </div>
+ </div>
+
<s:hidden key="model.withData" label=' '/>
<s:hidden key="model.withSpatial" label=' '/>
Modified: trunk/echobase-ui/src/main/webapp/js/gridHelper.js
===================================================================
--- trunk/echobase-ui/src/main/webapp/js/gridHelper.js 2014-01-22 14:01:35 UTC (rev 928)
+++ trunk/echobase-ui/src/main/webapp/js/gridHelper.js 2014-01-22 21:32:46 UTC (rev 929)
@@ -304,35 +304,24 @@
}
},
- // auto-selection des voyages - species
- autoSelectVoyageAndEchotype: function (voyageSelectBox, echotypeSelectBox, getUrl, voyageId, echotypeId) {
+ // affichage ou non des options d'un layer spatial
+ showSpatialLayer: function (checkboxId, configCssClass, selectBoxId, defaultValue) {
- voyageSelectBox.change({echotypeSelectBox: echotypeSelectBox,
- getUrl: getUrl}, function (event) {
-
- $.updateSelectBoxContent(event.data.getUrl,
- {voyageId: this.value},
- 'data',
- event.data.echotypeSelectBox
- );
+ var f = function(show) {
+ var config = $('[class~="' + configCssClass + '"]');
+ var selectBox = $('[name="' + selectBoxId + '"]')
+ if (show) {
+ selectBox.removeAttr('disabled');
+ config.show();
+ } else {
+ selectBox.attr('disabled', true);
+ config.hide();
+ }
+ };
+ $('[name="' + checkboxId + '"]').change(function () {
+ f($(this).is(':checked'));
});
-
- if (voyageId) {
-
- voyageSelectBox.change(voyageId);
-
- $.updateSelectBoxContent(getUrl,
- {voyageId: voyageId},
- 'data',
- echotypeSelectBox, function () {
-
- if (echotypeId) {
-
- echotypeSelectBox.val(echotypeId);
- }
- }
- );
- }
+ f(!!defaultValue);
}
});
@@ -384,8 +373,8 @@
autoSelectVoyageAndSpecies: function (voyageSelectBox, speciesSelectBox, getUrl, voyageId, speciesId) {
return $(document).autoSelectVoyageAndSpecies(voyageSelectBox, speciesSelectBox, getUrl, voyageId, speciesId);
},
- autoSelectVoyageAndEchotype: function (voyageSelectBox, echotypeSelectBox, getUrl, voyageId, echotypeId) {
- return $(document).autoSelectVoyageAndEchotype(voyageSelectBox, echotypeSelectBox, getUrl, voyageId, echotypeId);
+ showSpatialLayer: function (checkboxId, configCssClass, selectBoxId, defaultValue) {
+ return $(document).showSpatialLayer(checkboxId, configCssClass, selectBoxId, defaultValue);
}
});
})(jQuery);
1
0