Wao-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
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
February 2014
- 2 participants
- 24 discussions
12 Mar '14
See <http://ci.codelutin.com/jenkins/job/wao-nightly/1/>
------------------------------------------
[...truncated 611 lines...]
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/ta…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/ta…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/ta…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/ta…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/ta…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/ta…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/ta…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/ta…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/ta…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/ta…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/ta…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/ta…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/ta…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/ta…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/ta…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/ta…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/ta…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/ta…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/ta…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/ta…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/ta…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/ta…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/ta…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/ta…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/ta…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/ta…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/ta…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/ta…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/ta…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/ta…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/ta…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/ta…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/ta…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/ta…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/ta…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/ta…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/ta…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/ta…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/ta…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/ta…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/ta…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/sr…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/sr…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/sr…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/sr…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/sr…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/sr…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/sr…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/sr…>
[INFO] Scan 223 files header done in 388.675ms.
[INFO]
* uptodate header on 35 files.
* add header on 188 files.
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ wao-persistence ---
[INFO] Compiling 191 source files to <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/ta…>
[WARNING] <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/ta…>: Some input files use unchecked or unsafe operations.
[WARNING] <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/ta…>: Recompile with -Xlint:unchecked for details.
[INFO]
[INFO] --- animal-sniffer-maven-plugin:1.9:check (default) @ wao-persistence ---
[INFO] Checking unresolved references to org.codehaus.mojo.signature:java17:1.0
[INFO]
[INFO] --- jredmine-maven-plugin:1.6:generate-changes (jredmine-generate-changes) @ wao-persistence ---
[INFO] Skipping goal (runOnce flag is on, and was already executed).
[INFO]
[INFO] --- maven-antrun-plugin:1.7:run (generate-surefire-workdir) @ wao-persistence ---
[INFO] Executing tasks
main:
[mkdir] Created dir: <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/ta…>
[INFO] Executed tasks
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ wao-persistence ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ wao-persistence ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.16:test (default-test) @ wao-persistence ---
[JENKINS] Recording test results
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ wao-persistence ---
[INFO] Building jar: <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/ta…>
[INFO]
[INFO] >>> maven-source-plugin:2.2.1:jar (attach-sources) @ wao-persistence >>>
[INFO]
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (ensure-no-container-api) @ wao-persistence ---
[INFO]
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (check-project-files) @ wao-persistence ---
[INFO]
[INFO] --- helper-maven-plugin:2.1:share-server-secret (get-redmine-login) @ wao-persistence ---
[INFO] Skipping goal (runOnce flag is on and goal was already executed).
[INFO]
[INFO] --- eugene-maven-plugin:2.7.3:generate (generate-entities) @ wao-persistence ---
[INFO] Process phase [zargo] for one entry.
[INFO] Expanding 1 xmi file(s) from <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/sr…>
[INFO] Copy file <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/sr…> to <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/ta…>
[INFO] No file generated.
[INFO] Process phase [xmi] for one entry.
[INFO] Processing XSL tranformation on <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/ta…> for 1 file(s).
[INFO] No file generated.
[INFO] Process phase [model] for one entry.
WARN [pool-1-thread-1 for channel] (AbstractObjectModelReader.java:126) beforeReadFile - No properties provider filled, will instanciate a new default one
WARN [pool-1-thread-1 for channel] (AbstractObjectModelReader.java:577) getObjectElements - Invalid tagvalue [fr.ifremer.wao.entity.Boat.attribute.boatDistrict.tagValue.lazy] : Element 'boatDistrict' of type 'attribute' on classifier 'fr.ifremer.wao.entity.Boat' is null.
WARN [pool-1-thread-1 for channel] (AbstractObjectModelReader.java:577) getObjectElements - Invalid tagvalue [fr.ifremer.wao.entity.WaoUser.attribute.SampleRow.tagValue.inverse] : Element 'SampleRow' of type 'attribute' on classifier 'fr.ifremer.wao.entity.WaoUser' is null.
WARN [pool-1-thread-1 for channel] (AbstractObjectModelReader.java:459) loadTagValue - Invalid tag value [fr.ifremer.wao.entity.WaoUser.attribute.allegroWallet.tagValue.unique] : this tagvalue 'unique' is unkown.
WARN [pool-1-thread-1 for channel] (AbstractObjectModelReader.java:294) loadModelTagValue - Invalid model tag value [model.tagValue.copyright] : the tagvalue 'copyright' is unkown.
WARN [pool-1-thread-1 for channel] (AbstractObjectModelReader.java:294) loadModelTagValue - Invalid model tag value [model.tagValue.exceptionClass] : the tagvalue 'exceptionClass' is unkown.
WARN [pool-1-thread-1 for channel] (AbstractObjectModelReader.java:294) loadModelTagValue - Invalid model tag value [model.tagValue.java.lang.String] : the tagvalue 'java.lang.String' is unkown.
WARN [pool-1-thread-1 for channel] (AbstractObjectModelReader.java:303) loadModelTagValue - Invalid model tag value [model.tagValue.useEnumerationName] : this tagvalue 'useEnumerationName' can not be apply on the model.
INFO [pool-1-thread-1 for channel] (AbstractObjectModelReader.java:270) loadModelProperties - 32 tag values were succesfull imported from <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/ta…>
[INFO] No file generated.
[INFO] Apply generator TopiaMetaTransformer
WARN [pool-1-thread-1 for channel] (TopiaMetaTransformer.java:110) validateModel - [VALIDATION] [getUserProfile([fr.ifremer.wao.entity.ObsProgram obsProgram<<[]>> tagvalue: {}])<<[]>> throws [] tagvalue: {}] Operation name getUserProfile is already reserved for a getter/setter of an entity attribute
WARN [pool-1-thread-1 for channel] (TopiaMetaTransformer.java:110) validateModel - [VALIDATION] [setDCF5Code([java.lang.String codes<<[]>> tagvalue: {}, java.lang.String separatorRegex<<[]>> tagvalue: {}])<<[]>> throws [] tagvalue: {}] Operation name setDCF5Code is already reserved for a getter/setter of an entity attribute
WARN [pool-1-thread-1 for channel] (TopiaMetaTransformer.java:110) validateModel - [VALIDATION] [setLogText([fr.ifremer.wao.entity.SampleRow oldSampleRow<<[]>> tagvalue: {}, fr.ifremer.wao.entity.SampleRow newSampleRow<<[]>> tagvalue: {}])<<[]>> throws [] tagvalue: {}] Operation name setLogText is already reserved for a getter/setter of an entity attribute
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.WaoUserImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.FishingGearDCFImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.TerrestrialDivisionImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.DCF5CodeImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.SampleRowImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.BoatImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.ContactImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.IndicatorImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.ContactStateMotifImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.TerrestrialLocationImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.BoatGroupImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.CompanyImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.IndicatorLevelImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.FishingZoneImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.SampleMonthImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.FleetImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.UserProfileImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.TargetSpeciesDCFImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.ObsDebCodeImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.SampleRowLogImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.NewsImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.WaoUserTopiaDao], already found in class-path.
[WARNING] Failed to getClass for org.apache.maven.plugin.source.SourceJarMojo
[INFO]
[INFO] <<< maven-source-plugin:2.2.1:jar (attach-sources) @ wao-persistence <<<
[INFO]
[INFO] --- maven-source-plugin:2.2.1:jar (attach-sources) @ wao-persistence ---
[INFO] Building jar: <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/ta…>
[INFO]
[INFO] --- maven-javadoc-plugin:2.9.1:jar (attach-javadocs) @ wao-persistence ---
[INFO] Building jar: <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/wao-persistence/ta…>
[INFO]
[INFO] --- maven-site-plugin:3.3:attach-descriptor (attach-descriptor) @ wao-persistence ---
[INFO]
[INFO] --- helper-maven-plugin:2.1:share-server-secret (get-pgp-passphrase) @ wao-persistence ---
[INFO] Exporting server [gpg-signer] username in ${gpg.keyname}
[INFO] Exporting server [gpg-signer] password in ${gpg.passphrase}
[INFO]
[INFO] --- helper-maven-plugin:2.1:collect-files (collect-build-artifacts) @ wao-persistence ---
[INFO] Loaded <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/target/collect-art…>
[INFO] Copying wao-persistence-4.0-SNAPSHOT.jar to <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/target/collect/fr.…>
[INFO] Copying THIRD-PARTY.properties to <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/target/collect/fr.…>
[INFO] Copying wao-persistence-4.0-SNAPSHOT-sources.jar to <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/target/collect/fr.…>
[INFO] Copying wao-persistence-4.0-SNAPSHOT-javadoc.jar to <http://ci.codelutin.com/jenkins/job/wao-nightly/ws/trunk/target/collect/fr.…>
[INFO]
[INFO] --- helper-maven-plugin:2.1:collect-files (collect-build-attachements) @ wao-persistence ---
[WARNING] Skipping goal (No file to collect).
[INFO]
[INFO] --- maven-gpg-plugin:1.4:sign (sign-artifacts) @ wao-persistence ---
[INFO]
[INFO] --- maven-dependency-plugin:2.8:analyze-only (analyze) @ wao-persistence ---
[INFO] Used declared dependencies found:
[INFO] org.nuiton.topia:topia-persistence:jar:3.0-SNAPSHOT:compile
[INFO] org.nuiton:nuiton-config:jar:3.0-alpha-1:compile
[INFO] org.nuiton.i18n:nuiton-i18n:jar:2.5.2:compile
[INFO] org.apache.commons:commons-lang3:jar:3.1:compile
[INFO] commons-logging:commons-logging:jar:1.1.3:compile
[INFO] com.google.guava:guava:jar:15.0:compile
[WARNING] Used undeclared dependencies found:
[WARNING] org.nuiton:nuiton-utils:jar:3.0-SNAPSHOT:compile
[WARNING] org.hibernate:hibernate-core:jar:4.2.8.Final:compile
[WARNING] commons-collections:commons-collections:jar:3.2.1:compile
[WARNING] Unused declared dependencies found:
[WARNING] org.apache.commons:commons-collections4:jar:4.0:compile
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Wao ............................................... SUCCESS [9.477s]
[INFO] Wao :: Persistence ................................ FAILURE [25.503s]
[INFO] Wao :: Services ................................... SKIPPED
[INFO] Wao :: Web ........................................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 36.377s
[INFO] Finished at: Sat Feb 15 00:08:00 CET 2014
[JENKINS] Archiving disabled
[INFO] Final Memory: 66M/1002M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.8:analyze-only (analyze) on project wao-persistence: Dependency problems found -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.8:analyze-only (analyze) on project wao-persistence: Dependency problems found
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.jvnet.hudson.maven3.launcher.Maven31Launcher.main(Maven31Launcher.java:132)
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.launchStandard(Launcher.java:330)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
at jenkins.maven3.agent.Maven31Main.launch(Maven31Main.java:181)
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 hudson.maven.Maven3Builder.call(Maven3Builder.java:134)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:69)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:328)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: org.apache.maven.plugin.MojoExecutionException: Dependency problems found
at org.apache.maven.plugin.dependency.analyze.AbstractAnalyzeMojo.execute(AbstractAnalyzeMojo.java:188)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 30 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/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :wao-persistence
Sending e-mails to: wao-commits(a)list.forge.codelutin.com
channel stopped
Skipping sonar analysis due to bad build status FAILURE
1
9
Build failed in Jenkins: wao-nightly » Wao :: Persistence #1
by admin+ci-codelutin.com@codelutin.com 12 Mar '14
by admin+ci-codelutin.com@codelutin.com 12 Mar '14
12 Mar '14
See <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
------------------------------------------
[...truncated 285 lines...]
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] - adding license header on file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] Scan 223 files header done in 388.675ms.
[INFO]
* uptodate header on 35 files.
* add header on 188 files.
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ wao-persistence ---
[INFO] Compiling 191 source files to <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[WARNING] <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>: Some input files use unchecked or unsafe operations.
[WARNING] <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>: Recompile with -Xlint:unchecked for details.
[INFO]
[INFO] --- animal-sniffer-maven-plugin:1.9:check (default) @ wao-persistence ---
[INFO] Checking unresolved references to org.codehaus.mojo.signature:java17:1.0
[INFO]
[INFO] --- jredmine-maven-plugin:1.6:generate-changes (jredmine-generate-changes) @ wao-persistence ---
[INFO] Skipping goal (runOnce flag is on, and was already executed).
[INFO]
[INFO] --- maven-antrun-plugin:1.7:run (generate-surefire-workdir) @ wao-persistence ---
[INFO] Executing tasks
main:
[mkdir] Created dir: <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] Executed tasks
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ wao-persistence ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ wao-persistence ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:2.16:test (default-test) @ wao-persistence ---
[JENKINS] Recording test results
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ wao-persistence ---
[INFO] Building jar: <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO]
[INFO] >>> maven-source-plugin:2.2.1:jar (attach-sources) @ wao-persistence >>>
[INFO]
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (ensure-no-container-api) @ wao-persistence ---
[INFO]
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (check-project-files) @ wao-persistence ---
[INFO]
[INFO] --- helper-maven-plugin:2.1:share-server-secret (get-redmine-login) @ wao-persistence ---
[INFO] Skipping goal (runOnce flag is on and goal was already executed).
[INFO]
[INFO] --- eugene-maven-plugin:2.7.3:generate (generate-entities) @ wao-persistence ---
[INFO] Process phase [zargo] for one entry.
[INFO] Expanding 1 xmi file(s) from <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] Copy file <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…> to <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] No file generated.
[INFO] Process phase [xmi] for one entry.
[INFO] Processing XSL tranformation on <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…> for 1 file(s).
[INFO] No file generated.
[INFO] Process phase [model] for one entry.
WARN [pool-1-thread-1 for channel] (AbstractObjectModelReader.java:126) beforeReadFile - No properties provider filled, will instanciate a new default one
WARN [pool-1-thread-1 for channel] (AbstractObjectModelReader.java:577) getObjectElements - Invalid tagvalue [fr.ifremer.wao.entity.Boat.attribute.boatDistrict.tagValue.lazy] : Element 'boatDistrict' of type 'attribute' on classifier 'fr.ifremer.wao.entity.Boat' is null.
WARN [pool-1-thread-1 for channel] (AbstractObjectModelReader.java:577) getObjectElements - Invalid tagvalue [fr.ifremer.wao.entity.WaoUser.attribute.SampleRow.tagValue.inverse] : Element 'SampleRow' of type 'attribute' on classifier 'fr.ifremer.wao.entity.WaoUser' is null.
WARN [pool-1-thread-1 for channel] (AbstractObjectModelReader.java:459) loadTagValue - Invalid tag value [fr.ifremer.wao.entity.WaoUser.attribute.allegroWallet.tagValue.unique] : this tagvalue 'unique' is unkown.
WARN [pool-1-thread-1 for channel] (AbstractObjectModelReader.java:294) loadModelTagValue - Invalid model tag value [model.tagValue.copyright] : the tagvalue 'copyright' is unkown.
WARN [pool-1-thread-1 for channel] (AbstractObjectModelReader.java:294) loadModelTagValue - Invalid model tag value [model.tagValue.exceptionClass] : the tagvalue 'exceptionClass' is unkown.
WARN [pool-1-thread-1 for channel] (AbstractObjectModelReader.java:294) loadModelTagValue - Invalid model tag value [model.tagValue.java.lang.String] : the tagvalue 'java.lang.String' is unkown.
WARN [pool-1-thread-1 for channel] (AbstractObjectModelReader.java:303) loadModelTagValue - Invalid model tag value [model.tagValue.useEnumerationName] : this tagvalue 'useEnumerationName' can not be apply on the model.
INFO [pool-1-thread-1 for channel] (AbstractObjectModelReader.java:270) loadModelProperties - 32 tag values were succesfull imported from <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO] No file generated.
[INFO] Apply generator TopiaMetaTransformer
WARN [pool-1-thread-1 for channel] (TopiaMetaTransformer.java:110) validateModel - [VALIDATION] [getUserProfile([fr.ifremer.wao.entity.ObsProgram obsProgram<<[]>> tagvalue: {}])<<[]>> throws [] tagvalue: {}] Operation name getUserProfile is already reserved for a getter/setter of an entity attribute
WARN [pool-1-thread-1 for channel] (TopiaMetaTransformer.java:110) validateModel - [VALIDATION] [setDCF5Code([java.lang.String codes<<[]>> tagvalue: {}, java.lang.String separatorRegex<<[]>> tagvalue: {}])<<[]>> throws [] tagvalue: {}] Operation name setDCF5Code is already reserved for a getter/setter of an entity attribute
WARN [pool-1-thread-1 for channel] (TopiaMetaTransformer.java:110) validateModel - [VALIDATION] [setLogText([fr.ifremer.wao.entity.SampleRow oldSampleRow<<[]>> tagvalue: {}, fr.ifremer.wao.entity.SampleRow newSampleRow<<[]>> tagvalue: {}])<<[]>> throws [] tagvalue: {}] Operation name setLogText is already reserved for a getter/setter of an entity attribute
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.WaoUserImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.FishingGearDCFImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.TerrestrialDivisionImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.DCF5CodeImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.SampleRowImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.BoatImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.ContactImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.IndicatorImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.ContactStateMotifImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.TerrestrialLocationImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.BoatGroupImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.CompanyImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.IndicatorLevelImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.FishingZoneImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.SampleMonthImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.FleetImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.UserProfileImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.TargetSpeciesDCFImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.ObsDebCodeImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.SampleRowLogImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.NewsImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.WaoUserTopiaDao], already found in class-path.
[WARNING] Failed to getClass for org.apache.maven.plugin.source.SourceJarMojo
[INFO]
[INFO] <<< maven-source-plugin:2.2.1:jar (attach-sources) @ wao-persistence <<<
[INFO]
[INFO] --- maven-source-plugin:2.2.1:jar (attach-sources) @ wao-persistence ---
[INFO] Building jar: <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO]
[INFO] --- maven-javadoc-plugin:2.9.1:jar (attach-javadocs) @ wao-persistence ---
[INFO] Building jar: <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-persistence/…>
[INFO]
[INFO] --- maven-site-plugin:3.3:attach-descriptor (attach-descriptor) @ wao-persistence ---
[INFO]
[INFO] --- helper-maven-plugin:2.1:share-server-secret (get-pgp-passphrase) @ wao-persistence ---
[INFO] Exporting server [gpg-signer] username in ${gpg.keyname}
[INFO] Exporting server [gpg-signer] password in ${gpg.passphrase}
[INFO]
[INFO] --- helper-maven-plugin:2.1:collect-files (collect-build-artifacts) @ wao-persistence ---
[INFO] Loaded /var/local/forge/data/codelutin.com/jenkins/workspace/wao-nightly/trunk/target/collect-artifacts.txt
[INFO] Copying wao-persistence-4.0-SNAPSHOT.jar to /var/local/forge/data/codelutin.com/jenkins/workspace/wao-nightly/trunk/target/collect/fr.ifremer--wao-persistence/wao-persistence-4.0-SNAPSHOT.jar
[INFO] Copying THIRD-PARTY.properties to /var/local/forge/data/codelutin.com/jenkins/workspace/wao-nightly/trunk/target/collect/fr.ifremer--wao-persistence/THIRD-PARTY.properties
[INFO] Copying wao-persistence-4.0-SNAPSHOT-sources.jar to /var/local/forge/data/codelutin.com/jenkins/workspace/wao-nightly/trunk/target/collect/fr.ifremer--wao-persistence/wao-persistence-4.0-SNAPSHOT-sources.jar
[INFO] Copying wao-persistence-4.0-SNAPSHOT-javadoc.jar to /var/local/forge/data/codelutin.com/jenkins/workspace/wao-nightly/trunk/target/collect/fr.ifremer--wao-persistence/wao-persistence-4.0-SNAPSHOT-javadoc.jar
[INFO]
[INFO] --- helper-maven-plugin:2.1:collect-files (collect-build-attachements) @ wao-persistence ---
[WARNING] Skipping goal (No file to collect).
[INFO]
[INFO] --- maven-gpg-plugin:1.4:sign (sign-artifacts) @ wao-persistence ---
[INFO]
[INFO] --- maven-dependency-plugin:2.8:analyze-only (analyze) @ wao-persistence ---
[INFO] Used declared dependencies found:
[INFO] org.nuiton.topia:topia-persistence:jar:3.0-SNAPSHOT:compile
[INFO] org.nuiton:nuiton-config:jar:3.0-alpha-1:compile
[INFO] org.nuiton.i18n:nuiton-i18n:jar:2.5.2:compile
[INFO] org.apache.commons:commons-lang3:jar:3.1:compile
[INFO] commons-logging:commons-logging:jar:1.1.3:compile
[INFO] com.google.guava:guava:jar:15.0:compile
[WARNING] Used undeclared dependencies found:
[WARNING] org.nuiton:nuiton-utils:jar:3.0-SNAPSHOT:compile
[WARNING] org.hibernate:hibernate-core:jar:4.2.8.Final:compile
[WARNING] commons-collections:commons-collections:jar:3.2.1:compile
[WARNING] Unused declared dependencies found:
[WARNING] org.apache.commons:commons-collections4:jar:4.0:compile
[JENKINS] Archiving disabled
1
9
r1708 - in trunk: wao-persistence/src/main/java/fr/ifremer/wao/entity wao-persistence/src/main/resources/i18n wao-services/src/main/java/fr/ifremer/wao/services/service wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations wao-services/src/test/java/fr/ifremer/wao/services/service wao-services/src/test/resources wao-services/src/test/resources/import
by bleny@users.forge.codelutin.com 28 Feb '14
by bleny@users.forge.codelutin.com 28 Feb '14
28 Feb '14
Author: bleny
Date: 2014-02-28 18:37:02 +0100 (Fri, 28 Feb 2014)
New Revision: 1708
Url: http://codelutin.com/projects/wao/repository/revisions/1708
Log:
fix issues due to using guava for indexation, introduce ReferentielServiceTest
Added:
trunk/wao-services/src/test/java/fr/ifremer/wao/services/service/ReferentialServiceTest.java
trunk/wao-services/src/test/resources/import/
Removed:
trunk/wao-services/src/test/resources/import/activity.csv
trunk/wao-services/src/test/resources/import/activity.csv.gz
trunk/wao-services/src/test/resources/import/boat_districts.kml
trunk/wao-services/src/test/resources/import/dates.csv
trunk/wao-services/src/test/resources/import/misc.csv
Modified:
trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/TerrestrialLocationImpl.java
trunk/wao-persistence/src/main/resources/i18n/wao-persistence_en_GB.properties
trunk/wao-persistence/src/main/resources/i18n/wao-persistence_fr_FR.properties
trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ReferentialService.java
trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/BoatParserFormatter.java
trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/CompanyParserFormatter.java
trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/ContactStateMotivesParserFormatter.java
trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/FishingZonesParserFormatter.java
trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/ObsDebCodeParserFormatter.java
trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/PortParserFormatter.java
trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/RegionParserFormatter.java
trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/RegionsParser.java
trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/SampleRowParserFormatter.java
trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/UserParserFormatter.java
trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/UsersParserFormatter.java
Modified: trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/TerrestrialLocationImpl.java
===================================================================
--- trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/TerrestrialLocationImpl.java 2014-02-28 16:53:44 UTC (rev 1707)
+++ trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/TerrestrialLocationImpl.java 2014-02-28 17:37:02 UTC (rev 1708)
@@ -21,6 +21,7 @@
package fr.ifremer.wao.entity;
import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.nuiton.i18n.I18n;
public class TerrestrialLocationImpl extends TerrestrialLocationAbstract {
@@ -42,8 +43,7 @@
public String getDistrictName() {
String districtName = super.getDistrictName();
if (districtName == null) {
- // districtName = WaoUtils._("wao.business.other");
- throw new UnsupportedOperationException();
+ districtName = I18n.t("wao.business.other");
}
return districtName;
}
Modified: trunk/wao-persistence/src/main/resources/i18n/wao-persistence_en_GB.properties
===================================================================
--- trunk/wao-persistence/src/main/resources/i18n/wao-persistence_en_GB.properties 2014-02-28 16:53:44 UTC (rev 1707)
+++ trunk/wao-persistence/src/main/resources/i18n/wao-persistence_en_GB.properties 2014-02-28 17:37:02 UTC (rev 1708)
@@ -136,3 +136,4 @@
fr.ifremer.wao.entity.TargetSpeciesDCF.SPF=Small pelagic
fr.ifremer.wao.entity.TerrestrialDivision=Terrestrial divisions
fr.ifremer.wao.entity.TerrestrialLocation=Terrestrial locations
+wao.business.other=
Modified: trunk/wao-persistence/src/main/resources/i18n/wao-persistence_fr_FR.properties
===================================================================
--- trunk/wao-persistence/src/main/resources/i18n/wao-persistence_fr_FR.properties 2014-02-28 16:53:44 UTC (rev 1707)
+++ trunk/wao-persistence/src/main/resources/i18n/wao-persistence_fr_FR.properties 2014-02-28 17:37:02 UTC (rev 1708)
@@ -136,3 +136,4 @@
fr.ifremer.wao.entity.TargetSpeciesDCF.SPF=Petits pélagiques
fr.ifremer.wao.entity.TerrestrialDivision=Stratification géographique
fr.ifremer.wao.entity.TerrestrialLocation=Lieux terrestres
+wao.business.other=
Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ReferentialService.java
===================================================================
--- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ReferentialService.java 2014-02-28 16:53:44 UTC (rev 1707)
+++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ReferentialService.java 2014-02-28 17:37:02 UTC (rev 1708)
@@ -26,12 +26,10 @@
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableSet;
-import com.google.common.collect.Maps;
import fr.ifremer.wao.WaoTechnicalException;
import fr.ifremer.wao.entity.Boat;
import fr.ifremer.wao.entity.BoatGroup;
import fr.ifremer.wao.entity.BoatGroupTopiaDao;
-import fr.ifremer.wao.entity.BoatGroups;
import fr.ifremer.wao.entity.BoatTopiaDao;
import fr.ifremer.wao.entity.ContactState;
import fr.ifremer.wao.entity.ContactStateMotif;
@@ -43,7 +41,6 @@
import fr.ifremer.wao.entity.FishingZoneTopiaDao;
import fr.ifremer.wao.entity.Fleet;
import fr.ifremer.wao.entity.FleetTopiaDao;
-import fr.ifremer.wao.entity.Fleets;
import fr.ifremer.wao.entity.LocationType;
import fr.ifremer.wao.entity.ObsDebCode;
import fr.ifremer.wao.entity.ObsDebCodeDetails;
@@ -59,7 +56,6 @@
import fr.ifremer.wao.entity.SampleRowTopiaDao;
import fr.ifremer.wao.entity.ShipOwner;
import fr.ifremer.wao.entity.ShipOwnerTopiaDao;
-import fr.ifremer.wao.entity.ShipOwners;
import fr.ifremer.wao.entity.TargetSpeciesDCF;
import fr.ifremer.wao.entity.TargetSpeciesDCFTopiaDao;
import fr.ifremer.wao.entity.TerrestrialDivision;
@@ -857,14 +853,14 @@
FleetTopiaDao fleetDao = getPersistenceContext().getFleetDao();
// load data that will be linked to the boat
- Map<String, ShipOwner> shipOwners =
- Maps.uniqueIndex(
- shipOwnerDao.findAll(),
- ShipOwners.getCode());
- Map<String, Fleet> fleets =
- Maps.uniqueIndex(
- fleetDao.findAll(),
- Fleets.getCode());
+ Map<String, ShipOwner> shipOwners = new HashMap<>();
+ for (ShipOwner shipOwner : shipOwnerDao.findAll()) {
+ shipOwners.put(shipOwner.getCode(), shipOwner);
+ }
+ Map<String, Fleet> fleets = new HashMap<>();
+ for (Fleet fleet : fleetDao.findAll()) {
+ fleets.put(fleet.getCode(), fleet);
+ }
// now iterating over the lines of the CSV
try {
@@ -931,12 +927,12 @@
// Getting some DAOs
BoatTopiaDao boatDao = getPersistenceContext().getBoatDao();
- BoatGroupTopiaDao boatGroupDAO = getPersistenceContext().getBoatGroupDao();
+ BoatGroupTopiaDao boatGroupDao = getPersistenceContext().getBoatGroupDao();
- Map<String, BoatGroup> boatGroups =
- Maps.uniqueIndex(
- boatGroupDAO.findAll(),
- BoatGroups.getCode());
+ Map<String, BoatGroup> boatGroups = new HashMap<>();
+ for (BoatGroup boatGroup : boatGroupDao.findAll()) {
+ boatGroups.put(boatGroup.getCode(), boatGroup);
+ }
// now iterating over the lines of the CSV
try {
@@ -949,7 +945,7 @@
} else {
BoatGroup boatGroup = boatGroups.get(boatGroupCode);
if (boatGroup == null) {
- boatGroup = boatGroupDAO.create(boat.getBoatGroup());
+ boatGroup = boatGroupDao.create(boat.getBoatGroup());
boatGroups.put(boatGroupCode, boatGroup);
}
boat.setBoatGroup(boatGroup);
Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/BoatParserFormatter.java
===================================================================
--- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/BoatParserFormatter.java 2014-02-28 16:53:44 UTC (rev 1707)
+++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/BoatParserFormatter.java 2014-02-28 17:37:02 UTC (rev 1708)
@@ -23,6 +23,7 @@
*/
package fr.ifremer.wao.services.service.csv.operations;
+import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Maps;
import fr.ifremer.wao.entity.Boat;
import fr.ifremer.wao.entity.Boats;
@@ -31,12 +32,11 @@
import java.text.ParseException;
import java.util.List;
-import java.util.Map;
/** Parse a boat (identification based on the immatriculation) */
public class BoatParserFormatter implements ValueParserFormatter<Boat> {
- protected Map<Integer, Boat> indexedBoats;
+ protected ImmutableMap<Integer, Boat> indexedBoats;
public BoatParserFormatter(List<Boat> boats) {
indexedBoats = Maps.uniqueIndex(boats, Boats.getImmatriculation());
Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/CompanyParserFormatter.java
===================================================================
--- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/CompanyParserFormatter.java 2014-02-28 16:53:44 UTC (rev 1707)
+++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/CompanyParserFormatter.java 2014-02-28 17:37:02 UTC (rev 1708)
@@ -23,6 +23,7 @@
*/
package fr.ifremer.wao.services.service.csv.operations;
+import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Maps;
import fr.ifremer.wao.entity.Companies;
import fr.ifremer.wao.entity.Company;
@@ -31,14 +32,13 @@
import java.text.ParseException;
import java.util.List;
-import java.util.Map;
/** Parse a company according to it's name. */
public class CompanyParserFormatter implements ValueParserFormatter<Company> {
protected List<Company> companies;
- protected Map<String, Company> indexedCompanies;
+ protected ImmutableMap<String, Company> indexedCompanies;
public CompanyParserFormatter(List<Company> companies) {
this.companies = companies;
Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/ContactStateMotivesParserFormatter.java
===================================================================
--- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/ContactStateMotivesParserFormatter.java 2014-02-28 16:53:44 UTC (rev 1707)
+++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/ContactStateMotivesParserFormatter.java 2014-02-28 17:37:02 UTC (rev 1708)
@@ -23,6 +23,7 @@
*/
package fr.ifremer.wao.services.service.csv.operations;
+import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Maps;
import fr.ifremer.wao.entity.ContactStateMotif;
import fr.ifremer.wao.entity.ContactStateMotives;
@@ -32,13 +33,12 @@
import java.text.ParseException;
import java.util.List;
-import java.util.Map;
public class ContactStateMotivesParserFormatter implements ValueParserFormatter<ContactStateMotif> {
protected List<ContactStateMotif> motives;
- protected Map<String, ContactStateMotif> indexedMotives;
+ protected ImmutableMap<String, ContactStateMotif> indexedMotives;
public ContactStateMotivesParserFormatter(List<ContactStateMotif> motives) {
this.motives = motives;
Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/FishingZonesParserFormatter.java
===================================================================
--- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/FishingZonesParserFormatter.java 2014-02-28 16:53:44 UTC (rev 1707)
+++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/FishingZonesParserFormatter.java 2014-02-28 17:37:02 UTC (rev 1708)
@@ -23,6 +23,7 @@
*/
package fr.ifremer.wao.services.service.csv.operations;
+import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Maps;
import fr.ifremer.wao.entity.FishingZone;
import fr.ifremer.wao.entity.FishingZones;
@@ -33,14 +34,13 @@
import java.text.ParseException;
import java.util.LinkedList;
import java.util.List;
-import java.util.Map;
/**
* Consiste en plusieurs codes de zones de pêches séparés par des " / ".
*/
public class FishingZonesParserFormatter implements ValueParserFormatter<List<FishingZone>> {
- protected Map<String, FishingZone> indexedFishingZones;
+ protected ImmutableMap<String, FishingZone> indexedFishingZones;
protected List<FishingZone> fishingZones;
Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/ObsDebCodeParserFormatter.java
===================================================================
--- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/ObsDebCodeParserFormatter.java 2014-02-28 16:53:44 UTC (rev 1707)
+++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/ObsDebCodeParserFormatter.java 2014-02-28 17:37:02 UTC (rev 1708)
@@ -23,6 +23,7 @@
*/
package fr.ifremer.wao.services.service.csv.operations;
+import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Maps;
import fr.ifremer.wao.entity.ObsDebCode;
import fr.ifremer.wao.entity.ObsDebCodes;
@@ -32,11 +33,10 @@
import java.text.ParseException;
import java.util.List;
-import java.util.Map;
public class ObsDebCodeParserFormatter implements ValueParserFormatter<ObsDebCode> {
- protected Map<String, ObsDebCode> indexedObsDebCodes;
+ protected ImmutableMap<String, ObsDebCode> indexedObsDebCodes;
protected List<ObsDebCode> obsDebCodes;
Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/PortParserFormatter.java
===================================================================
--- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/PortParserFormatter.java 2014-02-28 16:53:44 UTC (rev 1707)
+++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/PortParserFormatter.java 2014-02-28 17:37:02 UTC (rev 1708)
@@ -23,6 +23,7 @@
*/
package fr.ifremer.wao.services.service.csv.operations;
+import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Maps;
import fr.ifremer.wao.entity.TerrestrialLocation;
import fr.ifremer.wao.entity.TerrestrialLocations;
@@ -30,7 +31,6 @@
import org.nuiton.csv.ValueParserFormatter;
import java.util.List;
-import java.util.Map;
public class PortParserFormatter implements ValueParserFormatter<TerrestrialLocation> {
@@ -39,7 +39,7 @@
* and all the values must have {@link fr.ifremer.wao.entity.TerrestrialLocation#getLocationType()} at
* {@link fr.ifremer.wao.entity.LocationType#PORT}.
*/
- protected Map<String, TerrestrialLocation> ports;
+ protected ImmutableMap<String, TerrestrialLocation> ports;
protected boolean allowNullValue;
Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/RegionParserFormatter.java
===================================================================
--- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/RegionParserFormatter.java 2014-02-28 16:53:44 UTC (rev 1707)
+++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/RegionParserFormatter.java 2014-02-28 17:37:02 UTC (rev 1708)
@@ -23,6 +23,7 @@
*/
package fr.ifremer.wao.services.service.csv.operations;
+import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Maps;
import fr.ifremer.wao.entity.TerrestrialLocation;
import fr.ifremer.wao.entity.TerrestrialLocations;
@@ -30,13 +31,12 @@
import java.text.ParseException;
import java.util.List;
-import java.util.Map;
public class RegionParserFormatter implements ValueParserFormatter<TerrestrialLocation> {
protected List<TerrestrialLocation> regions;
- protected Map<String, TerrestrialLocation> indexedRegions;
+ protected ImmutableMap<String, TerrestrialLocation> indexedRegions;
public RegionParserFormatter(List<TerrestrialLocation> regions) {
this.regions = regions;
Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/RegionsParser.java
===================================================================
--- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/RegionsParser.java 2014-02-28 16:53:44 UTC (rev 1707)
+++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/RegionsParser.java 2014-02-28 17:37:02 UTC (rev 1708)
@@ -23,6 +23,7 @@
*/
package fr.ifremer.wao.services.service.csv.operations;
+import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Maps;
import fr.ifremer.wao.entity.TerrestrialLocation;
import fr.ifremer.wao.entity.TerrestrialLocations;
@@ -31,13 +32,12 @@
import java.text.ParseException;
import java.util.LinkedList;
import java.util.List;
-import java.util.Map;
public class RegionsParser implements ValueParser<List<TerrestrialLocation>> {
protected List<TerrestrialLocation> regions;
- protected Map<String, TerrestrialLocation> indexedRegions;
+ protected ImmutableMap<String, TerrestrialLocation> indexedRegions;
public RegionsParser(List<TerrestrialLocation> regions) {
this.regions = regions;
Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/SampleRowParserFormatter.java
===================================================================
--- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/SampleRowParserFormatter.java 2014-02-28 16:53:44 UTC (rev 1707)
+++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/SampleRowParserFormatter.java 2014-02-28 17:37:02 UTC (rev 1708)
@@ -23,6 +23,7 @@
*/
package fr.ifremer.wao.services.service.csv.operations;
+import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Maps;
import fr.ifremer.wao.entity.SampleRow;
import fr.ifremer.wao.entity.SampleRows;
@@ -32,11 +33,10 @@
import java.text.ParseException;
import java.util.List;
-import java.util.Map;
public class SampleRowParserFormatter implements ValueParserFormatter<SampleRow> {
- protected Map<String, SampleRow> indexedSampleRows;
+ protected ImmutableMap<String, SampleRow> indexedSampleRows;
public SampleRowParserFormatter(List<SampleRow> sampleRows) {
indexedSampleRows = Maps.uniqueIndex(sampleRows, SampleRows.getCode());
Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/UserParserFormatter.java
===================================================================
--- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/UserParserFormatter.java 2014-02-28 16:53:44 UTC (rev 1707)
+++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/UserParserFormatter.java 2014-02-28 17:37:02 UTC (rev 1708)
@@ -24,6 +24,7 @@
package fr.ifremer.wao.services.service.csv.operations;
+import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Maps;
import fr.ifremer.wao.entity.WaoUser;
import fr.ifremer.wao.entity.WaoUsers;
@@ -32,12 +33,11 @@
import java.text.ParseException;
import java.util.List;
-import java.util.Map;
public class UserParserFormatter implements ValueParserFormatter<WaoUser> {
/** all waoUsers in the database when import was started, indexed by logins */
- protected Map<String, WaoUser> indexedWaoUsers;
+ protected ImmutableMap<String, WaoUser> indexedWaoUsers;
public UserParserFormatter(List<WaoUser> waoUsers) {
this.indexedWaoUsers = Maps.uniqueIndex(waoUsers, WaoUsers.getLogin());
Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/UsersParserFormatter.java
===================================================================
--- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/UsersParserFormatter.java 2014-02-28 16:53:44 UTC (rev 1707)
+++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/UsersParserFormatter.java 2014-02-28 17:37:02 UTC (rev 1708)
@@ -23,6 +23,7 @@
*/
package fr.ifremer.wao.services.service.csv.operations;
+import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Iterables;
import com.google.common.collect.Maps;
import fr.ifremer.wao.entity.WaoUser;
@@ -34,14 +35,13 @@
import java.text.ParseException;
import java.util.LinkedList;
import java.util.List;
-import java.util.Map;
public class UsersParserFormatter implements ValueParserFormatter<List<WaoUser>> {
protected static final String SEPARATOR = ",";
/** all waoUsers in the database when import was started, indexed by logins */
- protected Map<String, WaoUser> indexedWaoUsers;
+ protected ImmutableMap<String, WaoUser> indexedWaoUsers;
public UsersParserFormatter(List<WaoUser> waoUsers) {
this.indexedWaoUsers = Maps.uniqueIndex(waoUsers, WaoUsers.getLogin());
Added: trunk/wao-services/src/test/java/fr/ifremer/wao/services/service/ReferentialServiceTest.java
===================================================================
--- trunk/wao-services/src/test/java/fr/ifremer/wao/services/service/ReferentialServiceTest.java (rev 0)
+++ trunk/wao-services/src/test/java/fr/ifremer/wao/services/service/ReferentialServiceTest.java 2014-02-28 17:37:02 UTC (rev 1708)
@@ -0,0 +1,142 @@
+package fr.ifremer.wao.services.service;
+
+import fr.ifremer.wao.services.AbstractWaoServiceTest;
+import org.apache.commons.io.IOUtils;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+
+import java.io.InputStream;
+import java.util.Date;
+
+public class ReferentialServiceTest extends AbstractWaoServiceTest {
+
+ private static final Log log = LogFactory.getLog(ReferentialServiceTest.class);
+
+ protected ReferentialService service;
+
+ @Before
+ public void setUp() {
+ getServiceContext().setDate(new Date(1393607049651l));
+ service = newService(ReferentialService.class);
+ }
+
+ @Test
+ public void testImportFishingZones() {
+ InputStream input = null;
+ try {
+ input = getClass().getResourceAsStream("/import/zonesPeche.csv");
+ service.importFishingZones(input);
+ } catch (ImportErrorException e) {
+ if (log.isDebugEnabled()) {
+ log.debug("unexpected exception raised", e);
+ }
+ Assert.fail("exception should not be raised");
+ } finally {
+ IOUtils.closeQuietly(input);
+ }
+ }
+
+ @Test
+ public void testImportTerrestrialLocations() {
+ InputStream input = null;
+ try {
+ input = getClass().getResourceAsStream("/terrestrialLocations.csv");
+ service.importTerrestrialLocations(input);
+ } catch (ImportErrorException e) {
+ if (log.isDebugEnabled()) {
+ log.debug("unexpected exception raised", e);
+ }
+ Assert.fail("exception should not be raised");
+ } finally {
+ IOUtils.closeQuietly(input);
+ }
+ }
+
+ @Test
+ public void testImportContactStateMotives() {
+ testImportTerrestrialLocations();
+ InputStream input = null;
+ try {
+ input = getClass().getResourceAsStream("/motifs.csv");
+ service.importContactStateMotives(input);
+ } catch (ImportErrorException e) {
+ if (log.isDebugEnabled()) {
+ log.debug("unexpected exception raised", e);
+ }
+ Assert.fail("exception should not be raised");
+ } finally {
+ IOUtils.closeQuietly(input);
+ }
+ }
+
+ @Test
+ public void testImportTerrestrialDivisions() {
+ testImportTerrestrialLocations();
+ InputStream input = null;
+ try {
+ input = getClass().getResourceAsStream("/import/purifiedTerrestrialDivisions.csv");
+ service.importTerrestrialDivisions(input);
+ } catch (ImportErrorException e) {
+ if (log.isDebugEnabled()) {
+ log.debug("unexpected exception raised", e);
+ }
+ Assert.fail("exception should not be raised");
+ } finally {
+ IOUtils.closeQuietly(input);
+ }
+ }
+
+ @Test
+ public void testImportObsDebCodes() {
+ testImportTerrestrialLocations();
+ InputStream input = null;
+ try {
+ input = getClass().getResourceAsStream("/obsDebCodes.csv");
+ service.importObsDebCodes(input);
+ } catch (ImportErrorException e) {
+ if (log.isDebugEnabled()) {
+ log.debug("unexpected exception raised", e);
+ }
+ Assert.fail("exception should not be raised");
+ } finally {
+ IOUtils.closeQuietly(input);
+ }
+ }
+
+ @Test
+ public void testImportBoats() {
+ testImportTerrestrialLocations();
+ InputStream input = null;
+ try {
+ input = getClass().getResourceAsStream("/import/navires.csv");
+ service.importBoats(input);
+ } catch (ImportErrorException e) {
+ if (log.isDebugEnabled()) {
+ log.debug("unexpected exception raised", e);
+ }
+ Assert.fail("exception should not be raised");
+ } finally {
+ IOUtils.closeQuietly(input);
+ }
+ }
+
+ @Test
+ public void testImportBoatGroups() {
+ testImportBoats();
+ InputStream input = null;
+ try {
+ input = getClass().getResourceAsStream("/import/strates.csv");
+ service.importBoatGroups(input);
+ } catch (ImportErrorException e) {
+ if (log.isDebugEnabled()) {
+ log.debug("unexpected exception raised", e);
+ }
+ Assert.fail("exception should not be raised");
+ } finally {
+ IOUtils.closeQuietly(input);
+ }
+ }
+}
Property changes on: trunk/wao-services/src/test/resources/import
___________________________________________________________________
Added: svn:ignore
+ .~lock.echantillonnage.csv#
Added: svn:mergeinfo
+ /branches/wao-1.5.x/wao-business/src/test/resources/import:679-733
Deleted: trunk/wao-services/src/test/resources/import/activity.csv
===================================================================
--- tags/wao-3.4.1/wao-business/src/test/resources/import/activity.csv 2014-02-28 16:53:44 UTC (rev 1707)
+++ trunk/wao-services/src/test/resources/import/activity.csv 2014-02-28 17:37:02 UTC (rev 1708)
@@ -1,9 +0,0 @@
-"","SYNA_DATED","SYNA_DATEF","SYNA_AN","SYNA_MOI","ENQ_ID","INDQ_COD","CATD_COD","NAVS_COD","SYNA_NOMJDM","SYNA_NOMJDP","SYNA_NOMHE","SYNA_TPOR_COD","SYNA_POR_COD","SYNA_POR_LIB","SYNA_QUA_COD","SYNA_QUA_LIB","META_ORDRE","ORII_COD","ORII_COURT_LIB","MET_ID","MET_COD","MET_LIB","GRA_COD","GRA_LIB","TSECT_COD","SECT_COD","SECT_LIB","zone","MET5","VIId"
-"1286","2008-02-01 00:00:00","2008-02-29 00:00:00","2008","02","932766","2","1","273129","12","11","4","6","XGV","Le Guilvinec","GV","Le Guilvinec","1","9","CNTS/M","193","OTBGA","Chalut de fond à panneaux (1 nav.) à divers gadidés","11","Etranger","13","31E3","Rectangle 31E3","CELT","OTB_DEF",FALSE
-"1287","2008-02-01 00:00:00","2008-02-29 00:00:00","2008","02","932766","2","1","273129","12","11","4","6","XGV","Le Guilvinec","GV","Le Guilvinec","1","9","CNTS/M","193","OTBGA","Chalut de fond à panneaux (1 nav.) à divers gadidés","11","Etranger","13","31E2","Rectangle 31E2","CELT","OTB_DEF",FALSE
-"1288","2008-07-01 00:00:00","2008-07-31 00:00:00","2008","07","914020","1","1","177474","10",NA,"3","6","XGV","Le Guilvinec","GV","Le Guilvinec","1","9","CNTS/M","307","TTBLN","Chaluts jumeaux à langoustines, galathées","16","Mixte","13","24E4","Rectangle 24E4","GASC","OTT_CRU",FALSE
-"24431","2008-10-01 00:00:00","2008-10-31 00:00:00","2008","10","968329","1","1","174592","15","15","4","6","ACN","Honfleur","CN","Caen","2","9","CNTS/M","211","OTBSO","Chalut de fond à panneaux (1 nav.) à soles","9","Côtier","14","27E930","Extérieur des 3 milles de Ouistreham à Villers/mer","NSEC","OTB_DEF",TRUE
-"24432","2008-08-01 00:00:00","2008-08-31 00:00:00","2008","08","967774","2","1","284595","4","4","3","6","ACN","Honfleur","CN","Caen","1","9","CNTS/M","211","OTBSO","Chalut de fond à panneaux (1 nav.) à soles","9","Côtier","14","27E930","Extérieur des 3 milles de Ouistreham à Villers/mer","NSEC","OTB_DEF",TRUE
-"24433","2008-09-01 00:00:00","2008-09-30 00:00:00","2008","09","966415","2","1","177474",NA,"8",NA,"6","ACN","Honfleur","CN","Caen","1","9","CNTS/M","211","OTBSO","Chalut de fond à panneaux (1 nav.) à soles","9","Côtier","14","27E930","Extérieur des 3 milles de Ouistreham à Villers/mer","NSEC","OTB_DEF",TRUE
-"24434","2008-08-01 00:00:00","2008-08-31 00:00:00","2008","08","968272","1","1","978419","25","25","4","6","ACN","Honfleur","CN","Caen","1","9","CNTS/M","211","OTBSO","Chalut de fond à panneaux (1 nav.) à soles","9","Côtier","14","27E930","Extérieur des 3 milles de Ouistreham à Villers/mer","NSEC","OTB_DEF",TRUE
-"43134","2008-05-01 00:00:00","2008-05-31 00:00:00","2008","05","961088","3","1","174592",NA,NA,"1","6","INA","Trentemoult (Nantes)",NA,"Nantes","1","7","ENQUETEUR","344","GNSLM","Filet maillant fixe à lamproie marine","9","Côtier","14","23E7L5","Loire domaine mixte lot 15","GASC","GNS_CAT",FALSE
\ No newline at end of file
Deleted: trunk/wao-services/src/test/resources/import/activity.csv.gz
===================================================================
(Binary files differ)
Deleted: trunk/wao-services/src/test/resources/import/boat_districts.kml
===================================================================
--- tags/wao-3.4.1/wao-business/src/test/resources/import/boat_districts.kml 2014-02-28 16:53:44 UTC (rev 1707)
+++ trunk/wao-services/src/test/resources/import/boat_districts.kml 2014-02-28 17:37:02 UTC (rev 1708)
@@ -1,102 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<!--
- #%L
- Wao :: Business
-
- $Id$
- $HeadURL$
- %%
- Copyright (C) 2009 - 2010 Ifremer
- %%
- 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%
- -->
-
-<kml xmlns="http://www.opengis.net/kml/2.2">
- <Document>
- <Folder>
- <name>IFR_SIH_QUARTIER_MAR_PT</name>
- <Schema name="IFR_SIH_QUARTIER_MAR_PT" id="IFR_SIH_QUARTIER_MAR_PT">
- <SimpleField name="Name" type="string"></SimpleField>
- <SimpleField name="Description" type="string"></SimpleField>
- <SimpleField name="OBJECTID" type="int"></SimpleField>
- <SimpleField name="LIEU_LIB" type="string"></SimpleField>
- <SimpleField name="LIEU_COD" type="string"></SimpleField>
- <SimpleField name="TLIEU_COD" type="int"></SimpleField>
- <SimpleField name="L_OCEAN" type="string"></SimpleField>
- <SimpleField name="L_PAYS" type="string"></SimpleField>
- </Schema>
- <Placemark>
- <name>34</name>
- <description>Sete</description>
- <ExtendedData>
- <SchemaData schemaUrl="#IFR_SIH_QUARTIER_MAR_PT">
- <SimpleData name="Name">2</SimpleData>
- <SimpleData name="Description">Unio</SimpleData>
- <SimpleData name="OBJECTID">PV</SimpleData>
- <SimpleData name="LIEU_LIB">13</SimpleData>
- <SimpleData name="LIEU_COD">ME</SimpleData>
- <SimpleData name="TLIEU_COD">FRA</SimpleData>
- <SimpleData name="L_OCEAN">0</SimpleData>
- <SimpleData name="L_PAYS">POINT</SimpleData>
- </SchemaData>
- </ExtendedData>
- <Point>
- <coordinates>3.697544304924308,43.400978635376085
- </coordinates>
- </Point>
- </Placemark>
- <Placemark>
- <name>30</name>
- <description>Martigues</description>
- <ExtendedData>
- <SchemaData schemaUrl="#IFR_SIH_QUARTIER_MAR_PT">
- <SimpleData name="Name">30</SimpleData>
- <SimpleData name="Description">Uxirgue</SimpleData>
- <SimpleData name="OBJECTID">DP</SimpleData>
- <SimpleData name="LIEU_LIB">13</SimpleData>
- <SimpleData name="LIEU_COD">ME</SimpleData>
- <SimpleData name="TLIEU_COD">FRA</SimpleData>
- <SimpleData name="L_OCEAN">1</SimpleData>
- <SimpleData name="L_PAYS">POINT</SimpleData>
- </SchemaData>
- </ExtendedData>
- <Point>
- <coordinates>5.05084975227851,43.405830559005189
- </coordinates>
- </Point>
- </Placemark>
- <Placemark>
- <name>29</name>
- <description>Marseille</description>
- <ExtendedData>
- <SchemaData schemaUrl="#IFR_SIH_QUARTIER_MAR_PT">
- <SimpleData name="Name">29</SimpleData>
- <SimpleData name="Description">Civik</SimpleData>
- <SimpleData name="OBJECTID">FK</SimpleData>
- <SimpleData name="LIEU_LIB">13</SimpleData>
- <SimpleData name="LIEU_COD">ME</SimpleData>
- <SimpleData name="TLIEU_COD">FRA</SimpleData>
- <SimpleData name="L_OCEAN">2</SimpleData>
- <SimpleData name="L_PAYS">POINT</SimpleData>
- </SchemaData>
- </ExtendedData>
- <Point>
- <coordinates>5.351948092148461,43.323330380088101
- </coordinates>
- </Point>
- </Placemark>
- </Folder>
- </Document>
-</kml>
Deleted: trunk/wao-services/src/test/resources/import/dates.csv
===================================================================
--- tags/wao-3.4.1/wao-business/src/test/resources/import/dates.csv 2014-02-28 16:53:44 UTC (rev 1707)
+++ trunk/wao-services/src/test/resources/import/dates.csv 2014-02-28 17:37:02 UTC (rev 1708)
@@ -1,2 +0,0 @@
-DATE_1,DATE_2,DATE_3,DATE_4
-10/02/2010,10/02/10,02/2010,10/02/10
\ No newline at end of file
Deleted: trunk/wao-services/src/test/resources/import/misc.csv
===================================================================
--- tags/wao-3.4.1/wao-business/src/test/resources/import/misc.csv 2014-02-28 16:53:44 UTC (rev 1707)
+++ trunk/wao-services/src/test/resources/import/misc.csv 2014-02-28 17:37:02 UTC (rev 1708)
@@ -1,5 +0,0 @@
-PLAN_CODE
-2009_M1
-2009_M11
-2009_M111
-2009_M1111
\ No newline at end of file
1
0
r1707 - trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations
by bleny@users.forge.codelutin.com 28 Feb '14
by bleny@users.forge.codelutin.com 28 Feb '14
28 Feb '14
Author: bleny
Date: 2014-02-28 17:53:44 +0100 (Fri, 28 Feb 2014)
New Revision: 1707
Url: http://codelutin.com/projects/wao/repository/revisions/1707
Log:
refs #4482 prevent NPE when indexing boat districts
Modified:
trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/DistrictParserFormatter.java
trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/DistrictsParserFormatter.java
Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/DistrictParserFormatter.java
===================================================================
--- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/DistrictParserFormatter.java 2014-02-28 16:52:18 UTC (rev 1706)
+++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/DistrictParserFormatter.java 2014-02-28 16:53:44 UTC (rev 1707)
@@ -25,13 +25,12 @@
*/
-import com.google.common.collect.Maps;
import fr.ifremer.wao.entity.TerrestrialLocation;
-import fr.ifremer.wao.entity.TerrestrialLocations;
import org.nuiton.csv.ValueParserFormatter;
import org.nuiton.i18n.I18n;
import java.text.ParseException;
+import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -41,12 +40,14 @@
public DistrictParserFormatter(List<TerrestrialLocation> districts) {
if (districts != null) {
+ indexedDistricts = new HashMap<>();
for (TerrestrialLocation district : districts) {
if ( ! district.isDistrict()) {
throw new IllegalArgumentException();
}
+ indexedDistricts.put(district.getDistrictCode(), district);
}
- indexedDistricts = Maps.uniqueIndex(districts, TerrestrialLocations.getDistrictCode());
+ // XXX brendan 28/02/14 on utilise pas Maps.uniqueIndex car la clé peut être null (quartier maritime « Hors France »)
}
}
Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/DistrictsParserFormatter.java
===================================================================
--- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/DistrictsParserFormatter.java 2014-02-28 16:52:18 UTC (rev 1706)
+++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/csv/operations/DistrictsParserFormatter.java 2014-02-28 16:53:44 UTC (rev 1707)
@@ -23,15 +23,14 @@
*/
package fr.ifremer.wao.services.service.csv.operations;
-import com.google.common.collect.Maps;
import fr.ifremer.wao.entity.TerrestrialLocation;
-import fr.ifremer.wao.entity.TerrestrialLocations;
import org.apache.commons.lang3.StringUtils;
import org.nuiton.csv.ValueParserFormatter;
import org.nuiton.i18n.I18n;
import java.text.ParseException;
import java.util.Collection;
+import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
@@ -41,14 +40,14 @@
protected Map<String, TerrestrialLocation> indexedDistricts;
public DistrictsParserFormatter(List<TerrestrialLocation> districts) {
- if (districts != null) {
- for (TerrestrialLocation district : districts) {
- if ( ! district.isDistrict()) {
- throw new IllegalArgumentException();
- }
+ indexedDistricts = new HashMap<>();
+ for (TerrestrialLocation district : districts) {
+ if ( ! district.isDistrict()) {
+ throw new IllegalArgumentException();
}
- indexedDistricts = Maps.uniqueIndex(districts, TerrestrialLocations.getDistrictCode());
+ indexedDistricts.put(district.getDistrictCode(), district);
}
+ // XXX brendan 28/02/14 on utilise pas Maps.uniqueIndex car la clé peut être null (quartier maritime « Hors France »)
}
@Override
1
0
r1706 - trunk/wao-services/src/test/java/fr/ifremer/wao/services
by bleny@users.forge.codelutin.com 28 Feb '14
by bleny@users.forge.codelutin.com 28 Feb '14
28 Feb '14
Author: bleny
Date: 2014-02-28 17:52:18 +0100 (Fri, 28 Feb 2014)
New Revision: 1706
Url: http://codelutin.com/projects/wao/repository/revisions/1706
Log:
prevent release failure by waiting infinitly for H2 unlocking while testing
Modified:
trunk/wao-services/src/test/java/fr/ifremer/wao/services/AbstractWaoServiceTest.java
Modified: trunk/wao-services/src/test/java/fr/ifremer/wao/services/AbstractWaoServiceTest.java
===================================================================
--- trunk/wao-services/src/test/java/fr/ifremer/wao/services/AbstractWaoServiceTest.java 2014-02-28 16:51:05 UTC (rev 1705)
+++ trunk/wao-services/src/test/java/fr/ifremer/wao/services/AbstractWaoServiceTest.java 2014-02-28 16:52:18 UTC (rev 1706)
@@ -128,21 +128,17 @@
File lockFile = new File(databaseRefFile, "h2data.lock.db");
- int countWaiting = 0;
-
- while (lockFile.exists() && countWaiting < 25) {
+ while (lockFile.exists()) {
+ if (log.isDebugEnabled()) {
+ log.debug("referential database is still locked, will wait 5 more seconds");
+ }
try {
- Thread.sleep(200);
+ Thread.sleep(5 * 1000);
} catch (InterruptedException e) {
throw new WaoTechnicalException("can't wait", e);
}
- countWaiting++;
}
- if (lockFile.exists()) {
- throw new WaoTechnicalException("database ref is not close after 5 seconds !");
- }
-
}
File databaseFile = new File(tempDirFile, databaseName);
1
0
28 Feb '14
Author: bleny
Date: 2014-02-28 17:51:05 +0100 (Fri, 28 Feb 2014)
New Revision: 1705
Url: http://codelutin.com/projects/wao/repository/revisions/1705
Log:
configure logging for tests
Added:
trunk/wao-services/src/test/resources/log4j.properties
Added: trunk/wao-services/src/test/resources/log4j.properties
===================================================================
--- trunk/wao-services/src/test/resources/log4j.properties (rev 0)
+++ trunk/wao-services/src/test/resources/log4j.properties 2014-02-28 16:51:05 UTC (rev 1705)
@@ -0,0 +1,15 @@
+log4j.rootCategory=WARN, console
+
+log4j.appender.console=org.apache.log4j.ConsoleAppender
+log4j.appender.console.layout=org.apache.log4j.PatternLayout
+log4j.appender.console.layout.ConversionPattern=%d{yyyy/MM/dd hh:mm:ss} %5p (%F:%L) %M %m%n
+
+# global level
+log4j.logger.fr.ifremer.wao=TRACE
+
+### persistence level
+# log4j.logger.org.nuiton.topia=TRACE
+# log4j.logger.fr.gouv.social.encahi.extranet.persistence=TRACE
+
+### services level
+# log4j.logger.fr.ifremer.wao.services=TRACE
1
0
Author: bleny
Date: 2014-02-28 17:50:03 +0100 (Fri, 28 Feb 2014)
New Revision: 1704
Url: http://codelutin.com/projects/wao/repository/revisions/1704
Log:
rename model and tagValues to prevent classpath conflict
Added:
trunk/wao-persistence/src/main/xmi/wao-model.properties
trunk/wao-persistence/src/main/xmi/wao-model.zargo
Removed:
trunk/wao-persistence/src/main/xmi/wao.properties
trunk/wao-persistence/src/main/xmi/wao.zargo
Copied: trunk/wao-persistence/src/main/xmi/wao-model.properties (from rev 1679, trunk/wao-persistence/src/main/xmi/wao.properties)
===================================================================
--- trunk/wao-persistence/src/main/xmi/wao-model.properties (rev 0)
+++ trunk/wao-persistence/src/main/xmi/wao-model.properties 2014-02-28 16:50:03 UTC (rev 1704)
@@ -0,0 +1,73 @@
+###
+# #%L
+# Wao :: Business
+#
+# $Id$
+# $HeadURL$
+# %%
+# Copyright (C) 2009 - 2010 Ifremer
+# %%
+# 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%
+###
+model.tagValue.copyright=/* *##%\n Copyright (C) 2009 Wao\n *##%*/
+model.tagValue.java.lang.String=text
+model.tagValue.exceptionClass=fr.ifremer.wao.WaoException
+model.tagValue.notGenerateToString=true
+model.tagValue.constantPrefix=PROPERTY_
+model.tagValue.useEnumerationName=true
+model.tagValue.indexForeignKeys=true
+
+# model.tagValue.doNotGenerateBooleanGetMethods=true
+
+#model.tagValue.useLegacyDAO=true
+
+fr.ifremer.wao.entity.WaoUser.attribute.userProfile.tagValue.lazy=false
+
+fr.ifremer.wao.entity.SampleRow.attribute.sampleMonth.tagValue.orderBy=periodDate
+fr.ifremer.wao.entity.SampleRow.attribute.fishingZone.tagValue.lazy=false
+fr.ifremer.wao.entity.SampleRow.attribute.fishingZone.tagValue.orderBy=facadeName,sectorName,districtCode
+fr.ifremer.wao.entity.SampleRow.attribute.company.tagValue.lazy=false
+fr.ifremer.wao.entity.SampleRow.attribute.profession.tagValue.lazy=false
+fr.ifremer.wao.entity.SampleRow.attribute.dCF5Code.tagValue.lazy=false
+fr.ifremer.wao.entity.DCF5Code.attribute.fishingGearDCF.tagValue.lazy=false
+fr.ifremer.wao.entity.DCF5Code.attribute.targetSpeciesDCF.tagValue.lazy=false
+#fr.ifremer.wao.entity.SampleRow.attribute.elligibleBoat.tagValue.lazy=false
+fr.ifremer.wao.entity.SampleRow.attribute.elligibleBoat.tagValue.orderBy=companyActive
+#fr.ifremer.wao.entity.SampleRow.attribute.sampleRowLog.tagValue.lazy=false
+fr.ifremer.wao.entity.SampleRow.attribute.sampleRowLog.tagValue.orderBy=topiaCreateDate desc
+
+fr.ifremer.wao.entity.SampleRowLog.attribute.author.tagValue.lazy=false
+
+fr.ifremer.wao.entity.FishingZone.attribute.sampleRow.tagValue.orderBy=code
+
+#fr.ifremer.wao.entity.Boat.attribute.shipOwner.tagValue.lazy=false
+fr.ifremer.wao.entity.Boat.attribute.boatDistrict.tagValue.lazy=false
+fr.ifremer.wao.entity.Boat.attribute.elligibleBoat.tagValue.orderBy=companyActive
+
+fr.ifremer.wao.entity.ElligibleBoat.attribute.boat.tagValue.lazy=false
+
+fr.ifremer.wao.entity.Contact.attribute.sampleRow.tagValue.lazy=false
+fr.ifremer.wao.entity.Contact.attribute.boat.tagValue.lazy=false
+
+fr.ifremer.wao.entity.TerrestrialDivision.attribute.regionIfremer.tagValue.lazy=false
+
+fr.ifremer.wao.entity.Indicator.attribute.indicatorLevel.tagValue.lazy=false
+fr.ifremer.wao.entity.IndicatorLog.attribute.author.tagValue.lazy=false
+fr.ifremer.wao.entity.Indicator.attribute.indicatorLevel.tagValue.orderBy=level
+
+fr.ifremer.wao.entity.SampleRow.attribute.observers.tagValue.inverse=false
+fr.ifremer.wao.entity.WaoUser.attribute.SampleRow.tagValue.inverse=true
+
+fr.ifremer.wao.entity.WaoUser.attribute.allegroWallet.tagValue.unique=true
Copied: trunk/wao-persistence/src/main/xmi/wao-model.zargo (from rev 1689, trunk/wao-persistence/src/main/xmi/wao.zargo)
===================================================================
(Binary files differ)
Deleted: trunk/wao-persistence/src/main/xmi/wao.properties
===================================================================
--- trunk/wao-persistence/src/main/xmi/wao.properties 2014-02-28 16:10:56 UTC (rev 1703)
+++ trunk/wao-persistence/src/main/xmi/wao.properties 2014-02-28 16:50:03 UTC (rev 1704)
@@ -1,73 +0,0 @@
-###
-# #%L
-# Wao :: Business
-#
-# $Id$
-# $HeadURL$
-# %%
-# Copyright (C) 2009 - 2010 Ifremer
-# %%
-# 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%
-###
-model.tagValue.copyright=/* *##%\n Copyright (C) 2009 Wao\n *##%*/
-model.tagValue.java.lang.String=text
-model.tagValue.exceptionClass=fr.ifremer.wao.WaoException
-model.tagValue.notGenerateToString=true
-model.tagValue.constantPrefix=PROPERTY_
-model.tagValue.useEnumerationName=true
-model.tagValue.indexForeignKeys=true
-
-# model.tagValue.doNotGenerateBooleanGetMethods=true
-
-#model.tagValue.useLegacyDAO=true
-
-fr.ifremer.wao.entity.WaoUser.attribute.userProfile.tagValue.lazy=false
-
-fr.ifremer.wao.entity.SampleRow.attribute.sampleMonth.tagValue.orderBy=periodDate
-fr.ifremer.wao.entity.SampleRow.attribute.fishingZone.tagValue.lazy=false
-fr.ifremer.wao.entity.SampleRow.attribute.fishingZone.tagValue.orderBy=facadeName,sectorName,districtCode
-fr.ifremer.wao.entity.SampleRow.attribute.company.tagValue.lazy=false
-fr.ifremer.wao.entity.SampleRow.attribute.profession.tagValue.lazy=false
-fr.ifremer.wao.entity.SampleRow.attribute.dCF5Code.tagValue.lazy=false
-fr.ifremer.wao.entity.DCF5Code.attribute.fishingGearDCF.tagValue.lazy=false
-fr.ifremer.wao.entity.DCF5Code.attribute.targetSpeciesDCF.tagValue.lazy=false
-#fr.ifremer.wao.entity.SampleRow.attribute.elligibleBoat.tagValue.lazy=false
-fr.ifremer.wao.entity.SampleRow.attribute.elligibleBoat.tagValue.orderBy=companyActive
-#fr.ifremer.wao.entity.SampleRow.attribute.sampleRowLog.tagValue.lazy=false
-fr.ifremer.wao.entity.SampleRow.attribute.sampleRowLog.tagValue.orderBy=topiaCreateDate desc
-
-fr.ifremer.wao.entity.SampleRowLog.attribute.author.tagValue.lazy=false
-
-fr.ifremer.wao.entity.FishingZone.attribute.sampleRow.tagValue.orderBy=code
-
-#fr.ifremer.wao.entity.Boat.attribute.shipOwner.tagValue.lazy=false
-fr.ifremer.wao.entity.Boat.attribute.boatDistrict.tagValue.lazy=false
-fr.ifremer.wao.entity.Boat.attribute.elligibleBoat.tagValue.orderBy=companyActive
-
-fr.ifremer.wao.entity.ElligibleBoat.attribute.boat.tagValue.lazy=false
-
-fr.ifremer.wao.entity.Contact.attribute.sampleRow.tagValue.lazy=false
-fr.ifremer.wao.entity.Contact.attribute.boat.tagValue.lazy=false
-
-fr.ifremer.wao.entity.TerrestrialDivision.attribute.regionIfremer.tagValue.lazy=false
-
-fr.ifremer.wao.entity.Indicator.attribute.indicatorLevel.tagValue.lazy=false
-fr.ifremer.wao.entity.IndicatorLog.attribute.author.tagValue.lazy=false
-fr.ifremer.wao.entity.Indicator.attribute.indicatorLevel.tagValue.orderBy=level
-
-fr.ifremer.wao.entity.SampleRow.attribute.observers.tagValue.inverse=false
-fr.ifremer.wao.entity.WaoUser.attribute.SampleRow.tagValue.inverse=true
-
-fr.ifremer.wao.entity.WaoUser.attribute.allegroWallet.tagValue.unique=true
Deleted: trunk/wao-persistence/src/main/xmi/wao.zargo
===================================================================
(Binary files differ)
1
0
r1703 - in trunk/wao-web/src/main/webapp/WEB-INF: content/obsmer decorators
by bleny@users.forge.codelutin.com 28 Feb '14
by bleny@users.forge.codelutin.com 28 Feb '14
28 Feb '14
Author: bleny
Date: 2014-02-28 17:10:56 +0100 (Fri, 28 Feb 2014)
New Revision: 1703
Url: http://codelutin.com/projects/wao/repository/revisions/1703
Log:
use s:text everywhere
Modified:
trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/edit-news-input.jsp
trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/news.jsp
trunk/wao-web/src/main/webapp/WEB-INF/decorators/layout.jsp
Modified: trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/edit-news-input.jsp
===================================================================
--- trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/edit-news-input.jsp 2014-02-28 16:06:46 UTC (rev 1702)
+++ trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/edit-news-input.jsp 2014-02-28 16:10:56 UTC (rev 1703)
@@ -16,11 +16,11 @@
<div class="form-actions">
<s:url action="news" id="newsUrl" />
<s:a href="%{newsUrl}" cssClass="btn">
- <i class="icon-chevron-left"></i> <s:property value="getText('wao.ui.action.cancel')" />
+ <i class="icon-chevron-left"></i> <s:text name="wao.ui.action.cancel" />
</s:a>
<s:submit type="button" cssClass="btn">
- <i class="icon-ok"></i> <s:property value="getText('wao.ui.action.save')" />
+ <i class="icon-ok"></i> <s:text name="wao.ui.action.save" />
</s:submit>
</div>
Modified: trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/news.jsp
===================================================================
--- trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/news.jsp 2014-02-28 16:06:46 UTC (rev 1702)
+++ trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/news.jsp 2014-02-28 16:10:56 UTC (rev 1703)
@@ -35,14 +35,14 @@
<s:param name="newsId" value="topiaId" />
</s:url>
<s:a href="%{editNewsUrl}">
- <i class="icon-edit"></i> <s:property value="getText('wao.ui.action.edit')" />
+ <i class="icon-edit"></i> <s:text name="wao.ui.action.edit" />
</s:a>
<s:url action="delete-news" id="deleteNewsUrl">
<s:param name="newsId" value="topiaId" />
</s:url>
<s:a href="%{deleteNewsUrl}">
- <i class="icon-trash"></i> <s:property value="getText('wao.ui.action.delete')" />
+ <i class="icon-trash"></i> <s:text name="wao.ui.action.delete" />
</s:a>
</p>
</div>
Modified: trunk/wao-web/src/main/webapp/WEB-INF/decorators/layout.jsp
===================================================================
--- trunk/wao-web/src/main/webapp/WEB-INF/decorators/layout.jsp 2014-02-28 16:06:46 UTC (rev 1702)
+++ trunk/wao-web/src/main/webapp/WEB-INF/decorators/layout.jsp 2014-02-28 16:10:56 UTC (rev 1703)
@@ -29,45 +29,45 @@
<li class="active">
<s:url action="news" id="newsUrl" />
<s:a href="%{newsUrl}">
- <s:property value="getText('wao.ui.page.Index.title')" />
+ <s:text name="wao.ui.page.Index.title" />
</s:a>
</li>
<li>
<s:url action="sampling-plan" id="samplingPlanUrl" />
<s:a href="%{samplingPlanUrl}">
- <s:property value="getText('wao.ui.page.SamplingPlan.title')" />
+ <s:text name="wao.ui.page.SamplingPlan.title" />
</s:a>
</li>
<li>
<s:url action="boats" id="boatsUrl" />
<s:a href="%{boatsUrl}">
- <s:property value="getText('wao.ui.page.Boats.title')" />
+ <s:text name="wao.ui.page.Boats.title" />
</s:a>
</li>
<li>
<s:url action="contacts" id="contactsUrl" />
<s:a href="%{contactsUrl}">
- <s:property value="getText('wao.ui.page.Contacts.title')" />
+ <s:text name="wao.ui.page.Contacts.title" />
</s:a>
</li>
<li>
<s:url action="synthesis" id="synthesisUrl" />
<s:a href="%{synthesisUrl}">
- <s:property value="getText('wao.ui.page.Synthesis.title')" />
+ <s:text name="wao.ui.page.Synthesis.title" />
</s:a>
</li>
</ul>
<ul class="nav pull-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
- <s:property value="getText('wao.ui.page.Administration.title')" />
+ <s:text name="wao.ui.page.Administration.title" />
<b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<s:url namespace="/administration" action="referential-management" id="referentialManagementUrl" />
<s:a href="%{referentialManagementUrl}">
- <i class="icon-upload"></i> <s:property value="getText('wao.ui.page.ReferentialManagement.title')" />
+ <i class="icon-upload"></i> <s:text name="wao.ui.page.ReferentialManagement.title" />
</s:a>
</li>
</ul>
@@ -90,14 +90,14 @@
</s:param>
</s:url>
<s:a href="%{changeLocaleUrl}">
- <i class="icon-flag"></i> <s:property value="getText('wao.ui.action.changeLocale')" />
+ <i class="icon-flag"></i> <s:text name="wao.ui.action.changeLocale" />
</s:a>
</li>
<li>
- <a href="#"><i class="icon-user"></i> <s:property value="getText('wao.ui.page.UserProfileForm.title')" /></a>
+ <a href="#"><i class="icon-user"></i> <s:text name="wao.ui.page.UserProfileForm.title" /></a>
</li>
<li>
- <a href="#"><i class="icon-off"></i> <s:property value="getText('wao.ui.action.logout')" /></a>
+ <a href="#"><i class="icon-off"></i> <s:text name="wao.ui.action.logout" /></a>
</li>
</ul>
</li>
@@ -149,7 +149,7 @@
</ul>
<s:if test="obsMer">
<small class="cnil">
- <s:property value="getText('wao.ui.disclaimer')" />
+ <s:text name="wao.ui.disclaimer" />
</small>
</s:if>
</footer>
1
0
r1702 - in trunk/wao-web/src/main: java/fr/ifremer/wao/web/action/administration resources/i18n webapp/WEB-INF/content/administration
by bleny@users.forge.codelutin.com 28 Feb '14
by bleny@users.forge.codelutin.com 28 Feb '14
28 Feb '14
Author: bleny
Date: 2014-02-28 17:06:46 +0100 (Fri, 28 Feb 2014)
New Revision: 1702
Url: http://codelutin.com/projects/wao/repository/revisions/1702
Log:
refs #4482 add boats and boatgroups import in UI
Added:
trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/administration/ImportBoatGroupsAction.java
trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/administration/ImportBoatsAction.java
Modified:
trunk/wao-web/src/main/resources/i18n/wao-web_en_GB.properties
trunk/wao-web/src/main/resources/i18n/wao-web_fr_FR.properties
trunk/wao-web/src/main/webapp/WEB-INF/content/administration/referential-management.jsp
Added: trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/administration/ImportBoatGroupsAction.java
===================================================================
--- trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/administration/ImportBoatGroupsAction.java (rev 0)
+++ trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/administration/ImportBoatGroupsAction.java 2014-02-28 16:06:46 UTC (rev 1702)
@@ -0,0 +1,20 @@
+package fr.ifremer.wao.web.action.administration;
+
+import fr.ifremer.wao.services.service.ImportErrorException;
+import org.nuiton.i18n.I18n;
+
+import java.io.InputStream;
+
+public class ImportBoatGroupsAction extends AbstractImportReferentialAction {
+
+ @Override
+ protected void importCsv(InputStream csvInputStream) throws ImportErrorException {
+ service.importBoatGroups(csvInputStream);
+ }
+
+ @Override
+ protected String getSuccessMessage() {
+ return I18n.t("wao.import.boatGroups.success");
+ }
+
+}
Added: trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/administration/ImportBoatsAction.java
===================================================================
--- trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/administration/ImportBoatsAction.java (rev 0)
+++ trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/administration/ImportBoatsAction.java 2014-02-28 16:06:46 UTC (rev 1702)
@@ -0,0 +1,20 @@
+package fr.ifremer.wao.web.action.administration;
+
+import fr.ifremer.wao.services.service.ImportErrorException;
+import org.nuiton.i18n.I18n;
+
+import java.io.InputStream;
+
+public class ImportBoatsAction extends AbstractImportReferentialAction {
+
+ @Override
+ protected void importCsv(InputStream csvInputStream) throws ImportErrorException {
+ service.importBoats(csvInputStream);
+ }
+
+ @Override
+ protected String getSuccessMessage() {
+ return I18n.t("wao.import.boats.success");
+ }
+
+}
Modified: trunk/wao-web/src/main/resources/i18n/wao-web_en_GB.properties
===================================================================
--- trunk/wao-web/src/main/resources/i18n/wao-web_en_GB.properties 2014-02-28 15:26:57 UTC (rev 1701)
+++ trunk/wao-web/src/main/resources/i18n/wao-web_en_GB.properties 2014-02-28 16:06:46 UTC (rev 1702)
@@ -1,6 +1,10 @@
fr.ifremer.wao.services.service.ReferentialState.lastUpdate=Last update
fr.ifremer.wao.services.service.ReferentialState.referentialName=Referential
fr.ifremer.wao.services.service.ReferentialState.size=Lines count
+wao.import.boatGroups.prompt=Import boats
+wao.import.boatGroups.success=Import boats successful
+wao.import.boats.prompt=Import boat groups
+wao.import.boats.success=Import boat groups successful
wao.import.contactStateMotives.prompt=Import contact state motives
wao.import.contactStateMotives.success=Import contact state motives successful
wao.import.fishingZones.prompt=Import fishing zones
Modified: trunk/wao-web/src/main/resources/i18n/wao-web_fr_FR.properties
===================================================================
--- trunk/wao-web/src/main/resources/i18n/wao-web_fr_FR.properties 2014-02-28 15:26:57 UTC (rev 1701)
+++ trunk/wao-web/src/main/resources/i18n/wao-web_fr_FR.properties 2014-02-28 16:06:46 UTC (rev 1702)
@@ -1,6 +1,10 @@
fr.ifremer.wao.services.service.ReferentialState.lastUpdate=Date de dernière mise à jour
fr.ifremer.wao.services.service.ReferentialState.referentialName=Référentiel
fr.ifremer.wao.services.service.ReferentialState.size=Nombre de lignes en base
+wao.import.boatGroups.prompt=Import des flotilles
+wao.import.boatGroups.success=Import des flotilles réalisé avec succès
+wao.import.boats.prompt=Import des navires
+wao.import.boats.success=Import des navires réalisé avec succès
wao.import.contactStateMotives.prompt=Import des motifs de refus
wao.import.contactStateMotives.success=Import des motifs de refus réalisé avec succès
wao.import.fishingZones.prompt=Import des zones de pêches
Modified: trunk/wao-web/src/main/webapp/WEB-INF/content/administration/referential-management.jsp
===================================================================
--- trunk/wao-web/src/main/webapp/WEB-INF/content/administration/referential-management.jsp 2014-02-28 15:26:57 UTC (rev 1701)
+++ trunk/wao-web/src/main/webapp/WEB-INF/content/administration/referential-management.jsp 2014-02-28 16:06:46 UTC (rev 1702)
@@ -8,14 +8,14 @@
</head>
<div class="alert alert-info">
- <s:property value="getText('wao.ui.import.disclaimer')" />
+ <s:text name="wao.ui.import.disclaimer" />
</div>
<s:form action="import-fishing-zones" method="POST" enctype="multipart/form-data">
<fieldset>
<legend>
- <s:property value="getText('wao.import.fishingZones.prompt')" />
+ <s:text name="wao.import.fishingZones.prompt" />
</legend>
<s:file name="csvFile" />
@@ -31,7 +31,7 @@
<fieldset>
<legend>
- <s:property value="getText('wao.import.terrestrialLocations.prompt')" />
+ <s:text name="wao.import.terrestrialLocations.prompt" />
</legend>
<s:file name="csvFile" />
@@ -43,12 +43,28 @@
</s:form>
+ <s:form action="import-boats" method="POST" enctype="multipart/form-data">
+
+ <fieldset>
+ <legend>
+ <s:text name="wao.import.boats.prompt" />
+ </legend>
+
+ <s:file name="csvFile" />
+
+ <s:submit type="button">
+ <i class="icon-upload"></i> Importer
+ </s:submit>
+ </fieldset>
+
+ </s:form>
+
<s:if test="obsMer">
<s:form action="import-contact-state-motives" method="POST" enctype="multipart/form-data">
<fieldset>
<legend>
- <s:property value="getText('wao.import.contactStateMotives.prompt')" />
+ <s:text name="wao.import.contactStateMotives.prompt" />
</legend>
<s:file name="csvFile" />
@@ -66,7 +82,7 @@
<fieldset>
<legend>
- <s:property value="getText('wao.import.obsDebCodes.prompt')" />
+ <s:text name="wao.import.obsDebCodes.prompt" />
</legend>
<s:file name="csvFile" />
@@ -82,7 +98,7 @@
<fieldset>
<legend>
- <s:property value="getText('wao.import.terrestrialDivisions.prompt')" />
+ <s:text name="wao.import.terrestrialDivisions.prompt" />
</legend>
<s:file name="csvFile" />
@@ -93,18 +109,34 @@
</fieldset>
</s:form>
+
+ <s:form action="import-boat-groups" method="POST" enctype="multipart/form-data">
+
+ <fieldset>
+ <legend>
+ <s:text name="wao.import.boatGroups.prompt" />
+ </legend>
+
+ <s:file name="csvFile" />
+
+ <s:submit type="button">
+ <i class="icon-upload"></i> Importer
+ </s:submit>
+ </fieldset>
+
+ </s:form>
</s:if>
<table class="table table-bordered">
<tr>
<th>
- <s:property value="getText('fr.ifremer.wao.services.service.ReferentialState.referentialName')" />
+ <s:text name="fr.ifremer.wao.services.service.ReferentialState.referentialName" />
</th>
<th>
- <s:property value="getText('fr.ifremer.wao.services.service.ReferentialState.size')" />
+ <s:text name="fr.ifremer.wao.services.service.ReferentialState.size" />
</th>
<th>
- <s:property value="getText('fr.ifremer.wao.services.service.ReferentialState.lastUpdate')" />
+ <s:text name="fr.ifremer.wao.services.service.ReferentialState.lastUpdate" />
</th>
</tr>
<s:iterator value="referentialStates">
1
0
r1701 - trunk/wao-services/src/main/java/fr/ifremer/wao/services/service
by bleny@users.forge.codelutin.com 28 Feb '14
by bleny@users.forge.codelutin.com 28 Feb '14
28 Feb '14
Author: bleny
Date: 2014-02-28 16:26:57 +0100 (Fri, 28 Feb 2014)
New Revision: 1701
Url: http://codelutin.com/projects/wao/repository/revisions/1701
Log:
refs #4482 delete LegacyBoatsServiceMethodsToMergeInReferentialService and integrate content in ReferentialService
Removed:
trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/LegacyBoatsServiceMethodsToMergeInReferentialService.java
Modified:
trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ReferentialService.java
Deleted: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/LegacyBoatsServiceMethodsToMergeInReferentialService.java
===================================================================
--- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/LegacyBoatsServiceMethodsToMergeInReferentialService.java 2014-02-28 15:24:50 UTC (rev 1700)
+++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/LegacyBoatsServiceMethodsToMergeInReferentialService.java 2014-02-28 15:26:57 UTC (rev 1701)
@@ -1,202 +0,0 @@
-/*
- * #%L
- * Wao :: Business
- *
- * $Id$
- * $HeadURL$
- * %%
- * Copyright (C) 2009 - 2010 Ifremer
- * %%
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- * #L%
- */
-
-package fr.ifremer.wao.services.service;
-
-import com.google.common.collect.Maps;
-import fr.ifremer.wao.entity.Boat;
-import fr.ifremer.wao.entity.BoatGroup;
-import fr.ifremer.wao.entity.BoatGroupTopiaDao;
-import fr.ifremer.wao.entity.BoatGroups;
-import fr.ifremer.wao.entity.BoatTopiaDao;
-import fr.ifremer.wao.entity.Fleet;
-import fr.ifremer.wao.entity.FleetTopiaDao;
-import fr.ifremer.wao.entity.Fleets;
-import fr.ifremer.wao.entity.LocationType;
-import fr.ifremer.wao.entity.ShipOwner;
-import fr.ifremer.wao.entity.ShipOwnerTopiaDao;
-import fr.ifremer.wao.entity.ShipOwners;
-import fr.ifremer.wao.entity.TerrestrialLocation;
-import fr.ifremer.wao.entity.TerrestrialLocationTopiaDao;
-import fr.ifremer.wao.services.service.csv.BoatGroupImportModel;
-import fr.ifremer.wao.services.service.csv.BoatImportExportModel;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.nuiton.csv.Import;
-import org.nuiton.csv.ImportRuntimeException;
-import org.nuiton.i18n.I18n;
-
-import java.io.InputStream;
-import java.util.List;
-import java.util.Map;
-
-
-public class LegacyBoatsServiceMethodsToMergeInReferentialService extends WaoServiceSupport {
-
- private static final Log log = LogFactory.getLog(LegacyBoatsServiceMethodsToMergeInReferentialService.class);
-
- /**
- * Import boats from CSV file, given data will be merged with data already
- * in the DB. All shipowner or district code mentioned will be added to
- * the database on the fly
- */
- public void importBoats(InputStream input) throws ImportErrorException {
-
- // Before importing, we need to retrieve all ports that may be mentioned
- // in the CSV file
- TerrestrialLocationTopiaDao terrestrialLocationDao =
- getPersistenceContext().getTerrestrialLocationDao();
- List<TerrestrialLocation> ports = terrestrialLocationDao.forLocationTypeEquals(LocationType.PORT).findAll();
- List<TerrestrialLocation> districts = terrestrialLocationDao.forLocationTypeEquals(LocationType.DISTRICT).findAll();
-
- // Building the model, providing ports
- BoatImportExportModel model = new BoatImportExportModel(ports, districts);
- Import<Boat> boatImport = Import.newImport(model, input);
-
- // Getting some DAOs
- BoatTopiaDao boatDao = getPersistenceContext().getBoatDao();
- ShipOwnerTopiaDao shipOwnerDao = getPersistenceContext().getShipOwnerDao();
- FleetTopiaDao fleetDao = getPersistenceContext().getFleetDao();
-
- // load data that will be linked to the boat
- Map<String, ShipOwner> shipOwners =
- Maps.uniqueIndex(
- shipOwnerDao.findAll(),
- ShipOwners.getCode());
- Map<String, Fleet> fleets =
- Maps.uniqueIndex(
- fleetDao.findAll(),
- Fleets.getCode());
-
- // now iterating over the lines of the CSV
- try {
- for (Boat boat : boatImport) {
-
- // first each boat read, merge with data already in database or add
- // all new boats encountered. New district codes or shipowners may be
- // added on the fly too.
-
- // first, find and reuse existing ship owner
- String shipOwnerCode = boat.getShipOwner().getCode();
- ShipOwner shipOwner = shipOwners.get(shipOwnerCode);
- if (shipOwner == null) {
- shipOwner = shipOwnerDao.create(boat.getShipOwner());
- shipOwners.put(shipOwnerCode, shipOwner);
- }
- boat.setShipOwner(shipOwner);
-
- // secondly, find and reuse fleet
- String fleetCode = boat.getFleet().getCode();
- if (fleetCode == null) {
- boat.setFleet(null);
- } else {
- Fleet fleet = fleets.get(fleetCode);
- if (fleet == null) {
- fleet = fleetDao.create(boat.getFleet());
- fleets.put(fleetCode, fleet);
- }
- boat.setFleet(fleet);
- }
-
- // now boat object is ready
- Boat existingBoat = boatDao.forImmatriculationEquals(boat.getImmatriculation()).findUniqueOrNull();
- if (existingBoat == null) {
- boatDao.create(boat);
- } else {
- // copy new values in found entity and save changes
- existingBoat.setName(boat.getName());
- existingBoat.setBoatLength(boat.getBoatLength());
- existingBoat.setBuildYear(boat.getBuildYear());
- existingBoat.setActive(boat.isActive());
- existingBoat.setShipOwner(boat.getShipOwner());
- existingBoat.setDistrict(boat.getDistrict());
- existingBoat.setPortOfRegistry(boat.getPortOfRegistry());
- existingBoat.setFleet(boat.getFleet());
- boatDao.update(existingBoat);
- }
-
- }
- } catch (ImportRuntimeException e) {
- throw new ImportErrorException(e);
- }
-
- getReferentialService().updateReferentialMeta(Boat.class.getName());
-
- commit();
-
- }
-
- public void importBoatGroups(InputStream input) throws ImportErrorException {
- // Building the model, providing ports
- BoatGroupImportModel model = new BoatGroupImportModel();
- Import<Boat> boatImport = Import.newImport(model, input);
-
- // Getting some DAOs
- BoatTopiaDao boatDao = getPersistenceContext().getBoatDao();
- BoatGroupTopiaDao boatGroupDAO = getPersistenceContext().getBoatGroupDao();
-
- Map<String, BoatGroup> boatGroups =
- Maps.uniqueIndex(
- boatGroupDAO.findAll(),
- BoatGroups.getCode());
-
- // now iterating over the lines of the CSV
- try {
- for (Boat boat : boatImport) {
-
- // fourth, the group
- String boatGroupCode = boat.getBoatGroup().getCode();
- if (boatGroupCode == null) {
- boat.setBoatGroup(null);
- } else {
- BoatGroup boatGroup = boatGroups.get(boatGroupCode);
- if (boatGroup == null) {
- boatGroup = boatGroupDAO.create(boat.getBoatGroup());
- boatGroups.put(boatGroupCode, boatGroup);
- }
- boat.setBoatGroup(boatGroup);
- }
-
- // now boat object is ready
- Boat existingBoat = boatDao.forImmatriculationEquals(boat.getImmatriculation()).findUniqueOrNull();
- if (existingBoat == null) {
- throw new ImportRuntimeException(I18n.t("wao.import.contact.failure.wrongBoat", String.valueOf(boat.getImmatriculation())));
- } else {
- // copy new values in found entity and save changes
- existingBoat.setBoatGroup(boat.getBoatGroup());
- boatDao.update(existingBoat);
- }
-
- }
- } catch (ImportRuntimeException e) {
- throw new ImportErrorException(e);
- }
-
- getReferentialService().updateReferentialMeta(Boat.class.getName());
-
- commit();
-
- }
-
-}
Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ReferentialService.java
===================================================================
--- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ReferentialService.java 2014-02-28 15:24:50 UTC (rev 1700)
+++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ReferentialService.java 2014-02-28 15:26:57 UTC (rev 1701)
@@ -26,9 +26,13 @@
import com.google.common.base.Preconditions;
import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Maps;
import fr.ifremer.wao.WaoTechnicalException;
import fr.ifremer.wao.entity.Boat;
import fr.ifremer.wao.entity.BoatGroup;
+import fr.ifremer.wao.entity.BoatGroupTopiaDao;
+import fr.ifremer.wao.entity.BoatGroups;
+import fr.ifremer.wao.entity.BoatTopiaDao;
import fr.ifremer.wao.entity.ContactState;
import fr.ifremer.wao.entity.ContactStateMotif;
import fr.ifremer.wao.entity.ContactStateMotifTopiaDao;
@@ -37,6 +41,9 @@
import fr.ifremer.wao.entity.FishingGearDCFTopiaDao;
import fr.ifremer.wao.entity.FishingZone;
import fr.ifremer.wao.entity.FishingZoneTopiaDao;
+import fr.ifremer.wao.entity.Fleet;
+import fr.ifremer.wao.entity.FleetTopiaDao;
+import fr.ifremer.wao.entity.Fleets;
import fr.ifremer.wao.entity.LocationType;
import fr.ifremer.wao.entity.ObsDebCode;
import fr.ifremer.wao.entity.ObsDebCodeDetails;
@@ -50,6 +57,9 @@
import fr.ifremer.wao.entity.ReferentialMetaTopiaDao;
import fr.ifremer.wao.entity.SampleRow;
import fr.ifremer.wao.entity.SampleRowTopiaDao;
+import fr.ifremer.wao.entity.ShipOwner;
+import fr.ifremer.wao.entity.ShipOwnerTopiaDao;
+import fr.ifremer.wao.entity.ShipOwners;
import fr.ifremer.wao.entity.TargetSpeciesDCF;
import fr.ifremer.wao.entity.TargetSpeciesDCFTopiaDao;
import fr.ifremer.wao.entity.TerrestrialDivision;
@@ -58,6 +68,8 @@
import fr.ifremer.wao.entity.TerrestrialLocation;
import fr.ifremer.wao.entity.TerrestrialLocationImpl;
import fr.ifremer.wao.entity.TerrestrialLocationTopiaDao;
+import fr.ifremer.wao.services.service.csv.BoatGroupImportModel;
+import fr.ifremer.wao.services.service.csv.BoatImportExportModel;
import fr.ifremer.wao.services.service.csv.ContactStateMotivesImportModel;
import fr.ifremer.wao.services.service.csv.FishingZoneImportModel;
import fr.ifremer.wao.services.service.csv.RawObsDebCode;
@@ -821,4 +833,147 @@
return all;
}
+ /**
+ * Import boats from CSV file, given data will be merged with data already
+ * in the DB. All shipowner or district code mentioned will be added to
+ * the database on the fly
+ */
+ public void importBoats(InputStream input) throws ImportErrorException {
+
+ // Before importing, we need to retrieve all ports that may be mentioned
+ // in the CSV file
+ TerrestrialLocationTopiaDao terrestrialLocationDao =
+ getPersistenceContext().getTerrestrialLocationDao();
+ List<TerrestrialLocation> ports = terrestrialLocationDao.forLocationTypeEquals(LocationType.PORT).findAll();
+ List<TerrestrialLocation> districts = terrestrialLocationDao.forLocationTypeEquals(LocationType.DISTRICT).findAll();
+
+ // Building the model, providing ports
+ BoatImportExportModel model = new BoatImportExportModel(ports, districts);
+ Import<Boat> boatImport = Import.newImport(model, input);
+
+ // Getting some DAOs
+ BoatTopiaDao boatDao = getPersistenceContext().getBoatDao();
+ ShipOwnerTopiaDao shipOwnerDao = getPersistenceContext().getShipOwnerDao();
+ FleetTopiaDao fleetDao = getPersistenceContext().getFleetDao();
+
+ // load data that will be linked to the boat
+ Map<String, ShipOwner> shipOwners =
+ Maps.uniqueIndex(
+ shipOwnerDao.findAll(),
+ ShipOwners.getCode());
+ Map<String, Fleet> fleets =
+ Maps.uniqueIndex(
+ fleetDao.findAll(),
+ Fleets.getCode());
+
+ // now iterating over the lines of the CSV
+ try {
+ for (Boat boat : boatImport) {
+
+ // first each boat read, merge with data already in database or add
+ // all new boats encountered. New district codes or shipowners may be
+ // added on the fly too.
+
+ // first, find and reuse existing ship owner
+ String shipOwnerCode = boat.getShipOwner().getCode();
+ ShipOwner shipOwner = shipOwners.get(shipOwnerCode);
+ if (shipOwner == null) {
+ shipOwner = shipOwnerDao.create(boat.getShipOwner());
+ shipOwners.put(shipOwnerCode, shipOwner);
+ }
+ boat.setShipOwner(shipOwner);
+
+ // secondly, find and reuse fleet
+ String fleetCode = boat.getFleet().getCode();
+ if (fleetCode == null) {
+ boat.setFleet(null);
+ } else {
+ Fleet fleet = fleets.get(fleetCode);
+ if (fleet == null) {
+ fleet = fleetDao.create(boat.getFleet());
+ fleets.put(fleetCode, fleet);
+ }
+ boat.setFleet(fleet);
+ }
+
+ // now boat object is ready
+ Boat existingBoat = boatDao.forImmatriculationEquals(boat.getImmatriculation()).findUniqueOrNull();
+ if (existingBoat == null) {
+ boatDao.create(boat);
+ } else {
+ // copy new values in found entity and save changes
+ existingBoat.setName(boat.getName());
+ existingBoat.setBoatLength(boat.getBoatLength());
+ existingBoat.setBuildYear(boat.getBuildYear());
+ existingBoat.setActive(boat.isActive());
+ existingBoat.setShipOwner(boat.getShipOwner());
+ existingBoat.setDistrict(boat.getDistrict());
+ existingBoat.setPortOfRegistry(boat.getPortOfRegistry());
+ existingBoat.setFleet(boat.getFleet());
+ boatDao.update(existingBoat);
+ }
+
+ }
+ } catch (ImportRuntimeException e) {
+ throw new ImportErrorException(e);
+ }
+
+ updateReferentialMeta(Boat.class.getName());
+
+ commit();
+
+ }
+
+ public void importBoatGroups(InputStream input) throws ImportErrorException {
+ // Building the model, providing ports
+ BoatGroupImportModel model = new BoatGroupImportModel();
+ Import<Boat> boatImport = Import.newImport(model, input);
+
+ // Getting some DAOs
+ BoatTopiaDao boatDao = getPersistenceContext().getBoatDao();
+ BoatGroupTopiaDao boatGroupDAO = getPersistenceContext().getBoatGroupDao();
+
+ Map<String, BoatGroup> boatGroups =
+ Maps.uniqueIndex(
+ boatGroupDAO.findAll(),
+ BoatGroups.getCode());
+
+ // now iterating over the lines of the CSV
+ try {
+ for (Boat boat : boatImport) {
+
+ // fourth, the group
+ String boatGroupCode = boat.getBoatGroup().getCode();
+ if (boatGroupCode == null) {
+ boat.setBoatGroup(null);
+ } else {
+ BoatGroup boatGroup = boatGroups.get(boatGroupCode);
+ if (boatGroup == null) {
+ boatGroup = boatGroupDAO.create(boat.getBoatGroup());
+ boatGroups.put(boatGroupCode, boatGroup);
+ }
+ boat.setBoatGroup(boatGroup);
+ }
+
+ // now boat object is ready
+ Boat existingBoat = boatDao.forImmatriculationEquals(boat.getImmatriculation()).findUniqueOrNull();
+ if (existingBoat == null) {
+ throw new ImportRuntimeException(I18n.t("wao.import.contact.failure.wrongBoat", String.valueOf(boat.getImmatriculation())));
+ } else {
+ // copy new values in found entity and save changes
+ existingBoat.setBoatGroup(boat.getBoatGroup());
+ boatDao.update(existingBoat);
+ }
+
+ }
+ } catch (ImportRuntimeException e) {
+ throw new ImportErrorException(e);
+ }
+
+ updateReferentialMeta(Boat.class.getName());
+
+ commit();
+
+ }
+
}
1
0