Tutti-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
- 4058 discussions
Author: tchemit
Date: 2013-02-15 18:55:53 +0100 (Fri, 15 Feb 2013)
New Revision: 426
Url: http://forge.codelutin.com/projects/tutti/repository/revisions/426
Log:
use last stable of jaxx
Modified:
trunk/pom.xml
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2013-02-15 17:55:36 UTC (rev 425)
+++ trunk/pom.xml 2013-02-15 17:55:53 UTC (rev 426)
@@ -132,7 +132,7 @@
<h2Version>1.3.168</h2Version>
<postgresqlVersion>9.1-901-1.jdbc4</postgresqlVersion>
- <jaxxVersion>2.5.10-SNAPSHOT</jaxxVersion>
+ <jaxxVersion>2.5.10</jaxxVersion>
<swingXVersion>1.6.4</swingXVersion>
<xworkVersion>2.3.7</xworkVersion>
1
0
r425 - in trunk/tutti-persistence/src/main: java/fr/ifremer/tutti/persistence/service resources
by tchemit@users.forge.codelutin.com 15 Feb '13
by tchemit@users.forge.codelutin.com 15 Feb '13
15 Feb '13
Author: tchemit
Date: 2013-02-15 18:55:36 +0100 (Fri, 15 Feb 2013)
New Revision: 425
Url: http://forge.codelutin.com/projects/tutti/repository/revisions/425
Log:
manual close of db
Modified:
trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/TuttiPersistenceServiceLocator.java
trunk/tutti-persistence/src/main/resources/applicationContext-service-tutti.xml
Modified: trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/TuttiPersistenceServiceLocator.java
===================================================================
--- trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/TuttiPersistenceServiceLocator.java 2013-02-15 17:18:29 UTC (rev 424)
+++ trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/service/TuttiPersistenceServiceLocator.java 2013-02-15 17:55:36 UTC (rev 425)
@@ -44,7 +44,7 @@
public static void initTuttiDefault() {
instance().init("tuttiBeanRefFactory.xml", "TuttiBeanRefFactory");
}
-
+
public static void initTutti(String beanFactoryReferenceLocation,
String beanRefFactoryReferenceId) {
instance().init(beanFactoryReferenceLocation, beanRefFactoryReferenceId);
@@ -87,7 +87,7 @@
public static CatchBatchPersistenceService getCatchBatchPersistenceService() {
return getPersistenceService("batchPersistenceService",
- CatchBatchPersistenceService.class);
+ CatchBatchPersistenceService.class);
}
public static SpeciesBatchPersistenceService getSpeciesBatchPersistenceService() {
Modified: trunk/tutti-persistence/src/main/resources/applicationContext-service-tutti.xml
===================================================================
--- trunk/tutti-persistence/src/main/resources/applicationContext-service-tutti.xml 2013-02-15 17:18:29 UTC (rev 424)
+++ trunk/tutti-persistence/src/main/resources/applicationContext-service-tutti.xml 2013-02-15 17:55:36 UTC (rev 425)
@@ -31,7 +31,7 @@
<context:component-scan base-package="fr.ifremer.tutti.persistence.service"/>
- <bean id="tuttiPersistence" init-method="init" destroy-method="close"
+ <bean id="tuttiPersistence" init-method="init"
class="fr.ifremer.tutti.persistence.TuttiPersistenceImpl"/>
<bean id="tuttiEnumerationFile" init-method="init"
1
0
See <http://ci.nuiton.org/jenkins/job/tutti/350/changes>
Changes:
[Tony Chemit] clean validator when quitting home screen
[Tony Chemit] ajout manage db
------------------------------------------
[...truncated 492 lines...]
Downloaded: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja… (2 KB at 42.5 KB/sec)
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja…
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-va…
Downloaded: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-va… (2 KB at 50.4 KB/sec)
Downloaded: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja… (2 KB at 42.4 KB/sec)
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-wi…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja…
Downloaded: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja… (2 KB at 30.5 KB/sec)
Downloaded: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-wi… (2 KB at 28.6 KB/sec)
mojoStarted org.apache.maven.plugins:maven-clean-plugin:2.5(default-clean)[INFO] Deleting <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/target>
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ tutti-ui-swing ---
mojoSucceeded org.apache.maven.plugins:maven-clean-plugin:2.5(default-clean)
mojoStarted org.apache.maven.plugins:maven-enforcer-plugin:1.2(check-project-files)
[INFO]
[INFO] --- maven-enforcer-plugin:1.2:enforce (check-project-files) @ tutti-ui-swing ---
mojoSucceeded org.apache.maven.plugins:maven-enforcer-plugin:1.2(check-project-files)
mojoStarted org.nuiton.jaxx:jaxx-maven-plugin:2.5.10-SNAPSHOT(default)
[INFO]
[INFO] --- jaxx-maven-plugin:2.5.10-SNAPSHOT:generate (default) @ tutti-ui-swing ---
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja…
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-co…
Downloaded: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja… (2 KB at 50.1 KB/sec)
Downloaded: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-co… (2 KB at 39.0 KB/sec)
[INFO] use project compile scope class-path
[INFO] Detects 26 modified jaxx file(s).
mojoSucceeded org.nuiton.jaxx:jaxx-maven-plugin:2.5.10-SNAPSHOT(default)[WARNING] JAXX detects 3 warnings :
<http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>
jaxx supports i18n, no need to add explicit call to I18n._ for attribute 'text' in component 'filterSpeciesBatchRootButton' : [_("tutti.label.filterSpeciesBatchMode.mode.root", model.getRootNumber())]
<http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>
jaxx supports i18n, no need to add explicit call to I18n._ for attribute 'text' in component 'gearLatitudeLabel' : [_("tutti.label.fishingOperation.gearLatitude", ((CoordinateEditorType)handler.getConfig().getCoordinateEditorType()).toString())]
<http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>
jaxx supports i18n, no need to add explicit call to I18n._ for attribute 'text' in component 'gearLongitudeLabel' : [_("tutti.label.fishingOperation.gearLongitude", ((CoordinateEditorType)handler.getConfig().getCoordinateEditorType()).toString())]
[INFO] Generated 26 file(s) in 16.137s
mojoStarted org.nuiton.i18n:i18n-maven-plugin:2.5(scan-sources)
[INFO]
[INFO] --- i18n-maven-plugin:2.5:parserJava (scan-sources) @ tutti-ui-swing ---
mojoSucceeded org.nuiton.i18n:i18n-maven-plugin:2.5(scan-sources)
mojoStarted org.nuiton.i18n:i18n-maven-plugin:2.5(scan-sources)
[INFO]
[INFO] --- i18n-maven-plugin:2.5:parserValidation (scan-sources) @ tutti-ui-swing ---
[INFO] Load rules file validation.rules
mojoSucceeded org.nuiton.i18n:i18n-maven-plugin:2.5(scan-sources)
forkedProjectStarted fr.ifremer.tutti:tutti-ui-swing:1.0-SNAPSHOT
mojoStarted org.nuiton.i18n:i18n-maven-plugin:2.5(get)
[INFO]
[INFO] --- i18n-maven-plugin:2.5:get (get) @ tutti-ui-swing ---
[INFO] Copying tutti-ui-swing.properties to <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/target/gener…>
mojoSucceeded org.nuiton.i18n:i18n-maven-plugin:2.5(get)
forkedProjectSucceeded fr.ifremer.tutti:tutti-ui-swing:1.0-SNAPSHOT
mojoStarted org.nuiton.i18n:i18n-maven-plugin:2.5(scan-sources)
[INFO]
[INFO] --- i18n-maven-plugin:2.5:gen (scan-sources) @ tutti-ui-swing ---
[WARNING] bundle fr_FR contains 31/547 empty entries! (use -Di18n.showEmpty to see these entries)
mojoSucceeded org.nuiton.i18n:i18n-maven-plugin:2.5(scan-sources)
forkedProjectStarted fr.ifremer.tutti:tutti-ui-swing:1.0-SNAPSHOT
mojoStarted org.nuiton.i18n:i18n-maven-plugin:2.5(collect-i18n-artifacts)
[INFO]
[INFO] --- i18n-maven-plugin:2.5:collect-i18n-artifacts (collect-i18n-artifacts) @ tutti-ui-swing ---
mojoSucceeded org.nuiton.i18n:i18n-maven-plugin:2.5(collect-i18n-artifacts)[INFO] collected 10 i18n artifacts for locale fr_FR stored in <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/target/i18n/…>
forkedProjectSucceeded fr.ifremer.tutti:tutti-ui-swing:1.0-SNAPSHOT
mojoStarted org.nuiton.i18n:i18n-maven-plugin:2.5(make-bundle)
[INFO]
[INFO] --- i18n-maven-plugin:2.5:bundle (make-bundle) @ tutti-ui-swing ---
[WARNING] bundle fr_FR contains 37/800 empty entries! (use -Di18n.showEmpty to see these entries)
mojoSucceeded org.nuiton.i18n:i18n-maven-plugin:2.5(make-bundle)
mojoStarted org.codehaus.mojo:license-maven-plugin:1.4(attach-licenses)
[INFO]
[INFO] --- license-maven-plugin:1.4:update-project-license (attach-licenses) @ tutti-ui-swing ---
mojoSucceeded org.codehaus.mojo:license-maven-plugin:1.4(attach-licenses)
mojoStarted org.codehaus.mojo:license-maven-plugin:1.4(attach-licenses)
[INFO]
[INFO] --- license-maven-plugin:1.4:add-third-party (attach-licenses) @ tutti-ui-swing ---
[WARNING] No license name defined for org.hibernate.javax.persistence--hibernate-jpa-2.0-api--1.0.1.Final
[INFO] Load missing file <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/license/…>
[INFO] Missing file <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/license/…> is up-to-date.
[INFO] Writing third-party file to <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/target/gener…>
[INFO] Writing bundled third-party file to <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/target/gener…>
[INFO] Will attach third party file from <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/license/…>
mojoSucceeded org.codehaus.mojo:license-maven-plugin:1.4(attach-licenses)
mojoStarted org.apache.maven.plugins:maven-resources-plugin:2.6(default-resources)
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ tutti-ui-swing ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 78 resources
mojoSucceeded org.apache.maven.plugins:maven-resources-plugin:2.6(default-resources)[INFO] Copying 2 resources
[INFO] Copying 4 resources
mojoStarted org.apache.maven.plugins:maven-compiler-plugin:2.5.1(default-compile)
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ tutti-ui-swing ---
[INFO] Compiling 208 source files to <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/target/class…>
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] bootstrap class path not set in conjunction with -source 1.6
<http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[29,32] error: cannot find symbol
[ERROR] symbol: class AbstractMainUITuttiAction
location: package fr.ifremer.tutti.ui.swing
<http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[48,37] error: cannot find symbol
[ERROR] symbol: class AbstractMainUITuttiAction
<http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[28,32] error: cannot find symbol
[ERROR] symbol: class AbstractMainUITuttiAction
location: package fr.ifremer.tutti.ui.swing
<http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[44,35] error: cannot find symbol
[ERROR] symbol: class AbstractMainUITuttiAction
<http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[27,32] error: cannot find symbol
[ERROR] symbol: class AbstractMainUITuttiAction
location: package fr.ifremer.tutti.ui.swing
<http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[42,36] error: cannot find symbol
[ERROR] symbol: class AbstractMainUITuttiAction
<http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[28,32] error: cannot find symbol
[ERROR] symbol: class AbstractMainUITuttiAction
location: package fr.ifremer.tutti.ui.swing
<http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[44,34] error: cannot find symbol
[ERROR] symbol: class AbstractMainUITuttiAction
<http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[67,40] error: cannot find symbol
[ERROR] symbol: method getContext()
location: class InstallDbAction
<http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[79,8] error: cannot find symbol
[ERROR] symbol: method getContext()
location: class InstallDbAction
<http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[82,87] error: cannot find symbol
[ERROR] symbol: method getContext()
location: class InstallDbAction
<http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[83,57] error: UpdateType is not public in TuttiApplicationUpdaterCallBack; cannot be accessed from outside package
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[87,8] error: cannot find symbol
[ERROR] symbol: method sendMessage(String)
location: class InstallDbAction
<http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[93,8] error: cannot find symbol
[ERROR] symbol: method getContext()
location: class InstallDbAction
<http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[96,25] error: cannot find symbol
[ERROR] symbol: method getHandler()
location: class InstallDbAction
<http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[96,38] error: cannot find symbol
[ERROR] symbol: method actionPerformed(ActionEvent)
location: class OpenDbAction
<http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[65,4] error: method does not override or implement a method from a supertype
mojoFailed org.apache.maven.plugins:maven-compiler-plugin:2.5.1(default-compile)[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[101,8] error: cannot find symbol
[ERROR] symbol: variable super
location: class InstallDbAction
<http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[102,8] error: cannot find symbol
[ERROR] symbol: method getContext()
location: class InstallDbAction
<http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[99,4] error: method does not override or implement a method from a supertype
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[69,8] error: cannot find symbol
[ERROR] symbol: method getContext()
location: class CloseDbAction
<http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[71,8] error: cannot find symbol
[ERROR] symbol: method getHandler()
location: class CloseDbAction
<http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[73,8] error: cannot find symbol
[ERROR] symbol: method sendMessage(String)
location: class CloseDbAction
<http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[76,8] error: cannot find symbol
[ERROR] symbol: method getContext()
location: class CloseDbAction
<http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[60,4] error: method does not override or implement a method from a supertype
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[58,4] error: method does not override or implement a method from a supertype
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[64,8] error: cannot find symbol
[ERROR] symbol: method getContext()
location: class OpenDbAction
<http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[65,8] error: cannot find symbol
[ERROR] symbol: method getHandler()
location: class OpenDbAction
<http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[69,8] error: cannot find symbol
[ERROR] symbol: method sendMessage(String)
location: class OpenDbAction
<http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[71,8] error: cannot find symbol
[ERROR] symbol: method getContext()
location: class OpenDbAction
<http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/main/jav…>:[61,4] error: method does not override or implement a method from a supertype
[INFO] 31 errors
[INFO] -------------------------------------------------------------
projectFailed fr.ifremer.tutti:tutti-ui-swing:1.0-SNAPSHOT
sessionEnded
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Tutti ............................................. SUCCESS [7.494s]
[INFO] Tutti :: Persistence .............................. SUCCESS [23.127s]
[INFO] Tutti :: Service .................................. SUCCESS [3.801s]
[INFO] Tutti :: UI ....................................... FAILURE [26.597s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:03.162s
[INFO] Finished at: Fri Feb 15 16:04:43 CET 2013
[INFO] Final Memory: 57M/184M
[INFO] ------------------------------------------------------------------------
Projects to build: [MavenProject: fr.ifremer:tutti:1.0-SNAPSHOT @ <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/pom.xml,> MavenProject: fr.ifremer.tutti:tutti-persistence:1.0-SNAPSHOT @ <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-persistence/pom.xml,> MavenProject: fr.ifremer.tutti:tutti-service:1.0-SNAPSHOT @ <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/pom.xml,> MavenProject: fr.ifremer.tutti:tutti-ui-swing:1.0-SNAPSHOT @ <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/pom.xml]>
[JENKINS] Archiving <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/pom.xml> to /var/local/jenkins/data/jobs/tutti/modules/fr.ifremer.tutti$tutti-service/builds/2013-02-15_16-03-35/archive/fr.ifremer.tutti/tutti-service/1.0-SNAPSHOT/tutti-service-1.0-SNAPSHOT.pom
[JENKINS] Archiving <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-service/target/tutti-…> to /var/local/jenkins/data/jobs/tutti/modules/fr.ifremer.tutti$tutti-service/builds/2013-02-15_16-03-35/archive/fr.ifremer.tutti/tutti-service/1.0-SNAPSHOT/tutti-service-1.0-SNAPSHOT.jar
[JENKINS] Archiving <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/pom.xml> to /var/local/jenkins/data/jobs/tutti/modules/fr.ifremer.tutti$tutti-ui-swing/builds/2013-02-15_16-03-35/archive/fr.ifremer.tutti/tutti-ui-swing/1.0-SNAPSHOT/tutti-ui-swing-1.0-SNAPSHOT.pom
[JENKINS] Archiving <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-ui-swing/src/license/…> to /var/local/jenkins/data/jobs/tutti/modules/fr.ifremer.tutti$tutti-ui-swing/builds/2013-02-15_16-03-35/archive/fr.ifremer.tutti/tutti-ui-swing/1.0-SNAPSHOT/tutti-ui-swing-1.0-SNAPSHOT-third-party.properties
[JENKINS] Archiving <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/pom.xml> to /var/local/jenkins/data/jobs/tutti/modules/fr.ifremer$tutti/builds/2013-02-15_16-03-35/archive/fr.ifremer/tutti/1.0-SNAPSHOT/tutti-1.0-SNAPSHOT.pom
[JENKINS] Archiving <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/target/tutti-1.0-SNAPSHOT-s…> to /var/local/jenkins/data/jobs/tutti/modules/fr.ifremer$tutti/builds/2013-02-15_16-03-35/archive/fr.ifremer/tutti/1.0-SNAPSHOT/tutti-1.0-SNAPSHOT-site_fr.xml
[JENKINS] Archiving <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-persistence/pom.xml> to /var/local/jenkins/data/jobs/tutti/modules/fr.ifremer.tutti$tutti-persistence/builds/2013-02-15_16-03-35/archive/fr.ifremer.tutti/tutti-persistence/1.0-SNAPSHOT/tutti-persistence-1.0-SNAPSHOT.pom
[JENKINS] Archiving <http://ci.nuiton.org/jenkins/job/tutti/ws/trunk/tutti-persistence/target/tu…> to /var/local/jenkins/data/jobs/tutti/modules/fr.ifremer.tutti$tutti-persistence/builds/2013-02-15_16-03-35/archive/fr.ifremer.tutti/tutti-persistence/1.0-SNAPSHOT/tutti-persistence-1.0-SNAPSHOT.jar
Waiting for Jenkins to finish collecting data
mavenExecutionResult exceptions not empty
message : Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project tutti-ui-swing: Compilation failure
cause : Compilation failure
Stack trace :
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project tutti-ui-swing: Compilation failure
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
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:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79)
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:601)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)
at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:98)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:64)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:326)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation failure
at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:729)
at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:128)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 27 more
Maven failed with error.
Sending e-mails to: tutti-commits(a)list.forge.codelutin.com chemit(a)codelutin.com
Sending e-mails to: tutti-commits(a)list.forge.codelutin.com chemit(a)codelutin.com
channel stopped
1
2
Jenkins build became unstable: tutti » Tutti :: Service #350
by admin+hudson@codelutin.com 15 Feb '13
by admin+hudson@codelutin.com 15 Feb '13
15 Feb '13
r424 - trunk/tutti-service/src/test/java/fr/ifremer/tutti/service/referential
by tchemit@users.forge.codelutin.com 15 Feb '13
by tchemit@users.forge.codelutin.com 15 Feb '13
15 Feb '13
Author: tchemit
Date: 2013-02-15 18:18:29 +0100 (Fri, 15 Feb 2013)
New Revision: 424
Url: http://forge.codelutin.com/projects/tutti/repository/revisions/424
Log:
fix tests
Modified:
trunk/tutti-service/src/test/java/fr/ifremer/tutti/service/referential/TuttiReferentialImportExportServiceTest.java
Modified: trunk/tutti-service/src/test/java/fr/ifremer/tutti/service/referential/TuttiReferentialImportExportServiceTest.java
===================================================================
--- trunk/tutti-service/src/test/java/fr/ifremer/tutti/service/referential/TuttiReferentialImportExportServiceTest.java 2013-02-15 16:55:21 UTC (rev 423)
+++ trunk/tutti-service/src/test/java/fr/ifremer/tutti/service/referential/TuttiReferentialImportExportServiceTest.java 2013-02-15 17:18:29 UTC (rev 424)
@@ -37,6 +37,7 @@
import fr.ifremer.tutti.service.PersistenceService;
import fr.ifremer.tutti.service.TuttiServiceContext;
import fr.ifremer.tutti.service.config.TuttiServiceConfig;
+import org.apache.commons.io.FileUtils;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
@@ -250,6 +251,8 @@
name.getMethodName(),
null, TIMESTAMP);
+ FileUtils.forceMkdir(datadirectory);
+
ApplicationConfig applicationConfig =
new ApplicationConfig("tutti-test.properties");
applicationConfig.loadDefaultOptions(
@@ -281,7 +284,38 @@
public void setServiceContext(TuttiServiceContext context) {
this.context = context;
persistenceService = new PersistenceService() {
+
@Override
+ public List<Species> getAllSpecies() {
+ return Lists.newArrayList();
+ }
+
+ @Override
+ public List<Person> getAllPerson() {
+ return Lists.newArrayList();
+ }
+
+ @Override
+ public List<Gear> getAllScientificGear() {
+ return Lists.newArrayList();
+ }
+
+ @Override
+ public List<Gear> getAllFishingGear() {
+ return Lists.newArrayList();
+ }
+
+ @Override
+ public List<Vessel> getAllScientificVessel() {
+ return Lists.newArrayList();
+ }
+
+ @Override
+ public List<Vessel> getAllFishingVessel() {
+ return Lists.newArrayList();
+ }
+
+ @Override
public List<Species> importTemporarySpecies(List<Species> species) {
Binder<Species, Species> binder = BinderFactory.newBinder(Species.class);
List<Species> result = Lists.newArrayList();
1
0
15 Feb '13
See <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/350/…>
Changes:
[Tony Chemit] clean validator when quitting home screen
[Tony Chemit] ajout manage db
------------------------------------------
projectStarted fr.ifremer.tutti:tutti-ui-swing:1.0-SNAPSHOT
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Tutti :: UI 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-ma…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja…
Downloaded: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja… (2 KB at 52.1 KB/sec)
Downloaded: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-ma… (2 KB at 31.3 KB/sec)
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/2.…
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/2.5.10-…
Downloaded: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/2.… (808 B at 15.2 KB/sec)
Downloaded: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/2.5.10-… (808 B at 15.5 KB/sec)
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/nuiton-valid…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/nuiton-…
Downloaded: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/nuiton-… (2 KB at 51.9 KB/sec)
Downloaded: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/nuiton-valid… (2 KB at 38.6 KB/sec)
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-ru…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja…
Downloaded: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-ru… (2 KB at 39.0 KB/sec)
Downloaded: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja… (2 KB at 42.5 KB/sec)
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja…
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-va…
Downloaded: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-va… (2 KB at 50.4 KB/sec)
Downloaded: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja… (2 KB at 42.4 KB/sec)
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-wi…
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja…
Downloaded: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja… (2 KB at 30.5 KB/sec)
Downloaded: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-wi… (2 KB at 28.6 KB/sec)
mojoStarted org.apache.maven.plugins:maven-clean-plugin:2.5(default-clean)[INFO] Deleting <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/t…>
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ tutti-ui-swing ---
mojoSucceeded org.apache.maven.plugins:maven-clean-plugin:2.5(default-clean)
mojoStarted org.apache.maven.plugins:maven-enforcer-plugin:1.2(check-project-files)
[INFO]
[INFO] --- maven-enforcer-plugin:1.2:enforce (check-project-files) @ tutti-ui-swing ---
mojoSucceeded org.apache.maven.plugins:maven-enforcer-plugin:1.2(check-project-files)
mojoStarted org.nuiton.jaxx:jaxx-maven-plugin:2.5.10-SNAPSHOT(default)
[INFO]
[INFO] --- jaxx-maven-plugin:2.5.10-SNAPSHOT:generate (default) @ tutti-ui-swing ---
Downloading: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja…
Downloading: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-co…
Downloaded: http://nexus.nuiton.org/nexus/content/groups/tutti-group/org/nuiton/jaxx/ja… (2 KB at 50.1 KB/sec)
Downloaded: http://nexus.nuiton.org/nexus/content/groups/public/org/nuiton/jaxx/jaxx-co… (2 KB at 39.0 KB/sec)
[INFO] use project compile scope class-path
[INFO] Detects 26 modified jaxx file(s).
mojoSucceeded org.nuiton.jaxx:jaxx-maven-plugin:2.5.10-SNAPSHOT(default)[WARNING] JAXX detects 3 warnings :
<http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>
jaxx supports i18n, no need to add explicit call to I18n._ for attribute 'text' in component 'filterSpeciesBatchRootButton' : [_("tutti.label.filterSpeciesBatchMode.mode.root", model.getRootNumber())]
<http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>
jaxx supports i18n, no need to add explicit call to I18n._ for attribute 'text' in component 'gearLatitudeLabel' : [_("tutti.label.fishingOperation.gearLatitude", ((CoordinateEditorType)handler.getConfig().getCoordinateEditorType()).toString())]
<http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>
jaxx supports i18n, no need to add explicit call to I18n._ for attribute 'text' in component 'gearLongitudeLabel' : [_("tutti.label.fishingOperation.gearLongitude", ((CoordinateEditorType)handler.getConfig().getCoordinateEditorType()).toString())]
[INFO] Generated 26 file(s) in 16.137s
mojoStarted org.nuiton.i18n:i18n-maven-plugin:2.5(scan-sources)
[INFO]
[INFO] --- i18n-maven-plugin:2.5:parserJava (scan-sources) @ tutti-ui-swing ---
mojoSucceeded org.nuiton.i18n:i18n-maven-plugin:2.5(scan-sources)
mojoStarted org.nuiton.i18n:i18n-maven-plugin:2.5(scan-sources)
[INFO]
[INFO] --- i18n-maven-plugin:2.5:parserValidation (scan-sources) @ tutti-ui-swing ---
[INFO] Load rules file validation.rules
mojoSucceeded org.nuiton.i18n:i18n-maven-plugin:2.5(scan-sources)
forkedProjectStarted fr.ifremer.tutti:tutti-ui-swing:1.0-SNAPSHOT
mojoStarted org.nuiton.i18n:i18n-maven-plugin:2.5(get)
[INFO]
[INFO] --- i18n-maven-plugin:2.5:get (get) @ tutti-ui-swing ---
[INFO] Copying tutti-ui-swing.properties to <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/t…>
mojoSucceeded org.nuiton.i18n:i18n-maven-plugin:2.5(get)
forkedProjectSucceeded fr.ifremer.tutti:tutti-ui-swing:1.0-SNAPSHOT
mojoStarted org.nuiton.i18n:i18n-maven-plugin:2.5(scan-sources)
[INFO]
[INFO] --- i18n-maven-plugin:2.5:gen (scan-sources) @ tutti-ui-swing ---
[WARNING] bundle fr_FR contains 31/547 empty entries! (use -Di18n.showEmpty to see these entries)
mojoSucceeded org.nuiton.i18n:i18n-maven-plugin:2.5(scan-sources)
forkedProjectStarted fr.ifremer.tutti:tutti-ui-swing:1.0-SNAPSHOT
mojoStarted org.nuiton.i18n:i18n-maven-plugin:2.5(collect-i18n-artifacts)
[INFO]
[INFO] --- i18n-maven-plugin:2.5:collect-i18n-artifacts (collect-i18n-artifacts) @ tutti-ui-swing ---
mojoSucceeded org.nuiton.i18n:i18n-maven-plugin:2.5(collect-i18n-artifacts)[INFO] collected 10 i18n artifacts for locale fr_FR stored in <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/t…>
forkedProjectSucceeded fr.ifremer.tutti:tutti-ui-swing:1.0-SNAPSHOT
mojoStarted org.nuiton.i18n:i18n-maven-plugin:2.5(make-bundle)
[INFO]
[INFO] --- i18n-maven-plugin:2.5:bundle (make-bundle) @ tutti-ui-swing ---
[WARNING] bundle fr_FR contains 37/800 empty entries! (use -Di18n.showEmpty to see these entries)
mojoSucceeded org.nuiton.i18n:i18n-maven-plugin:2.5(make-bundle)
mojoStarted org.codehaus.mojo:license-maven-plugin:1.4(attach-licenses)
[INFO]
[INFO] --- license-maven-plugin:1.4:update-project-license (attach-licenses) @ tutti-ui-swing ---
mojoSucceeded org.codehaus.mojo:license-maven-plugin:1.4(attach-licenses)
mojoStarted org.codehaus.mojo:license-maven-plugin:1.4(attach-licenses)
[INFO]
[INFO] --- license-maven-plugin:1.4:add-third-party (attach-licenses) @ tutti-ui-swing ---
[WARNING] No license name defined for org.hibernate.javax.persistence--hibernate-jpa-2.0-api--1.0.1.Final
[INFO] Load missing file <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>
[INFO] Missing file <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…> is up-to-date.
[INFO] Writing third-party file to <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/t…>
[INFO] Writing bundled third-party file to <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/t…>
[INFO] Will attach third party file from <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>
mojoSucceeded org.codehaus.mojo:license-maven-plugin:1.4(attach-licenses)
mojoStarted org.apache.maven.plugins:maven-resources-plugin:2.6(default-resources)
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ tutti-ui-swing ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 78 resources
mojoSucceeded org.apache.maven.plugins:maven-resources-plugin:2.6(default-resources)[INFO] Copying 2 resources
[INFO] Copying 4 resources
mojoStarted org.apache.maven.plugins:maven-compiler-plugin:2.5.1(default-compile)
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ tutti-ui-swing ---
[INFO] Compiling 208 source files to <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/t…>
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] bootstrap class path not set in conjunction with -source 1.6
<http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[29,32] error: cannot find symbol
[ERROR] symbol: class AbstractMainUITuttiAction
location: package fr.ifremer.tutti.ui.swing
<http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[48,37] error: cannot find symbol
[ERROR] symbol: class AbstractMainUITuttiAction
<http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[28,32] error: cannot find symbol
[ERROR] symbol: class AbstractMainUITuttiAction
location: package fr.ifremer.tutti.ui.swing
<http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[44,35] error: cannot find symbol
[ERROR] symbol: class AbstractMainUITuttiAction
<http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[27,32] error: cannot find symbol
[ERROR] symbol: class AbstractMainUITuttiAction
location: package fr.ifremer.tutti.ui.swing
<http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[42,36] error: cannot find symbol
[ERROR] symbol: class AbstractMainUITuttiAction
<http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[28,32] error: cannot find symbol
[ERROR] symbol: class AbstractMainUITuttiAction
location: package fr.ifremer.tutti.ui.swing
<http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[44,34] error: cannot find symbol
[ERROR] symbol: class AbstractMainUITuttiAction
<http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[67,40] error: cannot find symbol
[ERROR] symbol: method getContext()
location: class InstallDbAction
<http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[79,8] error: cannot find symbol
[ERROR] symbol: method getContext()
location: class InstallDbAction
<http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[82,87] error: cannot find symbol
[ERROR] symbol: method getContext()
location: class InstallDbAction
<http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[83,57] error: UpdateType is not public in TuttiApplicationUpdaterCallBack; cannot be accessed from outside package
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[87,8] error: cannot find symbol
[ERROR] symbol: method sendMessage(String)
location: class InstallDbAction
<http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[93,8] error: cannot find symbol
[ERROR] symbol: method getContext()
location: class InstallDbAction
<http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[96,25] error: cannot find symbol
[ERROR] symbol: method getHandler()
location: class InstallDbAction
<http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[96,38] error: cannot find symbol
[ERROR] symbol: method actionPerformed(ActionEvent)
location: class OpenDbAction
<http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[65,4] error: method does not override or implement a method from a supertype
mojoFailed org.apache.maven.plugins:maven-compiler-plugin:2.5.1(default-compile)[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[101,8] error: cannot find symbol
[ERROR] symbol: variable super
location: class InstallDbAction
<http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[102,8] error: cannot find symbol
[ERROR] symbol: method getContext()
location: class InstallDbAction
<http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[99,4] error: method does not override or implement a method from a supertype
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[69,8] error: cannot find symbol
[ERROR] symbol: method getContext()
location: class CloseDbAction
<http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[71,8] error: cannot find symbol
[ERROR] symbol: method getHandler()
location: class CloseDbAction
<http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[73,8] error: cannot find symbol
[ERROR] symbol: method sendMessage(String)
location: class CloseDbAction
<http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[76,8] error: cannot find symbol
[ERROR] symbol: method getContext()
location: class CloseDbAction
<http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[60,4] error: method does not override or implement a method from a supertype
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[58,4] error: method does not override or implement a method from a supertype
[ERROR] <http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[64,8] error: cannot find symbol
[ERROR] symbol: method getContext()
location: class OpenDbAction
<http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[65,8] error: cannot find symbol
[ERROR] symbol: method getHandler()
location: class OpenDbAction
<http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[69,8] error: cannot find symbol
[ERROR] symbol: method sendMessage(String)
location: class OpenDbAction
<http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[71,8] error: cannot find symbol
[ERROR] symbol: method getContext()
location: class OpenDbAction
<http://ci.nuiton.org/jenkins/job/tutti/fr.ifremer.tutti$tutti-ui-swing/ws/s…>:[61,4] error: method does not override or implement a method from a supertype
[INFO] 31 errors
[INFO] -------------------------------------------------------------
projectFailed fr.ifremer.tutti:tutti-ui-swing:1.0-SNAPSHOT
1
1
r423 - in trunk/tutti-ui-swing/src/main: java/fr/ifremer/tutti/ui/swing resources/i18n resources/icons
by tchemit@users.forge.codelutin.com 15 Feb '13
by tchemit@users.forge.codelutin.com 15 Feb '13
15 Feb '13
Author: tchemit
Date: 2013-02-15 17:55:21 +0100 (Fri, 15 Feb 2013)
New Revision: 423
Url: http://forge.codelutin.com/projects/tutti/repository/revisions/423
Log:
continue updater actions
Added:
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/AbstractMainUITuttiAction.java
trunk/tutti-ui-swing/src/main/resources/icons/action-close-db.png
trunk/tutti-ui-swing/src/main/resources/icons/action-export-db.png
trunk/tutti-ui-swing/src/main/resources/icons/action-install-db.png
trunk/tutti-ui-swing/src/main/resources/icons/action-manage-db.png
trunk/tutti-ui-swing/src/main/resources/icons/action-open-db.png
Modified:
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/AbstractTuttiUIHandler.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/TuttiApplicationUpdaterCallBack.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/UpdateReferentialAction.java
trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties
Added: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/AbstractMainUITuttiAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/AbstractMainUITuttiAction.java (rev 0)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/AbstractMainUITuttiAction.java 2013-02-15 16:55:21 UTC (rev 423)
@@ -0,0 +1,43 @@
+package fr.ifremer.tutti.ui.swing;
+
+/*
+ * #%L
+ * Tutti :: UI
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2012 - 2013 Ifremer
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU 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 General Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
+ * #L%
+ */
+
+/**
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 1.0
+ */
+public abstract class AbstractMainUITuttiAction extends AbstractTuttiAction<TuttiUIContext, MainUI, MainUIHandler> {
+
+ private static final long serialVersionUID = 1L;
+
+ protected AbstractMainUITuttiAction(MainUIHandler handler,
+ String name,
+ String icon,
+ String text,
+ String tip,
+ boolean hideBody) {
+ super(handler, name, icon, text, tip, hideBody);
+ }
+}
Property changes on: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/AbstractMainUITuttiAction.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/AbstractTuttiUIHandler.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/AbstractTuttiUIHandler.java 2013-02-15 14:49:58 UTC (rev 422)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/AbstractTuttiUIHandler.java 2013-02-15 16:55:21 UTC (rev 423)
@@ -311,27 +311,32 @@
AbstractButton abstractButton = (AbstractButton) component;
Class<? extends AbstractTuttiAction> actionName = (Class<? extends AbstractTuttiAction>) abstractButton.getClientProperty("tuttiAction");
if (actionName != null) {
- Action action = createAction(actionName);
- abstractButton.setAction(action);
+ initAction(abstractButton, actionName);
}
}
-
-// else if (component instanceof JMenuItem) {
-// JMenuItem jMenuItem = (JMenuItem) component;
-// if (jMenuItem.getAction()!=null) {
-// jMenuItem.setIcon();
-// }
-//
-// }
}
}
+ protected void initAction(AbstractButton abstractButton,
+ Class<? extends AbstractTuttiAction> actionName) {
+ Action action = createAction(actionName);
+ abstractButton.setAction(action);
+ }
+
protected <A extends AbstractTuttiAction> A createAction(Class<A> actionName) {
A action = null;
if (actionName != null) {
try {
+
+ AbstractTuttiUIHandler handler = this;
+
+ if (AbstractMainUITuttiAction.class.isAssignableFrom(actionName) &&
+ getContext().getMainUI() != null) {
+ handler = getContext().getMainUI().getHandler();
+ }
+
action = (A) ConstructorUtils.invokeConstructor(
- actionName, this);
+ actionName, handler);
} catch (Exception e) {
throw new RuntimeException(
"Could not instanciate action " + actionName, e);
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/TuttiApplicationUpdaterCallBack.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/TuttiApplicationUpdaterCallBack.java 2013-02-15 14:49:58 UTC (rev 422)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/TuttiApplicationUpdaterCallBack.java 2013-02-15 16:55:21 UTC (rev 423)
@@ -54,7 +54,7 @@
private static final Log log =
LogFactory.getLog(TuttiApplicationUpdaterCallBack.class);
- enum UpdateType {
+ public enum UpdateType {
JRE,
TUTTI,
I18N,
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/UpdateReferentialAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/UpdateReferentialAction.java 2013-02-15 14:49:58 UTC (rev 422)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/UpdateReferentialAction.java 2013-02-15 16:55:21 UTC (rev 423)
@@ -41,7 +41,7 @@
* @author tchemit <chemit(a)codelutin.com>
* @since 1.0
*/
-public class UpdateReferentialAction extends AbstractTuttiAction<TuttiUIContext, MainUI, MainUIHandler> {
+public class UpdateReferentialAction extends AbstractMainUITuttiAction {
private static final long serialVersionUID = 1L;
@@ -82,6 +82,11 @@
false,
callback);
+ progressionModel.setMessage("Rechargement de la base de données");
+
+ getContext().setDbLoaded(true);
+ getHandler().reloadPersistenceService();
+
getContext().getActionUI().getModel().setProgressionModel(null);
}
}
\ No newline at end of file
Modified: trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties
===================================================================
--- trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties 2013-02-15 14:49:58 UTC (rev 422)
+++ trunk/tutti-ui-swing/src/main/resources/i18n/tutti-ui-swing_fr_FR.properties 2013-02-15 16:55:21 UTC (rev 423)
@@ -27,6 +27,8 @@
tutti.action.cloneProtocol=Cloner
tutti.action.cloneProtocol.tip=Dupliquer le protocole sélectionné
tutti.action.close=Fermer
+tutti.action.closeDb=Fermer la base
+tutti.action.closeDb.tip=Fermer la base de données en cours d'utilisation
tutti.action.computeWeights=Elever les poids
tutti.action.computeWeights.tip=Elever les poids
tutti.action.configuration=Configuration
@@ -55,6 +57,8 @@
tutti.action.exit.tip=Quitter l'application
tutti.action.exportAllCaracteristic=Exporter toutes les caractéristiques
tutti.action.exportAllCaracteristic.tip=Exporter toutes les caractéristiques (sans les affecter à un écran)
+tutti.action.exportDb=Exporter la base
+tutti.action.exportDb.tip=Exporter la base de données au format zip
tutti.action.exportProtocol=Exporter
tutti.action.exportProtocol.tip=Exporter le protocole sélectionné
tutti.action.exportProtocolCaracteristic=Exporter les caractéristiques
@@ -91,6 +95,10 @@
tutti.action.importTemporarySpecies.tip=Importer un référentiel temporaire d'espèces
tutti.action.importTemporaryVessel=Importer
tutti.action.importTemporaryVessel.tip=Importer un référentiel temporaire de navires
+tutti.action.installDb=Installer la base
+tutti.action.installDb.tip=Télécharger puis installer la base de données
+tutti.action.manageDb=Gestion base
+tutti.action.manageDb.tip=Gérer la base de données utilisée par Tutti
tutti.action.newCruise=Nouveau
tutti.action.newCruise.tip=Créer une nouvelle campagne
tutti.action.newFishingOperation.tip=Créer une nouvelle opération de pêche
@@ -99,6 +107,8 @@
tutti.action.newProtocol=Nouveau
tutti.action.newProtocol.tip=Créer un nouveau protocole
tutti.action.ok=Fermer
+tutti.action.openDb=Ouvrir la base
+tutti.action.openDb.tip=Ouvrir la base de données détectée par Tutti
tutti.action.reload.actions=Recharger les actions
tutti.action.reload.application=Recharger l'application
tutti.action.reload.ui=Recharger l'interface graphique
@@ -171,6 +181,10 @@
tutti.flash.information.species.exported.from.protocol=Espèces du protocole exportées dans le fichier %s.
tutti.flash.information.species.imported.in.protocol=Espèces importées dans le protocole depuis le fichier %s.
tutti.flash.information.species.remove.from.protocol=L'espèce %s a été retirée du protocole
+tutti.information.db.loaded=Tutti est connecté à une base de données
+tutti.information.no.db.connected=Aucune base de données connectée à Tutti.
+tutti.information.no.db.exist=Tutti n'a pas trouvée de base à utiliser, vous pouvez l'installer.
+tutti.information.no.db.loaded=Tutti a détecté une base mais elle n'est pas actuellement ouverte.
tutti.label.attachmentEditor.file=Fichier
tutti.label.attachmentEditor.fileComment=Commentaire
tutti.label.attachmentEditor.fileName=Nom
@@ -307,6 +321,8 @@
tutti.legend.splitSpeciesBatchConfiguration=Configuration
tutti.menu.actions=Actions
tutti.menu.actions.tip=Actions
+tutti.menu.administration=Administration
+tutti.menu.administration.tip=Administrer Tutti
tutti.menu.file=Fichier
tutti.menu.file.tip=Fichier
tutti.menu.help=Aide
@@ -443,6 +459,7 @@
tutti.title.editFrequency=Mensuration
tutti.title.home=Sélection de la campagne
tutti.title.import.temporary.referential=importer des référentiels temporaires
+tutti.title.manageDb=Gérer les bases de données
tutti.title.noSelectedCruise=Pas de campagne sélectionné
tutti.title.noSelectedProgram=Pas de série de campagne sélectionné
tutti.title.noSelectedProtocol=Pas de protocol sélectionné
Added: trunk/tutti-ui-swing/src/main/resources/icons/action-close-db.png
===================================================================
(Binary files differ)
Property changes on: trunk/tutti-ui-swing/src/main/resources/icons/action-close-db.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: trunk/tutti-ui-swing/src/main/resources/icons/action-export-db.png
===================================================================
(Binary files differ)
Property changes on: trunk/tutti-ui-swing/src/main/resources/icons/action-export-db.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
Added: trunk/tutti-ui-swing/src/main/resources/icons/action-install-db.png
===================================================================
(Binary files differ)
Property changes on: trunk/tutti-ui-swing/src/main/resources/icons/action-install-db.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: trunk/tutti-ui-swing/src/main/resources/icons/action-manage-db.png
===================================================================
(Binary files differ)
Property changes on: trunk/tutti-ui-swing/src/main/resources/icons/action-manage-db.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: trunk/tutti-ui-swing/src/main/resources/icons/action-open-db.png
===================================================================
(Binary files differ)
Property changes on: trunk/tutti-ui-swing/src/main/resources/icons/action-open-db.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
Added: svn:keywords
+ Author Date Id Revision HeadURL
1
0
r422 - trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home
by tchemit@users.forge.codelutin.com 15 Feb '13
by tchemit@users.forge.codelutin.com 15 Feb '13
15 Feb '13
Author: tchemit
Date: 2013-02-15 15:49:58 +0100 (Fri, 15 Feb 2013)
New Revision: 422
Url: http://forge.codelutin.com/projects/tutti/repository/revisions/422
Log:
clean validator when quitting home screen
Modified:
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SelectCruiseUIHandler.java
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SelectCruiseUIHandler.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SelectCruiseUIHandler.java 2013-02-15 14:49:24 UTC (rev 421)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/home/SelectCruiseUIHandler.java 2013-02-15 14:49:58 UTC (rev 422)
@@ -251,6 +251,7 @@
for (PropertyChangeListener listener : listeners) {
getModel().removePropertyChangeListener(listener);
}
+ clearValidators();
}
public void startExistingProtocolAction(ActionEvent event) {
1
0
r421 - in trunk: tutti-persistence/src/main/java/fr/ifremer/tutti/persistence tutti-service/src/main/java/fr/ifremer/tutti/service tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db
by tchemit@users.forge.codelutin.com 15 Feb '13
by tchemit@users.forge.codelutin.com 15 Feb '13
15 Feb '13
Author: tchemit
Date: 2013-02-15 15:49:24 +0100 (Fri, 15 Feb 2013)
New Revision: 421
Url: http://forge.codelutin.com/projects/tutti/repository/revisions/421
Log:
ajout manage db
Added:
trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistenceNoDbImpl.java
trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/ClosedPersistenceService.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/ManageDbAction.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/CloseDbAction.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/DbManagerUI.css
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/DbManagerUI.jaxx
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/DbManagerUIHandler.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/ExportDbAction.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/InstallDbAction.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/OpenDbAction.java
Modified:
trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/PersistenceService.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/MainUI.css
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/MainUI.jaxx
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/MainUIHandler.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/TuttiScreen.java
trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/TuttiUIContext.java
Added: trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistenceNoDbImpl.java
===================================================================
--- trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistenceNoDbImpl.java (rev 0)
+++ trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistenceNoDbImpl.java 2013-02-15 14:49:24 UTC (rev 421)
@@ -0,0 +1,461 @@
+package fr.ifremer.tutti.persistence;
+
+/*
+ * #%L
+ * Tutti :: Persistence
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2012 - 2013 Ifremer
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU 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 General Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
+ * #L%
+ */
+
+import fr.ifremer.tutti.persistence.entities.data.AccidentalBatch;
+import fr.ifremer.tutti.persistence.entities.data.BenthosBatch;
+import fr.ifremer.tutti.persistence.entities.data.CatchBatch;
+import fr.ifremer.tutti.persistence.entities.data.Cruise;
+import fr.ifremer.tutti.persistence.entities.data.FishingOperation;
+import fr.ifremer.tutti.persistence.entities.data.MacroWasteBatch;
+import fr.ifremer.tutti.persistence.entities.data.PlanktonBatch;
+import fr.ifremer.tutti.persistence.entities.data.Program;
+import fr.ifremer.tutti.persistence.entities.data.SpeciesBatch;
+import fr.ifremer.tutti.persistence.entities.data.SpeciesBatchFrequency;
+import fr.ifremer.tutti.persistence.entities.protocol.TuttiProtocol;
+import fr.ifremer.tutti.persistence.entities.referential.Caracteristic;
+import fr.ifremer.tutti.persistence.entities.referential.CaracteristicQualitativeValue;
+import fr.ifremer.tutti.persistence.entities.referential.Country;
+import fr.ifremer.tutti.persistence.entities.referential.FishingOperationLocation;
+import fr.ifremer.tutti.persistence.entities.referential.Gear;
+import fr.ifremer.tutti.persistence.entities.referential.Person;
+import fr.ifremer.tutti.persistence.entities.referential.Species;
+import fr.ifremer.tutti.persistence.entities.referential.Vessel;
+import fr.ifremer.tutti.persistence.entities.referential.Zone;
+
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * Mock implementation With no persistence at all behind.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 1.0
+ */
+public class TuttiPersistenceNoDbImpl implements TuttiPersistence {
+
+ @Override
+ public String getImplementationName() {
+ return "Mock persistence service implementation";
+ }
+
+ @Override
+ public List<Zone> getAllProgramZone() {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public List<Country> getAllCountry() {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public List<FishingOperationLocation> getAllFishingOperationStrata(String zoneId) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public List<FishingOperationLocation> getAllFishingOperationSubStrata(String zoneId, String strataId) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public List<FishingOperationLocation> getAllFishingOperationLocation(String zoneId, String strataId, String subStrataId) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public List<Vessel> getAllScientificVessel() {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public List<Vessel> getAllFishingVessel() {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public List<Species> getAllSpecies() {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public List<Species> getAllReferentSpecies() {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public List<Species> getAllSpecies(TuttiProtocol protocol) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public List<Caracteristic> getAllCaracteristic() {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public Caracteristic getSizeCategoryCaracteristic() {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public Caracteristic getSexCaracteristic() {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public Caracteristic getSortedUnsortedCaracteristic() {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public Caracteristic getMaturityCaracteristic() {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public Caracteristic getMacroWasteCategoryCaracteristic() {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public Caracteristic getMacroWasteSizeCategoryCaracteristic() {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public List<Gear> getAllScientificGear() {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public List<Gear> getAllFishingGear() {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public List<Person> getAllPerson() {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public Person getPerson(Integer personId) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public Gear getGear(Integer gearCode) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public Vessel getVessel(String vesselCode) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public boolean isSortedQualitativeValue(CaracteristicQualitativeValue value) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public List<Species> importTemporarySpecies(List<Species> species) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public List<Vessel> importTemporaryVessel(List<Vessel> vessels) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public List<Person> importTemporaryPerson(List<Person> persons) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public List<Gear> importTemporaryGear(List<Gear> gears) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public List<Program> getAllProgram() {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public Program getProgram(String id) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public Program createProgram(Program bean) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public Program saveProgram(Program bean) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public List<Cruise> getAllCruise(String programId) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public Cruise getCruise(String id) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public Cruise createCruise(Cruise bean) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public Cruise saveCruise(Cruise bean) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public List<String> getAllProtocolNames() {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public List<TuttiProtocol> getAllProtocol() {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public boolean isProtocolExist(String id) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public TuttiProtocol getProtocol(String id) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public TuttiProtocol createProtocol(TuttiProtocol bean) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public TuttiProtocol saveProtocol(TuttiProtocol bean) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public void deleteProtocol(String id) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public List<FishingOperation> getAllFishingOperation(String cruiseId) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public FishingOperation getFishingOperation(String id) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public FishingOperation createFishingOperation(FishingOperation bean) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public FishingOperation saveFishingOperation(FishingOperation bean) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public CatchBatch getCatchBatchFromFishingOperation(String id) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public CatchBatch createCatchBatch(CatchBatch bean) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public CatchBatch saveCatchBatch(CatchBatch bean) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public List<SpeciesBatch> getAllRootSpeciesBatch(String fishingOperationId) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public SpeciesBatch createSpeciesBatch(SpeciesBatch bean, String parentBatchId) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public SpeciesBatch saveSpeciesBatch(SpeciesBatch bean) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public void deleteSpeciesBatch(String id) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public void deleteSpeciesSubBatch(String id) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public void changeSpeciesBatchSpecies(String batchId, Species species) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public List<SpeciesBatchFrequency> getAllSpeciesBatchFrequency(String speciesBatchId) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public List<SpeciesBatchFrequency> saveSpeciesBatchFrequency(String speciesBatchId, List<SpeciesBatchFrequency> frequencies) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public List<BenthosBatch> getAllBenthosBatch(String fishingOperationId) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public BenthosBatch getBenthosBatch(String id) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public BenthosBatch createBenthosBatch(BenthosBatch bean) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public BenthosBatch saveBenthosBatch(BenthosBatch bean) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public void deleteBenthosBatch(String id) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public List<PlanktonBatch> getAllPlanktonBatch(String fishingOperationId) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public PlanktonBatch getPlanktonBatch(String id) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public PlanktonBatch createPlanktonBatch(PlanktonBatch bean) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public PlanktonBatch savePlanktonBatch(PlanktonBatch bean) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public void deletePlanktonBatch(String id) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public List<MacroWasteBatch> getAllMacroWasteBatch(String fishingOperationId) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public MacroWasteBatch getMacroWasteBatch(String id) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public MacroWasteBatch createMacroWasteBatch(MacroWasteBatch bean) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public MacroWasteBatch saveMacroWasteBatch(MacroWasteBatch bean) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public void deleteMacroWasteBatch(String id) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public List<AccidentalBatch> getAllAccidentalBatch(String fishingOperationId) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public AccidentalBatch getAccidentalBatch(String id) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public AccidentalBatch createAccidentalBatch(AccidentalBatch bean) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public AccidentalBatch saveAccidentalBatch(AccidentalBatch bean) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public void deleteAccidentalBatch(String id) {
+ throw new RuntimeException("method not implemented");
+ }
+
+ @Override
+ public void init() {
+ }
+
+ @Override
+ public void close() throws IOException {
+ }
+}
Property changes on: trunk/tutti-persistence/src/main/java/fr/ifremer/tutti/persistence/TuttiPersistenceNoDbImpl.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/ClosedPersistenceService.java
===================================================================
--- trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/ClosedPersistenceService.java (rev 0)
+++ trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/ClosedPersistenceService.java 2013-02-15 14:49:24 UTC (rev 421)
@@ -0,0 +1,71 @@
+package fr.ifremer.tutti.service;
+
+/*
+ * #%L
+ * Tutti :: Service
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2012 - 2013 Ifremer
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU 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 General Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
+ * #L%
+ */
+
+import fr.ifremer.tutti.persistence.TuttiPersistenceNoDbImpl;
+import fr.ifremer.tutti.persistence.config.TuttiPersistenceConfig;
+import fr.ifremer.tutti.service.config.TuttiServiceConfig;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * Persistence service which always use the mock driver (means db is closed).
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 1.0
+ */
+public class ClosedPersistenceService extends PersistenceService {
+
+ /** Logger. */
+ private static final Log log =
+ LogFactory.getLog(ClosedPersistenceService.class);
+
+ @Override
+ public void init() {
+
+ if (log.isInfoEnabled()) {
+ log.info("Open persistence driver " + getImplementationName());
+ }
+
+ TuttiServiceConfig serviceConfig = context.getConfig();
+
+ TuttiPersistenceConfig config = serviceConfig.getPersistenceConfig();
+ TuttiPersistenceConfig.setInstance(config);
+
+ driver = new TuttiPersistenceNoDbImpl();
+
+ if (log.isInfoEnabled()) {
+ log.info("Will open persistence driver " +
+ driver.getImplementationName());
+ }
+
+ driver.init();
+ }
+
+ @Override
+ public boolean isDbLoaded() {
+ return false;
+ }
+}
Property changes on: trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/ClosedPersistenceService.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/PersistenceService.java
===================================================================
--- trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/PersistenceService.java 2013-02-15 14:02:59 UTC (rev 420)
+++ trunk/tutti-service/src/main/java/fr/ifremer/tutti/service/PersistenceService.java 2013-02-15 14:49:24 UTC (rev 421)
@@ -25,7 +25,7 @@
*/
import fr.ifremer.tutti.persistence.TuttiPersistence;
-import fr.ifremer.tutti.persistence.TuttiPersistenceDevImpl;
+import fr.ifremer.tutti.persistence.TuttiPersistenceNoDbImpl;
import fr.ifremer.tutti.persistence.config.TuttiPersistenceConfig;
import fr.ifremer.tutti.persistence.entities.data.AccidentalBatch;
import fr.ifremer.tutti.persistence.entities.data.BenthosBatch;
@@ -47,8 +47,6 @@
import fr.ifremer.tutti.persistence.entities.referential.Species;
import fr.ifremer.tutti.persistence.entities.referential.Vessel;
import fr.ifremer.tutti.persistence.entities.referential.Zone;
-import fr.ifremer.tutti.persistence.service.ProtocolPersistenceService;
-import fr.ifremer.tutti.persistence.service.ProtocolPersistenceServiceImpl;
import fr.ifremer.tutti.persistence.service.TuttiPersistenceServiceLocator;
import fr.ifremer.tutti.service.config.TuttiServiceConfig;
import org.apache.commons.io.IOUtils;
@@ -56,7 +54,6 @@
import org.apache.commons.logging.LogFactory;
import org.springframework.transaction.annotation.Transactional;
-import java.io.File;
import java.io.IOException;
import java.util.List;
@@ -89,6 +86,10 @@
return "Tutti Persistence Service";
}
+ public boolean isDbLoaded() {
+ return !(driver instanceof TuttiPersistenceNoDbImpl);
+ }
+
@Override
public void init() {
@@ -117,65 +118,67 @@
// still on dev driver
- File storageDirectory = TuttiPersistenceDevImpl.getStorageDirectory(serviceConfig.getApplicationConfig());
+// File storageDirectory = TuttiPersistenceDevImpl.getStorageDirectory(serviceConfig.getApplicationConfig());
- if (log.isWarnEnabled()) {
+// if (log.isWarnEnabled()) {
+//
+// log.warn("--------------------------------------------------------------------");
+// log.warn("");
+// log.warn("Could not find database directory at " + config.getDbDirectory());
+// log.warn("Will still use dev dataStorage in " + storageDirectory);
+// log.warn("");
+// log.warn("--------------------------------------------------------------------");
+// }
- log.warn("--------------------------------------------------------------------");
- log.warn("");
- log.warn("Could not find database directory at " + config.getDbDirectory());
- log.warn("Will still use dev dataStorage in " + storageDirectory);
- log.warn("");
- log.warn("--------------------------------------------------------------------");
- }
+ driver = new TuttiPersistenceNoDbImpl();
- driver = new TuttiPersistenceDevImpl(serviceConfig.getApplicationConfig()) {
+// driver = new TuttiPersistenceDevImpl(serviceConfig.getApplicationConfig()) {
+//
+// ProtocolPersistenceService protocolPersistenceService = new ProtocolPersistenceServiceImpl();
+//
+// @Override
+// public void init() {
+// super.init();
+//
+// protocolPersistenceService.init();
+// }
+//
+// @Override
+// public boolean isProtocolExist(String id) {
+// return protocolPersistenceService.isProtocolExist(id);
+// }
+//
+// @Override
+// public List<String> getAllProtocolNames() {
+// return protocolPersistenceService.getAllProtocolNames();
+// }
+//
+// @Override
+// public List<TuttiProtocol> getAllProtocol() {
+// return protocolPersistenceService.getAllProtocol();
+// }
+//
+// @Override
+// public TuttiProtocol getProtocol(String id) {
+// return protocolPersistenceService.getProtocol(id);
+// }
+//
+// @Override
+// public TuttiProtocol createProtocol(TuttiProtocol bean) {
+// return protocolPersistenceService.createProtocol(bean);
+// }
+//
+// @Override
+// public TuttiProtocol saveProtocol(TuttiProtocol bean) {
+// return protocolPersistenceService.saveProtocol(bean);
+// }
+//
+// @Override
+// public void deleteProtocol(String id) {
+// protocolPersistenceService.deleteProtocol(id);
+// }
+// };
- ProtocolPersistenceService protocolPersistenceService = new ProtocolPersistenceServiceImpl();
-
- @Override
- public void init() {
- super.init();
-
- protocolPersistenceService.init();
- }
-
- @Override
- public boolean isProtocolExist(String id) {
- return protocolPersistenceService.isProtocolExist(id);
- }
-
- @Override
- public List<String> getAllProtocolNames() {
- return protocolPersistenceService.getAllProtocolNames();
- }
-
- @Override
- public List<TuttiProtocol> getAllProtocol() {
- return protocolPersistenceService.getAllProtocol();
- }
-
- @Override
- public TuttiProtocol getProtocol(String id) {
- return protocolPersistenceService.getProtocol(id);
- }
-
- @Override
- public TuttiProtocol createProtocol(TuttiProtocol bean) {
- return protocolPersistenceService.createProtocol(bean);
- }
-
- @Override
- public TuttiProtocol saveProtocol(TuttiProtocol bean) {
- return protocolPersistenceService.saveProtocol(bean);
- }
-
- @Override
- public void deleteProtocol(String id) {
- protocolPersistenceService.deleteProtocol(id);
- }
- };
-
if (log.isInfoEnabled()) {
log.info("Will open persistence driver " +
driver.getImplementationName());
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/MainUI.css
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/MainUI.css 2013-02-15 14:02:59 UTC (rev 420)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/MainUI.css 2013-02-15 14:49:24 UTC (rev 421)
@@ -50,7 +50,17 @@
actionIcon: exit;
}
+#menuActionUpdate {
+ _tuttiAction: {UpdateApplicationAction.class};
+}
+
+#menuActionManageDb {
+ enabled: {model.getScreen() != TuttiScreen.MANAGE_DB};
+ _tuttiAction: {ManageDbAction.class};
+}
+
#menuActions {
+ enabled: {model.isDbLoaded()};
text: "tutti.menu.actions";
toolTipText: "tutti.menu.actions.tip";
mnemonic: A;
@@ -92,10 +102,11 @@
_tuttiAction: {ValidateSelectedCruiseCatchesAction.class};
}
-#menuReferential{
- text: "tutti.menu.referential";
- toolTipText: "tutti.menu.referential.tip";
- mnemonic: S;
+#menuAdministration{
+ enabled: {model.isDbLoaded()};
+ text: "tutti.menu.administration";
+ toolTipText: "tutti.menu.administration.tip";
+ mnemonic: A;
}
#menuImportTemporaryReferential {
@@ -103,11 +114,8 @@
_tuttiAction: {ImportTemporaryReferentialAction.class};
}
-#menuUpdateReferential {
- _tuttiAction: {UpdateReferentialAction.class};
-}
-
#menuSynchronisations {
+ enabled: {model.isDbLoaded()};
text: "tutti.menu.synchronisations";
toolTipText: "tutti.menu.synchronisations.tip";
mnemonic: S;
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/MainUI.jaxx
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/MainUI.jaxx 2013-02-15 14:02:59 UTC (rev 420)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/MainUI.jaxx 2013-02-15 14:49:24 UTC (rev 421)
@@ -58,7 +58,10 @@
<JMenu id='menuFile'>
<JMenuItem id='menuFileConfiguration'
onActionPerformed="getHandler().showConfig()"/>
+ <JMenuItem id='menuActionUpdate'/>
<JSeparator/>
+ <JMenuItem id='menuActionManageDb'/>
+ <JSeparator/>
<JMenuItem id='menuFileExit'
onActionPerformed='getHandler().closeTutti()'/>
</JMenu>
@@ -72,10 +75,8 @@
<JMenuItem id='menuActionValidateCatches'/>
</JMenu>
- <JMenu id='menuReferential'>
-
+ <JMenu id='menuAdministration'>
<JMenuItem id='menuImportTemporaryReferential'/>
- <JMenuItem id='menuUpdateReferential'/>
</JMenu>
<JMenu id='menuSynchronisations'>
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/MainUIHandler.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/MainUIHandler.java 2013-02-15 14:02:59 UTC (rev 420)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/MainUIHandler.java 2013-02-15 14:49:24 UTC (rev 421)
@@ -31,6 +31,7 @@
import fr.ifremer.tutti.ui.swing.config.TuttiApplicationConfig;
import fr.ifremer.tutti.ui.swing.config.TuttiConfigUI;
import fr.ifremer.tutti.ui.swing.content.cruise.EditCruiseUI;
+import fr.ifremer.tutti.ui.swing.content.db.DbManagerUI;
import fr.ifremer.tutti.ui.swing.content.home.SelectCruiseUI;
import fr.ifremer.tutti.ui.swing.content.operation.FishingOperationsUI;
import fr.ifremer.tutti.ui.swing.content.program.EditProgramUI;
@@ -69,7 +70,7 @@
protected JComponent currentBody;
- protected final PersistenceService persistenceService;
+ protected PersistenceService persistenceService;
protected MainUIHandler(TuttiUIContext context, MainUI ui) {
super(context, ui);
@@ -125,8 +126,14 @@
TuttiScreen screen;
- screen = TuttiScreen.SELECT_CRUISE;
+ if (context.isDbExist() && context.isDbLoaded()) {
+ screen = TuttiScreen.SELECT_CRUISE;
+ } else {
+
+ screen = TuttiScreen.MANAGE_DB;
+ }
+
context.setScreen(screen);
}
@@ -310,6 +317,13 @@
Icon icon;
switch (screen) {
default:
+ case MANAGE_DB:
+
+ screenUI = new DbManagerUI(ui);
+ screenTitle = _("tutti.title.manageDb");
+ icon = ui.getMenuActionManageDb().getIcon();
+ break;
+
case SELECT_CRUISE:
screenUI = new SelectCruiseUI(ui);
@@ -462,7 +476,6 @@
title += _("tutti.title.noSelectedProtocol");
-
} else {
// selected protocol
@@ -475,4 +488,15 @@
return title;
}
+ public void reloadPersistenceService() {
+
+ this.persistenceService = context.reloadPersistenceService();
+
+ context.setProgramId(null);
+ context.setProgramId(null);
+ }
+
+ public PersistenceService getPersistenceService() {
+ return persistenceService;
+ }
}
Added: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/ManageDbAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/ManageDbAction.java (rev 0)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/ManageDbAction.java 2013-02-15 14:49:24 UTC (rev 421)
@@ -0,0 +1,71 @@
+package fr.ifremer.tutti.ui.swing;
+
+/*
+ * #%L
+ * Tutti :: UI
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2012 - 2013 Ifremer
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU 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 General Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
+ * #L%
+ */
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import java.awt.event.ActionEvent;
+
+import static org.nuiton.i18n.I18n._;
+
+/**
+ * To manage db in Tutti.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 1.0
+ */
+public class ManageDbAction extends AbstractChangeScreenAction {
+
+ private static final long serialVersionUID = 1L;
+
+ /** Logger. */
+ private static final Log log = LogFactory.getLog(ManageDbAction.class);
+
+ public ManageDbAction(MainUIHandler handler) {
+ super(handler,
+ "mnanageDb",
+ "manage-db",
+ _("tutti.action.manageDb"),
+ _("tutti.action.manageDb.tip"),
+ true
+ );
+ setMnemonic('P');
+ }
+
+ @Override
+ protected void doAction(ActionEvent e) {
+ if (log.isDebugEnabled()) {
+ log.debug("open manage db screen");
+ }
+ getContext().setScreen(getNextScreen());
+ }
+
+ @Override
+ protected TuttiScreen getNextScreen() {
+ return TuttiScreen.MANAGE_DB;
+ }
+
+}
\ No newline at end of file
Property changes on: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/ManageDbAction.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/TuttiScreen.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/TuttiScreen.java 2013-02-15 14:02:59 UTC (rev 420)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/TuttiScreen.java 2013-02-15 14:49:24 UTC (rev 421)
@@ -33,6 +33,13 @@
public enum TuttiScreen {
/**
+ * To manager db used by Tutti.
+ *
+ * @since 1.0
+ */
+ MANAGE_DB,
+
+ /**
* To select program and cruise.
*
* @since 0.1
Modified: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/TuttiUIContext.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/TuttiUIContext.java 2013-02-15 14:02:59 UTC (rev 420)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/TuttiUIContext.java 2013-02-15 14:49:24 UTC (rev 421)
@@ -30,9 +30,11 @@
import fr.ifremer.tutti.persistence.RessourceClassLoader;
import fr.ifremer.tutti.persistence.entities.data.Cruise;
import fr.ifremer.tutti.persistence.entities.data.Program;
+import fr.ifremer.tutti.service.ClosedPersistenceService;
import fr.ifremer.tutti.service.PersistenceService;
import fr.ifremer.tutti.service.TuttiService;
import fr.ifremer.tutti.service.TuttiServiceContext;
+import fr.ifremer.tutti.service.TuttiTechnicalException;
import fr.ifremer.tutti.ui.swing.config.TuttiApplicationConfig;
import fr.ifremer.tutti.ui.swing.util.UIMessageNotifier;
import fr.ifremer.tutti.ui.swing.util.action.TuttiActionUI;
@@ -91,6 +93,10 @@
PROPERTY_CRUISE_ID,
PROPERTY_PROTOCOL_ID);
+ public static final String PROPERTY_DB_EXIST = "dbExist";
+
+ public static final String PROPERTY_DB_LOADED = "dbLoaded";
+
/**
* Application context (only one for all the application).
*
@@ -126,6 +132,11 @@
*/
protected final SwingSession swingSession;
+ /**
+ * Erro helper.
+ *
+ * @since 1.0
+ */
protected final TuttiErrorHelper errorHelper;
/**
@@ -174,6 +185,20 @@
private TuttiActionUI actionUI;
+ /**
+ * Flag to know if there is an exsiting db.
+ *
+ * @since 1.0
+ */
+ private boolean dbExist;
+
+ /**
+ * Flag to know if there is a loaded db.
+ *
+ * @since 1.0
+ */
+ private boolean dbLoaded;
+
public static TuttiUIContext newContext(TuttiApplicationConfig config) {
Preconditions.checkNotNull(config);
Preconditions.checkState(applicationContext == null,
@@ -210,9 +235,27 @@
}
public <S extends TuttiService> S getService(Class<S> serviceType) {
+ if (PersistenceService.class.equals(serviceType) && !useRealPersistenceService()) {
+ serviceType = (Class<S>) ClosedPersistenceService.class;
+ }
return serviceContext.getService(serviceType);
}
+ public boolean useRealPersistenceService() {
+ return isDbExist() && isDbLoaded();
+ }
+
+ public PersistenceService reloadPersistenceService() {
+
+ try {
+ serviceContext.close();
+ } catch (IOException e) {
+ throw new TuttiTechnicalException("Could not close services", e);
+ }
+
+ return getService(PersistenceService.class);
+ }
+
public TuttiApplicationConfig getConfig() {
return config;
}
@@ -245,11 +288,28 @@
return StringUtils.isNotBlank(programId);
}
-
public TuttiScreen getScreen() {
return screen;
}
+ public boolean isDbExist() {
+ return dbExist;
+ }
+
+ public void setDbExist(boolean dbExist) {
+ this.dbExist = dbExist;
+ firePropertyChange(PROPERTY_DB_EXIST, null, dbExist);
+ }
+
+ public boolean isDbLoaded() {
+ return dbLoaded;
+ }
+
+ public void setDbLoaded(boolean dbLoaded) {
+ this.dbLoaded = dbLoaded;
+ firePropertyChange(PROPERTY_DB_LOADED, null, dbLoaded);
+ }
+
public void setProgramId(String programId) {
boolean oldProgramFilled = isProgramFilled();
boolean oldCruiseFilled = isCruiseFilled();
@@ -301,7 +361,6 @@
public void init() {
-
try {
config.getServiceConfig().prepareDirectories();
} catch (IOException e) {
@@ -385,70 +444,87 @@
setProtocolId(getConfig().getProtocolId());
}
- //check if programId is sane
- PersistenceService service = getService(PersistenceService.class);
+ boolean dbExists =
+ getConfig().getServiceConfig().getPersistenceConfig().isDbExists();
- if (isProtocolFilled()) {
+ setDbExist(dbExists);
- if (!service.isProtocolExist(protocolId)) {
+ if (!dbExists) {
- // not found in this db
+ setProtocolId(null);
+ setProgramId(null);
+ setCruiseId(null);
+ setDbLoaded(false);
- if (log.isWarnEnabled()) {
- log.warn("Remove invalid protocolId: " + protocolId);
- }
+ } else {
- setProtocolId(null);
- }
- }
+ setDbLoaded(true);
- if (isProgramFilled()) {
+ //check if programId is sane
+ PersistenceService service = getService(PersistenceService.class);
- Program program = service.getProgram(programId);
- if (program == null) {
+ if (isProtocolFilled()) {
- // not found in this db
+ if (!service.isProtocolExist(protocolId)) {
- if (log.isWarnEnabled()) {
- log.warn("Remove invalid programId: " + programId);
+ // not found in this db
+
+ if (log.isWarnEnabled()) {
+ log.warn("Remove invalid protocolId: " + protocolId);
+ }
+
+ setProtocolId(null);
}
+ }
- setProgramId(null);
- setCruiseId(null);
+ if (isProgramFilled()) {
- } else {
+ Program program = service.getProgram(programId);
+ if (program == null) {
- if (log.isInfoEnabled()) {
- log.info("ProgramId valid: " + programId);
- }
+ // not found in this db
- setProgramId(programId);
+ if (log.isWarnEnabled()) {
+ log.warn("Remove invalid programId: " + programId);
+ }
- // test cruiseId
- if (isCruiseFilled()) {
+ setProgramId(null);
+ setCruiseId(null);
- Cruise cruise = service.getCruise(cruiseId);
+ } else {
- if (cruise != null &&
- !cruise.getProgram().getId().equals(programId)) {
-
- // not matchin program, reset cruise id
- cruise = null;
+ if (log.isInfoEnabled()) {
+ log.info("ProgramId valid: " + programId);
}
- if (cruise == null) {
+ setProgramId(programId);
- // not found in this db
+ // test cruiseId
+ if (isCruiseFilled()) {
- if (log.isWarnEnabled()) {
- log.warn("Remove invalid cruiseId: " + cruiseId);
+ Cruise cruise = service.getCruise(cruiseId);
+
+ if (cruise != null &&
+ !cruise.getProgram().getId().equals(programId)) {
+
+ // not matchin program, reset cruise id
+ cruise = null;
}
- setCruiseId(null);
- } else {
+ if (cruise == null) {
- if (log.isInfoEnabled()) {
- log.info("CruiseId valid: " + cruiseId);
+ // not found in this db
+
+ if (log.isWarnEnabled()) {
+ log.warn("Remove invalid cruiseId: " + cruiseId);
+ }
+ setCruiseId(null);
+
+ } else {
+
+ if (log.isInfoEnabled()) {
+ log.info("CruiseId valid: " + cruiseId);
+ }
}
}
}
Added: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/CloseDbAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/CloseDbAction.java (rev 0)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/CloseDbAction.java 2013-02-15 14:49:24 UTC (rev 421)
@@ -0,0 +1,78 @@
+package fr.ifremer.tutti.ui.swing.content.db;
+
+/*
+ * #%L
+ * Tutti :: UI
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2012 - 2013 Ifremer
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU 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 General Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
+ * #L%
+ */
+
+import fr.ifremer.tutti.persistence.config.TuttiPersistenceConfig;
+import fr.ifremer.tutti.ui.swing.AbstractMainUITuttiAction;
+import fr.ifremer.tutti.ui.swing.MainUIHandler;
+import fr.ifremer.tutti.ui.swing.TuttiScreen;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import java.awt.event.ActionEvent;
+
+import static org.nuiton.i18n.I18n._;
+
+/**
+ * To close db attached to Tutti.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 1.0
+ */
+public class CloseDbAction extends AbstractMainUITuttiAction {
+
+ private static final long serialVersionUID = 1L;
+
+ /** Logger. */
+ private static final Log log = LogFactory.getLog(CloseDbAction.class);
+
+ public CloseDbAction(MainUIHandler handler) {
+ super(handler,
+ "closeDb",
+ "close-db",
+ _("tutti.action.closeDb"),
+ _("tutti.action.closeDb.tip"),
+ true);
+ }
+
+ @Override
+ protected void doAction(ActionEvent event) {
+
+ if (log.isInfoEnabled()) {
+ log.info("Will close db...");
+ }
+
+ String jdbcUrl = TuttiPersistenceConfig.getInstance().getJdbcUrl();
+
+ getContext().setDbLoaded(false);
+
+ getHandler().reloadPersistenceService();
+
+ sendMessage(String.format("La base de données '%s' est fermée.", jdbcUrl));
+
+ // goto the only screen possible in this state
+ getContext().setScreen(TuttiScreen.MANAGE_DB);
+ }
+}
\ No newline at end of file
Property changes on: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/CloseDbAction.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/DbManagerUI.css
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/DbManagerUI.css (rev 0)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/DbManagerUI.css 2013-02-15 14:49:24 UTC (rev 421)
@@ -0,0 +1,54 @@
+/*
+ * #%L
+ * Tutti :: UI
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2012 - 2013 Ifremer
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU 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 General Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
+ * #L%
+ */
+#informationLabel {
+ actionIcon: information;
+ text: {handler.updateMessage(model.isDbExist(), model.isDbLoaded())};
+ horizontalAlignment: {JLabel.CENTER};
+}
+
+#installDbButton {
+ enabled: {!model.isDbExist()};
+ _tuttiAction: {InstallDbAction.class};
+}
+
+#openDbButton {
+ enabled: {model.isDbExist() && !model.isDbLoaded()};
+ _tuttiAction: {OpenDbAction.class};
+}
+
+#upgradeDbButton {
+ enabled: {model.isDbExist() && model.isDbLoaded()};
+ _tuttiAction: {UpdateReferentialAction.class};
+}
+
+#closeDbButton {
+ enabled: {model.isDbExist() && model.isDbLoaded()};
+ _tuttiAction: {CloseDbAction.class};
+}
+
+#exportDbButton {
+ enabled: false;
+ /*enabled: {model.isDbExist() && model.isDbLoaded()};*/
+ _tuttiAction: {ExportDbAction.class};
+}
Property changes on: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/DbManagerUI.css
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/DbManagerUI.jaxx
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/DbManagerUI.jaxx (rev 0)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/DbManagerUI.jaxx 2013-02-15 14:49:24 UTC (rev 421)
@@ -0,0 +1,67 @@
+<!--
+ #%L
+ Tutti :: UI
+ $Id$
+ $HeadURL$
+ %%
+ Copyright (C) 2012 - 2013 Ifremer
+ %%
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public
+ License along with this program. If not, see
+ <http://www.gnu.org/licenses/gpl-3.0.html>.
+ #L%
+ -->
+<JPanel id='noDbUITopPanel' layout='{new BorderLayout()}'
+ implements='fr.ifremer.tutti.ui.swing.TuttiUI<TuttiUIContext, DbManagerUIHandler>'>
+
+ <import>
+
+ fr.ifremer.tutti.ui.swing.TuttiUI
+ fr.ifremer.tutti.ui.swing.TuttiUIContext
+ fr.ifremer.tutti.ui.swing.UpdateReferentialAction
+
+ static org.nuiton.i18n.I18n._
+ </import>
+
+ <script><![CDATA[
+
+ public DbManagerUI(TuttiUI parentUI) {
+ JAXXUtil.initContext(this, parentUI);
+ DbManagerUIHandler handler = new DbManagerUIHandler(parentUI.getHandler().getContext(), this);
+ setContextValue(handler);
+ handler.beforeInitUI();
+ }
+
+ protected void $afterCompleteSetup() {
+ handler.afterInitUI();
+ }
+ ]]></script>
+
+ <DbManagerUIHandler id='handler'
+ initializer='getContextValue(DbManagerUIHandler.class)'/>
+
+ <TuttiUIContext id='model'
+ initializer='getContextValue(TuttiUIContext.class)'/>
+
+ <JPanel id='centerPanel' layout='{new BorderLayout()}'
+ constraints='BorderLayout.CENTER'>
+ <JLabel id='informationLabel' constraints='BorderLayout.CENTER'/>
+ <JPanel constraints='BorderLayout.SOUTH' layout='{new GridLayout(0, 1)}'>
+ <JButton id='installDbButton'/>
+ <JButton id='openDbButton'/>
+ <JButton id='upgradeDbButton'/>
+ <JButton id='exportDbButton'/>
+ <JButton id='closeDbButton'/>
+ </JPanel>
+ </JPanel>
+</JPanel>
\ No newline at end of file
Property changes on: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/DbManagerUI.jaxx
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/DbManagerUIHandler.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/DbManagerUIHandler.java (rev 0)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/DbManagerUIHandler.java 2013-02-15 14:49:24 UTC (rev 421)
@@ -0,0 +1,118 @@
+package fr.ifremer.tutti.ui.swing.content.db;
+
+/*
+ * #%L
+ * Tutti :: UI
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2012 - 2013 Ifremer
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU 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 General Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
+ * #L%
+ */
+
+import fr.ifremer.tutti.ui.swing.AbstractTuttiUIHandler;
+import fr.ifremer.tutti.ui.swing.TuttiUIContext;
+import jaxx.runtime.validator.swing.SwingValidator;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import javax.swing.SwingUtilities;
+import java.beans.PropertyChangeEvent;
+import java.beans.PropertyChangeListener;
+
+import static org.nuiton.i18n.I18n._;
+
+/**
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 1.0
+ */
+public class DbManagerUIHandler extends AbstractTuttiUIHandler<TuttiUIContext, DbManagerUI> {
+
+ /** Logger. */
+ private static final Log log =
+ LogFactory.getLog(DbManagerUIHandler.class);
+
+ public DbManagerUIHandler(TuttiUIContext context, DbManagerUI ui) {
+ super(context, ui);
+ }
+
+ @Override
+ public void beforeInitUI() {
+ context.addPropertyChangeListener(new PropertyChangeListener() {
+ @Override
+ public void propertyChange(PropertyChangeEvent evt) {
+ String propertyName = evt.getPropertyName();
+ String message;
+
+
+ }
+ });
+ }
+
+ public String updateMessage(boolean dbExist, boolean dbLoaded) {
+ String message;
+
+ if (dbExist) {
+ if (dbLoaded) {
+
+ // db loaded
+ message = _("tutti.information.db.loaded");
+
+ } else {
+
+ // no db loaded
+ message = _("tutti.information.no.db.loaded");
+ }
+ } else {
+
+ // db does not exist
+ message = "tutti.information.no.db.exist";
+ ui.getInformationLabel().setText(_(message));
+ }
+ return message;
+ }
+
+ @Override
+ public void afterInitUI() {
+
+ initUI(ui);
+
+ ui.applyDataBinding(DbManagerUI.BINDING_INSTALL_DB_BUTTON_ENABLED);
+ ui.applyDataBinding(DbManagerUI.BINDING_OPEN_DB_BUTTON_ENABLED);
+ ui.applyDataBinding(DbManagerUI.BINDING_CLOSE_DB_BUTTON_ENABLED);
+ ui.applyDataBinding(DbManagerUI.BINDING_UPGRADE_DB_BUTTON_ENABLED);
+
+ SwingUtilities.invokeLater(
+ new Runnable() {
+ @Override
+ public void run() {
+ ui.repaint();
+ }
+ }
+ );
+ }
+
+ @Override
+ public void onCloseUI() {
+ }
+
+ @Override
+ public SwingValidator<TuttiUIContext> getValidator() {
+ return null;
+ }
+
+}
Property changes on: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/DbManagerUIHandler.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/ExportDbAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/ExportDbAction.java (rev 0)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/ExportDbAction.java 2013-02-15 14:49:24 UTC (rev 421)
@@ -0,0 +1,67 @@
+package fr.ifremer.tutti.ui.swing.content.db;
+
+/*
+ * #%L
+ * Tutti :: UI
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2012 - 2013 Ifremer
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU 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 General Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
+ * #L%
+ */
+
+import fr.ifremer.tutti.ui.swing.AbstractMainUITuttiAction;
+import fr.ifremer.tutti.ui.swing.MainUIHandler;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import java.awt.event.ActionEvent;
+
+import static org.nuiton.i18n.I18n._;
+
+/**
+ * To export a db attached to Tutti.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 1.0
+ */
+public class ExportDbAction extends AbstractMainUITuttiAction {
+
+ private static final long serialVersionUID = 1L;
+
+ /** Logger. */
+ private static final Log log = LogFactory.getLog(ExportDbAction.class);
+
+ public ExportDbAction(MainUIHandler handler) {
+ super(handler,
+ "exportDb",
+ "export-db",
+ _("tutti.action.exportDb"),
+ _("tutti.action.exportDb.tip"),
+ true);
+ }
+
+ @Override
+ protected void doAction(ActionEvent event) {
+
+ if (log.isInfoEnabled()) {
+ log.info("Will export db...");
+ }
+
+ //TODO
+ }
+}
\ No newline at end of file
Property changes on: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/ExportDbAction.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/InstallDbAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/InstallDbAction.java (rev 0)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/InstallDbAction.java 2013-02-15 14:49:24 UTC (rev 421)
@@ -0,0 +1,104 @@
+package fr.ifremer.tutti.ui.swing.content.db;
+
+/*
+ * #%L
+ * Tutti :: UI
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2012 - 2013 Ifremer
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU 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 General Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
+ * #L%
+ */
+
+import fr.ifremer.tutti.persistence.ProgressionModel;
+import fr.ifremer.tutti.persistence.config.TuttiPersistenceConfig;
+import fr.ifremer.tutti.ui.swing.AbstractMainUITuttiAction;
+import fr.ifremer.tutti.ui.swing.MainUIHandler;
+import fr.ifremer.tutti.ui.swing.TuttiApplicationUpdaterCallBack;
+import fr.ifremer.tutti.ui.swing.config.TuttiApplicationConfig;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.nuiton.util.ApplicationUpdater;
+
+import java.awt.event.ActionEvent;
+import java.io.File;
+
+import static org.nuiton.i18n.I18n._;
+
+/**
+ * To install db when no db is attached to Tutti.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 1.0
+ */
+public class InstallDbAction extends AbstractMainUITuttiAction {
+
+ private static final long serialVersionUID = 1L;
+
+ /** Logger. */
+ private static final Log log =
+ LogFactory.getLog(InstallDbAction.class);
+
+ public InstallDbAction(MainUIHandler handler) {
+ super(handler,
+ "installDb",
+ "install-db",
+ _("tutti.action.installDb"),
+ _("tutti.action.installDb.tip"),
+ true);
+ }
+
+ @Override
+ protected void doAction(ActionEvent event) {
+ TuttiApplicationConfig config = getContext().getConfig();
+
+ File current = config.getDataDirectory();
+ String url = config.getUpdateUrl();
+
+ if (log.isInfoEnabled()) {
+ log.info(String.format("Try to install db (current data location: %s), using update url: %s", current, url));
+ }
+ ApplicationUpdater up = new ApplicationUpdater();
+
+ File dest = new File(config.getTuttiBasedir(), "NEW");
+ ProgressionModel progressionModel = new ProgressionModel();
+ getContext().getActionUI().getModel().setProgressionModel(progressionModel);
+ progressionModel.setMessage("Recherche de mises à jour de base");
+
+ TuttiApplicationUpdaterCallBack callback = new TuttiApplicationUpdaterCallBack(getContext(), progressionModel);
+ callback.setTypes(TuttiApplicationUpdaterCallBack.UpdateType.DB);
+
+ up.update(url, current, dest, false, callback);
+
+ sendMessage("Nouvelle base de données installée.");
+
+ String jdbcUrl = TuttiPersistenceConfig.getInstance().getJdbcUrl();
+
+ progressionModel.setMessage(String.format("Ouverture de la base de données *%s*.", jdbcUrl));
+
+ getContext().setDbExist(true);
+
+ // open db
+ new OpenDbAction(getHandler()).actionPerformed(event);
+ }
+
+ @Override
+ protected void releaseAction(ActionEvent event) {
+ super.releaseAction(event);
+ getContext().getActionUI().getModel().setProgressionModel(null);
+ }
+}
\ No newline at end of file
Property changes on: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/InstallDbAction.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
Added: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/OpenDbAction.java
===================================================================
--- trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/OpenDbAction.java (rev 0)
+++ trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/OpenDbAction.java 2013-02-15 14:49:24 UTC (rev 421)
@@ -0,0 +1,73 @@
+package fr.ifremer.tutti.ui.swing.content.db;
+
+/*
+ * #%L
+ * Tutti :: UI
+ * $Id$
+ * $HeadURL$
+ * %%
+ * Copyright (C) 2012 - 2013 Ifremer
+ * %%
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU 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 General Public
+ * License along with this program. If not, see
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
+ * #L%
+ */
+
+import fr.ifremer.tutti.persistence.config.TuttiPersistenceConfig;
+import fr.ifremer.tutti.ui.swing.AbstractMainUITuttiAction;
+import fr.ifremer.tutti.ui.swing.MainUIHandler;
+import fr.ifremer.tutti.ui.swing.TuttiScreen;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import java.awt.event.ActionEvent;
+
+import static org.nuiton.i18n.I18n._;
+
+/**
+ * To open existing db.
+ *
+ * @author tchemit <chemit(a)codelutin.com>
+ * @since 1.0
+ */
+public class OpenDbAction extends AbstractMainUITuttiAction {
+
+ private static final long serialVersionUID = 1L;
+
+ /** Logger. */
+ private static final Log log =
+ LogFactory.getLog(OpenDbAction.class);
+
+ public OpenDbAction(MainUIHandler handler) {
+ super(handler,
+ "openDb",
+ "open-db",
+ _("tutti.action.openDb"),
+ _("tutti.action.openDb.tip"),
+ true);
+ }
+
+ @Override
+ protected void doAction(ActionEvent event) {
+
+ getContext().setDbLoaded(true);
+ getHandler().reloadPersistenceService();
+
+ String jdbcUrl = TuttiPersistenceConfig.getInstance().getJdbcUrl();
+
+ sendMessage(String.format("La base de données '%s' est ouverte.", jdbcUrl));
+
+ getContext().setScreen(TuttiScreen.SELECT_CRUISE);
+ }
+}
\ No newline at end of file
Property changes on: trunk/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/db/OpenDbAction.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Id Revision HeadURL
Added: svn:eol-style
+ native
1
0
15 Feb '13
Author: tchemit
Date: 2013-02-15 15:02:59 +0100 (Fri, 15 Feb 2013)
New Revision: 420
Url: http://forge.codelutin.com/projects/tutti/repository/revisions/420
Log:
remove debugger command
Modified:
trunk/tutti-ui-swing/src/main/assembly/min/launch.sh
Modified: trunk/tutti-ui-swing/src/main/assembly/min/launch.sh
===================================================================
--- trunk/tutti-ui-swing/src/main/assembly/min/launch.sh 2013-02-15 10:03:34 UTC (rev 419)
+++ trunk/tutti-ui-swing/src/main/assembly/min/launch.sh 2013-02-15 14:02:59 UTC (rev 420)
@@ -1,7 +1,7 @@
#!/bin/bash
MEMORY="-Xmx1024M"
-TUTTI_JVM_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8000"
+#TUTTI_JVM_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8000"
REP=$(dirname $0)
1
0