Wao-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- 2357 discussions
Author: fdesbois
Date: 2009-12-23 17:52:53 +0000 (Wed, 23 Dec 2009)
New Revision: 158
Added:
tags/suiviobsmer-0.0.1-alpha-2/
Log:
[maven-scm] copy for tag suiviobsmer-0.0.1-alpha-2
1
0
[Suiviobsmer-commits] r157 - in trunk: . suiviobsmer-business suiviobsmer-ui
by fdesbois@users.labs.libre-entreprise.org 23 Dec '09
by fdesbois@users.labs.libre-entreprise.org 23 Dec '09
23 Dec '09
Author: fdesbois
Date: 2009-12-23 17:52:50 +0000 (Wed, 23 Dec 2009)
New Revision: 157
Modified:
trunk/pom.xml
trunk/suiviobsmer-business/pom.xml
trunk/suiviobsmer-ui/pom.xml
Log:
[maven-release-plugin] prepare release suiviobsmer-0.0.1-alpha-2
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2009-12-23 17:31:44 UTC (rev 156)
+++ trunk/pom.xml 2009-12-23 17:52:50 UTC (rev 157)
@@ -15,7 +15,7 @@
<groupId>fr.ifremer</groupId>
<artifactId>suiviobsmer</artifactId>
- <version>0.0.1-alpha-2-SNAPSHOT</version>
+ <version>0.0.1-alpha-2</version>
<modules>
<module>suiviobsmer-ui</module>
@@ -256,9 +256,9 @@
<scm>
- <connection>scm:svn:svn://anonymous at labs.libre-entreprise.org/svnroot/suiviobsmer/trunk</connection>
- <developerConnection>scm:svn:svn+ssh://fdesbois at labs.libre-entreprise.org/svnroot/suiviobsmer/trunk</developerConnection>
- <url>http://labs.libre-entreprise.org/scm/viewvc.php/trunk/?root=suiviobsmer</url>
+ <connection>scm:svn:svn://anonymous at labs.libre-entreprise.org/svnroot/suiviobsmer/tags/suiviobsmer-0.0.1-alpha-2</connection>
+ <developerConnection>scm:svn:svn+ssh://fdesbois at labs.libre-entreprise.org/svnroot/suiviobsmer/tags/suiviobsmer-0.0.1-alpha-2</developerConnection>
+ <url>http://labs.libre-entreprise.org/scm/viewvc.php/tags/suiviobsmer-0.0.1-alph…</url>
</scm>
<build>
Modified: trunk/suiviobsmer-business/pom.xml
===================================================================
--- trunk/suiviobsmer-business/pom.xml 2009-12-23 17:31:44 UTC (rev 156)
+++ trunk/suiviobsmer-business/pom.xml 2009-12-23 17:52:50 UTC (rev 157)
@@ -10,7 +10,7 @@
<parent>
<groupId>fr.ifremer</groupId>
<artifactId>suiviobsmer</artifactId>
- <version>0.0.1-alpha-2-SNAPSHOT</version>
+ <version>0.0.1-alpha-2</version>
</parent>
<groupId>fr.ifremer.suiviobsmer</groupId>
@@ -120,9 +120,9 @@
</build>
<scm>
- <url>http://labs.libre-entreprise.org/scm/viewvc.php/trunk/suiviobsmer-business/…</url>
- <connection>scm:svn:svn://anonymous at labs.libre-entreprise.org/svnroot/suiviobsmer/trunk/suiviobsmer-business</connection>
- <developerConnection>scm:svn:svn+ssh://fdesbois at labs.libre-entreprise.org/svnroot/suiviobsmer/trunk/suiviobsmer-business</developerConnection>
+ <url>http://labs.libre-entreprise.org/scm/viewvc.php/tags/suiviobsmer-0.0.1-alph…</url>
+ <connection>scm:svn:svn://anonymous at labs.libre-entreprise.org/svnroot/suiviobsmer/tags/suiviobsmer-0.0.1-alpha-…</connection>
+ <developerConnection>scm:svn:svn+ssh://fdesbois at labs.libre-entreprise.org/svnroot/suiviobsmer/tags/suiviobsmer-0.0.1-alpha-…</developerConnection>
</scm>
</project>
Modified: trunk/suiviobsmer-ui/pom.xml
===================================================================
--- trunk/suiviobsmer-ui/pom.xml 2009-12-23 17:31:44 UTC (rev 156)
+++ trunk/suiviobsmer-ui/pom.xml 2009-12-23 17:52:50 UTC (rev 157)
@@ -10,7 +10,7 @@
<parent>
<groupId>fr.ifremer</groupId>
<artifactId>suiviobsmer</artifactId>
- <version>0.0.1-alpha-2-SNAPSHOT</version>
+ <version>0.0.1-alpha-2</version>
</parent>
<groupId>fr.ifremer.suiviobsmer</groupId>
@@ -122,9 +122,9 @@
</build>
<scm>
- <url>http://labs.libre-entreprise.org/scm/viewvc.php/trunk/suiviobsmer-ui/?root=…</url>
- <connection>scm:svn:svn://anonymous at labs.libre-entreprise.org/svnroot/suiviobsmer/trunk/suiviobsmer-ui</connection>
- <developerConnection>scm:svn:svn+ssh://fdesbois at labs.libre-entreprise.org/svnroot/suiviobsmer/trunk/suiviobsmer-ui</developerConnection>
+ <url>http://labs.libre-entreprise.org/scm/viewvc.php/tags/suiviobsmer-0.0.1-alph…</url>
+ <connection>scm:svn:svn://anonymous at labs.libre-entreprise.org/svnroot/suiviobsmer/tags/suiviobsmer-0.0.1-alpha-…</connection>
+ <developerConnection>scm:svn:svn+ssh://fdesbois at labs.libre-entreprise.org/svnroot/suiviobsmer/tags/suiviobsmer-0.0.1-alpha-…</developerConnection>
</scm>
</project>
1
0
[Suiviobsmer-commits] r156 - in trunk: suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity suiviobsmer-business/src/main/xmi suiviobsmer-ui/src/main/resources/fr/ifremer/suiviobsmer/ui/pages suiviobsmer-ui/src/main/webapp
by fdesbois@users.labs.libre-entreprise.org 23 Dec '09
by fdesbois@users.labs.libre-entreprise.org 23 Dec '09
23 Dec '09
Author: fdesbois
Date: 2009-12-23 17:31:44 +0000 (Wed, 23 Dec 2009)
New Revision: 156
Modified:
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ContactImpl.java
trunk/suiviobsmer-business/src/main/xmi/suiviobsmer.zargo
trunk/suiviobsmer-ui/src/main/resources/fr/ifremer/suiviobsmer/ui/pages/Boats.properties
trunk/suiviobsmer-ui/src/main/webapp/Boats.tml
Log:
Add getReferenceDate for contact
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ContactImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ContactImpl.java 2009-12-23 15:51:25 UTC (rev 155)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ContactImpl.java 2009-12-23 17:31:44 UTC (rev 156)
@@ -72,4 +72,20 @@
}
}
+ /**
+ * Get the reference date for the contact. It depends on existence of tideBeginDate.
+ *
+ * @return the tideBeginDate if exists or the topiaCreateDate if not
+ */
+ @Override
+ public Date getReferenceDate() {
+ if (log.isDebugEnabled()) {
+ log.debug("topia " + getTopiaCreateDate());
+ }
+ if (getTideBeginDate() != null) {
+ return getTideBeginDate();
+ }
+ return getTopiaCreateDate();
+ }
+
}
Modified: trunk/suiviobsmer-business/src/main/xmi/suiviobsmer.zargo
===================================================================
(Binary files differ)
Modified: trunk/suiviobsmer-ui/src/main/resources/fr/ifremer/suiviobsmer/ui/pages/Boats.properties
===================================================================
--- trunk/suiviobsmer-ui/src/main/resources/fr/ifremer/suiviobsmer/ui/pages/Boats.properties 2009-12-23 15:51:25 UTC (rev 155)
+++ trunk/suiviobsmer-ui/src/main/resources/fr/ifremer/suiviobsmer/ui/pages/Boats.properties 2009-12-23 17:31:44 UTC (rev 156)
@@ -17,7 +17,7 @@
boatLength-label: Longueur
# BOAT INFOS
-topiaCreateDate-label: Date
+referenceDate-label: Date
state-label: Etat
createdBy-label: Observateur
sampleRowCode-label: Code plan
Modified: trunk/suiviobsmer-ui/src/main/webapp/Boats.tml
===================================================================
--- trunk/suiviobsmer-ui/src/main/webapp/Boats.tml 2009-12-23 15:51:25 UTC (rev 155)
+++ trunk/suiviobsmer-ui/src/main/webapp/Boats.tml 2009-12-23 17:31:44 UTC (rev 156)
@@ -190,18 +190,13 @@
</div>
</t:unless>
- <!-- BODY - armateur, contact -->
-<!-- <fieldset id="so-boats-boat-infos-shipowner">
- <legend>Armateur</legend>
- <div t:type="beandisplay" t:id="boatInfosShipOwner" t:object="boatInfos.boat.shipOwner"
- t:include="firstName, lastName" />
- </fieldset>-->
+ <!-- BODY - lastContact -->
<t:if t:test="companyBoatInfos.lastContact">
<fieldset id="so-boats-boat-infos-lastcontact">
<legend>Dernier contact avec le navire pour votre société</legend>
<div class="${lastContactClass}">
<dl t:type="beandisplay" t:id="boatInfosLastContact" t:object="companyBoatInfos.lastContact"
- t:include="topiaCreateDate, state" t:add="createdBy, sampleRowCode">
+ t:include="referenceDate, state" t:add="createdBy, sampleRowCode">
<p:createdBy>
${companyBoatInfos.lastContact.user.fullName}
</p:createdBy>
@@ -212,6 +207,7 @@
</div>
</fieldset>
</t:if>
+ <!-- BODY - contact (person to contact) -->
<fieldset id="so-boats-boat-infos-contact">
<legend>Contact</legend>
<div t:type="beandisplay" t:id="boatInfosContact" t:object="boatInfos"
1
0
[Suiviobsmer-commits] r153 - trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages
by fdesbois@users.labs.libre-entreprise.org 23 Dec '09
by fdesbois@users.labs.libre-entreprise.org 23 Dec '09
23 Dec '09
Author: fdesbois
Date: 2009-12-23 14:47:12 +0000 (Wed, 23 Dec 2009)
New Revision: 153
Modified:
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Contacts.java
Log:
Add condition for tideEndDate
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Contacts.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Contacts.java 2009-12-23 14:45:03 UTC (rev 152)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Contacts.java 2009-12-23 14:47:12 UTC (rev 153)
@@ -21,6 +21,7 @@
package fr.ifremer.suiviobsmer.ui.pages;
+import fr.ifremer.suiviobsmer.SuiviObsmerContext;
import fr.ifremer.suiviobsmer.SuiviObsmerException;
import fr.ifremer.suiviobsmer.bean.ContactState;
import fr.ifremer.suiviobsmer.entity.Boat;
@@ -360,9 +361,15 @@
}
if (begin != null && end != null && end.before(begin)) {
- contactsForm.recordError(endDate, "La date de fin de la marée ne peut être antérieure à celle de début");
+ contactsForm.recordError(endDate, "La date de fin de la marée ne peut pas être antérieure à celle de début");
}
+ Date current = SuiviObsmerContext.getCurrentDate();
+
+ if (end != null && end.after(current)) {
+ contactsForm.recordError(endDate, "La date de fin de la marée ne peut pas être postérieure à la date du jour");
+ }
+
// Non abouti, Refus ou Refus Définitif
if (contactState.isUnfinishedState()) {
if (!StringUtils.isEmpty(contact.getComment())) {
1
0
23 Dec '09
Author: fdesbois
Date: 2009-12-23 14:45:03 +0000 (Wed, 23 Dec 2009)
New Revision: 152
Added:
trunk/suiviobsmer-ui/src/main/webapp/favicon.png
trunk/suiviobsmer-ui/src/main/webapp/img/logo-wao-48px.png
Removed:
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/war/
Modified:
trunk/README.txt
trunk/pom.xml
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/DataLoader.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/QueryBuilder.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerBusinessException.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerContext.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerException.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerGlobal.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerRunner.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerRunnerImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/TopiaQuery.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/BoatFilterImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/CompanyBoatInfosImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/ContactState.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactContext.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactContextImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactState.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateBoardingDone.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateBoardingExpected.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateBoatDefinitiveRefused.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateBoatRefused.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateBoatUnavailable.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateCompanyAccepted.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateCompanyLocked.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateCompanyRefused.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateCompanyUnlocked.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateEnum.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateException.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateProgramAccepted.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateProgramLocked.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateProgramRefused.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateProgramUnlocked.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateStart.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateUnfinished.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ActivityCalendarImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ActivityMonthImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ActivityProfessionImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/BoatImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/BoatInfosImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/CompanyImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ContactImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/FishingZoneImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ProfessionImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ProgramImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/SampleMonthImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/SampleRowImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/UserImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ActivityCalendarImport.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceBoatImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceContactImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceReferentialImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceUserImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceBoatMock.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceContactMock.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceNewsMock.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceReferentialMock.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceSamplingMock.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceUserMock.java
trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/SuiviObsmerGlobalTest.java
trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/SuiviObsmerUtilsTest.java
trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/bean/states/ContactContextTest.java
trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/business/SuiviObsmerRunnerTest.java
trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/entity/BoatImplTest.java
trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/entity/BoatInfosImplTest.java
trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/entity/ProgramImplTest.java
trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/entity/SampleRowImplTest.java
trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ActivityCalendarImportTest.java
trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ServiceBoatImplTest.java
trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ServiceReferentialImplTest.java
trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImplTest.java
trunk/suiviobsmer-ui/pom.xml
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/base/BusinessUtils.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/base/GenericSelectModel.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/base/SuiviObsmerPage.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/components/BooleanImage.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/components/FeedBack.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/components/Layout.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/components/SubmitContext.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/data/SuiviObsmerPropertyChangeListener.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/mixins/Confirm.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Administration.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/BoatActivityCalendar.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Boats.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Contacts.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Index.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/SampleRowForm.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/SamplingHistoric.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/SamplingPlan.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Synthesis.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/UserProfile.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/services/AppModule.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/services/ContactModelFactory.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/services/SuiviObsmerManager.java
Log:
- Use WinstoneLauncher from nuiton-utils 1.1.2
- Update license-header
Modified: trunk/README.txt
===================================================================
--- trunk/README.txt 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/README.txt 2009-12-23 14:45:03 UTC (rev 152)
@@ -3,6 +3,8 @@
java -jar suiviobsmer-XXX.war
+Note : chargement un peu long...
+
Default admin user
------------------
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/pom.xml 2009-12-23 14:45:03 UTC (rev 152)
@@ -238,7 +238,7 @@
<labs.id>154</labs.id>
<!-- libraries version -->
- <nuitonutils.version>1.1.2-SNAPSHOT</nuitonutils.version>
+ <nuitonutils.version>1.1.2</nuitonutils.version>
<topia.version>2.3.0-beta-2</topia.version>
<license.version>2.0.0</license.version>
<helper.version>1.1.0</helper.version>
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/DataLoader.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/DataLoader.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/DataLoader.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/QueryBuilder.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/QueryBuilder.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/QueryBuilder.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerBusinessException.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerBusinessException.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerBusinessException.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerContext.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerContext.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerContext.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/**
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerException.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerException.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerException.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerGlobal.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerGlobal.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerGlobal.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerRunner.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerRunner.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerRunner.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerRunnerImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerRunnerImpl.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerRunnerImpl.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/TopiaQuery.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/TopiaQuery.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/TopiaQuery.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/BoatFilterImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/BoatFilterImpl.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/BoatFilterImpl.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/CompanyBoatInfosImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/CompanyBoatInfosImpl.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/CompanyBoatInfosImpl.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/ContactState.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/ContactState.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/ContactState.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactContext.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactContext.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactContext.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.bean.states;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactContextImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactContextImpl.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactContextImpl.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.bean.states;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactState.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactState.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactState.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.bean.states;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateBoardingDone.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateBoardingDone.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateBoardingDone.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.bean.states;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateBoardingExpected.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateBoardingExpected.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateBoardingExpected.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.bean.states;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateBoatDefinitiveRefused.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateBoatDefinitiveRefused.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateBoatDefinitiveRefused.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.bean.states;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateBoatRefused.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateBoatRefused.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateBoatRefused.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.bean.states;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateBoatUnavailable.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateBoatUnavailable.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateBoatUnavailable.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.bean.states;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateCompanyAccepted.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateCompanyAccepted.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateCompanyAccepted.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.bean.states;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateCompanyLocked.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateCompanyLocked.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateCompanyLocked.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.bean.states;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateCompanyRefused.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateCompanyRefused.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateCompanyRefused.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.bean.states;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateCompanyUnlocked.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateCompanyUnlocked.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateCompanyUnlocked.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.bean.states;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateEnum.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateEnum.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateEnum.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateException.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateException.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateException.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.bean.states;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateProgramAccepted.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateProgramAccepted.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateProgramAccepted.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.bean.states;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateProgramLocked.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateProgramLocked.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateProgramLocked.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.bean.states;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateProgramRefused.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateProgramRefused.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateProgramRefused.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.bean.states;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateProgramUnlocked.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateProgramUnlocked.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateProgramUnlocked.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.bean.states;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateStart.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateStart.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateStart.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.bean.states;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateUnfinished.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateUnfinished.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/bean/states/ContactStateUnfinished.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.bean.states;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ActivityCalendarImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ActivityCalendarImpl.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ActivityCalendarImpl.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.entity;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ActivityMonthImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ActivityMonthImpl.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ActivityMonthImpl.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.entity;
import java.io.Serializable;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ActivityProfessionImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ActivityProfessionImpl.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ActivityProfessionImpl.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.entity;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/BoatImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/BoatImpl.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/BoatImpl.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/BoatInfosImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/BoatInfosImpl.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/BoatInfosImpl.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/CompanyImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/CompanyImpl.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/CompanyImpl.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ContactImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ContactImpl.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ContactImpl.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.entity;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/FishingZoneImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/FishingZoneImpl.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/FishingZoneImpl.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ProfessionImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ProfessionImpl.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ProfessionImpl.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ProgramImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ProgramImpl.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ProgramImpl.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/SampleMonthImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/SampleMonthImpl.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/SampleMonthImpl.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/SampleRowImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/SampleRowImpl.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/SampleRowImpl.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/UserImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/UserImpl.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/UserImpl.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ActivityCalendarImport.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ActivityCalendarImport.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ActivityCalendarImport.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.impl;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceBoatImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceBoatImpl.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceBoatImpl.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceContactImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceContactImpl.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceContactImpl.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceReferentialImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceReferentialImpl.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceReferentialImpl.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImpl.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImpl.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceUserImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceUserImpl.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceUserImpl.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceBoatMock.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceBoatMock.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceBoatMock.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceContactMock.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceContactMock.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceContactMock.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceNewsMock.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceNewsMock.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceNewsMock.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceReferentialMock.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceReferentialMock.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceReferentialMock.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceSamplingMock.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceSamplingMock.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceSamplingMock.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceUserMock.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceUserMock.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceUserMock.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/SuiviObsmerGlobalTest.java
===================================================================
--- trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/SuiviObsmerGlobalTest.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/SuiviObsmerGlobalTest.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
@@ -102,4 +102,4 @@
}
-}
\ No newline at end of file
+}
Modified: trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/SuiviObsmerUtilsTest.java
===================================================================
--- trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/SuiviObsmerUtilsTest.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/SuiviObsmerUtilsTest.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
@@ -136,4 +136,4 @@
log.debug("topiaId for Company : " + company.getTopiaId());
}
-}
\ No newline at end of file
+}
Modified: trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/bean/states/ContactContextTest.java
===================================================================
--- trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/bean/states/ContactContextTest.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/bean/states/ContactContextTest.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.bean.states;
Modified: trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/business/SuiviObsmerRunnerTest.java
===================================================================
--- trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/business/SuiviObsmerRunnerTest.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/business/SuiviObsmerRunnerTest.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/entity/BoatImplTest.java
===================================================================
--- trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/entity/BoatImplTest.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/entity/BoatImplTest.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.entity;
Modified: trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/entity/BoatInfosImplTest.java
===================================================================
--- trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/entity/BoatInfosImplTest.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/entity/BoatInfosImplTest.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.entity;
Modified: trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/entity/ProgramImplTest.java
===================================================================
--- trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/entity/ProgramImplTest.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/entity/ProgramImplTest.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
@@ -206,4 +206,4 @@
}
-}
\ No newline at end of file
+}
Modified: trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/entity/SampleRowImplTest.java
===================================================================
--- trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/entity/SampleRowImplTest.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/entity/SampleRowImplTest.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
@@ -190,4 +190,4 @@
assertEquals(5, result.getRealTidesValue());
}
-}
\ No newline at end of file
+}
Modified: trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ActivityCalendarImportTest.java
===================================================================
--- trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ActivityCalendarImportTest.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ActivityCalendarImportTest.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Business
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.impl;
Modified: trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ServiceBoatImplTest.java
===================================================================
--- trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ServiceBoatImplTest.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ServiceBoatImplTest.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
@@ -404,4 +404,4 @@
Assert.assertEquals(2009, result.getYear());
}
-}
\ No newline at end of file
+}
Modified: trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ServiceReferentialImplTest.java
===================================================================
--- trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ServiceReferentialImplTest.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ServiceReferentialImplTest.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
@@ -116,4 +116,4 @@
assertEquals(6, result);
}
-}
\ No newline at end of file
+}
Modified: trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImplTest.java
===================================================================
--- trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImplTest.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImplTest.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Business
+ * SuiviObsmer :: Business
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
@@ -466,4 +466,4 @@
transaction.closeContext();
}
-}
\ No newline at end of file
+}
Modified: trunk/suiviobsmer-ui/pom.xml
===================================================================
--- trunk/suiviobsmer-ui/pom.xml 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-ui/pom.xml 2009-12-23 14:45:03 UTC (rev 152)
@@ -86,41 +86,40 @@
<!-- ************************************************************* -->
<!-- *** Build Environment ************************************** -->
<!-- ************************************************************* -->
- <build>
+ <build>
<!-- call result war : suiviobsmer-xxx.war -->
- <finalName>suiviobsmer-${project.version}</finalName>
+ <finalName>suiviobsmer-${project.version}</finalName>
<!-- Add main class into war to make it executable -->
- <plugins>
- <plugin>
- <artifactId>maven-war-plugin</artifactId>
- <version>2.1-beta-1</version>
- <configuration>
- <webResources>
- <resource>
- <directory>${basedir}/target/classes</directory>
- <includes>
- <include>**/war/*</include>
- </includes>
- </resource>
- </webResources>
- <!-- for putting Main-Class into war -->
- <archive>
- <manifest>
- <mainClass>fr.ifremer.suiviobsmer.ui.war.SuiviObsmerWarLauncher</mainClass>
- </manifest>
- </archive>
- <overlays>
- <overlay>
- <groupId>org.jvnet.hudson.winstone</groupId>
- <artifactId>winstone</artifactId>
- <type>jar</type>
- </overlay>
- </overlays>
- </configuration>
- </plugin>
- </plugins>
- </build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>2.1-beta-1</version>
+ <configuration>
+ <archive>
+ <manifest>
+ <mainClass>org.nuiton.util.war.WinstoneLauncher</mainClass>
+ </manifest>
+ </archive>
+ <overlays>
+ <overlay>
+ <groupId>org.nuiton</groupId>
+ <artifactId>nuiton-utils</artifactId>
+ <type>jar</type>
+ <includes>
+ <include>**/war/Winstone*</include>
+ </includes>
+ </overlay>
+ <overlay>
+ <groupId>org.jvnet.hudson.winstone</groupId>
+ <artifactId>winstone</artifactId>
+ <type>jar</type>
+ </overlay>
+ </overlays>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
<scm>
<url>http://labs.libre-entreprise.org/scm/viewvc.php/trunk/suiviobsmer-ui/?root=…</url>
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/base/BusinessUtils.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/base/BusinessUtils.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/base/BusinessUtils.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Web Interface
+ * SuiviObsmer :: Web Interface
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/base/GenericSelectModel.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/base/GenericSelectModel.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/base/GenericSelectModel.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/**
* *##%
- * SuiviObsmer Web Interface
+ * SuiviObsmer :: Web Interface
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/base/SuiviObsmerPage.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/base/SuiviObsmerPage.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/base/SuiviObsmerPage.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Web Interface
+ * SuiviObsmer :: Web Interface
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/components/BooleanImage.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/components/BooleanImage.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/components/BooleanImage.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Web Interface
+ * SuiviObsmer :: Web Interface
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
@@ -18,63 +18,63 @@
* <http://www.gnu.org/licenses/gpl-3.0.html>.
* ##%*
*/
-
-package fr.ifremer.suiviobsmer.ui.components;
-
-import org.apache.tapestry5.BindingConstants;
-import org.apache.tapestry5.annotations.Log;
-import org.apache.tapestry5.annotations.Parameter;
-import org.apache.tapestry5.ioc.annotations.Inject;
-import org.slf4j.Logger;
-
-/**
- * BooleanImage
- *
- * Created: 18 nov. 2009
- *
- * @author fdesbois
- * @version $Revision$
- *
- * Mise a jour: $Date$
- * par : $Author$
- */
-public class BooleanImage {
-
- @Inject
- private Logger log;
-
- @Parameter(required = true)
- private Boolean value;
-
- @Parameter
- private boolean empty;
-
- @Parameter(defaultPrefix = BindingConstants.LITERAL)
- private String trueTitle;
-
- @Parameter(defaultPrefix = BindingConstants.LITERAL)
- private String falseTitle;
-
- @Parameter(defaultPrefix = BindingConstants.LITERAL)
- private String emptyTitle;
-
- public Boolean getValue() {
- return value;
- }
-
- public boolean isEmpty() {
- return empty;
- }
-
- public String getTrueTitle() {
- return trueTitle == null ? "yes" : trueTitle;
- }
-
- public String getFalseTitle() {
- return falseTitle == null ? "no" : falseTitle;
- }
-
- public String getEmptyTitle() {
- return emptyTitle == null ? "empty" : emptyTitle;
- }
-}
+
+package fr.ifremer.suiviobsmer.ui.components;
+
+import org.apache.tapestry5.BindingConstants;
+import org.apache.tapestry5.annotations.Log;
+import org.apache.tapestry5.annotations.Parameter;
+import org.apache.tapestry5.ioc.annotations.Inject;
+import org.slf4j.Logger;
+
+/**
+ * BooleanImage
+ *
+ * Created: 18 nov. 2009
+ *
+ * @author fdesbois
+ * @version $Revision$
+ *
+ * Mise a jour: $Date$
+ * par : $Author$
+ */
+public class BooleanImage {
+
+ @Inject
+ private Logger log;
+
+ @Parameter(required = true)
+ private Boolean value;
+
+ @Parameter
+ private boolean empty;
+
+ @Parameter(defaultPrefix = BindingConstants.LITERAL)
+ private String trueTitle;
+
+ @Parameter(defaultPrefix = BindingConstants.LITERAL)
+ private String falseTitle;
+
+ @Parameter(defaultPrefix = BindingConstants.LITERAL)
+ private String emptyTitle;
+
+ public Boolean getValue() {
+ return value;
+ }
+
+ public boolean isEmpty() {
+ return empty;
+ }
+
+ public String getTrueTitle() {
+ return trueTitle == null ? "yes" : trueTitle;
+ }
+
+ public String getFalseTitle() {
+ return falseTitle == null ? "no" : falseTitle;
+ }
+
+ public String getEmptyTitle() {
+ return emptyTitle == null ? "empty" : emptyTitle;
+ }
+}
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/components/FeedBack.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/components/FeedBack.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/components/FeedBack.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,5 +1,5 @@
/* *##%
- * SuiviObsmer Web Interface
+ * SuiviObsmer :: Web Interface
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/components/Layout.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/components/Layout.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/components/Layout.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Web Interface
+ * SuiviObsmer :: Web Interface
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/components/SubmitContext.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/components/SubmitContext.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/components/SubmitContext.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Web Interface
+ * SuiviObsmer :: Web Interface
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/data/SuiviObsmerPropertyChangeListener.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/data/SuiviObsmerPropertyChangeListener.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/data/SuiviObsmerPropertyChangeListener.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Web Interface
+ * SuiviObsmer :: Web Interface
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/mixins/Confirm.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/mixins/Confirm.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/mixins/Confirm.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,7 @@
/**
- * *##% Ca$h Web Interface
- * Copyright (C) 2009 CodeLutin
+ * *##%
+ * SuiviObsmer :: Web Interface
+ * Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as
@@ -14,7 +15,8 @@
*
* 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>. ##%*
+ * <http://www.gnu.org/licenses/gpl-3.0.html>.
+ * ##%*
*/
package fr.ifremer.suiviobsmer.ui.mixins;
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Administration.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Administration.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Administration.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Web Interface
+ * SuiviObsmer :: Web Interface
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/BoatActivityCalendar.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/BoatActivityCalendar.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/BoatActivityCalendar.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,3 +1,23 @@
+/*
+ * *##%
+ * SuiviObsmer :: Web Interface
+ * Copyright (C) 2009 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 Lesser 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>.
+ * ##%*
+ */
package fr.ifremer.suiviobsmer.ui.pages;
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Boats.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Boats.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Boats.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Web Interface
+ * SuiviObsmer :: Web Interface
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Contacts.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Contacts.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Contacts.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Web Interface
+ * SuiviObsmer :: Web Interface
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Index.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Index.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Index.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Web Interface
+ * SuiviObsmer :: Web Interface
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
@@ -18,74 +18,74 @@
* <http://www.gnu.org/licenses/gpl-3.0.html>.
* ##%*
*/
-
-package fr.ifremer.suiviobsmer.ui.pages;
-
-import fr.ifremer.suiviobsmer.SuiviObsmerException;
-import fr.ifremer.suiviobsmer.dto.News;
-import fr.ifremer.suiviobsmer.services.ServiceNews;
-import fr.ifremer.suiviobsmer.ui.base.SuiviObsmerPage;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.List;
-import org.apache.tapestry5.annotations.IncludeStylesheet;
-import org.apache.tapestry5.annotations.Log;
-import org.apache.tapestry5.annotations.Persist;
-import org.apache.tapestry5.annotations.Property;
-import org.apache.tapestry5.ioc.annotations.Inject;
-
-/**
- * Index
- *
- * Created: 9 nov. 2009
- *
- * @author fdesbois
- * @version $Revision$
- *
- * Mise a jour: $Date$
- * par : $Author$
- */
- at IncludeStylesheet("context:css/news.css")
-public class Index implements SuiviObsmerPage {
-
- @Override
- public boolean isOnlyForAdmin() {
- return false;
- }
-
- @Inject
- private ServiceNews serviceNews;
-
- @Persist
- private List<News> newsList;
-
- @Property
- private News news;
-
- private DateFormat dateFormat;
-
- @Log
- void setupRender() {
- newsList = null;
- getNewsList();
- }
-
- public List<News> getNewsList() {
- if (newsList == null) {
- try {
- newsList = serviceNews.getNews();
- } catch (SuiviObsmerException eee) {
- // error db, ...
- }
- }
- return newsList;
- }
-
- public DateFormat getDateFormat() {
- if (dateFormat == null) {
- dateFormat = new SimpleDateFormat("dd/MM/yyyy");
- }
- return dateFormat;
- }
-
-}
+
+package fr.ifremer.suiviobsmer.ui.pages;
+
+import fr.ifremer.suiviobsmer.SuiviObsmerException;
+import fr.ifremer.suiviobsmer.dto.News;
+import fr.ifremer.suiviobsmer.services.ServiceNews;
+import fr.ifremer.suiviobsmer.ui.base.SuiviObsmerPage;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.List;
+import org.apache.tapestry5.annotations.IncludeStylesheet;
+import org.apache.tapestry5.annotations.Log;
+import org.apache.tapestry5.annotations.Persist;
+import org.apache.tapestry5.annotations.Property;
+import org.apache.tapestry5.ioc.annotations.Inject;
+
+/**
+ * Index
+ *
+ * Created: 9 nov. 2009
+ *
+ * @author fdesbois
+ * @version $Revision$
+ *
+ * Mise a jour: $Date$
+ * par : $Author$
+ */
+ at IncludeStylesheet("context:css/news.css")
+public class Index implements SuiviObsmerPage {
+
+ @Override
+ public boolean isOnlyForAdmin() {
+ return false;
+ }
+
+ @Inject
+ private ServiceNews serviceNews;
+
+ @Persist
+ private List<News> newsList;
+
+ @Property
+ private News news;
+
+ private DateFormat dateFormat;
+
+ @Log
+ void setupRender() {
+ newsList = null;
+ getNewsList();
+ }
+
+ public List<News> getNewsList() {
+ if (newsList == null) {
+ try {
+ newsList = serviceNews.getNews();
+ } catch (SuiviObsmerException eee) {
+ // error db, ...
+ }
+ }
+ return newsList;
+ }
+
+ public DateFormat getDateFormat() {
+ if (dateFormat == null) {
+ dateFormat = new SimpleDateFormat("dd/MM/yyyy");
+ }
+ return dateFormat;
+ }
+
+}
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/SampleRowForm.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/SampleRowForm.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/SampleRowForm.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Web Interface
+ * SuiviObsmer :: Web Interface
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/SamplingHistoric.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/SamplingHistoric.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/SamplingHistoric.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Web Interface
+ * SuiviObsmer :: Web Interface
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
@@ -18,59 +18,59 @@
* <http://www.gnu.org/licenses/gpl-3.0.html>.
* ##%*
*/
-
-package fr.ifremer.suiviobsmer.ui.pages;
-
-import fr.ifremer.suiviobsmer.SuiviObsmerException;
-import fr.ifremer.suiviobsmer.dto.SamplingHistoricRow;
-import fr.ifremer.suiviobsmer.services.ServiceSampling;
-import java.text.DateFormat;
-import java.text.SimpleDateFormat;
-import java.util.List;
-import org.apache.tapestry5.annotations.IncludeStylesheet;
-import org.apache.tapestry5.annotations.Property;
-import org.apache.tapestry5.ioc.annotations.Inject;
-
-/**
- * SamplingHistoric
- *
- * Created: 13 nov. 2009
- *
- * @author fdesbois
- * @version $Revision$
- *
- * Mise a jour: $Date$
- * par : $Author$
- */
- at IncludeStylesheet("context:css/sampling.css")
-public class SamplingHistoric {
-
- @Inject
- private ServiceSampling serviceSampling;
-
- private List<SamplingHistoricRow> historic;
-
- @Property
- private SamplingHistoricRow historicRow;
-
- private DateFormat dateFormat;
-
- public List<SamplingHistoricRow> getHistoric() {
- if (historic == null) {
- try {
- historic = serviceSampling.getHistoric();
- } catch (SuiviObsmerException eee) {
- // errors
- }
- }
- return historic;
- }
-
- public DateFormat getDateFormat() {
- if (dateFormat == null) {
- dateFormat = new SimpleDateFormat("dd/MM/yyyy");
- }
- return dateFormat;
- }
-
-}
+
+package fr.ifremer.suiviobsmer.ui.pages;
+
+import fr.ifremer.suiviobsmer.SuiviObsmerException;
+import fr.ifremer.suiviobsmer.dto.SamplingHistoricRow;
+import fr.ifremer.suiviobsmer.services.ServiceSampling;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.List;
+import org.apache.tapestry5.annotations.IncludeStylesheet;
+import org.apache.tapestry5.annotations.Property;
+import org.apache.tapestry5.ioc.annotations.Inject;
+
+/**
+ * SamplingHistoric
+ *
+ * Created: 13 nov. 2009
+ *
+ * @author fdesbois
+ * @version $Revision$
+ *
+ * Mise a jour: $Date$
+ * par : $Author$
+ */
+ at IncludeStylesheet("context:css/sampling.css")
+public class SamplingHistoric {
+
+ @Inject
+ private ServiceSampling serviceSampling;
+
+ private List<SamplingHistoricRow> historic;
+
+ @Property
+ private SamplingHistoricRow historicRow;
+
+ private DateFormat dateFormat;
+
+ public List<SamplingHistoricRow> getHistoric() {
+ if (historic == null) {
+ try {
+ historic = serviceSampling.getHistoric();
+ } catch (SuiviObsmerException eee) {
+ // errors
+ }
+ }
+ return historic;
+ }
+
+ public DateFormat getDateFormat() {
+ if (dateFormat == null) {
+ dateFormat = new SimpleDateFormat("dd/MM/yyyy");
+ }
+ return dateFormat;
+ }
+
+}
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/SamplingPlan.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/SamplingPlan.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/SamplingPlan.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Web Interface
+ * SuiviObsmer :: Web Interface
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Synthesis.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Synthesis.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Synthesis.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Web Interface
+ * SuiviObsmer :: Web Interface
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
@@ -18,29 +18,29 @@
* <http://www.gnu.org/licenses/gpl-3.0.html>.
* ##%*
*/
-
-package fr.ifremer.suiviobsmer.ui.pages;
-
-import fr.ifremer.suiviobsmer.ui.base.SuiviObsmerPage;
-import org.apache.tapestry5.annotations.IncludeStylesheet;
-
-/**
- * Synthesis
- *
- * Created: 9 nov. 2009
- *
- * @author fdesbois
- * @version $Revision$
- *
- * Mise a jour: $Date$
- * par : $Author$
- */
- at IncludeStylesheet("context:css/synthesis.css")
-public class Synthesis implements SuiviObsmerPage {
-
- @Override
- public boolean isOnlyForAdmin() {
- return false;
- }
-
-}
+
+package fr.ifremer.suiviobsmer.ui.pages;
+
+import fr.ifremer.suiviobsmer.ui.base.SuiviObsmerPage;
+import org.apache.tapestry5.annotations.IncludeStylesheet;
+
+/**
+ * Synthesis
+ *
+ * Created: 9 nov. 2009
+ *
+ * @author fdesbois
+ * @version $Revision$
+ *
+ * Mise a jour: $Date$
+ * par : $Author$
+ */
+ at IncludeStylesheet("context:css/synthesis.css")
+public class Synthesis implements SuiviObsmerPage {
+
+ @Override
+ public boolean isOnlyForAdmin() {
+ return false;
+ }
+
+}
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/UserProfile.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/UserProfile.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/UserProfile.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Web Interface
+ * SuiviObsmer :: Web Interface
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
@@ -18,92 +18,92 @@
* <http://www.gnu.org/licenses/gpl-3.0.html>.
* ##%*
*/
-
-package fr.ifremer.suiviobsmer.ui.pages;
-
-import fr.ifremer.suiviobsmer.SuiviObsmerException;
-import fr.ifremer.suiviobsmer.entity.User;
-import fr.ifremer.suiviobsmer.services.ServiceUser;
-import fr.ifremer.suiviobsmer.ui.base.SuiviObsmerPage;
-import fr.ifremer.suiviobsmer.ui.components.Layout;
-import org.apache.commons.lang.StringUtils;
-import org.apache.tapestry5.annotations.IncludeStylesheet;
-import org.apache.tapestry5.annotations.InjectComponent;
-import org.apache.tapestry5.annotations.Property;
-import org.apache.tapestry5.annotations.SessionState;
-import org.apache.tapestry5.corelib.components.BeanEditForm;
-import org.apache.tapestry5.ioc.annotations.Inject;
-import org.slf4j.Logger;
-
-/**
- * UserProfile
- *
- * Created: 10 nov. 2009
- *
- * @author fdesbois
- * @version $Revision$
- *
- * Mise a jour: $Date$
- * par : $Author$
- */
- at IncludeStylesheet("context:css/userProfile.css")
-public class UserProfile implements SuiviObsmerPage {
-
- @Override
- public boolean isOnlyForAdmin() {
- return false;
- }
-
- @Inject
- private Logger log;
-
- @Inject
- private ServiceUser serviceUser;
-
- @InjectComponent
- private Layout layout;
-
- @SessionState
- private User user;
-
- private User userEditable;
-
- @InjectComponent
- private BeanEditForm userForm;
-
- @Property
- private String password;
-
- @Property
- private String password2;
-
- public User getUserEditable() {
- if (userEditable == null) {
- userEditable = user;
- }
- return userEditable;
- }
-
- void onSuccessFromUserForm() {
-
- if (password != null && !password.equals(password2)) {
- userForm.recordError("Les deux password ne sont pas identiques, vérifiez la saisie !");
- } else {
- try {
- if (!StringUtils.isEmpty(password)) {
- userEditable.setPassword(password);
- }
- serviceUser.createUpdateUser(userEditable, false);
- layout.getFeedBack().addInfo("Modifications enregistrées avec succès !");
- } catch (SuiviObsmerException eee) {
- userForm.recordError(eee.getMessage());
- if (log.isErrorEnabled()) {
- log.error("Error during user save", eee);
- }
- }
- }
- }
-
-
-
-}
+
+package fr.ifremer.suiviobsmer.ui.pages;
+
+import fr.ifremer.suiviobsmer.SuiviObsmerException;
+import fr.ifremer.suiviobsmer.entity.User;
+import fr.ifremer.suiviobsmer.services.ServiceUser;
+import fr.ifremer.suiviobsmer.ui.base.SuiviObsmerPage;
+import fr.ifremer.suiviobsmer.ui.components.Layout;
+import org.apache.commons.lang.StringUtils;
+import org.apache.tapestry5.annotations.IncludeStylesheet;
+import org.apache.tapestry5.annotations.InjectComponent;
+import org.apache.tapestry5.annotations.Property;
+import org.apache.tapestry5.annotations.SessionState;
+import org.apache.tapestry5.corelib.components.BeanEditForm;
+import org.apache.tapestry5.ioc.annotations.Inject;
+import org.slf4j.Logger;
+
+/**
+ * UserProfile
+ *
+ * Created: 10 nov. 2009
+ *
+ * @author fdesbois
+ * @version $Revision$
+ *
+ * Mise a jour: $Date$
+ * par : $Author$
+ */
+ at IncludeStylesheet("context:css/userProfile.css")
+public class UserProfile implements SuiviObsmerPage {
+
+ @Override
+ public boolean isOnlyForAdmin() {
+ return false;
+ }
+
+ @Inject
+ private Logger log;
+
+ @Inject
+ private ServiceUser serviceUser;
+
+ @InjectComponent
+ private Layout layout;
+
+ @SessionState
+ private User user;
+
+ private User userEditable;
+
+ @InjectComponent
+ private BeanEditForm userForm;
+
+ @Property
+ private String password;
+
+ @Property
+ private String password2;
+
+ public User getUserEditable() {
+ if (userEditable == null) {
+ userEditable = user;
+ }
+ return userEditable;
+ }
+
+ void onSuccessFromUserForm() {
+
+ if (password != null && !password.equals(password2)) {
+ userForm.recordError("Les deux password ne sont pas identiques, vérifiez la saisie !");
+ } else {
+ try {
+ if (!StringUtils.isEmpty(password)) {
+ userEditable.setPassword(password);
+ }
+ serviceUser.createUpdateUser(userEditable, false);
+ layout.getFeedBack().addInfo("Modifications enregistrées avec succès !");
+ } catch (SuiviObsmerException eee) {
+ userForm.recordError(eee.getMessage());
+ if (log.isErrorEnabled()) {
+ log.error("Error during user save", eee);
+ }
+ }
+ }
+ }
+
+
+
+}
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/services/AppModule.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/services/AppModule.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/services/AppModule.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,5 +1,5 @@
/* *##%
- * SuiviObsmer Web Interface
+ * SuiviObsmer :: Web Interface
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/services/ContactModelFactory.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/services/ContactModelFactory.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/services/ContactModelFactory.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Web Interface
+ * SuiviObsmer :: Web Interface
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/services/SuiviObsmerManager.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/services/SuiviObsmerManager.java 2009-12-23 11:08:07 UTC (rev 151)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/services/SuiviObsmerManager.java 2009-12-23 14:45:03 UTC (rev 152)
@@ -1,6 +1,6 @@
/*
* *##%
- * SuiviObsmer Web Interface
+ * SuiviObsmer :: Web Interface
* Copyright (C) 2009 Ifremer
*
* This program is free software: you can redistribute it and/or modify
Added: trunk/suiviobsmer-ui/src/main/webapp/favicon.png
===================================================================
(Binary files differ)
Property changes on: trunk/suiviobsmer-ui/src/main/webapp/favicon.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/suiviobsmer-ui/src/main/webapp/img/logo-wao-48px.png
===================================================================
(Binary files differ)
Property changes on: trunk/suiviobsmer-ui/src/main/webapp/img/logo-wao-48px.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
1
0
[Suiviobsmer-commits] r151 - trunk/suiviobsmer-business/src/main/xmi
by fdesbois@users.labs.libre-entreprise.org 23 Dec '09
by fdesbois@users.labs.libre-entreprise.org 23 Dec '09
23 Dec '09
Author: fdesbois
Date: 2009-12-23 11:08:07 +0000 (Wed, 23 Dec 2009)
New Revision: 151
Modified:
trunk/suiviobsmer-business/src/main/xmi/suiviobsmer.zargo
Log:
Improve query
Modified: trunk/suiviobsmer-business/src/main/xmi/suiviobsmer.zargo
===================================================================
(Binary files differ)
1
0
[Suiviobsmer-commits] r150 - in trunk/suiviobsmer-business/src: main/java/fr/ifremer/suiviobsmer/entity test/resources
by fdesbois@users.labs.libre-entreprise.org 23 Dec '09
by fdesbois@users.labs.libre-entreprise.org 23 Dec '09
23 Dec '09
Author: fdesbois
Date: 2009-12-23 11:07:53 +0000 (Wed, 23 Dec 2009)
New Revision: 150
Modified:
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/BoatInfosImpl.java
trunk/suiviobsmer-business/src/test/resources/log4j.properties
Log:
Improve query
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/BoatInfosImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/BoatInfosImpl.java 2009-12-23 11:05:36 UTC (rev 149)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/BoatInfosImpl.java 2009-12-23 11:07:53 UTC (rev 150)
@@ -94,8 +94,9 @@
try {
transaction = SuiviObsmerContext.getTopiaRootContext().beginTransaction();
- TopiaQuery query = QueryBuilder.createQueryDoneContactsFromDate(getBoat(), fromDate);
- query.add("user.company = :company").addParam("company", getCompany());
+ TopiaQuery query = QueryBuilder.
+ createQueryDoneContactsFromDate(getBoat(), fromDate).
+ add("user.company", getCompany());
result = query.executeCount(transaction);
Modified: trunk/suiviobsmer-business/src/test/resources/log4j.properties
===================================================================
--- trunk/suiviobsmer-business/src/test/resources/log4j.properties 2009-12-23 11:05:36 UTC (rev 149)
+++ trunk/suiviobsmer-business/src/test/resources/log4j.properties 2009-12-23 11:07:53 UTC (rev 150)
@@ -8,5 +8,5 @@
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%d [%p] %c{2} %m%n
-log4j.logger.fr.ifremer.suiviobsmer=TRACE
+log4j.logger.fr.ifremer.suiviobsmer=INFO
log4j.logger.org.nuiton.util=INFO
1
0
[Suiviobsmer-commits] r149 - in trunk/suiviobsmer-ui/src/main: java/fr/ifremer/suiviobsmer/ui/components java/fr/ifremer/suiviobsmer/ui/pages webapp webapp/css webapp/img
by fdesbois@users.labs.libre-entreprise.org 23 Dec '09
by fdesbois@users.labs.libre-entreprise.org 23 Dec '09
23 Dec '09
Author: fdesbois
Date: 2009-12-23 11:05:36 +0000 (Wed, 23 Dec 2009)
New Revision: 149
Added:
trunk/suiviobsmer-ui/src/main/webapp/img/accept-unavailable-22px.png
trunk/suiviobsmer-ui/src/main/webapp/img/delete-unavailable-22px.png
trunk/suiviobsmer-ui/src/main/webapp/img/edit-unavailable-22px.png
trunk/suiviobsmer-ui/src/main/webapp/img/refuse-unavailable-22px.png
Modified:
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/components/Layout.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Boats.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Contacts.java
trunk/suiviobsmer-ui/src/main/webapp/Boats.tml
trunk/suiviobsmer-ui/src/main/webapp/Contacts.tml
trunk/suiviobsmer-ui/src/main/webapp/SampleRowForm.tml
trunk/suiviobsmer-ui/src/main/webapp/SamplingPlan.tml
trunk/suiviobsmer-ui/src/main/webapp/css/sampling.css
Log:
- Add icons for unavailable actions
- Add some style for SampleRowForm for display parts
- Resolve issue on contact form (fields were not keeped after errors)
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/components/Layout.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/components/Layout.java 2009-12-22 18:09:31 UTC (rev 148)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/components/Layout.java 2009-12-23 11:05:36 UTC (rev 149)
@@ -18,165 +18,164 @@
* <http://www.gnu.org/licenses/gpl-3.0.html>.
* ##%*
*/
-
-package fr.ifremer.suiviobsmer.ui.components;
-
-import fr.ifremer.suiviobsmer.SuiviObsmerException;
-import fr.ifremer.suiviobsmer.entity.User;
-import fr.ifremer.suiviobsmer.services.ServiceUser;
-import fr.ifremer.suiviobsmer.ui.base.SuiviObsmerPage;
-import fr.ifremer.suiviobsmer.ui.pages.Index;
-import org.apache.tapestry5.BindingConstants;
-import org.apache.tapestry5.annotations.InjectComponent;
-import org.apache.tapestry5.annotations.InjectContainer;
-import org.apache.tapestry5.annotations.Log;
-import org.apache.tapestry5.annotations.Parameter;
-import org.apache.tapestry5.annotations.Property;
-import org.apache.tapestry5.annotations.SessionState;
-import org.apache.tapestry5.ioc.annotations.Inject;
-import org.apache.tapestry5.services.Request;
-import org.slf4j.Logger;
-
-/**
- * Layout
- *
- * Created: 9 nov. 2009
- *
- * @author fdesbois
- * @version $Revision$
- *
- * Mise a jour: $Date$
- * par : $Author$
- */
-public class Layout {
-
- @Inject
- private Logger log;
-
- @Parameter(required = true, defaultPrefix = BindingConstants.LITERAL)
- private String pageTitle;
-
- @Parameter(required = true, defaultPrefix = BindingConstants.LITERAL)
- private String contentId;
-
- /**
- * Objet de session représentant l'utilisateur identifié
- */
- @SessionState
- private User currentUser;
-
- /**
- * vrai si l'utilisateur s'est identifié, faux sinon
- */
- @SuppressWarnings("unused")
- @Property
- private boolean currentUserExists;
-
- @InjectComponent
- private FeedBack connexionFeedback;
-
- @InjectComponent
- private FeedBack contentFeedback;
-
- @InjectContainer
- private SuiviObsmerPage page;
-
- @Inject
- private ServiceUser serviceUser;
-
- @Inject
- private Request request;
-
- void setupRender() {
- if(currentUserExists && !canShowPage()) {
- contentFeedback.addError("Vous n'êtes pas autorisé à accéder à cette page !");
- }
- }
-
- public String getContextPath() {
- return request.getContextPath();
- }
-
- /**
- * User for connexion form data
- */
- @Property
- private String login;
-
- @Property
- private String password;
-
- public String getPageTitle() {
- return this.pageTitle;
- }
-
- public String getContentId() {
- return this.contentId;
- }
-
- public void setCurrentUser(User user) {
- this.currentUser = user;
- }
-
- public User getCurrentUser() {
- return this.currentUser;
- }
-
- public FeedBack getFeedBack() {
- return this.contentFeedback;
- }
-
- public String getAdminClass() {
- return this.currentUser.getAdmin() ? " admin" : "";
- }
-
- public String getSamplingSelected() {
- return this.contentId.equals("so-sampling") ? "selected" : "";
- }
-
- public String getBoatsSelected() {
- return this.contentId.equals("so-boats") ? "selected" : "";
- }
-
- public String getContactsSelected() {
- return this.contentId.equals("so-contacts") ? "selected" : "";
- }
-
- public String getSynthesisSelected() {
- return this.contentId.equals("so-synthesis") ? "selected" : "";
- }
-
- public String getAdminSelected() {
- return this.contentId.equals("so-admin") ? "selected" : "";
- }
-
- @Log
- public boolean canShowPage() {
- if (!currentUser.getAdmin()) {
- return !page.isOnlyForAdmin();
- }
- return true;
- }
-
- @Log
- Object onSuccessFromConnexionForm() {
- try {
- User userForm = serviceUser.connect(login, password);
- if (userForm != null) {
- currentUser = userForm;
- } else {
- connexionFeedback.addError("Connexion failed (user/password)");
- }
- } catch (SuiviObsmerException eee) {
- // db error, others, ...
- }
- return null;
- }
-
- @Log
- Object onActionFromExit() {
- setCurrentUser(null);
- return Index.class;
- }
-
-}
+
+package fr.ifremer.suiviobsmer.ui.components;
+
+import fr.ifremer.suiviobsmer.SuiviObsmerException;
+import fr.ifremer.suiviobsmer.entity.User;
+import fr.ifremer.suiviobsmer.services.ServiceUser;
+import fr.ifremer.suiviobsmer.ui.base.SuiviObsmerPage;
+import fr.ifremer.suiviobsmer.ui.pages.Index;
+import org.apache.tapestry5.BindingConstants;
+import org.apache.tapestry5.annotations.InjectComponent;
+import org.apache.tapestry5.annotations.InjectContainer;
+import org.apache.tapestry5.annotations.Log;
+import org.apache.tapestry5.annotations.Parameter;
+import org.apache.tapestry5.annotations.Property;
+import org.apache.tapestry5.annotations.SessionState;
+import org.apache.tapestry5.ioc.annotations.Inject;
+import org.apache.tapestry5.services.Request;
+import org.slf4j.Logger;
+
+/**
+ * Layout
+ *
+ * Created: 9 nov. 2009
+ *
+ * @author fdesbois
+ * @version $Revision$
+ *
+ * Mise a jour: $Date$
+ * par : $Author$
+ */
+public class Layout {
+
+ @Inject
+ private Logger log;
+
+ @Parameter(required = true, defaultPrefix = BindingConstants.LITERAL)
+ private String pageTitle;
+
+ @Parameter(required = true, defaultPrefix = BindingConstants.LITERAL)
+ private String contentId;
+
+ /**
+ * Objet de session représentant l'utilisateur identifié
+ */
+ @SessionState
+ private User currentUser;
+
+ /**
+ * vrai si l'utilisateur s'est identifié, faux sinon
+ */
+ @SuppressWarnings("unused")
+ @Property
+ private boolean currentUserExists;
+
+ @InjectComponent
+ private FeedBack connexionFeedback;
+
+ @InjectComponent
+ private FeedBack contentFeedback;
+
+ @InjectContainer
+ private SuiviObsmerPage page;
+
+ @Inject
+ private ServiceUser serviceUser;
+
+ @Inject
+ private Request request;
+
+ void setupRender() {
+ if(currentUserExists && !canShowPage()) {
+ contentFeedback.addError("Vous n'êtes pas autorisé à accéder à cette page !");
+ }
+ }
+
+ public String getContextPath() {
+ return request.getContextPath();
+ }
+
+ /**
+ * User for connexion form data
+ */
+ @Property
+ private String login;
+
+ @Property
+ private String password;
+
+ public String getPageTitle() {
+ return this.pageTitle;
+ }
+
+ public String getContentId() {
+ return this.contentId;
+ }
+
+ public void setCurrentUser(User user) {
+ this.currentUser = user;
+ }
+
+ public User getCurrentUser() {
+ return this.currentUser;
+ }
+
+ public FeedBack getFeedBack() {
+ return this.contentFeedback;
+ }
+
+ public String getAdminClass() {
+ return this.currentUser.getAdmin() ? " admin" : "";
+ }
+
+ public String getSamplingSelected() {
+ return this.contentId.equals("so-sampling") ? "selected" : "";
+ }
+
+ public String getBoatsSelected() {
+ return this.contentId.equals("so-boats") ? "selected" : "";
+ }
+
+ public String getContactsSelected() {
+ return this.contentId.equals("so-contacts") ? "selected" : "";
+ }
+
+ public String getSynthesisSelected() {
+ return this.contentId.equals("so-synthesis") ? "selected" : "";
+ }
+
+ public String getAdminSelected() {
+ return this.contentId.equals("so-admin") ? "selected" : "";
+ }
+
+ public boolean canShowPage() {
+ if (!currentUser.getAdmin()) {
+ return !page.isOnlyForAdmin();
+ }
+ return true;
+ }
+
+ @Log
+ Object onSuccessFromConnexionForm() {
+ try {
+ User userForm = serviceUser.connect(login, password);
+ if (userForm != null) {
+ currentUser = userForm;
+ } else {
+ connexionFeedback.addError("Connexion failed (user/password)");
+ }
+ } catch (SuiviObsmerException eee) {
+ // db error, others, ...
+ }
+ return null;
+ }
+
+ @Log
+ Object onActionFromExit() {
+ setCurrentUser(null);
+ return Index.class;
+ }
+
+}
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Boats.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Boats.java 2009-12-22 18:09:31 UTC (rev 148)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Boats.java 2009-12-23 11:05:36 UTC (rev 149)
@@ -646,7 +646,11 @@
return boatInfosZone.getBody();
}
- Block onSuccessFromCalculateBoardings() {
+ Block onSuccessFromCalculateBoardings() throws SuiviObsmerException {
+ // Reinitialiaze companyId for select (admin only)
+ if (user.getAdmin()) {
+ companyId = getCompanyBoatInfos().getCompany().getTopiaId();
+ }
return boatInfosZone.getBody();
}
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Contacts.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Contacts.java 2009-12-22 18:09:31 UTC (rev 148)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Contacts.java 2009-12-23 11:05:36 UTC (rev 149)
@@ -26,6 +26,7 @@
import fr.ifremer.suiviobsmer.entity.Boat;
import fr.ifremer.suiviobsmer.entity.Company;
import fr.ifremer.suiviobsmer.entity.Contact;
+import fr.ifremer.suiviobsmer.entity.Program;
import fr.ifremer.suiviobsmer.entity.SampleRow;
import fr.ifremer.suiviobsmer.entity.User;
import fr.ifremer.suiviobsmer.services.ServiceBoat;
@@ -47,6 +48,7 @@
import org.apache.tapestry5.Field;
import org.apache.tapestry5.annotations.IncludeStylesheet;
import org.apache.tapestry5.annotations.InjectComponent;
+import org.apache.tapestry5.annotations.Log;
import org.apache.tapestry5.annotations.Persist;
import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.annotations.SessionState;
@@ -55,6 +57,7 @@
import org.apache.tapestry5.ioc.annotations.Inject;
import org.apache.tapestry5.ioc.services.PropertyAccess;
import org.apache.tapestry5.services.BeanModelSource;
+import org.nuiton.util.DateUtils;
import org.slf4j.Logger;
/**
@@ -101,6 +104,7 @@
void setupRender() throws SuiviObsmerException {
contacts = null;
getContacts();
+ contactsForm.clearErrors();
}
/**************************** CONTACT LIST ********************************/
@@ -303,15 +307,6 @@
contact.setState(contactState.toString());
User contactUser = getUserSelectModel().findObject(contactUserId);
contact.setUser(contactUser);
- contactsForm.clearErrors();
- if (!validateState()) {
- if (log.isDebugEnabled()) {
- log.debug("Contact can't be saved with errors");
- }
- // The contact is not saved, the contact must be editable to show form and correct errors
- contactEdited = true;
- editableContactId = contact.getTopiaId();
- }
}
void onSelectedFromCancelEditContact() throws SuiviObsmerException {
@@ -338,7 +333,65 @@
@InjectComponent
private Field comment;
- void onSuccessFromContactsForm() {
+ @Log
+ void onValidateFormFromContactsForm() {
+ contactsForm.clearErrors();
+ // Validation for saving contact depends on contactState (only edition form)
+ if (!contactEdited && contactState != null) {
+ if (log.isInfoEnabled()) {
+ log.info("For state : " + contactState);
+ }
+
+ Date begin = contact.getTideBeginDate();
+ Date end = contact.getTideEndDate();
+ Program program = contact.getSampleRow().getProgram();
+ DateFormat dateFormat = new SimpleDateFormat("MM/yyyy");
+
+ if (begin != null && !DateUtils.between(begin, program.getPeriodBegin(), program.getPeriodEnd())) {
+ contactsForm.recordError(beginDate,
+ "La date de début de la marée doit être comprise dans la période du programme : du " +
+ dateFormat.format(program.getPeriodBegin()) + " au " + dateFormat.format(program.getPeriodEnd()));
+ }
+
+ if (end != null && !DateUtils.between(end, program.getPeriodBegin(), program.getPeriodEnd())) {
+ contactsForm.recordError(endDate,
+ "La date de fin de la marée doit être comprise dans la période du programme : du " +
+ dateFormat.format(program.getPeriodBegin()) + " au " + dateFormat.format(program.getPeriodEnd()));
+ }
+
+ if (begin != null && end != null && end.before(begin)) {
+ contactsForm.recordError(endDate, "La date de fin de la marée ne peut être antérieure à celle de début");
+ }
+
+ // Non abouti, Refus ou Refus Définitif
+ if (contactState.isUnfinishedState()) {
+ if (!StringUtils.isEmpty(contact.getComment())) {
+ // RAZ des champs
+ contact.setTideBeginDate(null);
+ contact.setTideEndDate(null);
+ contact.setNbObservants(0);
+ contact.setMammalsCapture(false);
+ contact.setMammalsObservation(false);
+ } else {
+ contactsForm.recordError(comment, "Le commentaire est obligatoire pour l'état '" + contactState + "'");
+ }
+ // Embarquement Réalisé
+ } else if (contactState.equals(ContactState.BOARDING_DONE)) {
+ if (begin == null) {
+ contactsForm.recordError(beginDate, "La date de début de marée est obligatoire pour l'état '" + contactState + "'");
+ }
+ if (end == null) {
+ contactsForm.recordError(endDate, "La date de fin de marée est obligatoire pour l'état '" + contactState + "'");
+ }
+ if (contact.getNbObservants() == 0) {
+ contactsForm.recordError(nbObservants, "Il ne peut y avoir aucun observateur pour l'état '" + contactState + "'");
+ }
+ }
+ }
+ }
+
+ @Log
+ Object onSuccessFromContactsForm() {
if (!contactEdited) {
try {
if (log.isDebugEnabled()) {
@@ -350,44 +403,18 @@
layout.getFeedBack().addError(eee.getMessage());
}
}
+ return this;
}
- private boolean validateState() {
- if (log.isInfoEnabled()) {
- log.info("STATE SET : " + contactState);
+ @Log
+ Object onFailureFromContactsForm() {
+ if (log.isDebugEnabled()) {
+ log.debug("Contact can't be saved with errors");
}
- // Non abouti, Refus ou Refus Définitif
- if (contactState.isUnfinishedState()) {
- if (!StringUtils.isEmpty(contact.getComment())) {
- // RAZ des champs
- contact.setTideBeginDate(null);
- contact.setTideEndDate(null);
- contact.setNbObservants(0);
- contact.setMammalsCapture(false);
- contact.setMammalsObservation(false);
- } else {
- contactsForm.recordError(comment, "Le commentaire est obligatoire pour l'état '" + contactState + "'");
- }
- // Embarquement Réalisé
- } else if (contactState.equals(ContactState.BOARDING_DONE)) {
- Date begin = contact.getTideBeginDate();
- Date end = contact.getTideEndDate();
- // TODO check program period borns for begin and end ????
- if (begin == null) {
- contactsForm.recordError(beginDate, "La date de début de marée est obligatoire pour l'état '" + contactState + "'");
- }
- if (end != null) {
- if (begin != null && end.before(begin)) {
- contactsForm.recordError(endDate, "La date de fin de la marée ne peut être antérieure à celle de début");
- }
- } else {
- contactsForm.recordError(endDate, "La date de fin de marée est obligatoire pour l'état '" + contactState + "'");
- }
- if (contact.getNbObservants() == 0) {
- contactsForm.recordError(nbObservants, "Il ne peut y avoir aucun observateur pour l'état '" + contactState + "'");
- }
- }
- return !contactsForm.getHasErrors();
+ // The contact is not saved, the contact must be editable to show form and correct errors
+ contactEdited = true;
+ editableContactId = contact.getTopiaId();
+ return contactsForm;
}
public void createNewContact(Boat boat, SampleRow sampleRow) throws SuiviObsmerException {
Modified: trunk/suiviobsmer-ui/src/main/webapp/Boats.tml
===================================================================
--- trunk/suiviobsmer-ui/src/main/webapp/Boats.tml 2009-12-22 18:09:31 UTC (rev 148)
+++ trunk/suiviobsmer-ui/src/main/webapp/Boats.tml 2009-12-23 11:05:36 UTC (rev 149)
@@ -260,7 +260,9 @@
<img src="${asset:context:}/img/contact-22px.png" title="Créer un nouveau contact pour ce navire et cette ligne du plan"/>
</a>
<p:else>
- <img src="${asset:context:}/img/contact-unavailable-22px.png" title="Création d'un nouveau contact impossible"/>
+ <t:unless t:test="user.admin">
+ <img src="${asset:context:}/img/contact-unavailable-22px.png" title="Création d'un nouveau contact indisponible"/>
+ </t:unless>
</p:else>
</t:if>
</li>
Modified: trunk/suiviobsmer-ui/src/main/webapp/Contacts.tml
===================================================================
--- trunk/suiviobsmer-ui/src/main/webapp/Contacts.tml 2009-12-22 18:09:31 UTC (rev 148)
+++ trunk/suiviobsmer-ui/src/main/webapp/Contacts.tml 2009-12-23 11:05:36 UTC (rev 149)
@@ -3,130 +3,143 @@
xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd" xmlns:p="tapestry:parameter">
<!--t:include="creationDate, lastState, boatName, boatImmatriculation, boatDistrictCode, beginTideDate, endTideDate,
nbObservants, mammals, editDate, comment, validation"-->
-
-<form t:type="form" t:id="contactsForm">
- <t:errors id="so-contact-form-errors" t:banner="message:contactsForm-errors-banner"/>
- <div t:type="grid" t:source="contacts.values()" t:row="contact" class="t-data-grid ${gridClass}" t:model="contactModel" t:rowClass="prop:rowClass"
- t:rowsPerPage="20">
- <p:createdByCell>
- <t:if t:test="editionMode">
- <input t:type="select" t:model="userSelectModel" t:validate="required" t:value="contactUserId"/>
- <p:else>${contact.user.fullName}</p:else>
- </t:if>
- </p:createdByCell>
- <p:sampleRowCell>
- <span t:type="ck/Tooltip" title="Infos" t:value="prop:sampleRowDescription" t:effect="appear">
- ${contact.sampleRow.code}
- </span>
- </p:sampleRowCell>
- <p:topiaCreateDateCell>
- <t:output value="contact.topiaCreateDate" format="dateFormat" />
- </p:topiaCreateDateCell>
- <p:boatCell>
- <span t:type="ck/Tooltip" title="Infos" t:value="prop:boatDescription" t:effect="appear">
- ${contact.boat.name}
- </span>
- </p:boatCell>
- <p:stateCell>
- <t:if t:test="editionMode">
- <input t:type="select" t:id="contactState" t:validate="required"/>
- <p:else>${contact.state}</p:else>
- </t:if>
- </p:stateCell>
- <p:tideBeginDateCell>
- <t:if t:test="editionMode">
- <input t:type="datefield" t:id="beginDate" class="date" value="contact.tideBeginDate" />
- <p:else><t:output value="contact.tideBeginDate" format="dateFormat" /></p:else>
- </t:if>
- </p:tideBeginDateCell>
- <p:tideEndDateCell>
- <t:if t:test="editionMode">
- <input t:type="datefield" t:id="endDate" class="date" value="contact.tideEndDate" />
- <p:else><t:output value="contact.tideEndDate" format="dateFormat" /></p:else>
- </t:if>
- </p:tideEndDateCell>
- <p:nbObservantsCell>
- <t:if t:test="editionMode">
- <input t:type="textfield" t:id="nbObservants" class="nbObservants" value="contact.nbObservants" />
- <p:else>${contact.nbObservants}</p:else>
- </t:if>
- </p:nbObservantsCell>
- <p:mammalsCell>
- <t:if t:test="editionMode">
- <input t:type="checkbox" t:id="mammalsObservation" value="contact.mammalsObservation"/>
- <t:label t:for="mammalsObservation">
- <img src="${asset:context:}/img/eye-22px.png" alt="Observations de mammifères"
- title="Observations de mammifères" />
- </t:label>
- <input t:type="checkbox" t:id="mammalsCapture" value="contact.mammalsCapture" />
- <t:label t:for="mammalsCapture">
- <img src="${asset:context:}/img/fishing-net-22px.png" alt="Capture de mammifères"
- title="Capture de mammifères" />
- </t:label>
- <p:else>
- <!--t:booleanImage t:value="contact.mammalsObservation"
- t:trueTitle="Observations de mammifères" t:falseTitle="Aucune observation faites" />
- <t:booleanImage t:value="contact.mammalsCapture"
- t:trueTitle="Capture de mammifères" t:falseTitle="Aucune capture faites" /-->
- <t:if t:test="contact.mammalsObservation">
- <img src="${asset:context:}/img/eye-22px.png" alt="Observations de mammifères" title="Observations de mammifères" />
- </t:if>
- <t:if t:test="contact.mammalsCapture">
- <img src="${asset:context:}/img/fishing-net-22px.png" alt="Capture de mammifères" title="Capture de mammifères" />
- </t:if>
- </p:else>
- </t:if>
- </p:mammalsCell>
- <p:validationCell>
- <t:booleanImage t:value="contact.validationCompany" t:empty="isEmpty(contact.validationCompany)"
- t:emptyTitle="Non validé par la société"
- t:trueTitle="Validé par la société" t:falseTitle="Refusé par la société"/>
- <t:booleanImage t:value="contact.validationProgram" t:empty="isEmpty(contact.validationProgram)"
- t:emptyTitle="Non validé par le programme"
- t:trueTitle="Validé par le programme" t:falseTitle="Refusé par le programme"/>
- </p:validationCell>
- <p:dataInputDateCell>
- <t:if t:test="editionMode">
- <input t:type="datefield" t:id="inputDate" class="date" value="contact.dataInputDate" />
- <p:else><t:output value="contact.dataInputDate" format="dateFormat" /></p:else>
- </t:if>
- </p:dataInputDateCell>
- <p:commentCell>
- <t:if t:test="editionMode">
- <input t:type="textarea" t:id="comment" cols="15" rows="2" value="contact.comment" />
- <p:else>
- ${contact.comment}
- </p:else>
- </t:if>
- </p:commentCell>
- <p:actionsCell>
- <t:if t:test="hasActions()">
+<t:zone t:id="gridZone" t:update="show">
+ <form t:type="form" t:id="contactsForm" t:zone="gridZone">
+ <t:errors id="so-contact-form-errors" t:banner="message:contactsForm-errors-banner"/>
+ <div t:type="grid" t:source="contacts.values()" t:row="contact" class="t-data-grid ${gridClass}" t:model="contactModel" t:rowClass="prop:rowClass"
+ t:rowsPerPage="20">
+ <p:createdByCell>
<t:if t:test="editionMode">
- <input t:type="submit" t:id="cancelEditContact" class="ico22px undo22px" value="Undo"
- title="Annuler les modifications" />
- <input t:type="submitContext" t:id="saveContact" class="ico22px save22px" value="Save"
- t:context="contact.topiaId" title="Enregistrer le contact" />
+ <input t:type="select" t:model="userSelectModel" t:validate="required" t:value="contactUserId"/>
+ <p:else>${contact.user.fullName}</p:else>
+ </t:if>
+ </p:createdByCell>
+ <p:sampleRowCell>
+ <span t:type="ck/Tooltip" title="Infos" t:value="prop:sampleRowDescription" t:effect="appear">
+ ${contact.sampleRow.code}
+ </span>
+ </p:sampleRowCell>
+ <p:topiaCreateDateCell>
+ <t:output value="contact.topiaCreateDate" format="dateFormat" />
+ </p:topiaCreateDateCell>
+ <p:boatCell>
+ <span t:type="ck/Tooltip" title="Infos" t:value="prop:boatDescription" t:effect="appear">
+ ${contact.boat.name}
+ </span>
+ </p:boatCell>
+ <p:stateCell>
+ <t:if t:test="editionMode">
+ <input t:type="select" t:id="contactState" t:validate="required"/>
+ <p:else>${contact.state}</p:else>
+ </t:if>
+ </p:stateCell>
+ <p:tideBeginDateCell>
+ <t:if t:test="editionMode">
+ <input t:type="datefield" t:id="beginDate" class="date" value="contact.tideBeginDate" />
+ <p:else><t:output value="contact.tideBeginDate" format="dateFormat" /></p:else>
+ </t:if>
+ </p:tideBeginDateCell>
+ <p:tideEndDateCell>
+ <t:if t:test="editionMode">
+ <input t:type="datefield" t:id="endDate" class="date" value="contact.tideEndDate" />
+ <p:else><t:output value="contact.tideEndDate" format="dateFormat" /></p:else>
+ </t:if>
+ </p:tideEndDateCell>
+ <p:nbObservantsCell>
+ <t:if t:test="editionMode">
+ <input t:type="textfield" t:id="nbObservants" class="nbObservants" value="contact.nbObservants" />
+ <p:else>${contact.nbObservants}</p:else>
+ </t:if>
+ </p:nbObservantsCell>
+ <p:mammalsCell>
+ <t:if t:test="editionMode">
+ <input t:type="checkbox" t:id="mammalsObservation" value="contact.mammalsObservation"/>
+ <t:label t:for="mammalsObservation">
+ <img src="${asset:context:}/img/eye-22px.png" alt="Observations de mammifères"
+ title="Observations de mammifères" />
+ </t:label>
+ <input t:type="checkbox" t:id="mammalsCapture" value="contact.mammalsCapture" />
+ <t:label t:for="mammalsCapture">
+ <img src="${asset:context:}/img/fishing-net-22px.png" alt="Capture de mammifères"
+ title="Capture de mammifères" />
+ </t:label>
<p:else>
- <input t:type="submitContext" t:id="editContact" class="ico edit" value="Edit"
- t:context="contact.topiaId" title="Modifier le contact" />
- <input t:type="submitContext" t:id="deleteContact" class="ico22px delete" value="Delete"
- t:context="contact.topiaId" title="Supprimer le contact"
- t:mixins="confirm" t:message="Etes-vous sûr de vouloir supprimer définitivement ce contact ?" />
+ <!--t:booleanImage t:value="contact.mammalsObservation"
+ t:trueTitle="Observations de mammifères" t:falseTitle="Aucune observation faites" />
+ <t:booleanImage t:value="contact.mammalsCapture"
+ t:trueTitle="Capture de mammifères" t:falseTitle="Aucune capture faites" /-->
+ <t:if t:test="contact.mammalsObservation">
+ <img src="${asset:context:}/img/eye-22px.png" alt="Observations de mammifères" title="Observations de mammifères" />
+ </t:if>
+ <t:if t:test="contact.mammalsCapture">
+ <img src="${asset:context:}/img/fishing-net-22px.png" alt="Capture de mammifères" title="Capture de mammifères" />
+ </t:if>
</p:else>
</t:if>
- </t:if>
- <t:if t:test="canValidate()">
- <input t:type="submitContext" t:id="acceptContact" class="ico22px accept" value="Accept"
- t:context="contact.topiaId" title="Valider le contact" />
- <input t:type="submitContext" t:id="refuseContact" class="ico22px refuse" value="Refuse"
- t:context="contact.topiaId" title="Refuser le contact" />
- </t:if>
- <t:if t:test="canUnvalidate()">
- <input t:type="submitContext" t:id="unvalidateContact" class="ico22px unvalidate" value="Unvalidate"
- t:context="contact.topiaId" title="Enlever la validation du contact" />
- </t:if>
- </p:actionsCell>
- </div>
-</form>
+ </p:mammalsCell>
+ <p:validationCell>
+ <t:booleanImage t:value="contact.validationCompany" t:empty="isEmpty(contact.validationCompany)"
+ t:emptyTitle="Non validé par la société"
+ t:trueTitle="Validé par la société" t:falseTitle="Refusé par la société"/>
+ <t:booleanImage t:value="contact.validationProgram" t:empty="isEmpty(contact.validationProgram)"
+ t:emptyTitle="Non validé par le programme"
+ t:trueTitle="Validé par le programme" t:falseTitle="Refusé par le programme"/>
+ </p:validationCell>
+ <p:dataInputDateCell>
+ <t:if t:test="editionMode">
+ <input t:type="datefield" t:id="inputDate" class="date" value="contact.dataInputDate" />
+ <p:else><t:output value="contact.dataInputDate" format="dateFormat" /></p:else>
+ </t:if>
+ </p:dataInputDateCell>
+ <p:commentCell>
+ <t:if t:test="editionMode">
+ <input t:type="textarea" t:id="comment" cols="15" rows="2" value="contact.comment" />
+ <p:else>
+ ${contact.comment}
+ </p:else>
+ </t:if>
+ </p:commentCell>
+ <p:actionsCell>
+ <t:if t:test="hasActions()">
+ <t:if t:test="editionMode">
+ <input t:type="submit" t:id="cancelEditContact" class="ico22px undo22px" value="Undo"
+ title="Annuler les modifications" />
+ <input t:type="submitContext" t:id="saveContact" class="ico22px save22px" value="Save"
+ t:context="contact.topiaId" title="Enregistrer le contact" />
+ <p:else>
+ <input t:type="submitContext" t:id="editContact" class="ico edit" value="Edit"
+ t:context="contact.topiaId" title="Modifier le contact" />
+ <input t:type="submitContext" t:id="deleteContact" class="ico22px delete" value="Delete"
+ t:context="contact.topiaId" title="Supprimer le contact"
+ t:mixins="confirm" t:message="Etes-vous sûr de vouloir supprimer définitivement ce contact ?" />
+ </p:else>
+ </t:if>
+ <p:else>
+ <t:unless t:test="user.admin">
+ <img src="${asset:context:}/img/edit-unavailable-22px.png" alt="Edit unavailable" title="Edition du contact indisponible"/>
+ <img src="${asset:context:}/img/delete-unavailable-22px.png" alt="Delete unavailable" title="Suppression du contact indisponible"/>
+ </t:unless>
+ </p:else>
+ </t:if>
+ <t:if t:test="canValidate()">
+ <input t:type="submitContext" t:id="acceptContact" class="ico22px accept" value="Accept"
+ t:context="contact.topiaId" title="Valider le contact" />
+ <input t:type="submitContext" t:id="refuseContact" class="ico22px refuse" value="Refuse"
+ t:context="contact.topiaId" title="Refuser le contact" />
+ <p:else>
+ <t:unless t:test="canUnvalidate()">
+ <img src="${asset:context:}/img/accept-unavailable-22px.png" alt="Accept unavailable" title="Validation du contact indisponible"/>
+ <img src="${asset:context:}/img/refuse-unavailable-22px.png" alt="Refuse unavailable" title="Refus du contact indisponible"/>
+ </t:unless>
+ </p:else>
+ </t:if>
+ <t:if t:test="canUnvalidate()">
+ <input t:type="submitContext" t:id="unvalidateContact" class="ico22px unvalidate" value="Unvalidate"
+ t:context="contact.topiaId" title="Enlever la validation du contact" />
+ </t:if>
+ </p:actionsCell>
+ </div>
+ </form>
+</t:zone>
</t:layout>
Modified: trunk/suiviobsmer-ui/src/main/webapp/SampleRowForm.tml
===================================================================
--- trunk/suiviobsmer-ui/src/main/webapp/SampleRowForm.tml 2009-12-22 18:09:31 UTC (rev 148)
+++ trunk/suiviobsmer-ui/src/main/webapp/SampleRowForm.tml 2009-12-23 11:05:36 UTC (rev 149)
@@ -1,7 +1,14 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<t:layout t:pageTitle="Modification d'une ligne du plan" t:contentId="so-samplerow-form"
xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd" xmlns:p="tapestry:parameter">
-
+ <h1>
+ <t:if t:test="createMode">
+ Création d'une nouvelle ligne
+ <p:else>
+ Modification de la ligne ${sampleRow.code}
+ </p:else>
+ </t:if>
+ </h1>
<t:zone t:id="globalZone" t:update="show">
<form t:type="form" t:id="sampleRowForm" t:zone="globalZone">
@@ -30,7 +37,7 @@
</fieldset>
<!-- FISHING ZONES -->
- <fieldset>
+ <fieldset id="so-samplerow-form-fishingzone">
<legend>Zone(s) de pêche</legend>
<t:if t:test="sampleRow.hasSampleMonthRealTideTime()">
<!-- DISPLAY -->
@@ -58,33 +65,34 @@
${fishingZone.code}
</div>
</div>
- <div class="select">
- <t:label t:for="fishingZonesInfos" /> :
- <input t:type="textfield" class="width300" t:id="fishingZonesInfos" value="sampleRow.fishingZonesInfos" />
- </div>
</p:else>
</t:if>
+ <div class="t-beaneditor-row">
+ <t:label t:for="fishingZonesInfos" />
+ <input t:type="textfield" class="width300" t:id="fishingZonesInfos" value="sampleRow.fishingZonesInfos" />
+ </div>
</fieldset>
<!-- PROGRAM and SAMPLE MONTHS -->
<fieldset>
- <legend>Programme et données des marées par mois</legend>
- <div class="select">
- <t:if t:test="sampleRow.hasSampleMonthRealTideTime()">
- <!-- DISPLAY PROGRAM -->
- Programme : ${sampleRow.program.name}
- <p:else>
- <!-- EDITION PROGRAM -->
- <div class="select">
- <t:label t:for="program"/>* :
- <input t:type="select" t:id="program" t:model="programSelectModel" value="programId" />
- <input t:type="submit" class="ico search" t:id="searchProgram" value="Search"
- title="Afficher les détails du programme"/>
- ou <input t:type="textfield" t:id="programName" value="programName" />
- </div>
- </p:else>
- </t:if>
- </div>
+ <legend>Programme et données des marées par mois</legend>
+ <t:if t:test="sampleRow.hasSampleMonthRealTideTime()">
+ <!-- DISPLAY PROGRAM -->
+ <dl class="t-beandisplay">
+ <dt>Programme</dt>
+ <dd>${sampleRow.program.name}</dd>
+ </dl>
+ <p:else>
+ <!-- EDITION PROGRAM -->
+ <div class="select">
+ <t:label t:for="program"/>* :
+ <input t:type="select" t:id="program" t:model="programSelectModel" value="programId" />
+ <input t:type="submit" class="ico search" t:id="searchProgram" value="Search"
+ title="Afficher les détails du programme"/>
+ ou <input t:type="textfield" t:id="programName" value="programName" />
+ </div>
+ </p:else>
+ </t:if>
<!-- EDITION PROGRAM PERIOD -->
<div class="select">
<t:label t:for="programPeriodBegin"/>* :
@@ -93,8 +101,8 @@
<input t:type="submit" class="ico refresh" t:id="refreshMonths" value="Refresh" title="Rafraîchir les mois"/>
</div>
<!-- EDITION SAMPLE MONTHS -->
- <div class="acenter">
- <table id="so-samplerow-form-months">
+ <div id="so-samplerow-form-months" class="acenter">
+ <table>
<tr class="firstRow">
<td t:type="loop" t:source="months" t:value="month" volatile="true">
<t:output value="month" format="dateFormat" />
Modified: trunk/suiviobsmer-ui/src/main/webapp/SamplingPlan.tml
===================================================================
--- trunk/suiviobsmer-ui/src/main/webapp/SamplingPlan.tml 2009-12-22 18:09:31 UTC (rev 148)
+++ trunk/suiviobsmer-ui/src/main/webapp/SamplingPlan.tml 2009-12-23 11:05:36 UTC (rev 149)
@@ -155,6 +155,9 @@
t:mixins="confirm" t:message="Etes-vous sûr de vouloir supprimer définitivement la ligne ${row.code} du plan d\'échantillonnage ?">
<img src="${asset:context:}/img/delete2.png" alt="Supprimer" title="Supprimer la ligne"/>
</a>
+ <p:else>
+ <img src="${asset:context:}/img/delete-unavailable-22px.png" alt="Supprimer indisponible" title="Suppression de la ligne indisponible"/>
+ </p:else>
</t:unless>
</t:if>
</td>
Modified: trunk/suiviobsmer-ui/src/main/webapp/css/sampling.css
===================================================================
--- trunk/suiviobsmer-ui/src/main/webapp/css/sampling.css 2009-12-22 18:09:31 UTC (rev 148)
+++ trunk/suiviobsmer-ui/src/main/webapp/css/sampling.css 2009-12-23 11:05:36 UTC (rev 149)
@@ -155,8 +155,13 @@
width: 60%;
margin-left: auto;
margin-right: auto;
+ margin-top: 20px;
}
+div#so-samplerow-form h1 {
+ text-align: center;
+}
+
div#so-samplerow-form div.t-error {
margin: 5px auto;
font-size: 0.8em;
@@ -171,11 +176,6 @@
padding: 8px;
}
-/*div#so-samplerow-form legend {
- font-weight: bold;
-}*/
-
-
div#so-samplerow-form div.select {
width: 100%;
text-align: center;
@@ -183,49 +183,45 @@
color: #007CC2;
}
+div#so-samplerow-form dl.t-beandisplay dt,
div#so-samplerow-form label {
color: #007CC2;
}
+div#so-samplerow-form dl.t-beandisplay,
div#so-samplerow-form div.t-beaneditor {
background-color: transparent;
border: 0px;
}
-/*div#so-samplerow-form fieldset.user-form {
- width: 100%;
+fieldset#so-samplerow-form-fishingzone ul {
+ text-align: center;
}
-
-div#so-samplerow-form dl.t-beandisplay {
- background: transparent;
- border: 0px;
+fieldset#so-samplerow-form-fishingzone ul li {
+ list-style-type: circle;
}
-div#so-samplerow-form-fishingzone div.fishingzone-row {
- width: 400px;
-}*/
-
-#so-samplerow-form-months {
+div#so-samplerow-form-months {
margin: 10px;
}
-#so-samplerow-form-months tr.firstRow {
+div#so-samplerow-form-months table tr.firstRow {
background-color: #19A28D;
color: white;
border: 2px outset blue;
font-size: 0.8em;
}
-#so-samplerow-form-months tr.firstRow td {
+div#so-samplerow-form-months table tr.firstRow td {
padding: 3px;
text-align: center;
}
-#so-samplerow-form-other input.t-number {
+fieldset#so-samplerow-form-other input.t-number {
width: 50px;
}
-#so-samplerow-form-other span.code-missing {
+fieldset#so-samplerow-form-other span.code-missing {
font-size: 0.8em;
color: red;
}
Added: trunk/suiviobsmer-ui/src/main/webapp/img/accept-unavailable-22px.png
===================================================================
(Binary files differ)
Property changes on: trunk/suiviobsmer-ui/src/main/webapp/img/accept-unavailable-22px.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/suiviobsmer-ui/src/main/webapp/img/delete-unavailable-22px.png
===================================================================
(Binary files differ)
Property changes on: trunk/suiviobsmer-ui/src/main/webapp/img/delete-unavailable-22px.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/suiviobsmer-ui/src/main/webapp/img/edit-unavailable-22px.png
===================================================================
(Binary files differ)
Property changes on: trunk/suiviobsmer-ui/src/main/webapp/img/edit-unavailable-22px.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/suiviobsmer-ui/src/main/webapp/img/refuse-unavailable-22px.png
===================================================================
(Binary files differ)
Property changes on: trunk/suiviobsmer-ui/src/main/webapp/img/refuse-unavailable-22px.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
1
0
22 Dec '09
Author: fdesbois
Date: 2009-12-22 18:09:31 +0000 (Tue, 22 Dec 2009)
New Revision: 148
Added:
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerBusinessException.java
trunk/suiviobsmer-ui/src/main/webapp/img/contact-unavailable-22px.png
Modified:
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerGlobal.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ProfessionImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/SampleRowImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceBoatImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceUserImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceSamplingMock.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceUserMock.java
trunk/suiviobsmer-business/src/main/xmi/suiviobsmer.zargo
trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/SuiviObsmerGlobalTest.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/base/GenericSelectModel.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Administration.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Boats.java
trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/SampleRowForm.java
trunk/suiviobsmer-ui/src/main/resources/fr/ifremer/suiviobsmer/ui/pages/SampleRowForm.properties
trunk/suiviobsmer-ui/src/main/webapp/Boats.tml
trunk/suiviobsmer-ui/src/main/webapp/Contacts.tml
trunk/suiviobsmer-ui/src/main/webapp/SampleRowForm.tml
trunk/suiviobsmer-ui/src/main/webapp/css/contacts.css
trunk/suiviobsmer-ui/src/main/webapp/css/sampling.css
Log:
- Finishing SampleRowForm with validation
- Change method getCompanies to have only those active
- Improve style for Contacts and add images for mammals column in edition mode
- Change some details on Boats page
Added: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerBusinessException.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerBusinessException.java (rev 0)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerBusinessException.java 2009-12-22 18:09:31 UTC (rev 148)
@@ -0,0 +1,46 @@
+
+package fr.ifremer.suiviobsmer;
+
+/**
+ * SuiviObsmerBusinessException
+ *
+ * Created: 22 déc. 2009
+ *
+ * @param <T>
+ * @author fdesbois
+ * @version $Revision$
+ *
+ * Mise a jour: $Date$
+ * par : $Author$
+ */
+public class SuiviObsmerBusinessException extends SuiviObsmerException {
+
+ protected Type type;
+
+ protected Class<?> serviceClass;
+
+ public SuiviObsmerBusinessException(Type type, Class<?> serviceClass, String msg) {
+ super(msg);
+ this.type = type;
+ this.serviceClass = serviceClass;
+ }
+
+ public SuiviObsmerBusinessException(Type type, Class<?> serviceClass, String msg, Throwable cause) {
+ super(msg, cause);
+ this.type = type;
+ this.serviceClass = serviceClass;
+ }
+
+ public static enum Type {
+ IMPORT_ERROR, SELECT_PROBLEM, NOT_EXISTS;
+ }
+
+ public Type getType() {
+ return this.type;
+ }
+
+ public String getServiceName() {
+ return this.serviceClass.getSimpleName();
+ }
+
+}
Property changes on: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerBusinessException.java
___________________________________________________________________
Added: svn:keywords
+ "Author Date Id Revision HeadURL"
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerGlobal.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerGlobal.java 2009-12-22 11:58:16 UTC (rev 147)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerGlobal.java 2009-12-22 18:09:31 UTC (rev 148)
@@ -74,7 +74,7 @@
User user = dao.create(
User.ADMIN, true,
- User.ACTIVE, false,
+ User.ACTIVE, true,
User.LOGIN, "admin",
User.PASSWORD, password,
User.FIRST_NAME, "Super",
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ProfessionImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ProfessionImpl.java 2009-12-22 11:58:16 UTC (rev 147)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ProfessionImpl.java 2009-12-22 18:09:31 UTC (rev 148)
@@ -22,6 +22,7 @@
package fr.ifremer.suiviobsmer.entity;
import java.io.Serializable;
+import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -44,7 +45,14 @@
@Override
public String getCode() {
- return getCodeDCF5() + " " + getMeshSize() + " " + getSize();
+ String code = getCodeDCF5();
+ if (!StringUtils.isEmpty(getMeshSize())) {
+ code += getMeshSize();
+ }
+ if (!StringUtils.isEmpty(getSize())) {
+ code += getSize();
+ }
+ return code;
}
}
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/SampleRowImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/SampleRowImpl.java 2009-12-22 11:58:16 UTC (rev 147)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/SampleRowImpl.java 2009-12-22 18:09:31 UTC (rev 148)
@@ -165,11 +165,7 @@
*/
@Override
public boolean hasSampleMonthRealTideTime() {
- List<SampleMonth> months = getSampleMonth();
- if (months == null) {
- return false;
- }
- for (SampleMonth month : months) {
+ for (SampleMonth month : getSampleMonth()) {
if (month.getRealTidesValue() != 0) {
return true;
}
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceBoatImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceBoatImpl.java 2009-12-22 11:58:16 UTC (rev 147)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceBoatImpl.java 2009-12-22 18:09:31 UTC (rev 148)
@@ -24,6 +24,8 @@
import com.csvreader.CsvReader;
import fr.ifremer.suiviobsmer.DataLoader;
import fr.ifremer.suiviobsmer.QueryBuilder;
+import fr.ifremer.suiviobsmer.SuiviObsmerBusinessException;
+import fr.ifremer.suiviobsmer.SuiviObsmerBusinessException.Type;
import fr.ifremer.suiviobsmer.SuiviObsmerContext;
import fr.ifremer.suiviobsmer.SuiviObsmerException;
import fr.ifremer.suiviobsmer.SuiviObsmerModelDAOHelper;
@@ -131,219 +133,6 @@
results.put(boat.getImmatriculation(), boat);
}
-// String boatClassName = Boat.class.getName();
-// String queryHead = "SELECT B FROM " + boatClassName + " B";
-// String query = "";
-// boolean alreadyFiltered = false;
-// List<Object> params = new ArrayList<Object>();
-//
-// // Immatriculation
-// if (filter.getBoatImmatriculation() != null) {
-// query += " WHERE B.immatriculation = :immatriculation";
-// params.add("immatriculation");
-// params.add(filter.getBoatImmatriculation());
-// alreadyFiltered = true;
-// }
-// // Name
-// if (!StringUtils.isEmpty(filter.getBoatName())) {
-// query += alreadyFiltered ? " AND " : " WHERE ";
-// query += "B.name LIKE :name";
-// params.add("name");
-// params.add(filter.getBoatName() + "%");
-// alreadyFiltered = true;
-// }
-// // DistrictCode
-// if (!StringUtils.isEmpty(filter.getBoatDistrictCode())) {
-// query += alreadyFiltered ? " AND " : " WHERE ";
-// query += "B.districtCode = :districtCode";
-// params.add("districtCode");
-// params.add(filter.getBoatDistrictCode());
-// alreadyFiltered = true;
-// }
-//
-// boolean sampleRowCodeFiltered = !StringUtils.isEmpty(filter.getSampleRowCode());
-// boolean professionFiltered = filter.getProfession() != null;
-// boolean fishingZoneFiltered = filter.getFishingZone() != null;
-// boolean sampleRowFiltered = sampleRowCodeFiltered || professionFiltered || fishingZoneFiltered;
-//
-// // Add join for ElligibleBoat
-// if (sampleRowFiltered) {
-// String elligibleBoatClassName = ElligibleBoat.class.getName();
-// queryHead += ", " + elligibleBoatClassName + " E";
-// query += alreadyFiltered ? " AND " : " WHERE ";
-// query += "E.boat = B";
-// }
-// // SampleRowCode
-// if (sampleRowCodeFiltered) {
-// query += " AND E.sampleRow.code = :sampleRowCode";
-// params.add("sampleRowCode");
-// params.add(filter.getSampleRowCode());
-// }
-// // Profession
-// if (professionFiltered) {
-// query += " AND E.sampleRow.profession = :profession";
-// params.add("profession");
-// params.add(filter.getProfession());
-// }
-// // FishingZone
-//// if (fishingZoneFiltered) {
-//// String fishingZoneClassName = FishingZone.class.getName();
-//// queryHead += ", " + fishingZoneClassName + " F";
-//// query += " AND F.sampleRow = " +
-//// query += " AND E.sampleRow.fishingZone = :fishingZone";
-//// params.add("profession");
-//// params.add(filter.getFishingZone());
-//// }
-// // Company : only if an other filter is set for the sampleRow
-// if (filter.getCompany() != null && sampleRowFiltered) {
-// query += " AND E.sampleRow.company = :company";
-// query += " AND (E.companyActive = :booleanTrue ";
-// query += " OR (E.companyActive IS NULL AND E.globalActive = :booleanTrue))";
-// params.add("company");
-// params.add(filter.getCompany());
-// params.add("booleanTrue");
-// params.add(Boolean.TRUE);
-// }
-//
-// if (log.isDebugEnabled()) {
-// log.debug("QUERY : " + queryHead + query);
-// }
-//
-// List boats = transaction.find(queryHead + query, params.toArray());
-// for (Object o : boats) {
-// Boat boat = (Boat)o;
-// results.put(boat.getImmatriculation(), boat);
-// }
-
-
-
- /******************** FILTER ON BOATS *****************************/
-
-// // IMMATRICULATION : full
-// if (filter.getBoatImmatriculation() != null) {
-// if (log.isDebugEnabled()) {
-// log.debug("Filter by immatriculation : " + filter.getBoatImmatriculation());
-// }
-// Boat boat = dao.findByImmatriculation(filter.getBoatImmatriculation());
-// results.put(boat.getImmatriculation(), boat);
-// return results;
-// }
-// // NAME : startWith
-// if (!StringUtils.isEmpty(filter.getBoatName())) {
-// if (log.isDebugEnabled()) {
-// log.debug("Filter by boatName : " + filter.getBoatName());
-// }
-// List list = transaction.find("FROM BoatImpl WHERE name LIKE :name",
-// "name", filter.getBoatName() + "%");
-// for (Object o : list) {
-// Boat boat = (Boat)o;
-// results.put(boat.getImmatriculation(), boat);
-// }
-// alreadyFiltered = true;
-// }
-// // DISTRICT CODE : full
-// if (!StringUtils.isEmpty(filter.getBoatDistrictCode())) {
-// if (log.isDebugEnabled()) {
-// log.debug("Filter by boatDistrictCode : " + filter.getBoatDistrictCode());
-// }
-// // boats not filtered yet
-// if (!alreadyFiltered) {
-// List<Boat> boats = dao.findAllByDistrictCode(filter.getBoatDistrictCode());
-// for (Boat boat : boats) {
-// results.put(boat.getImmatriculation(), boat);
-// }
-// // results may exist with some boats from previous query (boatName)
-// } else {
-// for (Integer key : results.keySet()) {
-// Boat boat = results.get(key);
-// if (!boat.getDistrictCode().equals(filter.getBoatDistrictCode())) {
-// results.remove(key);
-// }
-// }
-// }
-// }
-//
-// /******************** FILTER ON SAMPLE ROWS ***********************/
-//
-// // COMPANY FILTERED ?
-// boolean companyFiltered = filter.getCompany() != null;
-// boolean professionFiltered = filter.getProfession() != null;
-// boolean fishingZoneFiltered = filter.getFishingZone() != null;
-//
-// SampleRowDAO rowDAO = SuiviObsmerModelDAOHelper.getSampleRowDAO(transaction);
-//
-// // CODE
-// Map<String, Object> properties = new HashMap<String, Object>();
-// if (!StringUtils.isEmpty(filter.getSampleRowCode())) {
-// if (log.isDebugEnabled()) {
-// log.debug("Filter by rowCode : " + filter.getSampleRowCode());
-// }
-// properties.put(SampleRow.CODE, filter.getSampleRowCode());
-// } else {
-// // COMPANY : only if an other filter on SampleRow is set
-// if (companyFiltered && (professionFiltered || fishingZoneFiltered)) {
-// if (log.isDebugEnabled()) {
-// log.debug("Filter by company : " + filter.getCompany().getName());
-// }
-// // TODO add filter for non closed sampleRow, i.e. sampleRow.program.periodEnd > currentTime
-// properties.put(SampleRow.COMPANY, filter.getCompany());
-// }
-// // PROFESSION
-// if (professionFiltered) {
-// if (log.isDebugEnabled()) {
-// log.debug("Filter by profession : " + filter.getProfession().getCode());
-// }
-// properties.put(SampleRow.PROFESSION, filter.getProfession());
-// }
-// }
-//
-// List<SampleRow> rows = new ArrayList<SampleRow>();
-// if (!properties.isEmpty()) {
-// rows = rowDAO.findAllByProperties(properties);
-// alreadyFiltered = true;
-// } else if (fishingZoneFiltered) {
-// rows = rowDAO.findAllContainsFishingZone(filter.getFishingZone());
-// alreadyFiltered = true;
-// }
-//
-// /******************** CHECK ELLIGIBLE BOATS FOR EACH ROW **********/
-//
-// for (SampleRow row : rows) {
-// List<FishingZone> zones = row.getFishingZone();
-// // FILTER BY FISHING ZONE
-// if (fishingZoneFiltered && !zones.contains(filter.getFishingZone())) {
-// break;
-// }
-//
-// for (ElligibleBoat elligible : row.getElligibleBoat()) {
-// int immatriculation = elligible.getBoat().getImmatriculation();
-//
-// // For company
-// boolean condition1 = companyFiltered &&
-// BooleanUtils.isNotFalse(elligible.getCompanyActive());
-//
-// // For admin
-// boolean condition2 = !companyFiltered && elligible.getGlobalActive();
-//
-// if (condition1 || condition2) {
-// if (log.isDebugEnabled()) {
-// log.debug("Add elligible boat : " +
-// immatriculation + " - " +
-// elligible.getBoat().getName());
-// }
-// results.put(immatriculation, elligible.getBoat());
-// }
-//
-// }
-// }
-//
-// // No filter set
-// if (!alreadyFiltered) {
-// for (Boat boat : dao.findAll()) {
-// results.put(boat.getImmatriculation(), boat);
-// }
-// }
-
transaction.closeContext();
} catch (Exception eee) {
SuiviObsmerContext.serviceException(transaction, "Impossible de filtrer la liste des navires", eee);
@@ -458,8 +247,11 @@
transaction.commitTransaction();
transaction.closeContext();
} catch (Exception eee) {
+ Boat boat = companyBoatInfos.getBoatInfos().getBoat();
+ Company company = companyBoatInfos.getCompany();
SuiviObsmerContext.serviceException(transaction,
- "La chaîne d'immatriculations est incorrect ! Chaque immatriculation doit posséder 6 chiffres", eee);
+ "Impossible de créer ou modifier les informations liés au navire " +
+ boat.getImmatriculation() + " pour la société " + company.getName(), eee);
}
}
@@ -482,7 +274,8 @@
int immatriculation = Integer.parseInt(res);
Boat boat = dao.findByImmatriculation(immatriculation);
if (boat == null) {
- throw new SuiviObsmerException("Immatriculation " + immatriculation + " incorrect, ne référence aucun navire");
+ throw new SuiviObsmerBusinessException(Type.NOT_EXISTS, ServiceBoat.class,
+ "Immatriculation " + immatriculation + " incorrect, ne référence aucun navire");
}
boats.add(boat);
}
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImpl.java 2009-12-22 11:58:16 UTC (rev 147)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImpl.java 2009-12-22 18:09:31 UTC (rev 148)
@@ -326,6 +326,7 @@
row.setFishingZone(new ArrayList<FishingZone>());
row.setProgram(new ProgramImpl());
row.setElligibleBoat(new ArrayList<ElligibleBoat>());
+ row.setSampleMonth(new ArrayList<SampleMonth>());
return row;
}
@@ -337,7 +338,26 @@
return month;
}
+ /**
+ * Create a new profession from an existing one. Copy all attributes values from
+ * the profession in argument to a new profession not created yet in database.
+ *
+ * @param profession the profession source
+ * @return a new Profession
+ */
+ @Override
+ public Profession getNewProfession(Profession profession) {
+ Profession newProfession = new ProfessionImpl();
+ newProfession.setCodeDCF5(profession.getCodeDCF5());
+ newProfession.setLibelle(profession.getLibelle());
+ newProfession.setOther(profession.getOther());
+ newProfession.setMeshSize(profession.getMeshSize());
+ newProfession.setSize(profession.getSize());
+ newProfession.setSpecies(profession.getSpecies());
+ return newProfession;
+ }
+
@Override
public int[] importSamplingPlanCsv(InputStream input) throws SuiviObsmerException {
TopiaContext transaction = null;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceUserImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceUserImpl.java 2009-12-22 11:58:16 UTC (rev 147)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceUserImpl.java 2009-12-22 18:09:31 UTC (rev 148)
@@ -140,7 +140,7 @@
}
@Override
- public List<Company> getCompanies() throws SuiviObsmerException {
+ public List<Company> getCompanies(boolean activeOnly) throws SuiviObsmerException {
TopiaContext transaction = null;
List<Company> results = new ArrayList<Company>();
try {
@@ -155,7 +155,11 @@
users.size();
}*/
- results = dao.findAll();
+ if (activeOnly) {
+ results = dao.findAllByActive(activeOnly);
+ } else {
+ results = dao.findAll();
+ }
transaction.closeContext();
} catch (Exception eee) {
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceSamplingMock.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceSamplingMock.java 2009-12-22 11:58:16 UTC (rev 147)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceSamplingMock.java 2009-12-22 18:09:31 UTC (rev 148)
@@ -26,6 +26,7 @@
import fr.ifremer.suiviobsmer.dto.SampleRowDTO;
import fr.ifremer.suiviobsmer.entity.Boat;
import fr.ifremer.suiviobsmer.entity.Company;
+import fr.ifremer.suiviobsmer.entity.Profession;
import fr.ifremer.suiviobsmer.entity.SampleMonth;
import fr.ifremer.suiviobsmer.entity.SampleRow;
import fr.ifremer.suiviobsmer.entity.SampleRowImpl;
@@ -257,4 +258,9 @@
throw new UnsupportedOperationException("Not supported yet.");
}
+ @Override
+ public Profession getNewProfession(Profession profession) {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+
}
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceUserMock.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceUserMock.java 2009-12-22 11:58:16 UTC (rev 147)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/mock/ServiceUserMock.java 2009-12-22 18:09:31 UTC (rev 148)
@@ -64,7 +64,7 @@
}
@Override
- public List<Company> getCompanies() throws SuiviObsmerException {
+ public List<Company> getCompanies(boolean activeOnly) throws SuiviObsmerException {
List<Company> results = new ArrayList<Company>();
results.add(getIfremer());
results.add(getTartanpion());
Modified: trunk/suiviobsmer-business/src/main/xmi/suiviobsmer.zargo
===================================================================
(Binary files differ)
Modified: trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/SuiviObsmerGlobalTest.java
===================================================================
--- trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/SuiviObsmerGlobalTest.java 2009-12-22 11:58:16 UTC (rev 147)
+++ trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/SuiviObsmerGlobalTest.java 2009-12-22 18:09:31 UTC (rev 148)
@@ -88,7 +88,7 @@
ServiceUser serviceUser = new ServiceUserImpl();
- List<Company> companies = serviceUser.getCompanies();
+ List<Company> companies = serviceUser.getCompanies(false);
assertEquals(1, companies.size());
Company company = companies.get(0);
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/base/GenericSelectModel.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/base/GenericSelectModel.java 2009-12-22 11:58:16 UTC (rev 147)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/base/GenericSelectModel.java 2009-12-22 18:09:31 UTC (rev 148)
@@ -18,16 +18,16 @@
* <http://www.gnu.org/licenses/gpl-3.0.html>.
* ##%*
*/
-
package fr.ifremer.suiviobsmer.ui.base;
+import fr.ifremer.suiviobsmer.ui.base.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import org.apache.tapestry5.OptionGroupModel;
import org.apache.tapestry5.OptionModel;
-import org.apache.tapestry5.annotations.Log;
+import org.apache.tapestry5.ValueEncoder;
import org.apache.tapestry5.internal.OptionGroupModelImpl;
import org.apache.tapestry5.internal.OptionModelImpl;
import org.apache.tapestry5.ioc.annotations.Inject;
@@ -42,6 +42,7 @@
* Based on IdSelectModel from <http://jumpstart.doublenegative.com.au:8080/jumpstart/examples/select/easyid>
* A generic selection model whose value is the id of the chosen object, not the object itself.
*
+ * @param <T>
* @author fdesbois
* @version $Revision: 3 $
*
@@ -50,116 +51,115 @@
*/
public class GenericSelectModel<T> extends AbstractSelectModel {
- private List<T> list;
- private Map<String, List<T>> map;
- private PropertyAdapter labelFieldAdapter;
- private PropertyAdapter idFieldAdapter;
+ private List<T> list;
+ private Map<String, List<T>> map;
+ private PropertyAdapter labelFieldAdapter;
+ private PropertyAdapter idFieldAdapter;
+
+ @Inject
+ private Logger log;
- @Inject
- private Logger log;
+ /**
+ * @param list the list of objects you want modeled in a Select component. These objects MUST implement
+ * equals(Object obj) and hashCode(). If the objects are JPA entities, ensure their implementations of
+ * equals(Object obj) and hashCode() return the same thing for different instances of the same detached
+ * entity.
+ * @param clazz the class of objects in the list.
+ * @param labelField the name of the field you want displayed as the label in the selection list, eg. "name".
+ * @param idField the name of the field which is the unique identifier of each object in the list, eg. "id". This is
+ * used in the value property of the Select component.
+ * @param access Declare a PropertyAccess injected into your page (eg. Inject private PropertyAccess _access) then pass it in here.
+ *
+ */
+ public GenericSelectModel(List<T> list, Class<T> clazz, String labelField, String idField, PropertyAccess access) {
+ init(clazz, labelField, idField, access);
- /**
- * @param list the list of objects you want modeled in a Select component. These objects MUST implement
- * equals(Object obj) and hashCode(). If the objects are JPA entities, ensure their implementations of
- * equals(Object obj) and hashCode() return the same thing for different instances of the same detached
- * entity.
- * @param clazz the class of objects in the list.
- * @param labelField the name of the field you want displayed as the label in the selection list, eg. "name".
- * @param idField the name of the field which is the unique identifier of each object in the list, eg. "id". This is
- * used in the value property of the Select component.
- * @param access Declare a PropertyAccess injected into your page (eg. Inject private PropertyAccess _access) then pass it in here.
- *
- */
- public GenericSelectModel(List<T> list, Class<T> clazz, String labelField, String idField, PropertyAccess access) {
- init(clazz, labelField, idField, access);
+ this.list = list;
+ }
- this.list = list;
- }
+ public GenericSelectModel(Map<String, List<T>> map, Class<T> clazz, String labelField, String idField, PropertyAccess access) {
+ init(clazz, labelField, idField, access);
- public GenericSelectModel(Map<String, List<T>> map, Class<T> clazz, String labelField, String idField, PropertyAccess access) {
- init(clazz, labelField, idField, access);
+ this.map = map;
+ }
- this.map = map;
- }
+ private void init(Class<T> clazz, String labelField, String idField, PropertyAccess access) {
+ if (clazz == null) {
+ throw new IllegalArgumentException("clazz is required.");
+ }
+ if (idField == null) {
+ throw new IllegalArgumentException("idField is required.");
+ }
+ if (labelField == null) {
+ throw new IllegalArgumentException("labelField is required.");
+ }
- private void init(Class<T> clazz, String labelField, String idField, PropertyAccess access) {
- if (clazz == null) {
- throw new IllegalArgumentException("clazz is required.");
- }
- if (idField == null) {
- throw new IllegalArgumentException("idField is required.");
- }
- if (labelField == null) {
- throw new IllegalArgumentException("labelField is required.");
- }
+ this.idFieldAdapter = access.getAdapter(clazz).getPropertyAdapter(idField);
+ this.labelFieldAdapter = access.getAdapter(clazz).getPropertyAdapter(labelField);
- this.idFieldAdapter = access.getAdapter(clazz).getPropertyAdapter(idField);
- this.labelFieldAdapter = access.getAdapter(clazz).getPropertyAdapter(labelField);
+ if (idFieldAdapter == null) {
+ throw new IllegalArgumentException("idField " + idField + " does not exist in class " + clazz + ".");
+ }
+ if (labelFieldAdapter == null) {
+ throw new IllegalArgumentException("labelField " + idField + " does not exist in class " + clazz + ".");
+ }
+ }
- if (idFieldAdapter == null) {
- throw new IllegalArgumentException("idField " + idField + " does not exist in class " + clazz + ".");
- }
- if (labelFieldAdapter == null) {
- throw new IllegalArgumentException("labelField " + idField + " does not exist in class " + clazz + ".");
- }
+ @Override
+ public List<OptionGroupModel> getOptionGroups() {
+ if (list != null) {
+ return null;
}
+ List<OptionGroupModel> optionGroupModelList = new ArrayList<OptionGroupModel>();
+ for (String key : map.keySet()) {
+ optionGroupModelList.add(new OptionGroupModelImpl(key, false, getOptions(map.get(key))));
+ }
+ return optionGroupModelList;
+ }
- @Override
- public List<OptionGroupModel> getOptionGroups() {
- if (list != null) {
- return null;
- }
- List<OptionGroupModel> optionGroupModelList = new ArrayList<OptionGroupModel>();
- for (String key : map.keySet()) {
- optionGroupModelList.add(new OptionGroupModelImpl(key, false, getOptions(map.get(key))));
- }
- return optionGroupModelList;
- }
+ @Override
+ public List<OptionModel> getOptions() {
+ if (map != null) {
+ return null;
+ }
+ return getOptions(list);
+ }
- @Override
- public List<OptionModel> getOptions() {
- if (map != null) {
- return null;
- }
- return getOptions(list);
- }
+ private List<OptionModel> getOptions(List<T> list) {
+ List<OptionModel> optionModelList = new ArrayList<OptionModel>();
+ for (T obj : list) {
+ optionModelList.add(new OptionModelImpl(nvl(labelFieldAdapter.get(obj)), idFieldAdapter.get(obj)));
+ }
+ return optionModelList;
+ }
- private List<OptionModel> getOptions(List<T> list) {
- List<OptionModel> optionModelList = new ArrayList<OptionModel>();
- for (T obj : list) {
- optionModelList.add(new OptionModelImpl(nvl(labelFieldAdapter.get(obj)), idFieldAdapter.get(obj)));
+ public List<T> getList() {
+ List<T> results;
+ if (map != null) {
+ results = new ArrayList<T>();
+ for (String key : map.keySet()) {
+ results.addAll(map.get(key));
}
- return optionModelList;
+ } else {
+ results = list;
}
+ return results;
+ }
- public List<T> getList() {
- List<T> results;
- if (map != null) {
- results = new ArrayList<T>();
- for (String key : map.keySet()) {
- results.addAll(map.get(key));
+ public T findObject(String id) {
+ if (id != null) {
+ for (T current : getList()) {
+ Object currentId = idFieldAdapter.get(current);
+ if (currentId.equals(id)) {
+ return current;
}
- } else {
- results = list;
}
- return results;
}
-
- public T findObject(String id) {
- if (id != null) {
- for (T current : getList()) {
- Object currentId = idFieldAdapter.get(current);
- if (currentId.equals(id)) {
- return current;
- }
- }
- }
- return null;
- }
+ return null;
+ }
- private String nvl(Object o) {
- return o == null ? "" : o.toString();
- }
-
+ private String nvl(Object o) {
+ return o == null ? "" : o.toString();
+ }
}
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Administration.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Administration.java 2009-12-22 11:58:16 UTC (rev 147)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Administration.java 2009-12-22 18:09:31 UTC (rev 148)
@@ -158,7 +158,7 @@
if (log.isInfoEnabled()) {
log.info("BUSINESS REQUEST [getCompanies]");
}
- companies = serviceUser.getCompanies();
+ companies = serviceUser.getCompanies(false);
} catch(SuiviObsmerException eee) {
// errors
}
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Boats.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Boats.java 2009-12-22 11:58:16 UTC (rev 147)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/Boats.java 2009-12-22 18:09:31 UTC (rev 148)
@@ -32,6 +32,7 @@
import fr.ifremer.suiviobsmer.entity.ElligibleBoat;
import fr.ifremer.suiviobsmer.entity.FishingZone;
import fr.ifremer.suiviobsmer.entity.Profession;
+import fr.ifremer.suiviobsmer.entity.Program;
import fr.ifremer.suiviobsmer.entity.SampleRow;
import fr.ifremer.suiviobsmer.entity.User;
import fr.ifremer.suiviobsmer.services.ServiceBoat;
@@ -442,6 +443,10 @@
public boolean canCreateNewContactFromList() throws SuiviObsmerException {
if (!user.getAdmin() && isSampleRowExists()) {
+ Program program = getSampleRow().getProgram();
+ if (program.isFinished()) {
+ return false;
+ }
return boat.canCreateContact(user.getCompany());
}
return false;
@@ -527,7 +532,7 @@
if (log.isDebugEnabled()) {
log.debug("BUSINESS REQUEST [getCompanies]");
}
- List<Company> companies = serviceUser.getCompanies();
+ List<Company> companies = serviceUser.getCompanies(true);
companySelectModel = new GenericSelectModel<Company>(companies,Company.class,
"name","topiaId",propertyAccess);
}
@@ -569,7 +574,11 @@
}
public boolean canCreateNewContactFromElligibleBoat() throws SuiviObsmerException {
- if (!user.getAdmin() && !isElligibleBoatCompanyActiveFalse()) {
+ if (!user.getAdmin() && !isElligibleBoatCompanyActiveFalse()) {
+ Program program = elligibleBoat.getSampleRow().getProgram();
+ if (program.isFinished()) {
+ return false;
+ }
Boat boat = getBoatInfos().getBoat();
return boat.canCreateContact(user.getCompany());
}
Modified: trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/SampleRowForm.java
===================================================================
--- trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/SampleRowForm.java 2009-12-22 11:58:16 UTC (rev 147)
+++ trunk/suiviobsmer-ui/src/main/java/fr/ifremer/suiviobsmer/ui/pages/SampleRowForm.java 2009-12-22 18:09:31 UTC (rev 148)
@@ -21,7 +21,10 @@
package fr.ifremer.suiviobsmer.ui.pages;
+import fr.ifremer.suiviobsmer.SuiviObsmerBusinessException;
import fr.ifremer.suiviobsmer.SuiviObsmerException;
+import fr.ifremer.suiviobsmer.entity.Boat;
+import fr.ifremer.suiviobsmer.entity.Company;
import fr.ifremer.suiviobsmer.entity.FishingZone;
import fr.ifremer.suiviobsmer.entity.Profession;
import fr.ifremer.suiviobsmer.entity.ProfessionImpl;
@@ -29,6 +32,7 @@
import fr.ifremer.suiviobsmer.entity.ProgramImpl;
import fr.ifremer.suiviobsmer.entity.SampleMonth;
import fr.ifremer.suiviobsmer.entity.SampleRow;
+import fr.ifremer.suiviobsmer.entity.User;
import fr.ifremer.suiviobsmer.services.ServiceBoat;
import fr.ifremer.suiviobsmer.services.ServiceReferential;
import fr.ifremer.suiviobsmer.services.ServiceSampling;
@@ -49,10 +53,12 @@
import org.apache.tapestry5.annotations.Log;
import org.apache.tapestry5.annotations.Persist;
import org.apache.tapestry5.annotations.Property;
+import org.apache.tapestry5.annotations.SessionState;
import org.apache.tapestry5.beaneditor.BeanModel;
import org.apache.tapestry5.corelib.components.Form;
import org.apache.tapestry5.ioc.annotations.Inject;
import org.apache.tapestry5.ioc.services.PropertyAccess;
+import org.apache.tapestry5.runtime.Component;
import org.apache.tapestry5.services.BeanModelSource;
import org.nuiton.util.DateUtils;
import org.nuiton.util.PeriodDates;
@@ -92,6 +98,10 @@
@Inject
private ServiceBoat serviceBoat;
+ @SessionState
+ @Property
+ private User user;
+
@Inject
private PropertyAccess propertyAccess;
@@ -109,27 +119,32 @@
void setupRender() throws SuiviObsmerException {
// load models for select
- professionSelectModel = null;
- getProfessionSelectModel();
+// professionSelectModel = null;
+// getProfessionSelectModel();
// programSelectModel = null;
// getProgramSelectModel();
- fishingZoneSelectModel = null;
- getFishingZoneSelectModel();
+// fishingZoneSelectModel = null;
+// getFishingZoneSelectModel();
// load main sampleRow (use of sampleRowId in url)
sampleRow = null;
getSampleRow();
+
+ professionId = null;
+ sampleRowForm.clearErrors();
if (!isCreateMode()) {
programId = getSampleRow().getProgram().getTopiaId();
+ } else {
+ programId = null;
}
-
// initialize companyId if exist for companySelect
-// Company company = getSampleRow().getCompany();
-// if (company != null) {
-// companyId = company.getTopiaId();
-// }
-// immatriculations = getSampleRow().getMainElligibleBoatsAsString();
+ Company company = getSampleRow().getCompany();
+ if (company != null) {
+ companyId = company.getTopiaId();
+ }
+
+ immatriculations = getSampleRow().getMainElligibleBoatsAsString();
// Initialize fishingZones, programPeriod and sampleMonths for edition
// fishingZones = null;
// getFishingZones();
@@ -141,21 +156,32 @@
/*************************** PROFESSION ***********************************/
+ /** Select model which contains all professions **/
@Persist
private GenericSelectModel<Profession> professionSelectModel;
+ /** The current selected professionId **/
+ @Property
+ private String professionId;
+
+ /** Bean model source to create the BeanModel for profession **/
@Inject
private BeanModelSource beanModelSource;
+ /** Component resources needed to create the BeanModel for profession **/
@Inject
private ComponentResources resources;
- @Property
- private String professionId;
-
+ /** Field codeDCF5 for validation : must be provided **/
// @InjectComponent
-// private Zone professionZone;
+// private BeanEditor professionEditor;
+ /**
+ * Get SelectModel for profession input Select. The select contains all existing professions.
+ *
+ * @return a GenericSelectModel<Profession>
+ * @throws SuiviObsmerException
+ */
public GenericSelectModel<Profession> getProfessionSelectModel() throws SuiviObsmerException {
if (professionSelectModel == null) {
if (log.isInfoEnabled()) {
@@ -168,57 +194,61 @@
return professionSelectModel;
}
+ /**
+ * Get the Profession model for BeanDisplay component.
+ *
+ * @return a BeanModel<Profession>
+ */
public BeanModel<Profession> getProfessionModel() {
return beanModelSource.createDisplayModel(Profession.class, resources.getMessages());
}
-// void onSelectedFromSearchProfession() throws SuiviObsmerException {
-// if (log.isDebugEnabled()) {
-// log.debug("professionId : " + professionId);
-// }
-// Profession professionSelected = getProfessionSelectModel().findObject(professionId);
-// sampleRow.setProfession(professionSelected);
-// }
-
+ /**
+ * Action on submit : addNewProfession. Used to set a new profession from the selected one.
+ *
+ * @throws SuiviObsmerException
+ */
void onSelectedFromAddNewProfession() throws SuiviObsmerException {
Profession profession = new ProfessionImpl();
- if (!StringUtils.isEmpty(professionId)) {
- profession = getProfessionSelectModel().findObject(professionId);
+ if (!StringUtils.isEmpty(professionId)) {
+ Profession professionSelected = getProfessionSelectModel().findObject(professionId);
if (log.isDebugEnabled()) {
- log.debug("Add new profession from : " + profession);
+ log.debug("Add new profession from : " + professionSelected);
}
- // TODO add this method in Business to copy attributes from the profession in
- // argument to a new one
- //serviceSampling.getNewProfession(profession);
+ profession = serviceSampling.getNewProfession(professionSelected);
}
getSampleRow().setProfession(profession);
edited = true;
}
-// Block onSuccessFromProfessionForm() throws SuiviObsmerException {
-// return professionZone.getBody();
-// }
-
/*************************** FISHING ZONE *********************************/
+ /** Select model for the FishingZone list **/
@Persist
private GenericSelectModel<FishingZone> fishingZoneSelectModel;
+ /** Current fishingZone id selected **/
@Property
private String fishingZoneId;
-// @InjectComponent
-// private Zone fishingZoneZone;
-
+ /** Current fishingZone for loop **/
@Property
private FishingZone fishingZone;
- //@Persist
- private List<FishingZone> fishingZones;
-
+ /** Current index in the loop **/
@Property
private int indexFishingZone;
+ /** Field fishingZone for validation : must have at least one fishingZone **/
+ @InjectComponent
+ private Field fishingZoneSelect;
+
+ /**
+ * Get the select model for FishingZone. The select contains all existing fishingZones.
+ *
+ * @return a GenericSelectModel<FishingZone>
+ * @throws SuiviObsmerException
+ */
public GenericSelectModel<FishingZone> getFishingZoneSelectModel() throws SuiviObsmerException {
if (fishingZoneSelectModel == null) {
if (log.isInfoEnabled()) {
@@ -231,13 +261,21 @@
return fishingZoneSelectModel;
}
+ /**
+ * Get the list of FishingZones from the SampleRow.
+ *
+ * @return a List of FishingZone linked with the SampleRow
+ * @throws SuiviObsmerException
+ */
public List<FishingZone> getFishingZones() throws SuiviObsmerException {
- if (fishingZones == null) {
- fishingZones = getSampleRow().getFishingZone();
- }
- return fishingZones;
+ return getSampleRow().getFishingZone();
}
+ /**
+ * Action on submit : addFishingZone. Used to add the selected fishingZone to the SampleRow.
+ *
+ * @throws SuiviObsmerException
+ */
void onSelectedFromAddFishingZone() throws SuiviObsmerException {
fishingZone = getFishingZoneSelectModel().findObject(fishingZoneId);
if (!getFishingZones().contains(fishingZone)) {
@@ -249,6 +287,12 @@
edited = true;
}
+ /**
+ * Action on submit : removeFishingZone. Used to remove the fishingZone from the SampleRow.
+ *
+ * @param index of the FishingZone in the list (from loop component)
+ * @throws SuiviObsmerException
+ */
void onSelectedFromRemoveFishingZone(int index) throws SuiviObsmerException {
if (log.isDebugEnabled()) {
log.debug("Remove fishingZone at position : " + index);
@@ -257,13 +301,6 @@
edited = true;
}
-// Block onSuccessFromFishingZoneForm() {
-// if (!edited) {
-// sampleRow.setFishingZone(fishingZones);
-// }
-// return fishingZoneZone.getBody();
-// }
-
/*************************** PROGRAM & MONTHS *****************************/
@Persist
@@ -275,19 +312,11 @@
@Property
private String programId;
-// @InjectComponent
-// private Zone periodZone;
-
- /** Program to saved **/
- private Program program;
-
@Property
private Date month;
- //@Persist
private PeriodDates period;
- //@Persist
private List<SampleMonth> sampleMonths;
@Property
@@ -299,6 +328,9 @@
@InjectComponent
private Field programPeriodEnd;
+ @InjectComponent
+ private Field program;
+
private boolean programChanged;
public GenericSelectModel<Program> getProgramSelectModel() throws SuiviObsmerException {
@@ -326,11 +358,6 @@
Date begin = getProgram().getPeriodBegin();
Date end = getProgram().getPeriodEnd();
period = new PeriodDates(begin, end);
-// if (begin != null && end != null) {
-// period = new PeriodDates(begin, end);
-// } else {
-// period = new PeriodDates();
-// }
}
return period;
}
@@ -354,28 +381,29 @@
}
/**
- * Search a program from the list.
+ * Search a program from the list.
* The program will be set from the one selected. If no selection, a new one will be set.
* @throws SuiviObsmerException
*/
void onSelectedFromSearchProgram() throws SuiviObsmerException {
- program = new ProgramImpl();
+ Program sampleRowProgram = new ProgramImpl();
if (!StringUtils.isEmpty(programId)) {
- program = getProgramSelectModel().findObject(programId);
- }
- // Period will be reinitialized from program params
- //getSampleRow().setProgram(program);
+ sampleRowProgram = getProgramSelectModel().findObject(programId);
+ programName = null;
+ period = null;
+ sampleMonths = null;
+ // Period will be reinitialized from program params
+ getSampleRow().setProgram(sampleRowProgram);
+ // Update sampleRowCode from program
+ if (isCreateMode()) {
+ String rowCode = sampleRowProgram.getNewSampleRowCode();
+ getSampleRow().setCode(rowCode);
+ }
- // SampleMonths ??
-
- //programName = null;
- // Reset period to get the one from selected program
- //period = null;
- // Reset sampleMonths for new period
- //sampleMonths = null;
- //saveProgramAndSampleMonths();
- programChanged = true;
+ validateProgram();
+ }
+ edited = true;
}
/**
@@ -384,66 +412,71 @@
* The period dates will be saved in program (validation will be done in onSuccess).
* @throws SuiviObsmerException
*/
+ @Log
void onSelectedFromRefreshMonths() throws SuiviObsmerException {
+ Program sampleRowProgram = null;
if (!StringUtils.isEmpty(programName)) {
// New program
- program = new ProgramImpl();
- program.setName(programName);
- //getSampleRow().setProgram(program);
- //programId = null;
+ sampleRowProgram = new ProgramImpl();
+ sampleRowProgram.setName(programName);
+ getSampleRow().setProgram(sampleRowProgram);
+ programId = null;
} else {
- program = getSampleRow().getProgram();
+ sampleRowProgram = getSampleRow().getProgram();
}
- program.setPeriodBegin(period.getFromDate());
- program.setPeriodEnd(period.getThruDate());
-
- // SampleMonths ??
+ sampleRowProgram.setPeriodBegin(period.getFromDate());
+ sampleRowProgram.setPeriodEnd(period.getThruDate());
- // Reset sampleMonths cause of period modification
- //sampleMonths = null;
- //saveProgramAndSampleMonths();
- programChanged = true;
+ // Update sampleRowCode from program
+ if (isCreateMode()) {
+ String rowCode = sampleRowProgram.getNewSampleRowCode();
+ getSampleRow().setCode(rowCode);
+ }
+ validateProgram();
+ edited = true;
}
-// private void saveProgramAndSampleMonths() throws SuiviObsmerException {
-// // New program
-// if (!getSampleRow().hasSampleMonthRealTideTime()) {
-// // Name not empty : suppress programId for select
-// if (!StringUtils.isEmpty(programName)) {
-// programId = null;
-// }
-//
-// Program currentProgram = getSampleRow().getProgram();
-// // Name changed : init new program with current periodBegin and periodEnd
-// if (!StringUtils.isEmpty(programName) && !programName.equals(currentProgram.getName())) {
-// program = new ProgramImpl();
-// program.setName(programName);
-// // ProgramId not empty in select : find program with id in selectModel
-// } else if (!StringUtils.isEmpty(programId)) {
-// program = getProgramSelectModel().findObject(programId);
-// // Nor programId neither programName : reinit program object
-// } else {
-// program = new ProgramImpl();
-// }
-// // Set program to session with sampleRow
-// getSampleRow().setProgram(program);
-// }
-// // Save sampleMonth
-// if (sampleMonths != null) {
-// getSampleRow().setSampleMonth(sampleMonths);
-// }
-//// if (!edited) {
-//// // Save period dates
-//// program = getSampleRow().getProgram();
-//// program.setPeriodBegin(period.getFromDate());
-//// program.setPeriodEnd(period.getThruDate());
-//// }
-////
-//// return periodZone.getBody();
-// }
+ @Log
+ protected boolean validateProgram() throws SuiviObsmerException {
+ sampleRowForm.clearErrors();
+ if (StringUtils.isEmpty(getProgram().getName())) {
+ sampleRowForm.recordError(program,
+ "Vous devez choisir un programme existant ou en créer un nouveau");
+ }
+ Date periodBegin = getProgram().getPeriodBegin();
+ Date periodEnd = getProgram().getPeriodEnd();
+ // Validation for period dates
+ if (periodBegin == null) {
+ sampleRowForm.recordError(programPeriodBegin,
+ "Vous ne pouvez pas rafraîchir les mois avec une date de début de programme vide");
+ }
+ if (periodEnd == null) {
+ sampleRowForm.recordError(programPeriodEnd,
+ "Vous ne pouvez pas rafraîchir les mois avec une date de fin de programme vide");
+ }
+
+ if (periodBegin != null && periodEnd != null) {
+
+ int size = getSampleMonths().size();
+
+ SampleMonth firstMonth = getSampleMonths().get(0);
+ SampleMonth lastMonth = getSampleMonths().get(size-1);
+
+ Date firstDate = DateUtils.createDate(
+ 1, firstMonth.getPeriodMonth(), firstMonth.getPeriodYear());
+
+ if (periodBegin.after(firstDate) && firstMonth.getRealTidesValue() != 0) {
+ sampleRowForm.recordError(programPeriodBegin,
+ "Vous ne pouvez pas réduire la période du programme. " +
+ "Il existe des enregistrements de marées réels.");
+ }
+ }
+ return !sampleRowForm.getHasErrors();
+ }
+
/*************************** SAMPLE ROW ***********************************/
private String sampleRowId;
@@ -451,20 +484,24 @@
@Persist
private SampleRow sampleRow;
+ private BeanModel<SampleRow> sampleRowModel;
+
@InjectComponent
private Form sampleRowForm;
-// @Property
-// private String updateComment;
-//
-// @Property
-// private String immatriculations;
-//
-// @Property
-// private String companyId;
-//
-// private GenericSelectModel<Company> companySelectModel;
+ @Property
+ private String updateComment;
+ @Property
+ private String immatriculations;
+
+ @Property
+ private String companyId;
+
+ private GenericSelectModel<Company> companySelectModel;
+
+ private boolean cancel;
+
public SampleRow getSampleRow() throws SuiviObsmerException {
if (sampleRow == null) {
if (!StringUtils.isEmpty(sampleRowId)) {
@@ -479,85 +516,83 @@
return sampleRow;
}
-// public GenericSelectModel<Company> getCompanySelectModel() throws SuiviObsmerException {
-// if (companySelectModel == null) {
-// if (log.isInfoEnabled()) {
-// log.info("BUSINESS REQUEST [getCompanies]");
-// }
-// List<Company> companies = serviceUser.getCompanies();
-// companySelectModel = new GenericSelectModel<Company>(companies, Company.class,
-// "name", "topiaId", propertyAccess);
-// }
-// return companySelectModel;
-// }
+ public BeanModel<SampleRow> getSampleRowModel() {
+ if (sampleRowModel == null) {
+ sampleRowModel = beanModelSource.createEditModel(SampleRow.class, resources.getMessages());
+ sampleRowModel.add("company", null);
+ sampleRowModel.add("boats", null);
+ sampleRowModel.include("code", "company", "nbObservants", "averageTideTime", "boats", "comment");
+ }
+ return sampleRowModel;
+ }
+ public GenericSelectModel<Company> getCompanySelectModel() throws SuiviObsmerException {
+ if (companySelectModel == null) {
+ if (log.isInfoEnabled()) {
+ log.info("BUSINESS REQUEST [getCompanies]");
+ }
+ List<Company> companies = serviceUser.getCompanies(true);
+ companySelectModel = new GenericSelectModel<Company>(companies, Company.class,
+ "name", "topiaId", propertyAccess);
+ }
+ return companySelectModel;
+ }
+
public boolean isCreateMode() throws SuiviObsmerException {
return StringUtils.isEmpty(getSampleRow().getTopiaId());
}
void onSelectedFromCancelSave() {
- edited = true;
+ cancel = true;
}
@Log
Object onSuccessFromSampleRowForm() throws SuiviObsmerException {
- sampleRowForm.clearErrors();
- if (programChanged) {
- String programTopiaId = program.getTopiaId();
- // Reinitialize programId for select if it's not the current one
- if (programTopiaId != null && !programTopiaId.equals(programId)) {
- programId = null;
- // Reinitialize programName, period and sampleMonths if it's the one selected
- } else {
- programName = null;
- period = null;
- sampleMonths = null;
- }
+ if (cancel) {
+ return this;
+ }
+ if (!edited) {
+ if (validateProgram()) {
+ sampleRowForm.clearErrors();
+ Profession profession = getSampleRow().getProfession();
+ if (StringUtils.isEmpty(profession.getCodeDCF5())) {
+ sampleRowForm.recordError(
+ "Le métier doit obligatoirement avoir un Code DCF niveau 5");
+ }
+ int nbZones = getSampleRow().sizeFishingZone();
+ if (nbZones == 0) {
+ sampleRowForm.recordError(fishingZoneSelect,
+ "Vous devez ajouter au moins une zone de pêche à la ligne");
+ }
+ if (sampleRowForm.getHasErrors()) {
+ return sampleRowForm;
+ }
- Date periodBegin = program.getPeriodBegin();
- Date periodEnd = program.getPeriodEnd();
+ // Save company
+ Company company = getCompanySelectModel().findObject(companyId);
+ getSampleRow().setCompany(company);
- // Validation for period dates
- if (periodBegin == null) {
- sampleRowForm.recordError(programPeriodBegin,
- "Vous ne pouvez pas rafraîchir les mois avec une date de début de programme vide");
- }
- if (periodEnd == null) {
- sampleRowForm.recordError(programPeriodEnd,
- "Vous ne pouvez pas rafraîchir les mois avec une date de fin de programme vide");
- }
+ // Save sampleMonths
+ getSampleRow().setSampleMonth(getSampleMonths());
- if (periodBegin != null && periodEnd != null) {
+ try {
+ List<Boat> boats = serviceBoat.getBoats(immatriculations);
- int size = getSampleMonths().size();
+ serviceSampling.createUpdateSampleRow(sampleRow, boats);
- SampleMonth firstMonth = getSampleMonths().get(0);
- SampleMonth lastMonth = getSampleMonths().get(size-1);
-
- Date firstDate = DateUtils.createDate(
- 1, firstMonth.getPeriodMonth(), firstMonth.getPeriodYear());
-
- if (periodBegin.after(firstDate) && firstMonth.getRealTidesValue() != 0) {
- sampleRowForm.recordError(programPeriodBegin,
- "Vous ne pouvez pas réduire la période du programme. " +
- "Il existe des enregistrements de marées réels.");
+ return SamplingPlan.class;
+ } catch (SuiviObsmerBusinessException eee) {
+ sampleRowForm.recordError(eee.getMessage());
+ log.error("BUSINESS ERROR : " + eee.getType() + " depuis " + eee.getServiceName());
}
}
-
- if (!sampleRowForm.getHasErrors()) {
- // Save program
- getSampleRow().setProgram(program);
- // Save sampleMonths
- //getSampleRow().setSampleMonth(sampleMonths);
- }
- } else if (!edited) {
//sampleRow.setFishingZone(fishingZones); USEFUL ?
// Save period dates
//program = getSampleRow().getProgram();
//program.setPeriodBegin(period.getFromDate());
//program.setPeriodEnd(period.getThruDate());
- return null;
+ //return null;
// Company company = getCompanySelectModel().findObject(companyId);
// getSampleRow().setCompany(company);
//
@@ -569,6 +604,18 @@
} else {
// Reinitialize professionId for select to avoid selection from existing Profession
professionId = null;
+
+// String programTopiaId = program.getTopiaId();
+// // Reinitialize programId for select if it's not the current one
+// if (programTopiaId != null && !programTopiaId.equals(programId)) {
+// programId = null;
+// }
+ // Reinitialize programName, period and sampleMonths if it's the one selected
+// } else {
+// programName = null;
+// period = null;
+// sampleMonths = null;
+// }
}
return sampleRowForm;
}
Modified: trunk/suiviobsmer-ui/src/main/resources/fr/ifremer/suiviobsmer/ui/pages/SampleRowForm.properties
===================================================================
--- trunk/suiviobsmer-ui/src/main/resources/fr/ifremer/suiviobsmer/ui/pages/SampleRowForm.properties 2009-12-22 11:58:16 UTC (rev 147)
+++ trunk/suiviobsmer-ui/src/main/resources/fr/ifremer/suiviobsmer/ui/pages/SampleRowForm.properties 2009-12-22 18:09:31 UTC (rev 148)
@@ -1,6 +1,6 @@
# FOR PROFESSION PART
professionSelect-label: Code m\u00E9tier
-codeDCF5-label: Code DCF Niv. 5
+codeDCF5-label: Code DCF Niv. 5*
meshSize-label: Maillage (mm)
size-label: Taille (mm)
other-label: Autre information
@@ -9,15 +9,19 @@
# FOR FISHING-ZONE PART
fishingZoneSelect-label: Code zone de p\u00EAche
-fishingZoneInfos-label: Autre information
+fishingZonesInfos-label: Autre information
# FOR PROGRAM/PERIOD PART
program-label: Programme
-programPeriod-label: P\u00E9riode
+programPeriodBegin-label: P\u00E9riode
# OTHER
+code-label: Code de la ligne
company-label: Soci\u00E9t\u00E9
boats-label: Navires elligibles
nbObservants-label: Nombre d'observateurs
averageTideTime-label: Dur\u00E9e moyenne d'une mar\u00E9e
-comment-label: Commentaire
\ No newline at end of file
+comment-label: Commentaire sur la ligne
+
+# FORM
+errors-banner: La ligne n'a pas \u00E9t\u00E9 sauvegard\u00E9 \u00E0 cause des erreurs suivantes :
\ No newline at end of file
Modified: trunk/suiviobsmer-ui/src/main/webapp/Boats.tml
===================================================================
--- trunk/suiviobsmer-ui/src/main/webapp/Boats.tml 2009-12-22 11:58:16 UTC (rev 147)
+++ trunk/suiviobsmer-ui/src/main/webapp/Boats.tml 2009-12-22 18:09:31 UTC (rev 148)
@@ -198,7 +198,7 @@
</fieldset>-->
<t:if t:test="companyBoatInfos.lastContact">
<fieldset id="so-boats-boat-infos-shipowner">
- <legend>Dernier contact avec le navire</legend>
+ <legend>Dernier contact avec le navire pour votre société</legend>
<div t:type="beandisplay" t:id="boatInfosLastContact" t:object="companyBoatInfos.lastContact"
t:include="topiaCreateDate, state" t:add="createdBy, sampleRowCode">
<p:createdBy>
@@ -237,7 +237,7 @@
<p>
<form t:type="form" t:id="CalculateBoardings" t:zone="so-boats-boat-infos">
<t:label t:for="fromDate"/> :
- <input t:type="datefield" t:id="fromDate" value="boardingFromDate" />
+ <input t:type="datefield" t:id="fromDate" class="width70" value="boardingFromDate" />
<input t:type="submit" class="ico refresh" t:id="refreshBoardings" value="Refresh" title="Recalculer les embarquements"/>
</form>
</p>
@@ -259,6 +259,9 @@
<a t:type="actionlink" t:id="addNewContactFromSampleRow" t:context="elligibleBoat.sampleRow.code">
<img src="${asset:context:}/img/contact-22px.png" title="Créer un nouveau contact pour ce navire et cette ligne du plan"/>
</a>
+ <p:else>
+ <img src="${asset:context:}/img/contact-unavailable-22px.png" title="Création d'un nouveau contact impossible"/>
+ </p:else>
</t:if>
</li>
</ul>
Modified: trunk/suiviobsmer-ui/src/main/webapp/Contacts.tml
===================================================================
--- trunk/suiviobsmer-ui/src/main/webapp/Contacts.tml 2009-12-22 11:58:16 UTC (rev 147)
+++ trunk/suiviobsmer-ui/src/main/webapp/Contacts.tml 2009-12-22 18:09:31 UTC (rev 148)
@@ -53,8 +53,16 @@
</p:nbObservantsCell>
<p:mammalsCell>
<t:if t:test="editionMode">
- <input t:type="checkbox" value="contact.mammalsObservation" title="Observations de mammifères"/>
- <input t:type="checkbox" value="contact.mammalsCapture" title="Capture de mammifères" />
+ <input t:type="checkbox" t:id="mammalsObservation" value="contact.mammalsObservation"/>
+ <t:label t:for="mammalsObservation">
+ <img src="${asset:context:}/img/eye-22px.png" alt="Observations de mammifères"
+ title="Observations de mammifères" />
+ </t:label>
+ <input t:type="checkbox" t:id="mammalsCapture" value="contact.mammalsCapture" />
+ <t:label t:for="mammalsCapture">
+ <img src="${asset:context:}/img/fishing-net-22px.png" alt="Capture de mammifères"
+ title="Capture de mammifères" />
+ </t:label>
<p:else>
<!--t:booleanImage t:value="contact.mammalsObservation"
t:trueTitle="Observations de mammifères" t:falseTitle="Aucune observation faites" />
@@ -85,7 +93,7 @@
</p:dataInputDateCell>
<p:commentCell>
<t:if t:test="editionMode">
- <input t:type="textarea" t:id="comment" cols="20" rows="2" value="contact.comment" />
+ <input t:type="textarea" t:id="comment" cols="15" rows="2" value="contact.comment" />
<p:else>
${contact.comment}
</p:else>
Modified: trunk/suiviobsmer-ui/src/main/webapp/SampleRowForm.tml
===================================================================
--- trunk/suiviobsmer-ui/src/main/webapp/SampleRowForm.tml 2009-12-22 11:58:16 UTC (rev 147)
+++ trunk/suiviobsmer-ui/src/main/webapp/SampleRowForm.tml 2009-12-22 18:09:31 UTC (rev 148)
@@ -2,12 +2,9 @@
<t:layout t:pageTitle="Modification d'une ligne du plan" t:contentId="so-samplerow-form"
xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd" xmlns:p="tapestry:parameter">
- <t:zone t:id="globalZone"><!--t:update="show"-->
+ <t:zone t:id="globalZone" t:update="show">
<form t:type="form" t:id="sampleRowForm" t:zone="globalZone">
- <p> LIGNE DU PLAN : ${sampleRow.code} </p>
- <t:errors />
-
<!-- PROFESSION -->
<fieldset>
<legend>Métier</legend>
@@ -21,8 +18,8 @@
<t:label t:for="professionSelect" /> :
<input t:type="select" t:id="professionSelect" t:model="professionSelectModel"
t:value="professionId" />
- <input t:type="submit" class="ico add"
- t:id="addNewProfession" value="Ajouter un nouveau métier" />
+ <input t:type="submit" class="ico add" t:id="addNewProfession" value="Add"
+ title="Créer un nouveau métier à partir de celui sélectionné"/>
</div>
<div class="t-beaneditor">
<t:beaneditor t:id="professionEditor" t:object="sampleRow.profession"
@@ -45,7 +42,7 @@
<p:else>
<!-- EDITION -->
<div class="select">
- <t:label t:for="fishingZoneSelect" /> :
+ <t:label t:for="fishingZoneSelect" />* :
<input t:type="select" t:id="fishingZoneSelect" t:model="fishingZoneSelectModel"
t:value="fishingZoneId" />
<input t:type="submit" class="ico add" t:id="addFishingZone" value="Add"
@@ -79,7 +76,7 @@
<p:else>
<!-- EDITION PROGRAM -->
<div class="select">
- <t:label t:for="program"/> :
+ <t:label t:for="program"/>* :
<input t:type="select" t:id="program" t:model="programSelectModel" value="programId" />
<input t:type="submit" class="ico search" t:id="searchProgram" value="Search"
title="Afficher les détails du programme"/>
@@ -90,7 +87,7 @@
</div>
<!-- EDITION PROGRAM PERIOD -->
<div class="select">
- <t:label t:for="programPeriodBegin"/> :
+ <t:label t:for="programPeriodBegin"/>* :
du <input t:type="datefield" t:id="programPeriodBegin" value="period.fromDate" />
jusqu'au <input t:type="datefield" t:id="programPeriodEnd" value="period.thruDate" />
<input t:type="submit" class="ico refresh" t:id="refreshMonths" value="Refresh" title="Rafraîchir les mois"/>
@@ -111,11 +108,51 @@
</table>
</div>
</fieldset>
-
- <div class="actions">
- <input t:type="submit" t:id="saveData" class="ico save" value="Save" />
- <input t:type="submit" t:id="cancelSave" class="ico undo" value="Undo" />
- </div>
+ <!-- OTHER DATA : nbObservants, averageTideTime, company, boats, comment -->
+ <fieldset id="so-samplerow-form-other">
+ <legend>Autres données de la ligne d'échantillonnage</legend>
+ <div class="t-beaneditor">
+ <t:beaneditor t:id="sampleRowEditor" t:object="sampleRow" t:model="sampleRowModel">
+ <p:code>
+ <label>${message:code-label}</label>
+ <!--${sampleRow.code}-->
+ <t:if t:test="sampleRow.code">
+ <strong>${sampleRow.code}</strong>
+ <p:else>
+ <span class="code-missing">
+ Date de début du programme manquante pour générer le code de la ligne !
+ </span>
+ </p:else>
+ </t:if>
+ </p:code>
+ <p:company>
+ <t:label t:for="company" />
+ <input t:type="select" t:id="company" t:model="companySelectModel" value="companyId" />
+ </p:company>
+ <p:boats>
+ <t:label t:for="boats" />
+ <input t:type="textarea" t:id="boats" cols="40" rows="2" value="immatriculations" />
+ </p:boats>
+ <p:comment>
+ <t:label t:for="comment" />
+ <input t:type="textarea" t:id="comment" cols="40" rows="3" value="sampleRow.comment" />
+ </p:comment>
+ </t:beaneditor>
+ </div>
+ </fieldset>
+ <fieldset class="clearfix">
+ <t:errors t:banner="message:errors-banner"/>
+ <p><label>Enregistrement fait par : </label>${user.fullName}</p>
+ <t:unless t:test="createMode">
+ <p><label>Commentaire sur la modification* :</label></p>
+ <p><input t:type="textarea" t:id="updateComment" cols="50" rows="5" value="updateComment"/></p>
+ </t:unless>
+ <div class="fright">
+ <input t:type="submit" t:id="saveData" class="ico save" value="Save" title="Enregistrer les modifications" />
+ <input t:type="submit" t:id="cancelSave" class="ico undo" value="Undo" title="Annuler les modifications" />
+ </div>
+ </fieldset>
+
</form>
</t:zone>
Modified: trunk/suiviobsmer-ui/src/main/webapp/css/contacts.css
===================================================================
--- trunk/suiviobsmer-ui/src/main/webapp/css/contacts.css 2009-12-22 11:58:16 UTC (rev 147)
+++ trunk/suiviobsmer-ui/src/main/webapp/css/contacts.css 2009-12-22 18:09:31 UTC (rev 148)
@@ -50,7 +50,7 @@
div#so-contacts table.t-data-grid thead tr th.dataInputDate,
div#so-contacts table.t-data-grid thead tr th.tideEndDate,
div#so-contacts table.t-data-grid thead tr th.tideBeginDate {
- width: 120px;
+ /*width: 120px;*/
white-space: normal;
text-align: center;
}
@@ -70,6 +70,10 @@
width: 90px;
}
+div#so-contacts table.t-data-grid tbody tr td {
+ white-space: nowrap;
+}
+
td.validation, td.mammals, /* TEMP */
div#so-contacts table.t-data-grid tbody td.validation,
div#so-contacts table.t-data-grid tbody td.mammals {
Modified: trunk/suiviobsmer-ui/src/main/webapp/css/sampling.css
===================================================================
--- trunk/suiviobsmer-ui/src/main/webapp/css/sampling.css 2009-12-22 11:58:16 UTC (rev 147)
+++ trunk/suiviobsmer-ui/src/main/webapp/css/sampling.css 2009-12-22 18:09:31 UTC (rev 148)
@@ -3,7 +3,7 @@
Created on : 10 nov. 2009, 14:31:28
Author : fdesbois
Description:
- Stylesheet for SamplingPlan page
+ Stylesheet for SamplingPlan and SampleRowForm pages
*/
div#so-sampling {
@@ -157,19 +157,42 @@
margin-right: auto;
}
-div#so-samplerow-form legend {
- font-weight: bold;
+div#so-samplerow-form div.t-error {
+ margin: 5px auto;
+ font-size: 0.8em;
}
+div#so-samplerow-form div.t-error li {
+ margin-left: 20px;
+}
+
+div#so-samplerow-form fieldset {
+ margin-bottom: 10px;
+ padding: 8px;
+}
+
+/*div#so-samplerow-form legend {
+ font-weight: bold;
+}*/
+
+
div#so-samplerow-form div.select {
width: 100%;
text-align: center;
margin: 5px;
color: #007CC2;
- font-weight: bold;
}
-div#so-samplerow-form fieldset.user-form {
+div#so-samplerow-form label {
+ color: #007CC2;
+}
+
+div#so-samplerow-form div.t-beaneditor {
+ background-color: transparent;
+ border: 0px;
+}
+
+/*div#so-samplerow-form fieldset.user-form {
width: 100%;
}
@@ -178,43 +201,31 @@
border: 0px;
}
-div#so-samplerow-form div.formPart {
- width: 70%;
- margin-left: auto;
- margin-right: auto;
- margin-bottom: 10px;
-}
-
-/*div#so-samplerow-form-fishingzone {
- width: 70%;
- margin-left: auto;
- margin-right: auto;
- margin-bottom: 10px;
-}*/
-
div#so-samplerow-form-fishingzone div.fishingzone-row {
width: 400px;
-}
-
-/*div#so-samplerow-form-period {
- width: 70%;
- margin-left: auto;
- margin-right: auto;
- margin-bottom: 10px;
}*/
-div#so-samplerow-form-period table#so-samplerow-form-months {
+#so-samplerow-form-months {
margin: 10px;
}
-div#so-samplerow-form-period table#so-samplerow-form-months tr.firstRow {
+#so-samplerow-form-months tr.firstRow {
background-color: #19A28D;
color: white;
border: 2px outset blue;
font-size: 0.8em;
}
-div#so-samplerow-form-period table#so-samplerow-form-months tr.firstRow td {
+#so-samplerow-form-months tr.firstRow td {
padding: 3px;
text-align: center;
}
+
+#so-samplerow-form-other input.t-number {
+ width: 50px;
+}
+
+#so-samplerow-form-other span.code-missing {
+ font-size: 0.8em;
+ color: red;
+}
Added: trunk/suiviobsmer-ui/src/main/webapp/img/contact-unavailable-22px.png
===================================================================
(Binary files differ)
Property changes on: trunk/suiviobsmer-ui/src/main/webapp/img/contact-unavailable-22px.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
1
0
[Suiviobsmer-commits] r147 - in trunk/suiviobsmer-business/src: main/java/fr/ifremer/suiviobsmer main/java/fr/ifremer/suiviobsmer/entity main/java/fr/ifremer/suiviobsmer/impl main/xmi test/java/fr/ifremer/suiviobsmer/entity test/java/fr/ifremer/suiviobsmer/impl test/resources/import
by fdesbois@users.labs.libre-entreprise.org 22 Dec '09
by fdesbois@users.labs.libre-entreprise.org 22 Dec '09
22 Dec '09
Author: fdesbois
Date: 2009-12-22 11:58:16 +0000 (Tue, 22 Dec 2009)
New Revision: 147
Modified:
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerContext.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/TopiaQuery.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ProgramImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/SampleRowImpl.java
trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImpl.java
trunk/suiviobsmer-business/src/main/xmi/suiviobsmer.zargo
trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/entity/BoatImplTest.java
trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/entity/ProgramImplTest.java
trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ServiceBoatImplTest.java
trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImplTest.java
trunk/suiviobsmer-business/src/test/resources/import/echantillonnage.csv
Log:
Add method to get next sampleRowCode iteration from a program begin year
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerContext.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerContext.java 2009-12-22 09:52:22 UTC (rev 146)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/SuiviObsmerContext.java 2009-12-22 11:58:16 UTC (rev 147)
@@ -26,6 +26,7 @@
import java.util.Date;
import java.util.Properties;
import java.util.Random;
+import org.apache.commons.lang.RandomStringUtils;
import org.apache.commons.lang.StringUtils;
import org.hibernate.exception.SQLGrammarException;
import org.nuiton.topia.TopiaContext;
@@ -129,12 +130,13 @@
* @return a String of "length" character
*/
public static String createRandomString(int length) {
- Random random = new Random();
- StringBuilder sb = new StringBuilder();
- while (sb.length() < length) {
- sb.append(Integer.toHexString(random.nextInt()));
- }
- return sb.toString();
+// Random random = new Random();
+// StringBuilder sb = new StringBuilder();
+// while (sb.length() < length) {
+// sb.append(Integer.toHexString(random.nextInt()));
+// }
+// return sb.toString();
+ return RandomStringUtils.randomAlphanumeric(length);
}
public static String encodeString(String string) {
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/TopiaQuery.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/TopiaQuery.java 2009-12-22 09:52:22 UTC (rev 146)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/TopiaQuery.java 2009-12-22 11:58:16 UTC (rev 147)
@@ -4,6 +4,7 @@
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
+import org.apache.commons.lang.StringUtils;
import org.nuiton.topia.TopiaContext;
import org.nuiton.topia.TopiaException;
import org.nuiton.topia.persistence.TopiaEntity;
@@ -303,12 +304,12 @@
*/
public <T extends TopiaEntity> List<T> executeToEntityList(TopiaContext transaction, Class<T> entityClass) throws TopiaException {
List res = execute(transaction);
- List<T> results = new ArrayList<T>();
- for (Object o : res) {
- T entity = (T)o;
- results.add(entity);
- }
- return results;
+// List<T> results = new ArrayList<T>();
+// for (Object o : res) {
+// T entity = (T)o;
+// results.add(entity);
+// }
+ return (List<T>)res;
}
/**
@@ -326,22 +327,51 @@
}
/**
- * Execute the query and get an Integer for result. Used for query with COUNT or MAX, ...
+ * Execute the query and get an Integer for result. Used for query with COUNT or SUM, ...
* The select is overriden to get only the right value for return.
*
* @param transaction the TopiaContext to use for execution
- * @param select the Select overriden (ex : MAX(myParam))
+ * @param select the Select overriden (ex : SUM(myParam))
* @return an Integer
* @throws TopiaException
*/
public int executeToInteger(TopiaContext transaction, String select) throws TopiaException {
+ Long res = (Long)executeToObject(transaction, select);
+ return res != null ? res.intValue() : 0;
+ }
+
+ /**
+ * Execute the query and get a String for result. Used for query with MAX, ...
+ * The select is overriden to get only the right value for return.
+ *
+ * @param transaction the TopiaContext to use for execution
+ * @param select the Select overriden (ex : MAX(myParam))
+ * @return a String
+ * @throws TopiaException
+ */
+ public String executeToString(TopiaContext transaction, String select) throws TopiaException {
+ Object res = executeToObject(transaction, select);
+ return res != null ? (String)res : "";
+ }
+
+ /**
+ * Execute the query and get an Object for result.
+ * The select is overriden to get only the right value for return.
+ *
+ * @param transaction the TopiaContext to use for execution
+ * @param select the Select overriden
+ * @return an Object
+ * @throws TopiaException
+ */
+ public Object executeToObject(TopiaContext transaction, String select) throws TopiaException {
String oldValue = this.select;
- this.select = "SELECT " + select;
- int result = 0;
+ if (!StringUtils.isEmpty(select)) {
+ this.select = "SELECT " + select;
+ }
+ Object result = null;
List results = execute(transaction);
if (!results.isEmpty()) {
- Long tmp = (Long)results.get(0);
- result = tmp.intValue();
+ result = results.get(0);
}
this.select = oldValue;
return result;
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ProgramImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ProgramImpl.java 2009-12-22 09:52:22 UTC (rev 146)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/ProgramImpl.java 2009-12-22 11:58:16 UTC (rev 147)
@@ -22,10 +22,16 @@
package fr.ifremer.suiviobsmer.entity;
import fr.ifremer.suiviobsmer.SuiviObsmerContext;
+import fr.ifremer.suiviobsmer.SuiviObsmerException;
+import fr.ifremer.suiviobsmer.TopiaQuery;
+import fr.ifremer.suiviobsmer.TopiaQuery.Op;
import java.io.Serializable;
+import java.text.NumberFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
+import org.apache.commons.lang.StringUtils;
+import org.nuiton.topia.TopiaContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -113,4 +119,40 @@
endCal.setTime(getPeriodEnd());
return endCal;
}
+
+ @Override
+ public String getNewSampleRowCode() throws SuiviObsmerException {
+ TopiaContext transaction = null;
+ String result = null;
+ if (getPeriodBegin() == null) {
+ return result;
+ }
+ try {
+ transaction = SuiviObsmerContext.getTopiaRootContext().beginTransaction();
+
+ Calendar begin = getCalendarBegin();
+ int year = begin.get(Calendar.YEAR);
+
+ TopiaQuery query = new TopiaQuery(SampleRow.class).
+ add(SampleRow.CODE, Op.LIKE, year + "_%");
+
+ String maxCode = query.executeToString(transaction, "MAX(" + SampleRow.CODE + ")");
+
+ if (log.isDebugEnabled()) {
+ log.debug("Max code found : " + maxCode);
+ }
+
+ String[] part = maxCode.split("_");
+ int inc = Integer.parseInt(part[1]) + 1;
+ String str = StringUtils.leftPad("" + inc, 2, "0");
+ result = year + "_" + str;
+
+ transaction.closeContext();
+ } catch (Exception eee) {
+ SuiviObsmerContext.serviceException(transaction,
+ "Impossible de récupérer un nouveau code pour une ligne d'échantillonnage",
+ eee);
+ }
+ return result;
+ }
}
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/SampleRowImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/SampleRowImpl.java 2009-12-22 09:52:22 UTC (rev 146)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/entity/SampleRowImpl.java 2009-12-22 11:58:16 UTC (rev 147)
@@ -165,7 +165,11 @@
*/
@Override
public boolean hasSampleMonthRealTideTime() {
- for (SampleMonth month : getSampleMonth()) {
+ List<SampleMonth> months = getSampleMonth();
+ if (months == null) {
+ return false;
+ }
+ for (SampleMonth month : months) {
if (month.getRealTidesValue() != 0) {
return true;
}
Modified: trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImpl.java
===================================================================
--- trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImpl.java 2009-12-22 09:52:22 UTC (rev 146)
+++ trunk/suiviobsmer-business/src/main/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImpl.java 2009-12-22 11:58:16 UTC (rev 147)
@@ -25,7 +25,6 @@
import fr.ifremer.suiviobsmer.SuiviObsmerException;
import fr.ifremer.suiviobsmer.SuiviObsmerModelDAOHelper;
import fr.ifremer.suiviobsmer.SuiviObsmerContext;
-import fr.ifremer.suiviobsmer.TopiaQuery;
import fr.ifremer.suiviobsmer.dto.SamplingHistoricRow;
import fr.ifremer.suiviobsmer.entity.*;
import fr.ifremer.suiviobsmer.entity.SampleRow;
@@ -45,10 +44,11 @@
import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
import org.apache.commons.lang.StringUtils;
import org.nuiton.topia.TopiaContext;
import org.nuiton.topia.TopiaException;
-import org.nuiton.util.DateUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -367,6 +367,9 @@
continue;
}
+ // Replace single number after year by a double one : 2010_1 -> 2010_01
+ code = code.replaceFirst("_(\\d)$", "_0$1");
+
String programName = reader.get("PROGRAMME_CODE").trim();
int[] programBegin = getMonthAndYear(reader.get("PROGRAMME_DEBUT").trim());
int[] programEnd = getMonthAndYear(reader.get("PROGRAMME_FIN").trim());
Modified: trunk/suiviobsmer-business/src/main/xmi/suiviobsmer.zargo
===================================================================
(Binary files differ)
Modified: trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/entity/BoatImplTest.java
===================================================================
--- trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/entity/BoatImplTest.java 2009-12-22 09:52:22 UTC (rev 146)
+++ trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/entity/BoatImplTest.java 2009-12-22 11:58:16 UTC (rev 147)
@@ -103,7 +103,7 @@
serviceSampling.importSamplingPlanCsv(input);
SampleRowDAO rowDAO = SuiviObsmerModelDAOHelper.getSampleRowDAO(transaction);
- SampleRow row = rowDAO.findByCode("2010_1");
+ SampleRow row = rowDAO.findByCode("2010_01");
row.getCompany();
row.getProgram();
row.getProfession();
Modified: trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/entity/ProgramImplTest.java
===================================================================
--- trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/entity/ProgramImplTest.java 2009-12-22 09:52:22 UTC (rev 146)
+++ trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/entity/ProgramImplTest.java 2009-12-22 11:58:16 UTC (rev 147)
@@ -21,8 +21,13 @@
package fr.ifremer.suiviobsmer.entity;
+import fr.ifremer.suiviobsmer.SuiviObsmerContext;
+import fr.ifremer.suiviobsmer.SuiviObsmerModelDAOHelper;
import fr.ifremer.suiviobsmer.SuiviObsmerRunner;
import fr.ifremer.suiviobsmer.business.SuiviObsmerRunnerTest;
+import fr.ifremer.suiviobsmer.impl.ServiceSamplingImpl;
+import fr.ifremer.suiviobsmer.services.ServiceSampling;
+import java.io.InputStream;
import java.util.Calendar;
import java.util.GregorianCalendar;
import org.junit.After;
@@ -31,6 +36,7 @@
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
+import org.nuiton.topia.TopiaContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -162,4 +168,42 @@
}
+
+ @Test
+ public void testGetNewSampleRowCode() throws Exception {
+ log.info("getNewSampleRowCode");
+
+ /** PREPARE DATA **/
+ TopiaContext transaction = SuiviObsmerContext.getTopiaRootContext().beginTransaction();
+
+ FishingZoneDAO zoneDAO = SuiviObsmerModelDAOHelper.getFishingZoneDAO(transaction);
+ FishingZone zoneIId = zoneDAO.create(FishingZone.DISTRICT_CODE, "IId");
+ FishingZone zoneIV = zoneDAO.create(FishingZone.DISTRICT_CODE, "IV");
+ FishingZone zoneI = zoneDAO.create(FishingZone.DISTRICT_CODE, "I");
+ transaction.commitTransaction();
+
+ ServiceSampling serviceSampling = new ServiceSamplingImpl();
+ InputStream input = getClass().getResourceAsStream("/import/echantillonnage.csv");
+ serviceSampling.importSamplingPlanCsv(input);
+
+ ProgramDAO programDAO = SuiviObsmerModelDAOHelper.getProgramDAO(transaction);
+ Program program = programDAO.findByName("PPP2010");
+ transaction.closeContext();
+
+ /** EXEC METHOD **/
+
+ String result = program.getNewSampleRowCode();
+ Assert.assertEquals("2009_07", result);
+
+ // Test regex for replacment in importSamplingPlanCsv
+ String code = "2010_1";
+ code = code.replaceFirst("_(\\d)$", "_0$1");
+ Assert.assertEquals("2010_01", code);
+
+ code = "2010_04";
+ code = code.replaceFirst("_(\\d)$", "_0$1");
+ Assert.assertEquals("2010_04", code);
+ }
+
+
}
\ No newline at end of file
Modified: trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ServiceBoatImplTest.java
===================================================================
--- trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ServiceBoatImplTest.java 2009-12-22 09:52:22 UTC (rev 146)
+++ trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ServiceBoatImplTest.java 2009-12-22 11:58:16 UTC (rev 147)
@@ -150,7 +150,7 @@
// Exec with filter on SampleRowCode and company
filter = new BoatFilterImpl();
- filter.setSampleRowCode("2009_3");
+ filter.setSampleRowCode("2009_03");
filter.setCompany(company);
boats = service.getBoatsByFilter(filter);
assertEquals(2, boats.size());
@@ -222,10 +222,10 @@
// Get two SampleRows : 2009_3 & 2010_4
SampleRowDAO rowDAO = SuiviObsmerModelDAOHelper.getSampleRowDAO(transaction);
- SampleRow row1 = rowDAO.findByCode("2009_3");
+ SampleRow row1 = rowDAO.findByCode("2009_03");
row1.getProgram();
row1.getProfession();
- SampleRow row2 = rowDAO.findByCode("2010_4");
+ SampleRow row2 = rowDAO.findByCode("2010_04");
row2.getProgram();
row2.getProfession();
@@ -269,7 +269,7 @@
TopiaContext transaction = SuiviObsmerContext.getTopiaRootContext().beginTransaction();
SampleRowDAO rowDAO = SuiviObsmerModelDAOHelper.getSampleRowDAO(transaction);
- SampleRow row = rowDAO.findByCode("2010_1");
+ SampleRow row = rowDAO.findByCode("2010_01");
row.getCompany();
row.getProgram();
row.getProfession();
@@ -293,7 +293,7 @@
// ajout d'une nouvelle ligne "2010_4" non mise en elligible auparavent
companyBoatInfos.setNewElligibleBoat(rows.get(1));
// ligne deja elligible mise en inactive
- companyBoatInfos.removeElligibleBoat("2009_3");
+ companyBoatInfos.removeElligibleBoat("2009_03");
service.createUpdateCompanyBoatInfos(companyBoatInfos);
@@ -302,18 +302,18 @@
Map<String, ElligibleBoat> results = companyBoatInfos.getElligibleBoats();
assertEquals(2, results.size());
- ElligibleBoat elligible = companyBoatInfos.getElligibleBoat("2009_3");
+ ElligibleBoat elligible = companyBoatInfos.getElligibleBoat("2009_03");
assertNotNull(elligible.getCompanyActive());
assertFalse(elligible.getCompanyActive());
- elligible = companyBoatInfos.getElligibleBoat("2010_4");
+ elligible = companyBoatInfos.getElligibleBoat("2010_04");
assertTrue(elligible.getCompanyActive());
/** TEST2 **/
// Suppression ligne lié elligible pour la société
- companyBoatInfos.removeElligibleBoat("2010_4");
+ companyBoatInfos.removeElligibleBoat("2010_04");
// Reactivation ligne mise en inactive juste avant
- companyBoatInfos.activeElligibleBoat("2009_3");
+ companyBoatInfos.activeElligibleBoat("2009_03");
service.createUpdateCompanyBoatInfos(companyBoatInfos);
@@ -322,7 +322,7 @@
results = companyBoatInfos.getElligibleBoats();
assertEquals(1, results.size());
- elligible = companyBoatInfos.getElligibleBoat("2009_3");
+ elligible = companyBoatInfos.getElligibleBoat("2009_03");
assertNull(elligible.getCompanyActive());
assertTrue(elligible.getGlobalActive());
Modified: trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImplTest.java
===================================================================
--- trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImplTest.java 2009-12-22 09:52:22 UTC (rev 146)
+++ trunk/suiviobsmer-business/src/test/java/fr/ifremer/suiviobsmer/impl/ServiceSamplingImplTest.java 2009-12-22 11:58:16 UTC (rev 147)
@@ -149,7 +149,7 @@
}
SampleRow row = service.getNewSampleRow();
- row.setCode("2010_3");
+ row.setCode("2010_03");
row.setNbObservants(3);
row.setAverageTideTime(2.5);
row.setProgram(program1);
@@ -205,24 +205,24 @@
SampleRowDAO dao = SuiviObsmerModelDAOHelper.getSampleRowDAO(transaction);
SampleRow row1 = dao.create();
- row1.setCode("2010_1");
+ row1.setCode("2010_01");
row1.addFishingZone(zones.get(2));
row1.setProgram(program1);
SampleRow row2 = dao.create();
- row2.setCode("2010_2");
+ row2.setCode("2010_02");
row2.addFishingZone(zones.get(0));
row2.setProgram(program1);
SampleRow row3 = dao.create();
- row3.setCode("2010_3");
+ row3.setCode("2010_03");
row3.addFishingZone(zones.get(1));
row3.addFishingZone(zones.get(2));
row3.addFishingZone(zones.get(0));
row3.setProgram(program2);
SampleRow row4 = dao.create();
- row4.setCode("2010_4");
+ row4.setCode("2010_04");
row4.addFishingZone(zones.get(0));
row4.setProgram(program1);
@@ -239,9 +239,9 @@
List<SampleRow> rows = service.getSampleRowsOrderedByFishingZone(begin.getTime(), end.getTime(), null);
assertEquals(4, rows.size());
SampleRow resultRow0 = rows.get(0);
- assertEquals("2010_2", resultRow0.getCode());
+ assertEquals("2010_02", resultRow0.getCode());
SampleRow resultRow1 = rows.get(1);
- assertEquals("2010_3", resultRow1.getCode());
+ assertEquals("2010_03", resultRow1.getCode());
List<FishingZone> zoneRow1 = resultRow1.getFishingZone();
assertEquals(3, zoneRow1.size());
@@ -253,9 +253,9 @@
assertEquals("V", resultZone2.getDistrictCode());
SampleRow resultRow2 = rows.get(2);
- assertEquals("2010_4", resultRow2.getCode());
+ assertEquals("2010_04", resultRow2.getCode());
SampleRow resultRow3 = rows.get(3);
- assertEquals("2010_1", resultRow3.getCode());
+ assertEquals("2010_01", resultRow3.getCode());
// SECOND TEST :
// ORDER by FishingZone (facadeName, sectorName, districtCode)
@@ -266,11 +266,11 @@
rows = service.getSampleRowsOrderedByFishingZone(begin.getTime(), end.getTime(), null);
assertEquals(3, rows.size());
resultRow0 = rows.get(0);
- assertEquals("2010_2", resultRow0.getCode());
+ assertEquals("2010_02", resultRow0.getCode());
resultRow1 = rows.get(1);
- assertEquals("2010_4", resultRow1.getCode());
+ assertEquals("2010_04", resultRow1.getCode());
resultRow2 = rows.get(2);
- assertEquals("2010_1", resultRow2.getCode());
+ assertEquals("2010_01", resultRow2.getCode());
}
@@ -377,7 +377,7 @@
service.importSamplingPlanCsv(input);
SampleRowDAO rowDAO = SuiviObsmerModelDAOHelper.getSampleRowDAO(transaction);
- SampleRow row = rowDAO.findByCode("2010_1");
+ SampleRow row = rowDAO.findByCode("2010_01");
row.getProfession();
row.getProgram();
row.getCompany();
@@ -394,7 +394,7 @@
service.deleteSampleRow(row);
transaction = SuiviObsmerContext.getTopiaRootContext().beginTransaction();
rowDAO = SuiviObsmerModelDAOHelper.getSampleRowDAO(transaction);
- row = rowDAO.findByCode("2010_1");
+ row = rowDAO.findByCode("2010_01");
assertNull(row);
ElligibleBoatDAO elligibleDAO = SuiviObsmerModelDAOHelper.getElligibleBoatDAO(transaction);
@@ -442,7 +442,7 @@
SampleRowDAO rowDAO = SuiviObsmerModelDAOHelper.getSampleRowDAO(transaction);
- SampleRow row1 = rowDAO.findByCode("2010_1");
+ SampleRow row1 = rowDAO.findByCode("2010_01");
assertNotNull(row1);
assertEquals(1, row1.getNbObservants());
assertEquals(1.5, row1.getAverageTideTime(), 0.1);
Modified: trunk/suiviobsmer-business/src/test/resources/import/echantillonnage.csv
===================================================================
--- trunk/suiviobsmer-business/src/test/resources/import/echantillonnage.csv 2009-12-22 09:52:22 UTC (rev 146)
+++ trunk/suiviobsmer-business/src/test/resources/import/echantillonnage.csv 2009-12-22 11:58:16 UTC (rev 147)
@@ -1,7 +1,7 @@
"PLAN_CODE","SOCIETE_NOM","PECHE_DIVISION","PECHE_AUTRE","METIER_CODE_DCF5","METIER_MAILLAGE","METIER_TAILLE","METIER_AUTRE","METIER_LIBELLE","METIER_ESPECES","PROGRAMME_CODE","PROGRAMME_DEBUT","PROGRAMME_FIN",12/2009,01/2010,02/2010,03/2010,04/2010,05/2010,06/2010,07/2010,08/2010,09/2010,10/2010,11/2010,12/2010,01/2011,02/2011,03/2011,"PLAN_DUREE_MOY","PLAN_NB_OBSERV","PLAN_COMMENT"
"2010_1",TARTANPION,"IId / I",,"DB_MOL",,,,,,"MA-2009",03/2010,01/2011,,,,0,0,0,0,0,0,0,2,0,0,4,,,"1,5",1,
"2010_2",,"IId",,"GTR_DEAEF et ANS_DEF",,,,"Fileyage","poissons tubes","MANY",01/2008,12/2008,,20,0,0,21,0,0,21,0,0,21,0,0,,,,1,1,
-"2010_3",,"IId / IV",,"ORM",,,,"balottage en plein air","divers choses visqueuses","MA-2009",03/2010,01/2011,,,,0,22,0,0,25,0,0,21,0,0,25,,,2,1,
+"2010_03",,"IId / IV",,"ORM",,,,"balottage en plein air","divers choses visqueuses","MA-2009",03/2010,01/2011,,,,0,22,0,0,25,0,0,21,0,0,25,,,2,1,
"2009_1",,"IId / IV",,"GTR_DEF et GNS_DEF","110-119",,,"Fileyage à poissons tubes","poissons plats","PPP2010",12/2009,10/2010,0,1,1,1,2,1,1,1,1,1,2,,,,,,1,1,
"2009_2",,"IId",,"GTR_DEF et GNS_DEF","9888-99",,,"Fileyage à sirènes ","nymphes","PPP2010",12/2009,10/2010,1,1,1,2,3,4,4,4,4,3,3,,,,,,1,1,
"2009_3",TARTANPION,"IV",,"GTR_DF et GNS_DP",,,,"Fileyages à baleines à bosse","chameaux","PPP2010",12/2009,10/2010,2,2,2,2,2,2,2,2,2,2,4,,,,,,1,1,
1
0