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
- 2352 discussions
Build failed in Jenkins: wao-nightly » Wao :: Services #17
by admin+ci-codelutin.com@codelutin.com 27 Mar '14
by admin+ci-codelutin.com@codelutin.com 27 Mar '14
27 Mar '14
See <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-services/17/…>
Changes:
[Tony CHEMIT] refs-40 #4483 (continue ui)
[bleny] fix test by fixing imported sampling plan
[bleny] refs #4483 introduce SampleRowsFilterValues start filter form ui
[Tony CHEMIT] refs-30 #4483 (begin of ui)
[Tony CHEMIT] refs #4483 (add estimated, expected and real values)
[bleny] refs #4487 introduce contact filter api
[Tony CHEMIT] - fix test config
- use diamonds
[bleny] remove references to another project, add licence headers
[Tony CHEMIT] refs-20 #4483 (fix tests)
[Tony CHEMIT] use commons-collections4 instead of commons-collections
[Tony CHEMIT] refs-20 #4483 (add SamplingPlan Builder)
[Tony CHEMIT] fix licenses
fix third-parties
fix dependencies
------------------------------------------
[...truncated 232 lines...]
2014/03/26 12:08:03 TRACE (SampleRowTopiaDao.java:149) toSampleRowHqlAndParametersBuilder query to filter sample rows for fr.ifremer.wao.SampleRowsFilter@7c02a5e1[obsProgram=OBSMER,sampleRowIds=[fr.ifremer.wao.entity.SampleRow#1395788883228#0.002710629850469992],periodFrom=Thu Apr 01 00:00:00 CEST 2010,periodTo=Tue Mar 01 00:00:00 CET 2011,fishingZoneFacadeNames=<null>,fishingZoneSectorNames=<null>,sampleRowCodes=<null>,programNames=<null>,fishingGearDcfIds=<null>,targetSpeciesDcfIds=<null>,samplingStrategies=<null>,terrestrialDistrictIds=<null>,companyIds=<null>,orderByArguments=<null>] is from fr.ifremer.wao.entity.SampleRow sr where (sr.obsProgramOrdinal = :obsProgramOrdinal) and (sr.topiaId = :topiaId) and (sr.periodEnd >= :periodFromMonth) and (sr.periodEnd <= :periodToMonth) {obsProgramOrdinal=0, topiaId=fr.ifremer.wao.entity.SampleRow#1395788883228#0.002710629850469992, periodFromMonth=Thu Apr 01 00:00:00 CEST 2010, periodToMonth=Tue Mar 01 00:00:00 CET 2011}
2014/03/26 12:08:03 TRACE (ContactTopiaDao.java:157) toSampleRowHqlAndParametersBuilder query to filter contacts for fr.ifremer.wao.ContactsFilter@310c7c08[sampleRowFilter=fr.ifremer.wao.SampleRowsFilter@7c02a5e1[obsProgram=OBSMER,sampleRowIds=[fr.ifremer.wao.entity.SampleRow#1395788883228#0.002710629850469992],periodFrom=Thu Apr 01 00:00:00 CEST 2010,periodTo=Tue Mar 01 00:00:00 CET 2011,fishingZoneFacadeNames=<null>,fishingZoneSectorNames=<null>,sampleRowCodes=<null>,programNames=<null>,fishingGearDcfIds=<null>,targetSpeciesDcfIds=<null>,samplingStrategies=<null>,terrestrialDistrictIds=<null>,companyIds=<null>,orderByArguments=<null>],periodFrom=Thu Apr 01 00:00:00 CEST 2010,periodTo=Tue Mar 01 00:00:00 CET 2011,contactIds=<null>,contactStates=[OBSERVATION_DONE],dataReliabilities=<null>,actualSamplingStrategies=<null>,observationTypes=<null>,observedDataControls=<null>,observerIds=<null>,terrestrialLocationIds=<null>,contactStateMotiveIds=<null>,mammalsCaptureOnly=false,mammalsObservationOnly=false,commentDefinedOnly=false,commentAdminDefinedOnly=false,commentCompanyDefinedOnly=false,companyAcceptations=[null, true],programAcceptations=[null, true],completeSamplings=<null>,filterOnObservationBeginDate=true,sortedByBoardingDate=false] is from fr.ifremer.wao.entity.Contact c where (c.sampleRow.topiaId in (select sr.topiaId from fr.ifremer.wao.entity.SampleRow sr where (sr.obsProgramOrdinal = :obsProgramOrdinal) and (sr.topiaId = :topiaId) and (sr.periodEnd >= :periodFromMonth) and (sr.periodEnd <= :periodToMonth))) and (c.observationBeginDate >= :periodFrom) and (c.observationBeginDate <= :periodTo) and (c.state = :state) and ( c.validationCompany in ( :validationCompany ) or c.validationCompany is null) and ( c.validationProgram in ( :validationProgram ) or c.validationProgram is null) {obsProgramOrdinal=0, topiaId=fr.ifremer.wao.entity.SampleRow#1395788883228#0.002710629850469992, periodFromMonth=Thu Apr 01 00:00:00 CEST 2010, periodToMonth=Tue Mar 01 00:00:00 CET 2011, periodFrom=Thu Apr 01 00:00:00 CEST 2010, periodTo=Tue Mar 01 00:00:00 CET 2011, state=2, validationCompany=[null, true], validationProgram=[null, true]}
2014/03/26 12:08:03 TRACE (FakeWaoServiceContext.java:50) getNow injecting fake date in service: Sat May 15 00:00:00 CEST 2010
2014/03/26 12:08:03 TRACE (SampleRowTopiaDao.java:149) toSampleRowHqlAndParametersBuilder query to filter sample rows for fr.ifremer.wao.SampleRowsFilter@1da15229[obsProgram=OBSMER,sampleRowIds=<null>,periodFrom=Thu Apr 01 00:00:00 CEST 2010,periodTo=Tue Mar 01 00:00:00 CET 2011,fishingZoneFacadeNames=<null>,fishingZoneSectorNames=<null>,sampleRowCodes=<null>,programNames=<null>,fishingGearDcfIds=[fr.ifremer.wao.entity.FishingGearDCF#1395788870097#0.6052098891633803],targetSpeciesDcfIds=<null>,samplingStrategies=<null>,terrestrialDistrictIds=<null>,companyIds=<null>,orderByArguments=<null>] is from fr.ifremer.wao.entity.SampleRow sr where (sr.obsProgramOrdinal = :obsProgramOrdinal) and (sr.periodEnd >= :periodFromMonth) and (sr.periodEnd <= :periodToMonth) and (sr.topiaId in (select sr2.topiaId from fr.ifremer.wao.entity.SampleRowImpl as sr2 join sr2.dCF5Code as dcf where dcf.fishingGearDCF.topiaId in (:fishingGearDcfIds))) {obsProgramOrdinal=0, periodFromMonth=Thu Apr 01 00:00:00 CEST 2010, periodToMonth=Tue Mar 01 00:00:00 CET 2011, fishingGearDcfIds=[fr.ifremer.wao.entity.FishingGearDCF#1395788870097#0.6052098891633803]}
2014/03/26 12:08:03 TRACE (SampleRowTopiaDao.java:149) toSampleRowHqlAndParametersBuilder query to filter sample rows for fr.ifremer.wao.SampleRowsFilter@1da15229[obsProgram=OBSMER,sampleRowIds=[fr.ifremer.wao.entity.SampleRow#1395788883176#0.1958589174266282],periodFrom=Thu Apr 01 00:00:00 CEST 2010,periodTo=Tue Mar 01 00:00:00 CET 2011,fishingZoneFacadeNames=<null>,fishingZoneSectorNames=<null>,sampleRowCodes=<null>,programNames=<null>,fishingGearDcfIds=[fr.ifremer.wao.entity.FishingGearDCF#1395788870097#0.6052098891633803],targetSpeciesDcfIds=<null>,samplingStrategies=<null>,terrestrialDistrictIds=<null>,companyIds=<null>,orderByArguments=<null>] is from fr.ifremer.wao.entity.SampleRow sr where (sr.obsProgramOrdinal = :obsProgramOrdinal) and (sr.topiaId = :topiaId) and (sr.periodEnd >= :periodFromMonth) and (sr.periodEnd <= :periodToMonth) and (sr.topiaId in (select sr2.topiaId from fr.ifremer.wao.entity.SampleRowImpl as sr2 join sr2.dCF5Code as dcf where dcf.fishingGearDCF.topiaId in (:fishingGearDcfIds))) {obsProgramOrdinal=0, topiaId=fr.ifremer.wao.entity.SampleRow#1395788883176#0.1958589174266282, periodFromMonth=Thu Apr 01 00:00:00 CEST 2010, periodToMonth=Tue Mar 01 00:00:00 CET 2011, fishingGearDcfIds=[fr.ifremer.wao.entity.FishingGearDCF#1395788870097#0.6052098891633803]}
2014/03/26 12:08:03 TRACE (ContactTopiaDao.java:157) toSampleRowHqlAndParametersBuilder query to filter contacts for fr.ifremer.wao.ContactsFilter@17c831df[sampleRowFilter=fr.ifremer.wao.SampleRowsFilter@1da15229[obsProgram=OBSMER,sampleRowIds=[fr.ifremer.wao.entity.SampleRow#1395788883176#0.1958589174266282],periodFrom=Thu Apr 01 00:00:00 CEST 2010,periodTo=Tue Mar 01 00:00:00 CET 2011,fishingZoneFacadeNames=<null>,fishingZoneSectorNames=<null>,sampleRowCodes=<null>,programNames=<null>,fishingGearDcfIds=[fr.ifremer.wao.entity.FishingGearDCF#1395788870097#0.6052098891633803],targetSpeciesDcfIds=<null>,samplingStrategies=<null>,terrestrialDistrictIds=<null>,companyIds=<null>,orderByArguments=<null>],periodFrom=Thu Apr 01 00:00:00 CEST 2010,periodTo=Tue Mar 01 00:00:00 CET 2011,contactIds=<null>,contactStates=[OBSERVATION_DONE],dataReliabilities=<null>,actualSamplingStrategies=<null>,observationTypes=<null>,observedDataControls=<null>,observerIds=<null>,terrestrialLocationIds=<null>,contactStateMotiveIds=<null>,mammalsCaptureOnly=false,mammalsObservationOnly=false,commentDefinedOnly=false,commentAdminDefinedOnly=false,commentCompanyDefinedOnly=false,companyAcceptations=[null, true],programAcceptations=[null, true],completeSamplings=<null>,filterOnObservationBeginDate=true,sortedByBoardingDate=false] is from fr.ifremer.wao.entity.Contact c where (c.sampleRow.topiaId in (select sr.topiaId from fr.ifremer.wao.entity.SampleRow sr where (sr.obsProgramOrdinal = :obsProgramOrdinal) and (sr.topiaId = :topiaId) and (sr.periodEnd >= :periodFromMonth) and (sr.periodEnd <= :periodToMonth) and (sr.topiaId in (select sr2.topiaId from fr.ifremer.wao.entity.SampleRowImpl as sr2 join sr2.dCF5Code as dcf where dcf.fishingGearDCF.topiaId in (:fishingGearDcfIds))))) and (c.observationBeginDate >= :periodFrom) and (c.observationBeginDate <= :periodTo) and (c.state = :state) and ( c.validationCompany in ( :validationCompany ) or c.validationCompany is null) and ( c.validationProgram in ( :validationProgram ) or c.validationProgram is null) {obsProgramOrdinal=0, topiaId=fr.ifremer.wao.entity.SampleRow#1395788883176#0.1958589174266282, periodFromMonth=Thu Apr 01 00:00:00 CEST 2010, periodToMonth=Tue Mar 01 00:00:00 CET 2011, fishingGearDcfIds=[fr.ifremer.wao.entity.FishingGearDCF#1395788870097#0.6052098891633803], periodFrom=Thu Apr 01 00:00:00 CEST 2010, periodTo=Tue Mar 01 00:00:00 CET 2011, state=2, validationCompany=[null, true], validationProgram=[null, true]}
2014/03/26 12:08:03 TRACE (SampleRowTopiaDao.java:149) toSampleRowHqlAndParametersBuilder query to filter sample rows for fr.ifremer.wao.SampleRowsFilter@1da15229[obsProgram=OBSMER,sampleRowIds=[fr.ifremer.wao.entity.SampleRow#1395788883185#0.40926781661657896],periodFrom=Thu Apr 01 00:00:00 CEST 2010,periodTo=Tue Mar 01 00:00:00 CET 2011,fishingZoneFacadeNames=<null>,fishingZoneSectorNames=<null>,sampleRowCodes=<null>,programNames=<null>,fishingGearDcfIds=[fr.ifremer.wao.entity.FishingGearDCF#1395788870097#0.6052098891633803],targetSpeciesDcfIds=<null>,samplingStrategies=<null>,terrestrialDistrictIds=<null>,companyIds=<null>,orderByArguments=<null>] is from fr.ifremer.wao.entity.SampleRow sr where (sr.obsProgramOrdinal = :obsProgramOrdinal) and (sr.topiaId = :topiaId) and (sr.periodEnd >= :periodFromMonth) and (sr.periodEnd <= :periodToMonth) and (sr.topiaId in (select sr2.topiaId from fr.ifremer.wao.entity.SampleRowImpl as sr2 join sr2.dCF5Code as dcf where dcf.fishingGearDCF.topiaId in (:fishingGearDcfIds))) {obsProgramOrdinal=0, topiaId=fr.ifremer.wao.entity.SampleRow#1395788883185#0.40926781661657896, periodFromMonth=Thu Apr 01 00:00:00 CEST 2010, periodToMonth=Tue Mar 01 00:00:00 CET 2011, fishingGearDcfIds=[fr.ifremer.wao.entity.FishingGearDCF#1395788870097#0.6052098891633803]}
2014/03/26 12:08:03 TRACE (ContactTopiaDao.java:157) toSampleRowHqlAndParametersBuilder query to filter contacts for fr.ifremer.wao.ContactsFilter@4018f98f[sampleRowFilter=fr.ifremer.wao.SampleRowsFilter@1da15229[obsProgram=OBSMER,sampleRowIds=[fr.ifremer.wao.entity.SampleRow#1395788883185#0.40926781661657896],periodFrom=Thu Apr 01 00:00:00 CEST 2010,periodTo=Tue Mar 01 00:00:00 CET 2011,fishingZoneFacadeNames=<null>,fishingZoneSectorNames=<null>,sampleRowCodes=<null>,programNames=<null>,fishingGearDcfIds=[fr.ifremer.wao.entity.FishingGearDCF#1395788870097#0.6052098891633803],targetSpeciesDcfIds=<null>,samplingStrategies=<null>,terrestrialDistrictIds=<null>,companyIds=<null>,orderByArguments=<null>],periodFrom=Thu Apr 01 00:00:00 CEST 2010,periodTo=Tue Mar 01 00:00:00 CET 2011,contactIds=<null>,contactStates=[OBSERVATION_DONE],dataReliabilities=<null>,actualSamplingStrategies=<null>,observationTypes=<null>,observedDataControls=<null>,observerIds=<null>,terrestrialLocationIds=<null>,contactStateMotiveIds=<null>,mammalsCaptureOnly=false,mammalsObservationOnly=false,commentDefinedOnly=false,commentAdminDefinedOnly=false,commentCompanyDefinedOnly=false,companyAcceptations=[null, true],programAcceptations=[null, true],completeSamplings=<null>,filterOnObservationBeginDate=true,sortedByBoardingDate=false] is from fr.ifremer.wao.entity.Contact c where (c.sampleRow.topiaId in (select sr.topiaId from fr.ifremer.wao.entity.SampleRow sr where (sr.obsProgramOrdinal = :obsProgramOrdinal) and (sr.topiaId = :topiaId) and (sr.periodEnd >= :periodFromMonth) and (sr.periodEnd <= :periodToMonth) and (sr.topiaId in (select sr2.topiaId from fr.ifremer.wao.entity.SampleRowImpl as sr2 join sr2.dCF5Code as dcf where dcf.fishingGearDCF.topiaId in (:fishingGearDcfIds))))) and (c.observationBeginDate >= :periodFrom) and (c.observationBeginDate <= :periodTo) and (c.state = :state) and ( c.validationCompany in ( :validationCompany ) or c.validationCompany is null) and ( c.validationProgram in ( :validationProgram ) or c.validationProgram is null) {obsProgramOrdinal=0, topiaId=fr.ifremer.wao.entity.SampleRow#1395788883185#0.40926781661657896, periodFromMonth=Thu Apr 01 00:00:00 CEST 2010, periodToMonth=Tue Mar 01 00:00:00 CET 2011, fishingGearDcfIds=[fr.ifremer.wao.entity.FishingGearDCF#1395788870097#0.6052098891633803], periodFrom=Thu Apr 01 00:00:00 CEST 2010, periodTo=Tue Mar 01 00:00:00 CET 2011, state=2, validationCompany=[null, true], validationProgram=[null, true]}
2014/03/26 12:08:03 TRACE (SampleRowTopiaDao.java:149) toSampleRowHqlAndParametersBuilder query to filter sample rows for fr.ifremer.wao.SampleRowsFilter@1da15229[obsProgram=OBSMER,sampleRowIds=[fr.ifremer.wao.entity.SampleRow#1395788883206#0.14314465804642373],periodFrom=Thu Apr 01 00:00:00 CEST 2010,periodTo=Tue Mar 01 00:00:00 CET 2011,fishingZoneFacadeNames=<null>,fishingZoneSectorNames=<null>,sampleRowCodes=<null>,programNames=<null>,fishingGearDcfIds=[fr.ifremer.wao.entity.FishingGearDCF#1395788870097#0.6052098891633803],targetSpeciesDcfIds=<null>,samplingStrategies=<null>,terrestrialDistrictIds=<null>,companyIds=<null>,orderByArguments=<null>] is from fr.ifremer.wao.entity.SampleRow sr where (sr.obsProgramOrdinal = :obsProgramOrdinal) and (sr.topiaId = :topiaId) and (sr.periodEnd >= :periodFromMonth) and (sr.periodEnd <= :periodToMonth) and (sr.topiaId in (select sr2.topiaId from fr.ifremer.wao.entity.SampleRowImpl as sr2 join sr2.dCF5Code as dcf where dcf.fishingGearDCF.topiaId in (:fishingGearDcfIds))) {obsProgramOrdinal=0, topiaId=fr.ifremer.wao.entity.SampleRow#1395788883206#0.14314465804642373, periodFromMonth=Thu Apr 01 00:00:00 CEST 2010, periodToMonth=Tue Mar 01 00:00:00 CET 2011, fishingGearDcfIds=[fr.ifremer.wao.entity.FishingGearDCF#1395788870097#0.6052098891633803]}
2014/03/26 12:08:03 TRACE (ContactTopiaDao.java:157) toSampleRowHqlAndParametersBuilder query to filter contacts for fr.ifremer.wao.ContactsFilter@6369a309[sampleRowFilter=fr.ifremer.wao.SampleRowsFilter@1da15229[obsProgram=OBSMER,sampleRowIds=[fr.ifremer.wao.entity.SampleRow#1395788883206#0.14314465804642373],periodFrom=Thu Apr 01 00:00:00 CEST 2010,periodTo=Tue Mar 01 00:00:00 CET 2011,fishingZoneFacadeNames=<null>,fishingZoneSectorNames=<null>,sampleRowCodes=<null>,programNames=<null>,fishingGearDcfIds=[fr.ifremer.wao.entity.FishingGearDCF#1395788870097#0.6052098891633803],targetSpeciesDcfIds=<null>,samplingStrategies=<null>,terrestrialDistrictIds=<null>,companyIds=<null>,orderByArguments=<null>],periodFrom=Thu Apr 01 00:00:00 CEST 2010,periodTo=Tue Mar 01 00:00:00 CET 2011,contactIds=<null>,contactStates=[OBSERVATION_DONE],dataReliabilities=<null>,actualSamplingStrategies=<null>,observationTypes=<null>,observedDataControls=<null>,observerIds=<null>,terrestrialLocationIds=<null>,contactStateMotiveIds=<null>,mammalsCaptureOnly=false,mammalsObservationOnly=false,commentDefinedOnly=false,commentAdminDefinedOnly=false,commentCompanyDefinedOnly=false,companyAcceptations=[null, true],programAcceptations=[null, true],completeSamplings=<null>,filterOnObservationBeginDate=true,sortedByBoardingDate=false] is from fr.ifremer.wao.entity.Contact c where (c.sampleRow.topiaId in (select sr.topiaId from fr.ifremer.wao.entity.SampleRow sr where (sr.obsProgramOrdinal = :obsProgramOrdinal) and (sr.topiaId = :topiaId) and (sr.periodEnd >= :periodFromMonth) and (sr.periodEnd <= :periodToMonth) and (sr.topiaId in (select sr2.topiaId from fr.ifremer.wao.entity.SampleRowImpl as sr2 join sr2.dCF5Code as dcf where dcf.fishingGearDCF.topiaId in (:fishingGearDcfIds))))) and (c.observationBeginDate >= :periodFrom) and (c.observationBeginDate <= :periodTo) and (c.state = :state) and ( c.validationCompany in ( :validationCompany ) or c.validationCompany is null) and ( c.validationProgram in ( :validationProgram ) or c.validationProgram is null) {obsProgramOrdinal=0, topiaId=fr.ifremer.wao.entity.SampleRow#1395788883206#0.14314465804642373, periodFromMonth=Thu Apr 01 00:00:00 CEST 2010, periodToMonth=Tue Mar 01 00:00:00 CET 2011, fishingGearDcfIds=[fr.ifremer.wao.entity.FishingGearDCF#1395788870097#0.6052098891633803], periodFrom=Thu Apr 01 00:00:00 CEST 2010, periodTo=Tue Mar 01 00:00:00 CET 2011, state=2, validationCompany=[null, true], validationProgram=[null, true]}
2014/03/26 12:08:03 TRACE (FakeWaoServiceContext.java:50) getNow injecting fake date in service: Sat May 15 00:00:00 CEST 2010
2014/03/26 12:08:03 TRACE (SampleRowTopiaDao.java:149) toSampleRowHqlAndParametersBuilder query to filter sample rows for fr.ifremer.wao.SampleRowsFilter@10f679f2[obsProgram=OBSMER,sampleRowIds=<null>,periodFrom=Thu Apr 01 00:00:00 CEST 2010,periodTo=Tue Mar 01 00:00:00 CET 2011,fishingZoneFacadeNames=<null>,fishingZoneSectorNames=<null>,sampleRowCodes=<null>,programNames=<null>,fishingGearDcfIds=<null>,targetSpeciesDcfIds=[fr.ifremer.wao.entity.TargetSpeciesDCF#1395788870101#0.7788242816671336],samplingStrategies=<null>,terrestrialDistrictIds=<null>,companyIds=<null>,orderByArguments=<null>] is from fr.ifremer.wao.entity.SampleRow sr where (sr.obsProgramOrdinal = :obsProgramOrdinal) and (sr.periodEnd >= :periodFromMonth) and (sr.periodEnd <= :periodToMonth) and (sr.topiaId in (select sr2.topiaId from fr.ifremer.wao.entity.SampleRowImpl as sr2 join sr2.dCF5Code as dcf where dcf.targetSpeciesDCF.topiaId in (:targetSpeciesDcfIds))) {obsProgramOrdinal=0, periodFromMonth=Thu Apr 01 00:00:00 CEST 2010, periodToMonth=Tue Mar 01 00:00:00 CET 2011, targetSpeciesDcfIds=[fr.ifremer.wao.entity.TargetSpeciesDCF#1395788870101#0.7788242816671336]}
2014/03/26 12:08:03 TRACE (SampleRowTopiaDao.java:149) toSampleRowHqlAndParametersBuilder query to filter sample rows for fr.ifremer.wao.SampleRowsFilter@10f679f2[obsProgram=OBSMER,sampleRowIds=[fr.ifremer.wao.entity.SampleRow#1395788883148#0.5685673585906867],periodFrom=Thu Apr 01 00:00:00 CEST 2010,periodTo=Tue Mar 01 00:00:00 CET 2011,fishingZoneFacadeNames=<null>,fishingZoneSectorNames=<null>,sampleRowCodes=<null>,programNames=<null>,fishingGearDcfIds=<null>,targetSpeciesDcfIds=[fr.ifremer.wao.entity.TargetSpeciesDCF#1395788870101#0.7788242816671336],samplingStrategies=<null>,terrestrialDistrictIds=<null>,companyIds=<null>,orderByArguments=<null>] is from fr.ifremer.wao.entity.SampleRow sr where (sr.obsProgramOrdinal = :obsProgramOrdinal) and (sr.topiaId = :topiaId) and (sr.periodEnd >= :periodFromMonth) and (sr.periodEnd <= :periodToMonth) and (sr.topiaId in (select sr2.topiaId from fr.ifremer.wao.entity.SampleRowImpl as sr2 join sr2.dCF5Code as dcf where dcf.targetSpeciesDCF.topiaId in (:targetSpeciesDcfIds))) {obsProgramOrdinal=0, topiaId=fr.ifremer.wao.entity.SampleRow#1395788883148#0.5685673585906867, periodFromMonth=Thu Apr 01 00:00:00 CEST 2010, periodToMonth=Tue Mar 01 00:00:00 CET 2011, targetSpeciesDcfIds=[fr.ifremer.wao.entity.TargetSpeciesDCF#1395788870101#0.7788242816671336]}
2014/03/26 12:08:03 TRACE (ContactTopiaDao.java:157) toSampleRowHqlAndParametersBuilder query to filter contacts for fr.ifremer.wao.ContactsFilter@2a6026de[sampleRowFilter=fr.ifremer.wao.SampleRowsFilter@10f679f2[obsProgram=OBSMER,sampleRowIds=[fr.ifremer.wao.entity.SampleRow#1395788883148#0.5685673585906867],periodFrom=Thu Apr 01 00:00:00 CEST 2010,periodTo=Tue Mar 01 00:00:00 CET 2011,fishingZoneFacadeNames=<null>,fishingZoneSectorNames=<null>,sampleRowCodes=<null>,programNames=<null>,fishingGearDcfIds=<null>,targetSpeciesDcfIds=[fr.ifremer.wao.entity.TargetSpeciesDCF#1395788870101#0.7788242816671336],samplingStrategies=<null>,terrestrialDistrictIds=<null>,companyIds=<null>,orderByArguments=<null>],periodFrom=Thu Apr 01 00:00:00 CEST 2010,periodTo=Tue Mar 01 00:00:00 CET 2011,contactIds=<null>,contactStates=[OBSERVATION_DONE],dataReliabilities=<null>,actualSamplingStrategies=<null>,observationTypes=<null>,observedDataControls=<null>,observerIds=<null>,terrestrialLocationIds=<null>,contactStateMotiveIds=<null>,mammalsCaptureOnly=false,mammalsObservationOnly=false,commentDefinedOnly=false,commentAdminDefinedOnly=false,commentCompanyDefinedOnly=false,companyAcceptations=[null, true],programAcceptations=[null, true],completeSamplings=<null>,filterOnObservationBeginDate=true,sortedByBoardingDate=false] is from fr.ifremer.wao.entity.Contact c where (c.sampleRow.topiaId in (select sr.topiaId from fr.ifremer.wao.entity.SampleRow sr where (sr.obsProgramOrdinal = :obsProgramOrdinal) and (sr.topiaId = :topiaId) and (sr.periodEnd >= :periodFromMonth) and (sr.periodEnd <= :periodToMonth) and (sr.topiaId in (select sr2.topiaId from fr.ifremer.wao.entity.SampleRowImpl as sr2 join sr2.dCF5Code as dcf where dcf.targetSpeciesDCF.topiaId in (:targetSpeciesDcfIds))))) and (c.observationBeginDate >= :periodFrom) and (c.observationBeginDate <= :periodTo) and (c.state = :state) and ( c.validationCompany in ( :validationCompany ) or c.validationCompany is null) and ( c.validationProgram in ( :validationProgram ) or c.validationProgram is null) {obsProgramOrdinal=0, topiaId=fr.ifremer.wao.entity.SampleRow#1395788883148#0.5685673585906867, periodFromMonth=Thu Apr 01 00:00:00 CEST 2010, periodToMonth=Tue Mar 01 00:00:00 CET 2011, targetSpeciesDcfIds=[fr.ifremer.wao.entity.TargetSpeciesDCF#1395788870101#0.7788242816671336], periodFrom=Thu Apr 01 00:00:00 CEST 2010, periodTo=Tue Mar 01 00:00:00 CET 2011, state=2, validationCompany=[null, true], validationProgram=[null, true]}
2014/03/26 12:08:03 TRACE (SampleRowTopiaDao.java:149) toSampleRowHqlAndParametersBuilder query to filter sample rows for fr.ifremer.wao.SampleRowsFilter@10f679f2[obsProgram=OBSMER,sampleRowIds=[fr.ifremer.wao.entity.SampleRow#1395788883158#0.8007613842010958],periodFrom=Thu Apr 01 00:00:00 CEST 2010,periodTo=Tue Mar 01 00:00:00 CET 2011,fishingZoneFacadeNames=<null>,fishingZoneSectorNames=<null>,sampleRowCodes=<null>,programNames=<null>,fishingGearDcfIds=<null>,targetSpeciesDcfIds=[fr.ifremer.wao.entity.TargetSpeciesDCF#1395788870101#0.7788242816671336],samplingStrategies=<null>,terrestrialDistrictIds=<null>,companyIds=<null>,orderByArguments=<null>] is from fr.ifremer.wao.entity.SampleRow sr where (sr.obsProgramOrdinal = :obsProgramOrdinal) and (sr.topiaId = :topiaId) and (sr.periodEnd >= :periodFromMonth) and (sr.periodEnd <= :periodToMonth) and (sr.topiaId in (select sr2.topiaId from fr.ifremer.wao.entity.SampleRowImpl as sr2 join sr2.dCF5Code as dcf where dcf.targetSpeciesDCF.topiaId in (:targetSpeciesDcfIds))) {obsProgramOrdinal=0, topiaId=fr.ifremer.wao.entity.SampleRow#1395788883158#0.8007613842010958, periodFromMonth=Thu Apr 01 00:00:00 CEST 2010, periodToMonth=Tue Mar 01 00:00:00 CET 2011, targetSpeciesDcfIds=[fr.ifremer.wao.entity.TargetSpeciesDCF#1395788870101#0.7788242816671336]}
2014/03/26 12:08:03 TRACE (ContactTopiaDao.java:157) toSampleRowHqlAndParametersBuilder query to filter contacts for fr.ifremer.wao.ContactsFilter@3f3415b1[sampleRowFilter=fr.ifremer.wao.SampleRowsFilter@10f679f2[obsProgram=OBSMER,sampleRowIds=[fr.ifremer.wao.entity.SampleRow#1395788883158#0.8007613842010958],periodFrom=Thu Apr 01 00:00:00 CEST 2010,periodTo=Tue Mar 01 00:00:00 CET 2011,fishingZoneFacadeNames=<null>,fishingZoneSectorNames=<null>,sampleRowCodes=<null>,programNames=<null>,fishingGearDcfIds=<null>,targetSpeciesDcfIds=[fr.ifremer.wao.entity.TargetSpeciesDCF#1395788870101#0.7788242816671336],samplingStrategies=<null>,terrestrialDistrictIds=<null>,companyIds=<null>,orderByArguments=<null>],periodFrom=Thu Apr 01 00:00:00 CEST 2010,periodTo=Tue Mar 01 00:00:00 CET 2011,contactIds=<null>,contactStates=[OBSERVATION_DONE],dataReliabilities=<null>,actualSamplingStrategies=<null>,observationTypes=<null>,observedDataControls=<null>,observerIds=<null>,terrestrialLocationIds=<null>,contactStateMotiveIds=<null>,mammalsCaptureOnly=false,mammalsObservationOnly=false,commentDefinedOnly=false,commentAdminDefinedOnly=false,commentCompanyDefinedOnly=false,companyAcceptations=[null, true],programAcceptations=[null, true],completeSamplings=<null>,filterOnObservationBeginDate=true,sortedByBoardingDate=false] is from fr.ifremer.wao.entity.Contact c where (c.sampleRow.topiaId in (select sr.topiaId from fr.ifremer.wao.entity.SampleRow sr where (sr.obsProgramOrdinal = :obsProgramOrdinal) and (sr.topiaId = :topiaId) and (sr.periodEnd >= :periodFromMonth) and (sr.periodEnd <= :periodToMonth) and (sr.topiaId in (select sr2.topiaId from fr.ifremer.wao.entity.SampleRowImpl as sr2 join sr2.dCF5Code as dcf where dcf.targetSpeciesDCF.topiaId in (:targetSpeciesDcfIds))))) and (c.observationBeginDate >= :periodFrom) and (c.observationBeginDate <= :periodTo) and (c.state = :state) and ( c.validationCompany in ( :validationCompany ) or c.validationCompany is null) and ( c.validationProgram in ( :validationProgram ) or c.validationProgram is null) {obsProgramOrdinal=0, topiaId=fr.ifremer.wao.entity.SampleRow#1395788883158#0.8007613842010958, periodFromMonth=Thu Apr 01 00:00:00 CEST 2010, periodToMonth=Tue Mar 01 00:00:00 CET 2011, targetSpeciesDcfIds=[fr.ifremer.wao.entity.TargetSpeciesDCF#1395788870101#0.7788242816671336], periodFrom=Thu Apr 01 00:00:00 CEST 2010, periodTo=Tue Mar 01 00:00:00 CET 2011, state=2, validationCompany=[null, true], validationProgram=[null, true]}
2014/03/26 12:08:03 TRACE (SampleRowTopiaDao.java:149) toSampleRowHqlAndParametersBuilder query to filter sample rows for fr.ifremer.wao.SampleRowsFilter@10f679f2[obsProgram=OBSMER,sampleRowIds=[fr.ifremer.wao.entity.SampleRow#1395788883191#0.5358399466645478],periodFrom=Thu Apr 01 00:00:00 CEST 2010,periodTo=Tue Mar 01 00:00:00 CET 2011,fishingZoneFacadeNames=<null>,fishingZoneSectorNames=<null>,sampleRowCodes=<null>,programNames=<null>,fishingGearDcfIds=<null>,targetSpeciesDcfIds=[fr.ifremer.wao.entity.TargetSpeciesDCF#1395788870101#0.7788242816671336],samplingStrategies=<null>,terrestrialDistrictIds=<null>,companyIds=<null>,orderByArguments=<null>] is from fr.ifremer.wao.entity.SampleRow sr where (sr.obsProgramOrdinal = :obsProgramOrdinal) and (sr.topiaId = :topiaId) and (sr.periodEnd >= :periodFromMonth) and (sr.periodEnd <= :periodToMonth) and (sr.topiaId in (select sr2.topiaId from fr.ifremer.wao.entity.SampleRowImpl as sr2 join sr2.dCF5Code as dcf where dcf.targetSpeciesDCF.topiaId in (:targetSpeciesDcfIds))) {obsProgramOrdinal=0, topiaId=fr.ifremer.wao.entity.SampleRow#1395788883191#0.5358399466645478, periodFromMonth=Thu Apr 01 00:00:00 CEST 2010, periodToMonth=Tue Mar 01 00:00:00 CET 2011, targetSpeciesDcfIds=[fr.ifremer.wao.entity.TargetSpeciesDCF#1395788870101#0.7788242816671336]}
2014/03/26 12:08:03 TRACE (ContactTopiaDao.java:157) toSampleRowHqlAndParametersBuilder query to filter contacts for fr.ifremer.wao.ContactsFilter@2726737f[sampleRowFilter=fr.ifremer.wao.SampleRowsFilter@10f679f2[obsProgram=OBSMER,sampleRowIds=[fr.ifremer.wao.entity.SampleRow#1395788883191#0.5358399466645478],periodFrom=Thu Apr 01 00:00:00 CEST 2010,periodTo=Tue Mar 01 00:00:00 CET 2011,fishingZoneFacadeNames=<null>,fishingZoneSectorNames=<null>,sampleRowCodes=<null>,programNames=<null>,fishingGearDcfIds=<null>,targetSpeciesDcfIds=[fr.ifremer.wao.entity.TargetSpeciesDCF#1395788870101#0.7788242816671336],samplingStrategies=<null>,terrestrialDistrictIds=<null>,companyIds=<null>,orderByArguments=<null>],periodFrom=Thu Apr 01 00:00:00 CEST 2010,periodTo=Tue Mar 01 00:00:00 CET 2011,contactIds=<null>,contactStates=[OBSERVATION_DONE],dataReliabilities=<null>,actualSamplingStrategies=<null>,observationTypes=<null>,observedDataControls=<null>,observerIds=<null>,terrestrialLocationIds=<null>,contactStateMotiveIds=<null>,mammalsCaptureOnly=false,mammalsObservationOnly=false,commentDefinedOnly=false,commentAdminDefinedOnly=false,commentCompanyDefinedOnly=false,companyAcceptations=[null, true],programAcceptations=[null, true],completeSamplings=<null>,filterOnObservationBeginDate=true,sortedByBoardingDate=false] is from fr.ifremer.wao.entity.Contact c where (c.sampleRow.topiaId in (select sr.topiaId from fr.ifremer.wao.entity.SampleRow sr where (sr.obsProgramOrdinal = :obsProgramOrdinal) and (sr.topiaId = :topiaId) and (sr.periodEnd >= :periodFromMonth) and (sr.periodEnd <= :periodToMonth) and (sr.topiaId in (select sr2.topiaId from fr.ifremer.wao.entity.SampleRowImpl as sr2 join sr2.dCF5Code as dcf where dcf.targetSpeciesDCF.topiaId in (:targetSpeciesDcfIds))))) and (c.observationBeginDate >= :periodFrom) and (c.observationBeginDate <= :periodTo) and (c.state = :state) and ( c.validationCompany in ( :validationCompany ) or c.validationCompany is null) and ( c.validationProgram in ( :validationProgram ) or c.validationProgram is null) {obsProgramOrdinal=0, topiaId=fr.ifremer.wao.entity.SampleRow#1395788883191#0.5358399466645478, periodFromMonth=Thu Apr 01 00:00:00 CEST 2010, periodToMonth=Tue Mar 01 00:00:00 CET 2011, targetSpeciesDcfIds=[fr.ifremer.wao.entity.TargetSpeciesDCF#1395788870101#0.7788242816671336], periodFrom=Thu Apr 01 00:00:00 CEST 2010, periodTo=Tue Mar 01 00:00:00 CET 2011, state=2, validationCompany=[null, true], validationProgram=[null, true]}
2014/03/26 12:08:03 TRACE (SampleRowTopiaDao.java:149) toSampleRowHqlAndParametersBuilder query to filter sample rows for fr.ifremer.wao.SampleRowsFilter@10f679f2[obsProgram=OBSMER,sampleRowIds=[fr.ifremer.wao.entity.SampleRow#1395788883206#0.14314465804642373],periodFrom=Thu Apr 01 00:00:00 CEST 2010,periodTo=Tue Mar 01 00:00:00 CET 2011,fishingZoneFacadeNames=<null>,fishingZoneSectorNames=<null>,sampleRowCodes=<null>,programNames=<null>,fishingGearDcfIds=<null>,targetSpeciesDcfIds=[fr.ifremer.wao.entity.TargetSpeciesDCF#1395788870101#0.7788242816671336],samplingStrategies=<null>,terrestrialDistrictIds=<null>,companyIds=<null>,orderByArguments=<null>] is from fr.ifremer.wao.entity.SampleRow sr where (sr.obsProgramOrdinal = :obsProgramOrdinal) and (sr.topiaId = :topiaId) and (sr.periodEnd >= :periodFromMonth) and (sr.periodEnd <= :periodToMonth) and (sr.topiaId in (select sr2.topiaId from fr.ifremer.wao.entity.SampleRowImpl as sr2 join sr2.dCF5Code as dcf where dcf.targetSpeciesDCF.topiaId in (:targetSpeciesDcfIds))) {obsProgramOrdinal=0, topiaId=fr.ifremer.wao.entity.SampleRow#1395788883206#0.14314465804642373, periodFromMonth=Thu Apr 01 00:00:00 CEST 2010, periodToMonth=Tue Mar 01 00:00:00 CET 2011, targetSpeciesDcfIds=[fr.ifremer.wao.entity.TargetSpeciesDCF#1395788870101#0.7788242816671336]}
2014/03/26 12:08:03 TRACE (ContactTopiaDao.java:157) toSampleRowHqlAndParametersBuilder query to filter contacts for fr.ifremer.wao.ContactsFilter@75f0e333[sampleRowFilter=fr.ifremer.wao.SampleRowsFilter@10f679f2[obsProgram=OBSMER,sampleRowIds=[fr.ifremer.wao.entity.SampleRow#1395788883206#0.14314465804642373],periodFrom=Thu Apr 01 00:00:00 CEST 2010,periodTo=Tue Mar 01 00:00:00 CET 2011,fishingZoneFacadeNames=<null>,fishingZoneSectorNames=<null>,sampleRowCodes=<null>,programNames=<null>,fishingGearDcfIds=<null>,targetSpeciesDcfIds=[fr.ifremer.wao.entity.TargetSpeciesDCF#1395788870101#0.7788242816671336],samplingStrategies=<null>,terrestrialDistrictIds=<null>,companyIds=<null>,orderByArguments=<null>],periodFrom=Thu Apr 01 00:00:00 CEST 2010,periodTo=Tue Mar 01 00:00:00 CET 2011,contactIds=<null>,contactStates=[OBSERVATION_DONE],dataReliabilities=<null>,actualSamplingStrategies=<null>,observationTypes=<null>,observedDataControls=<null>,observerIds=<null>,terrestrialLocationIds=<null>,contactStateMotiveIds=<null>,mammalsCaptureOnly=false,mammalsObservationOnly=false,commentDefinedOnly=false,commentAdminDefinedOnly=false,commentCompanyDefinedOnly=false,companyAcceptations=[null, true],programAcceptations=[null, true],completeSamplings=<null>,filterOnObservationBeginDate=true,sortedByBoardingDate=false] is from fr.ifremer.wao.entity.Contact c where (c.sampleRow.topiaId in (select sr.topiaId from fr.ifremer.wao.entity.SampleRow sr where (sr.obsProgramOrdinal = :obsProgramOrdinal) and (sr.topiaId = :topiaId) and (sr.periodEnd >= :periodFromMonth) and (sr.periodEnd <= :periodToMonth) and (sr.topiaId in (select sr2.topiaId from fr.ifremer.wao.entity.SampleRowImpl as sr2 join sr2.dCF5Code as dcf where dcf.targetSpeciesDCF.topiaId in (:targetSpeciesDcfIds))))) and (c.observationBeginDate >= :periodFrom) and (c.observationBeginDate <= :periodTo) and (c.state = :state) and ( c.validationCompany in ( :validationCompany ) or c.validationCompany is null) and ( c.validationProgram in ( :validationProgram ) or c.validationProgram is null) {obsProgramOrdinal=0, topiaId=fr.ifremer.wao.entity.SampleRow#1395788883206#0.14314465804642373, periodFromMonth=Thu Apr 01 00:00:00 CEST 2010, periodToMonth=Tue Mar 01 00:00:00 CET 2011, targetSpeciesDcfIds=[fr.ifremer.wao.entity.TargetSpeciesDCF#1395788870101#0.7788242816671336], periodFrom=Thu Apr 01 00:00:00 CEST 2010, periodTo=Tue Mar 01 00:00:00 CET 2011, state=2, validationCompany=[null, true], validationProgram=[null, true]}
2014/03/26 12:08:03 TRACE (FakeWaoServiceContext.java:50) getNow injecting fake date in service: Sat May 15 00:00:00 CEST 2010
2014/03/26 12:08:03 TRACE (SampleRowTopiaDao.java:149) toSampleRowHqlAndParametersBuilder query to filter sample rows for fr.ifremer.wao.SampleRowsFilter@51182c3c[obsProgram=OBSMER,sampleRowIds=<null>,periodFrom=Thu Apr 01 00:00:00 CEST 2010,periodTo=Tue Mar 01 00:00:00 CET 2011,fishingZoneFacadeNames=<null>,fishingZoneSectorNames=<null>,sampleRowCodes=<null>,programNames=<null>,fishingGearDcfIds=[fr.ifremer.wao.entity.FishingGearDCF#1395788870097#0.6052098891633803],targetSpeciesDcfIds=[fr.ifremer.wao.entity.TargetSpeciesDCF#1395788870101#0.7788242816671336],samplingStrategies=<null>,terrestrialDistrictIds=<null>,companyIds=<null>,orderByArguments=<null>] is from fr.ifremer.wao.entity.SampleRow sr where (sr.obsProgramOrdinal = :obsProgramOrdinal) and (sr.periodEnd >= :periodFromMonth) and (sr.periodEnd <= :periodToMonth) and (sr.topiaId in (select sr2.topiaId from fr.ifremer.wao.entity.SampleRowImpl as sr2 join sr2.dCF5Code as dcf where dcf.fishingGearDCF.topiaId in (:fishingGearDcfIds))) and (sr.topiaId in (select sr2.topiaId from fr.ifremer.wao.entity.SampleRowImpl as sr2 join sr2.dCF5Code as dcf where dcf.targetSpeciesDCF.topiaId in (:targetSpeciesDcfIds))) {obsProgramOrdinal=0, periodFromMonth=Thu Apr 01 00:00:00 CEST 2010, periodToMonth=Tue Mar 01 00:00:00 CET 2011, fishingGearDcfIds=[fr.ifremer.wao.entity.FishingGearDCF#1395788870097#0.6052098891633803], targetSpeciesDcfIds=[fr.ifremer.wao.entity.TargetSpeciesDCF#1395788870101#0.7788242816671336]}
2014/03/26 12:08:03 TRACE (SampleRowTopiaDao.java:149) toSampleRowHqlAndParametersBuilder query to filter sample rows for fr.ifremer.wao.SampleRowsFilter@51182c3c[obsProgram=OBSMER,sampleRowIds=[fr.ifremer.wao.entity.SampleRow#1395788883206#0.14314465804642373],periodFrom=Thu Apr 01 00:00:00 CEST 2010,periodTo=Tue Mar 01 00:00:00 CET 2011,fishingZoneFacadeNames=<null>,fishingZoneSectorNames=<null>,sampleRowCodes=<null>,programNames=<null>,fishingGearDcfIds=[fr.ifremer.wao.entity.FishingGearDCF#1395788870097#0.6052098891633803],targetSpeciesDcfIds=[fr.ifremer.wao.entity.TargetSpeciesDCF#1395788870101#0.7788242816671336],samplingStrategies=<null>,terrestrialDistrictIds=<null>,companyIds=<null>,orderByArguments=<null>] is from fr.ifremer.wao.entity.SampleRow sr where (sr.obsProgramOrdinal = :obsProgramOrdinal) and (sr.topiaId = :topiaId) and (sr.periodEnd >= :periodFromMonth) and (sr.periodEnd <= :periodToMonth) and (sr.topiaId in (select sr2.topiaId from fr.ifremer.wao.entity.SampleRowImpl as sr2 join sr2.dCF5Code as dcf where dcf.fishingGearDCF.topiaId in (:fishingGearDcfIds))) and (sr.topiaId in (select sr2.topiaId from fr.ifremer.wao.entity.SampleRowImpl as sr2 join sr2.dCF5Code as dcf where dcf.targetSpeciesDCF.topiaId in (:targetSpeciesDcfIds))) {obsProgramOrdinal=0, topiaId=fr.ifremer.wao.entity.SampleRow#1395788883206#0.14314465804642373, periodFromMonth=Thu Apr 01 00:00:00 CEST 2010, periodToMonth=Tue Mar 01 00:00:00 CET 2011, fishingGearDcfIds=[fr.ifremer.wao.entity.FishingGearDCF#1395788870097#0.6052098891633803], targetSpeciesDcfIds=[fr.ifremer.wao.entity.TargetSpeciesDCF#1395788870101#0.7788242816671336]}
2014/03/26 12:08:03 TRACE (ContactTopiaDao.java:157) toSampleRowHqlAndParametersBuilder query to filter contacts for fr.ifremer.wao.ContactsFilter@4b427d62[sampleRowFilter=fr.ifremer.wao.SampleRowsFilter@51182c3c[obsProgram=OBSMER,sampleRowIds=[fr.ifremer.wao.entity.SampleRow#1395788883206#0.14314465804642373],periodFrom=Thu Apr 01 00:00:00 CEST 2010,periodTo=Tue Mar 01 00:00:00 CET 2011,fishingZoneFacadeNames=<null>,fishingZoneSectorNames=<null>,sampleRowCodes=<null>,programNames=<null>,fishingGearDcfIds=[fr.ifremer.wao.entity.FishingGearDCF#1395788870097#0.6052098891633803],targetSpeciesDcfIds=[fr.ifremer.wao.entity.TargetSpeciesDCF#1395788870101#0.7788242816671336],samplingStrategies=<null>,terrestrialDistrictIds=<null>,companyIds=<null>,orderByArguments=<null>],periodFrom=Thu Apr 01 00:00:00 CEST 2010,periodTo=Tue Mar 01 00:00:00 CET 2011,contactIds=<null>,contactStates=[OBSERVATION_DONE],dataReliabilities=<null>,actualSamplingStrategies=<null>,observationTypes=<null>,observedDataControls=<null>,observerIds=<null>,terrestrialLocationIds=<null>,contactStateMotiveIds=<null>,mammalsCaptureOnly=false,mammalsObservationOnly=false,commentDefinedOnly=false,commentAdminDefinedOnly=false,commentCompanyDefinedOnly=false,companyAcceptations=[null, true],programAcceptations=[null, true],completeSamplings=<null>,filterOnObservationBeginDate=true,sortedByBoardingDate=false] is from fr.ifremer.wao.entity.Contact c where (c.sampleRow.topiaId in (select sr.topiaId from fr.ifremer.wao.entity.SampleRow sr where (sr.obsProgramOrdinal = :obsProgramOrdinal) and (sr.topiaId = :topiaId) and (sr.periodEnd >= :periodFromMonth) and (sr.periodEnd <= :periodToMonth) and (sr.topiaId in (select sr2.topiaId from fr.ifremer.wao.entity.SampleRowImpl as sr2 join sr2.dCF5Code as dcf where dcf.fishingGearDCF.topiaId in (:fishingGearDcfIds))) and (sr.topiaId in (select sr2.topiaId from fr.ifremer.wao.entity.SampleRowImpl as sr2 join sr2.dCF5Code as dcf where dcf.targetSpeciesDCF.topiaId in (:targetSpeciesDcfIds))))) and (c.observationBeginDate >= :periodFrom) and (c.observationBeginDate <= :periodTo) and (c.state = :state) and ( c.validationCompany in ( :validationCompany ) or c.validationCompany is null) and ( c.validationProgram in ( :validationProgram ) or c.validationProgram is null) {obsProgramOrdinal=0, topiaId=fr.ifremer.wao.entity.SampleRow#1395788883206#0.14314465804642373, periodFromMonth=Thu Apr 01 00:00:00 CEST 2010, periodToMonth=Tue Mar 01 00:00:00 CET 2011, fishingGearDcfIds=[fr.ifremer.wao.entity.FishingGearDCF#1395788870097#0.6052098891633803], targetSpeciesDcfIds=[fr.ifremer.wao.entity.TargetSpeciesDCF#1395788870101#0.7788242816671336], periodFrom=Thu Apr 01 00:00:00 CEST 2010, periodTo=Tue Mar 01 00:00:00 CET 2011, state=2, validationCompany=[null, true], validationProgram=[null, true]}
2014/03/26 12:08:03 TRACE (AbstractWaoServiceTest.java:217) tearDown closing transaction fr.ifremer.wao.WaoTopiaPersistenceContext@7a282d91
2014/03/26 12:08:03 TRACE (AbstractWaoServiceTest.java:217) tearDown closing transaction fr.ifremer.wao.WaoTopiaPersistenceContext@59a0787c
2014/03/26 12:08:03 TRACE (AbstractWaoServiceTest.java:227) tearDown closing transaction fr.ifremer.wao.WaoTopiaApplicationContext@578237f6
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.413 sec - in fr.ifremer.wao.services.service.ObsMerSamplingPlanServiceTest
Running fr.ifremer.wao.services.service.csv.ObsMerObsVenteSamplingPlanImportExportModelTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.111 sec - in fr.ifremer.wao.services.service.csv.ObsMerObsVenteSamplingPlanImportExportModelTest
Running fr.ifremer.wao.services.service.mail.EmailServiceTest
2014/03/26 12:08:03 TRACE (AbstractWaoServiceTest.java:83) newApplicationContext will store H2 data in <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-services/ws/…>
2014/03/26 12:08:03 TRACE (AbstractWaoServiceTest.java:84) newApplicationContext allJpaParameters = {hibernate.c3p0.max_statements=50, hibernate.c3p0.max_size=20, hibernate.c3p0.timeout=1800, hibernate.c3p0.min_size=5, hibernate.connection.url=jdbc:h2:<http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-services/ws/…,> hibernate.connection.driver_class=org.h2.Driver, hibernate.format_sql=true, hibernate.connection.username=sa, hibernate.connection.password=, hibernate.hbm2ddl.auto=update, hibernate.dialect=org.hibernate.dialect.H2Dialect, hibernate.show_sql=false, topia.persistence.topiaIdFactoryClassName=org.nuiton.topia.persistence.internal.LegacyTopiaIdFactory, hibernate.ejb.naming_strategy=org.hibernate.cfg.ImprovedNamingStrategy}
2014/03/26 12:08:03 DEBUG (AbstractWaoServiceTest.java:88) newApplicationContext jdbc url is
jdbc:h2:<http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-services/ws/…>
2014/03/26 12:08:03 TRACE (AbstractWaoServiceTest.java:94) newApplicationContext created root context fr.ifremer.wao.WaoTopiaApplicationContext@58a89372
2014/03/26 12:08:04 TRACE (AbstractWaoServiceTest.java:202) newPersistenceContext opened transaction fr.ifremer.wao.WaoTopiaPersistenceContext@631dd1b0
2014/03/26 12:08:04 TRACE (AbstractWaoServiceTest.java:217) tearDown closing transaction fr.ifremer.wao.WaoTopiaPersistenceContext@631dd1b0
2014/03/26 12:08:04 TRACE (AbstractWaoServiceTest.java:227) tearDown closing transaction fr.ifremer.wao.WaoTopiaApplicationContext@58a89372
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.449 sec - in fr.ifremer.wao.services.service.mail.EmailServiceTest
Running fr.ifremer.wao.services.service.administration.WaoUsersServiceTest
2014/03/26 12:08:04 TRACE (AbstractWaoServiceTest.java:83) newApplicationContext will store H2 data in <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-services/ws/…>
2014/03/26 12:08:04 TRACE (AbstractWaoServiceTest.java:84) newApplicationContext allJpaParameters = {hibernate.c3p0.max_statements=50, hibernate.c3p0.max_size=20, hibernate.c3p0.timeout=1800, hibernate.c3p0.min_size=5, hibernate.connection.url=jdbc:h2:<http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-services/ws/…,> hibernate.connection.driver_class=org.h2.Driver, hibernate.format_sql=true, hibernate.connection.username=sa, hibernate.connection.password=, hibernate.hbm2ddl.auto=update, hibernate.dialect=org.hibernate.dialect.H2Dialect, hibernate.show_sql=false, topia.persistence.topiaIdFactoryClassName=org.nuiton.topia.persistence.internal.LegacyTopiaIdFactory, hibernate.ejb.naming_strategy=org.hibernate.cfg.ImprovedNamingStrategy}
2014/03/26 12:08:04 DEBUG (AbstractWaoServiceTest.java:88) newApplicationContext jdbc url is
jdbc:h2:<http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-services/ws/…>
2014/03/26 12:08:04 TRACE (AbstractWaoServiceTest.java:94) newApplicationContext created root context fr.ifremer.wao.WaoTopiaApplicationContext@2f53db06
2014/03/26 12:08:04 TRACE (AbstractWaoServiceTest.java:202) newPersistenceContext opened transaction fr.ifremer.wao.WaoTopiaPersistenceContext@238661f8
2014/03/26 12:08:04 DEBUG (WaoUsersServiceTest.java:47) testNewPassword awHTVgLD
2014/03/26 12:08:04 DEBUG (WaoUsersServiceTest.java:48) testNewPassword F5qFwXRS
2014/03/26 12:08:04 DEBUG (WaoUsersServiceTest.java:49) testNewPassword 7P4mEbGf
2014/03/26 12:08:04 TRACE (AbstractWaoServiceTest.java:217) tearDown closing transaction fr.ifremer.wao.WaoTopiaPersistenceContext@238661f8
2014/03/26 12:08:04 TRACE (AbstractWaoServiceTest.java:227) tearDown closing transaction fr.ifremer.wao.WaoTopiaApplicationContext@2f53db06
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.386 sec - in fr.ifremer.wao.services.service.administration.WaoUsersServiceTest
Running fr.ifremer.wao.services.service.administration.ReferentialServiceTest
2014/03/26 12:08:04 TRACE (AbstractWaoServiceTest.java:83) newApplicationContext will store H2 data in <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-services/ws/…>
2014/03/26 12:08:04 TRACE (AbstractWaoServiceTest.java:84) newApplicationContext allJpaParameters = {hibernate.c3p0.max_statements=50, hibernate.c3p0.max_size=20, hibernate.c3p0.timeout=1800, hibernate.c3p0.min_size=5, hibernate.connection.url=jdbc:h2:<http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-services/ws/…,> hibernate.connection.driver_class=org.h2.Driver, hibernate.format_sql=true, hibernate.connection.username=sa, hibernate.connection.password=, hibernate.hbm2ddl.auto=update, hibernate.dialect=org.hibernate.dialect.H2Dialect, hibernate.show_sql=false, topia.persistence.topiaIdFactoryClassName=org.nuiton.topia.persistence.internal.LegacyTopiaIdFactory, hibernate.ejb.naming_strategy=org.hibernate.cfg.ImprovedNamingStrategy}
2014/03/26 12:08:04 DEBUG (AbstractWaoServiceTest.java:88) newApplicationContext jdbc url is
jdbc:h2:<http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-services/ws/…>
2014/03/26 12:08:04 TRACE (AbstractWaoServiceTest.java:94) newApplicationContext created root context fr.ifremer.wao.WaoTopiaApplicationContext@6a9f8e49
2014/03/26 12:08:04 TRACE (AbstractWaoServiceTest.java:202) newPersistenceContext opened transaction fr.ifremer.wao.WaoTopiaPersistenceContext@3b6823d8
2014/03/26 12:08:06 INFO (ReferentialService.java:375) importTerrestrialLocations 1248 terrestrial locations added, 0 updated
2014/03/26 12:08:06 INFO (ReferentialService.java:376) importTerrestrialLocations 50 terrestrial district added, 0 updated
2014/03/26 12:08:06 INFO (ReferentialService.java:377) importTerrestrialLocations 18 terrestrial region added, 28 updated
2014/03/26 12:08:06 TRACE (FakeWaoServiceContext.java:50) getNow injecting fake date in service: Mon Nov 02 00:00:00 CET 2009
2014/03/26 12:08:08 TRACE (FakeWaoServiceContext.java:50) getNow injecting fake date in service: Mon Nov 02 00:00:00 CET 2009
2014/03/26 12:08:08 TRACE (AbstractWaoServiceTest.java:217) tearDown closing transaction fr.ifremer.wao.WaoTopiaPersistenceContext@3b6823d8
2014/03/26 12:08:08 TRACE (AbstractWaoServiceTest.java:227) tearDown closing transaction fr.ifremer.wao.WaoTopiaApplicationContext@6a9f8e49
2014/03/26 12:08:08 TRACE (AbstractWaoServiceTest.java:83) newApplicationContext will store H2 data in <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-services/ws/…>
2014/03/26 12:08:08 TRACE (AbstractWaoServiceTest.java:84) newApplicationContext allJpaParameters = {hibernate.c3p0.max_statements=50, hibernate.c3p0.max_size=20, hibernate.c3p0.timeout=1800, hibernate.c3p0.min_size=5, hibernate.connection.url=jdbc:h2:<http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-services/ws/…,> hibernate.connection.driver_class=org.h2.Driver, hibernate.format_sql=true, hibernate.connection.username=sa, hibernate.connection.password=, hibernate.hbm2ddl.auto=update, hibernate.dialect=org.hibernate.dialect.H2Dialect, hibernate.show_sql=false, topia.persistence.topiaIdFactoryClassName=org.nuiton.topia.persistence.internal.LegacyTopiaIdFactory, hibernate.ejb.naming_strategy=org.hibernate.cfg.ImprovedNamingStrategy}
2014/03/26 12:08:08 DEBUG (AbstractWaoServiceTest.java:88) newApplicationContext jdbc url is
jdbc:h2:<http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-services/ws/…>
2014/03/26 12:08:08 TRACE (AbstractWaoServiceTest.java:94) newApplicationContext created root context fr.ifremer.wao.WaoTopiaApplicationContext@30405c1d
2014/03/26 12:08:08 TRACE (AbstractWaoServiceTest.java:202) newPersistenceContext opened transaction fr.ifremer.wao.WaoTopiaPersistenceContext@2cf10cfc
2014/03/26 12:08:10 INFO (ReferentialService.java:375) importTerrestrialLocations 1248 terrestrial locations added, 0 updated
2014/03/26 12:08:10 INFO (ReferentialService.java:376) importTerrestrialLocations 50 terrestrial district added, 0 updated
2014/03/26 12:08:10 INFO (ReferentialService.java:377) importTerrestrialLocations 18 terrestrial region added, 28 updated
2014/03/26 12:08:10 TRACE (FakeWaoServiceContext.java:50) getNow injecting fake date in service: Mon Nov 02 00:00:00 CET 2009
2014/03/26 12:08:10 TRACE (FakeWaoServiceContext.java:50) getNow injecting fake date in service: Mon Nov 02 00:00:00 CET 2009
2014/03/26 12:08:10 TRACE (FakeWaoServiceContext.java:50) getNow injecting fake date in service: Mon Nov 02 00:00:00 CET 2009
2014/03/26 12:08:10 TRACE (AbstractWaoServiceTest.java:217) tearDown closing transaction fr.ifremer.wao.WaoTopiaPersistenceContext@2cf10cfc
2014/03/26 12:08:10 TRACE (AbstractWaoServiceTest.java:227) tearDown closing transaction fr.ifremer.wao.WaoTopiaApplicationContext@30405c1d
2014/03/26 12:08:10 TRACE (AbstractWaoServiceTest.java:83) newApplicationContext will store H2 data in <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-services/ws/…>
2014/03/26 12:08:10 TRACE (AbstractWaoServiceTest.java:84) newApplicationContext allJpaParameters = {hibernate.c3p0.max_statements=50, hibernate.c3p0.max_size=20, hibernate.c3p0.timeout=1800, hibernate.c3p0.min_size=5, hibernate.connection.url=jdbc:h2:<http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-services/ws/…,> hibernate.connection.driver_class=org.h2.Driver, hibernate.format_sql=true, hibernate.connection.username=sa, hibernate.connection.password=, hibernate.hbm2ddl.auto=update, hibernate.dialect=org.hibernate.dialect.H2Dialect, hibernate.show_sql=false, topia.persistence.topiaIdFactoryClassName=org.nuiton.topia.persistence.internal.LegacyTopiaIdFactory, hibernate.ejb.naming_strategy=org.hibernate.cfg.ImprovedNamingStrategy}
2014/03/26 12:08:10 DEBUG (AbstractWaoServiceTest.java:88) newApplicationContext jdbc url is
jdbc:h2:<http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-services/ws/…>
2014/03/26 12:08:10 TRACE (AbstractWaoServiceTest.java:94) newApplicationContext created root context fr.ifremer.wao.WaoTopiaApplicationContext@438a9b77
2014/03/26 12:08:10 TRACE (AbstractWaoServiceTest.java:202) newPersistenceContext opened transaction fr.ifremer.wao.WaoTopiaPersistenceContext@288757f1
2014/03/26 12:08:10 INFO (ReferentialService.java:673) initialDCF5CodesImport no DCF in database, mass import
2014/03/26 12:08:10 INFO (ReferentialService.java:741) initialDCF5CodesImport 53 dcf codes in database
2014/03/26 12:08:10 TRACE (AbstractWaoServiceTest.java:217) tearDown closing transaction fr.ifremer.wao.WaoTopiaPersistenceContext@288757f1
2014/03/26 12:08:10 TRACE (AbstractWaoServiceTest.java:227) tearDown closing transaction fr.ifremer.wao.WaoTopiaApplicationContext@438a9b77
2014/03/26 12:08:10 TRACE (AbstractWaoServiceTest.java:83) newApplicationContext will store H2 data in <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-services/ws/…>
2014/03/26 12:08:10 TRACE (AbstractWaoServiceTest.java:84) newApplicationContext allJpaParameters = {hibernate.c3p0.max_statements=50, hibernate.c3p0.max_size=20, hibernate.c3p0.timeout=1800, hibernate.c3p0.min_size=5, hibernate.connection.url=jdbc:h2:<http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-services/ws/…,> hibernate.connection.driver_class=org.h2.Driver, hibernate.format_sql=true, hibernate.connection.username=sa, hibernate.connection.password=, hibernate.hbm2ddl.auto=update, hibernate.dialect=org.hibernate.dialect.H2Dialect, hibernate.show_sql=false, topia.persistence.topiaIdFactoryClassName=org.nuiton.topia.persistence.internal.LegacyTopiaIdFactory, hibernate.ejb.naming_strategy=org.hibernate.cfg.ImprovedNamingStrategy}
2014/03/26 12:08:10 DEBUG (AbstractWaoServiceTest.java:88) newApplicationContext jdbc url is
jdbc:h2:<http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-services/ws/…>
2014/03/26 12:08:10 TRACE (AbstractWaoServiceTest.java:94) newApplicationContext created root context fr.ifremer.wao.WaoTopiaApplicationContext@71c219ef
2014/03/26 12:08:11 TRACE (AbstractWaoServiceTest.java:202) newPersistenceContext opened transaction fr.ifremer.wao.WaoTopiaPersistenceContext@fbf4ae7
2014/03/26 12:08:12 INFO (ReferentialService.java:375) importTerrestrialLocations 1248 terrestrial locations added, 0 updated
2014/03/26 12:08:12 INFO (ReferentialService.java:376) importTerrestrialLocations 50 terrestrial district added, 0 updated
2014/03/26 12:08:12 INFO (ReferentialService.java:377) importTerrestrialLocations 18 terrestrial region added, 28 updated
2014/03/26 12:08:12 TRACE (FakeWaoServiceContext.java:50) getNow injecting fake date in service: Mon Nov 02 00:00:00 CET 2009
2014/03/26 12:08:12 DEBUG (ReferentialService.java:490) importTerrestrialDivisions 1181 ports, 18 regions
2014/03/26 12:08:14 DEBUG (ReferentialService.java:544) importTerrestrialDivisions 649 terrestrial divisions in database
2014/03/26 12:08:14 TRACE (FakeWaoServiceContext.java:50) getNow injecting fake date in service: Mon Nov 02 00:00:00 CET 2009
2014/03/26 12:08:14 TRACE (AbstractWaoServiceTest.java:217) tearDown closing transaction fr.ifremer.wao.WaoTopiaPersistenceContext@fbf4ae7
2014/03/26 12:08:14 TRACE (AbstractWaoServiceTest.java:227) tearDown closing transaction fr.ifremer.wao.WaoTopiaApplicationContext@71c219ef
2014/03/26 12:08:14 TRACE (AbstractWaoServiceTest.java:83) newApplicationContext will store H2 data in <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-services/ws/…>
2014/03/26 12:08:14 TRACE (AbstractWaoServiceTest.java:84) newApplicationContext allJpaParameters = {hibernate.c3p0.max_statements=50, hibernate.c3p0.max_size=20, hibernate.c3p0.timeout=1800, hibernate.c3p0.min_size=5, hibernate.connection.url=jdbc:h2:<http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-services/ws/…,> hibernate.connection.driver_class=org.h2.Driver, hibernate.format_sql=true, hibernate.connection.username=sa, hibernate.connection.password=, hibernate.hbm2ddl.auto=update, hibernate.dialect=org.hibernate.dialect.H2Dialect, hibernate.show_sql=false, topia.persistence.topiaIdFactoryClassName=org.nuiton.topia.persistence.internal.LegacyTopiaIdFactory, hibernate.ejb.naming_strategy=org.hibernate.cfg.ImprovedNamingStrategy}
2014/03/26 12:08:14 DEBUG (AbstractWaoServiceTest.java:88) newApplicationContext jdbc url is
jdbc:h2:<http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-services/ws/…>
2014/03/26 12:08:14 TRACE (AbstractWaoServiceTest.java:94) newApplicationContext created root context fr.ifremer.wao.WaoTopiaApplicationContext@7dc99fa6
2014/03/26 12:08:14 TRACE (AbstractWaoServiceTest.java:202) newPersistenceContext opened transaction fr.ifremer.wao.WaoTopiaPersistenceContext@2a4d2b6f
2014/03/26 12:08:15 INFO (ReferentialService.java:375) importTerrestrialLocations 1248 terrestrial locations added, 0 updated
2014/03/26 12:08:15 INFO (ReferentialService.java:376) importTerrestrialLocations 50 terrestrial district added, 0 updated
2014/03/26 12:08:15 INFO (ReferentialService.java:377) importTerrestrialLocations 18 terrestrial region added, 28 updated
2014/03/26 12:08:15 TRACE (FakeWaoServiceContext.java:50) getNow injecting fake date in service: Mon Nov 02 00:00:00 CET 2009
2014/03/26 12:08:15 TRACE (FakeWaoServiceContext.java:50) getNow injecting fake date in service: Mon Nov 02 00:00:00 CET 2009
2014/03/26 12:08:15 TRACE (AbstractWaoServiceTest.java:217) tearDown closing transaction fr.ifremer.wao.WaoTopiaPersistenceContext@2a4d2b6f
2014/03/26 12:08:15 TRACE (AbstractWaoServiceTest.java:227) tearDown closing transaction fr.ifremer.wao.WaoTopiaApplicationContext@7dc99fa6
2014/03/26 12:08:15 TRACE (AbstractWaoServiceTest.java:83) newApplicationContext will store H2 data in <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-services/ws/…>
2014/03/26 12:08:15 TRACE (AbstractWaoServiceTest.java:84) newApplicationContext allJpaParameters = {hibernate.c3p0.max_statements=50, hibernate.c3p0.max_size=20, hibernate.c3p0.timeout=1800, hibernate.c3p0.min_size=5, hibernate.connection.url=jdbc:h2:<http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-services/ws/…,> hibernate.connection.driver_class=org.h2.Driver, hibernate.format_sql=true, hibernate.connection.username=sa, hibernate.connection.password=, hibernate.hbm2ddl.auto=update, hibernate.dialect=org.hibernate.dialect.H2Dialect, hibernate.show_sql=false, topia.persistence.topiaIdFactoryClassName=org.nuiton.topia.persistence.internal.LegacyTopiaIdFactory, hibernate.ejb.naming_strategy=org.hibernate.cfg.ImprovedNamingStrategy}
2014/03/26 12:08:15 DEBUG (AbstractWaoServiceTest.java:88) newApplicationContext jdbc url is
jdbc:h2:<http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-services/ws/…>
2014/03/26 12:08:16 TRACE (AbstractWaoServiceTest.java:94) newApplicationContext created root context fr.ifremer.wao.WaoTopiaApplicationContext@351929aa
2014/03/26 12:08:16 TRACE (AbstractWaoServiceTest.java:202) newPersistenceContext opened transaction fr.ifremer.wao.WaoTopiaPersistenceContext@5dfddf46
2014/03/26 12:08:17 INFO (ReferentialService.java:375) importTerrestrialLocations 1248 terrestrial locations added, 0 updated
2014/03/26 12:08:17 INFO (ReferentialService.java:376) importTerrestrialLocations 50 terrestrial district added, 0 updated
2014/03/26 12:08:17 INFO (ReferentialService.java:377) importTerrestrialLocations 18 terrestrial region added, 28 updated
2014/03/26 12:08:17 TRACE (FakeWaoServiceContext.java:50) getNow injecting fake date in service: Mon Nov 02 00:00:00 CET 2009
2014/03/26 12:08:17 TRACE (AbstractWaoServiceTest.java:217) tearDown closing transaction fr.ifremer.wao.WaoTopiaPersistenceContext@5dfddf46
2014/03/26 12:08:17 TRACE (AbstractWaoServiceTest.java:227) tearDown closing transaction fr.ifremer.wao.WaoTopiaApplicationContext@351929aa
2014/03/26 12:08:17 TRACE (AbstractWaoServiceTest.java:83) newApplicationContext will store H2 data in <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-services/ws/…>
2014/03/26 12:08:17 TRACE (AbstractWaoServiceTest.java:84) newApplicationContext allJpaParameters = {hibernate.c3p0.max_statements=50, hibernate.c3p0.max_size=20, hibernate.c3p0.timeout=1800, hibernate.c3p0.min_size=5, hibernate.connection.url=jdbc:h2:<http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-services/ws/…,> hibernate.connection.driver_class=org.h2.Driver, hibernate.format_sql=true, hibernate.connection.username=sa, hibernate.connection.password=, hibernate.hbm2ddl.auto=update, hibernate.dialect=org.hibernate.dialect.H2Dialect, hibernate.show_sql=false, topia.persistence.topiaIdFactoryClassName=org.nuiton.topia.persistence.internal.LegacyTopiaIdFactory, hibernate.ejb.naming_strategy=org.hibernate.cfg.ImprovedNamingStrategy}
2014/03/26 12:08:17 DEBUG (AbstractWaoServiceTest.java:88) newApplicationContext jdbc url is
jdbc:h2:<http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-services/ws/…>
2014/03/26 12:08:17 TRACE (AbstractWaoServiceTest.java:94) newApplicationContext created root context fr.ifremer.wao.WaoTopiaApplicationContext@232cde6e
2014/03/26 12:08:18 TRACE (AbstractWaoServiceTest.java:202) newPersistenceContext opened transaction fr.ifremer.wao.WaoTopiaPersistenceContext@4b1b4dfa
2014/03/26 12:08:18 TRACE (FakeWaoServiceContext.java:50) getNow injecting fake date in service: Mon Nov 02 00:00:00 CET 2009
2014/03/26 12:08:18 TRACE (AbstractWaoServiceTest.java:217) tearDown closing transaction fr.ifremer.wao.WaoTopiaPersistenceContext@4b1b4dfa
2014/03/26 12:08:18 TRACE (AbstractWaoServiceTest.java:227) tearDown closing transaction fr.ifremer.wao.WaoTopiaApplicationContext@232cde6e
2014/03/26 12:08:18 TRACE (AbstractWaoServiceTest.java:83) newApplicationContext will store H2 data in <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-services/ws/…>
2014/03/26 12:08:18 TRACE (AbstractWaoServiceTest.java:84) newApplicationContext allJpaParameters = {hibernate.c3p0.max_statements=50, hibernate.c3p0.max_size=20, hibernate.c3p0.timeout=1800, hibernate.c3p0.min_size=5, hibernate.connection.url=jdbc:h2:<http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-services/ws/…,> hibernate.connection.driver_class=org.h2.Driver, hibernate.format_sql=true, hibernate.connection.username=sa, hibernate.connection.password=, hibernate.hbm2ddl.auto=update, hibernate.dialect=org.hibernate.dialect.H2Dialect, hibernate.show_sql=false, topia.persistence.topiaIdFactoryClassName=org.nuiton.topia.persistence.internal.LegacyTopiaIdFactory, hibernate.ejb.naming_strategy=org.hibernate.cfg.ImprovedNamingStrategy}
2014/03/26 12:08:18 DEBUG (AbstractWaoServiceTest.java:88) newApplicationContext jdbc url is
jdbc:h2:<http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-services/ws/…>
2014/03/26 12:08:18 TRACE (AbstractWaoServiceTest.java:94) newApplicationContext created root context fr.ifremer.wao.WaoTopiaApplicationContext@2ced9f7a
2014/03/26 12:08:18 TRACE (AbstractWaoServiceTest.java:202) newPersistenceContext opened transaction fr.ifremer.wao.WaoTopiaPersistenceContext@3302167f
2014/03/26 12:08:19 INFO (ReferentialService.java:375) importTerrestrialLocations 1248 terrestrial locations added, 0 updated
2014/03/26 12:08:19 INFO (ReferentialService.java:376) importTerrestrialLocations 50 terrestrial district added, 0 updated
2014/03/26 12:08:19 INFO (ReferentialService.java:377) importTerrestrialLocations 18 terrestrial region added, 28 updated
2014/03/26 12:08:19 TRACE (FakeWaoServiceContext.java:50) getNow injecting fake date in service: Mon Nov 02 00:00:00 CET 2009
2014/03/26 12:08:19 TRACE (FakeWaoServiceContext.java:50) getNow injecting fake date in service: Mon Nov 02 00:00:00 CET 2009
2014/03/26 12:08:19 TRACE (AbstractWaoServiceTest.java:217) tearDown closing transaction fr.ifremer.wao.WaoTopiaPersistenceContext@3302167f
2014/03/26 12:08:19 TRACE (AbstractWaoServiceTest.java:227) tearDown closing transaction fr.ifremer.wao.WaoTopiaApplicationContext@2ced9f7a
2014/03/26 12:08:19 TRACE (AbstractWaoServiceTest.java:83) newApplicationContext will store H2 data in <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-services/ws/…>
2014/03/26 12:08:19 TRACE (AbstractWaoServiceTest.java:84) newApplicationContext allJpaParameters = {hibernate.c3p0.max_statements=50, hibernate.c3p0.max_size=20, hibernate.c3p0.timeout=1800, hibernate.c3p0.min_size=5, hibernate.connection.url=jdbc:h2:<http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-services/ws/…,> hibernate.connection.driver_class=org.h2.Driver, hibernate.format_sql=true, hibernate.connection.username=sa, hibernate.connection.password=, hibernate.hbm2ddl.auto=update, hibernate.dialect=org.hibernate.dialect.H2Dialect, hibernate.show_sql=false, topia.persistence.topiaIdFactoryClassName=org.nuiton.topia.persistence.internal.LegacyTopiaIdFactory, hibernate.ejb.naming_strategy=org.hibernate.cfg.ImprovedNamingStrategy}
2014/03/26 12:08:19 DEBUG (AbstractWaoServiceTest.java:88) newApplicationContext jdbc url is
jdbc:h2:<http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-services/ws/…>
2014/03/26 12:08:19 TRACE (AbstractWaoServiceTest.java:94) newApplicationContext created root context fr.ifremer.wao.WaoTopiaApplicationContext@1f382373
2014/03/26 12:08:20 TRACE (AbstractWaoServiceTest.java:202) newPersistenceContext opened transaction fr.ifremer.wao.WaoTopiaPersistenceContext@1b375ce6
2014/03/26 12:08:21 INFO (ReferentialService.java:375) importTerrestrialLocations 1248 terrestrial locations added, 0 updated
2014/03/26 12:08:21 INFO (ReferentialService.java:376) importTerrestrialLocations 50 terrestrial district added, 0 updated
2014/03/26 12:08:21 INFO (ReferentialService.java:377) importTerrestrialLocations 18 terrestrial region added, 28 updated
2014/03/26 12:08:21 TRACE (FakeWaoServiceContext.java:50) getNow injecting fake date in service: Mon Nov 02 00:00:00 CET 2009
2014/03/26 12:08:21 TRACE (FakeWaoServiceContext.java:50) getNow injecting fake date in service: Mon Nov 02 00:00:00 CET 2009
2014/03/26 12:08:21 TRACE (AbstractWaoServiceTest.java:217) tearDown closing transaction fr.ifremer.wao.WaoTopiaPersistenceContext@1b375ce6
2014/03/26 12:08:21 TRACE (AbstractWaoServiceTest.java:227) tearDown closing transaction fr.ifremer.wao.WaoTopiaApplicationContext@1f382373
Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 16.939 sec - in fr.ifremer.wao.services.service.administration.ReferentialServiceTest
Running fr.ifremer.wao.services.service.InitWaoServiceTest
2014/03/26 12:08:21 TRACE (AbstractWaoServiceTest.java:83) newApplicationContext will store H2 data in <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-services/ws/…>
2014/03/26 12:08:21 TRACE (AbstractWaoServiceTest.java:84) newApplicationContext allJpaParameters = {hibernate.c3p0.max_statements=50, hibernate.c3p0.max_size=20, hibernate.c3p0.timeout=1800, hibernate.c3p0.min_size=5, hibernate.connection.url=jdbc:h2:<http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-services/ws/…,> hibernate.connection.driver_class=org.h2.Driver, hibernate.format_sql=true, hibernate.connection.username=sa, hibernate.connection.password=, hibernate.hbm2ddl.auto=update, hibernate.dialect=org.hibernate.dialect.H2Dialect, hibernate.show_sql=false, topia.persistence.topiaIdFactoryClassName=org.nuiton.topia.persistence.internal.LegacyTopiaIdFactory, hibernate.ejb.naming_strategy=org.hibernate.cfg.ImprovedNamingStrategy}
2014/03/26 12:08:21 DEBUG (AbstractWaoServiceTest.java:88) newApplicationContext jdbc url is
jdbc:h2:<http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-services/ws/…>
2014/03/26 12:08:21 TRACE (AbstractWaoServiceTest.java:94) newApplicationContext created root context fr.ifremer.wao.WaoTopiaApplicationContext@5b458bbc
2014/03/26 12:08:21 TRACE (AbstractWaoServiceTest.java:202) newPersistenceContext opened transaction fr.ifremer.wao.WaoTopiaPersistenceContext@279a0176
2014/03/26 12:08:21 TRACE (AbstractWaoServiceTest.java:217) tearDown closing transaction fr.ifremer.wao.WaoTopiaPersistenceContext@279a0176
2014/03/26 12:08:21 TRACE (AbstractWaoServiceTest.java:227) tearDown closing transaction fr.ifremer.wao.WaoTopiaApplicationContext@5b458bbc
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.294 sec - in fr.ifremer.wao.services.service.InitWaoServiceTest
Results :
Tests run: 17, Failures: 0, Errors: 0, Skipped: 0
[JENKINS] Recording test results
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ wao-services ---
[INFO] Building jar: <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-services/ws/…>
[INFO]
[INFO] >>> maven-source-plugin:2.2.1:jar (attach-sources) @ wao-services >>>
[INFO]
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (ensure-no-container-api) @ wao-services ---
[INFO]
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (check-project-files) @ wao-services ---
[INFO]
[INFO] --- helper-maven-plugin:2.1:share-server-secret (get-redmine-login) @ wao-services ---
[INFO] Skipping goal (runOnce flag is on and goal was already executed).
[WARNING] Failed to getClass for org.apache.maven.plugin.source.SourceJarMojo
[INFO]
[INFO] <<< maven-source-plugin:2.2.1:jar (attach-sources) @ wao-services <<<
[INFO]
[INFO] --- maven-source-plugin:2.2.1:jar (attach-sources) @ wao-services ---
[INFO] Building jar: <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-services/ws/…>
[INFO]
[INFO] --- maven-javadoc-plugin:2.9.1:jar (attach-javadocs) @ wao-services ---
[INFO]
1 warning
[WARNING] Javadoc Warnings
[WARNING] <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-services/ws/…>:572: warning - @returns is an unknown tag.
[INFO] Building jar: <http://ci.codelutin.com/jenkins/job/wao-nightly/fr.ifremer$wao-services/ws/…>
[INFO]
[INFO] --- maven-site-plugin:3.3:attach-descriptor (attach-descriptor) @ wao-services ---
[INFO]
[INFO] --- helper-maven-plugin:2.1:share-server-secret (get-pgp-passphrase) @ wao-services ---
[INFO] Exporting server [gpg-signer] username in ${gpg.keyname}
[INFO] Exporting server [gpg-signer] password in ${gpg.passphrase}
[INFO]
[INFO] --- helper-maven-plugin:2.1:collect-files (collect-build-artifacts) @ wao-services ---
[INFO] Loaded /var/local/forge/data/codelutin.com/jenkins/workspace/wao-nightly/trunk/target/collect-artifacts.txt
[INFO] Copying wao-services-4.0-SNAPSHOT.jar to /var/local/forge/data/codelutin.com/jenkins/workspace/wao-nightly/trunk/target/collect/fr.ifremer--wao-services/wao-services-4.0-SNAPSHOT.jar
[INFO] Copying THIRD-PARTY.properties to /var/local/forge/data/codelutin.com/jenkins/workspace/wao-nightly/trunk/target/collect/fr.ifremer--wao-services/THIRD-PARTY.properties
[INFO] Copying wao-services-4.0-SNAPSHOT-sources.jar to /var/local/forge/data/codelutin.com/jenkins/workspace/wao-nightly/trunk/target/collect/fr.ifremer--wao-services/wao-services-4.0-SNAPSHOT-sources.jar
[INFO] Copying wao-services-4.0-SNAPSHOT-javadoc.jar to /var/local/forge/data/codelutin.com/jenkins/workspace/wao-nightly/trunk/target/collect/fr.ifremer--wao-services/wao-services-4.0-SNAPSHOT-javadoc.jar
[INFO]
[INFO] --- helper-maven-plugin:2.1:collect-files (collect-build-attachements) @ wao-services ---
[WARNING] Skipping goal (No file to collect).
[INFO]
[INFO] --- maven-gpg-plugin:1.5:sign (sign-artifacts) @ wao-services ---
[INFO]
[INFO] --- maven-dependency-plugin:2.8:analyze-only (analyze) @ wao-services ---
[INFO] Used declared dependencies found:
[INFO] org.nuiton:nuiton-csv:jar:3.0-alpha-3:compile
[INFO] org.nuiton.i18n:nuiton-i18n:jar:3.0:compile
[INFO] org.nuiton:nuiton-utils:jar:3.0-SNAPSHOT:compile
[INFO] com.github.spullara.mustache.java:compiler:jar:0.8.13:compile
[INFO] org.apache.commons:commons-email:jar:1.3.2:compile
[INFO] com.h2database:h2:jar:1.3.175:test
[INFO] fr.ifremer:wao-persistence:jar:4.0-SNAPSHOT:compile
[INFO] org.nuiton.topia:topia-persistence:jar:3.0-SNAPSHOT:compile
[INFO] org.apache.commons:commons-lang3:jar:3.3:compile
[INFO] commons-logging:commons-logging:jar:1.1.3:compile
[INFO] com.google.guava:guava:jar:16.0.1:compile
[INFO] org.apache.commons:commons-collections4:jar:4.0:compile
[INFO] commons-io:commons-io:jar:2.4:compile
[INFO] org.apache.shiro:shiro-core:jar:1.2.2:compile
[INFO] junit:junit:jar:4.11:test
[INFO] org.apache.struts.xwork:xwork-core:jar:2.3.16.1:compile
[INFO] org.mockito:mockito-core:jar:1.9.5:test
[WARNING] Used undeclared dependencies found:
[WARNING] org.hibernate:hibernate-core:jar:4.2.8.Final:compile
[JENKINS] Archiving disabled
1
2
r1769 - in trunk/wao-web/src/main: resources/i18n webapp/WEB-INF/content/obsmer webapp/WEB-INF/decorators webapp/css
by bleny@users.forge.codelutin.com 27 Mar '14
by bleny@users.forge.codelutin.com 27 Mar '14
27 Mar '14
Author: bleny
Date: 2014-03-27 17:51:58 +0100 (Thu, 27 Mar 2014)
New Revision: 1769
Url: http://forge.codelutin.com/projects/wao/repository/revisions/1769
Log:
refs #4483 prepare compact/full view switch
Modified:
trunk/wao-web/src/main/resources/i18n/wao-web_en_GB.properties
trunk/wao-web/src/main/resources/i18n/wao-web_fr_FR.properties
trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/sampling-plan.jsp
trunk/wao-web/src/main/webapp/WEB-INF/decorators/layout.jsp
trunk/wao-web/src/main/webapp/css/wao.css
Modified: trunk/wao-web/src/main/resources/i18n/wao-web_en_GB.properties
===================================================================
--- trunk/wao-web/src/main/resources/i18n/wao-web_en_GB.properties 2014-03-27 16:23:08 UTC (rev 1768)
+++ trunk/wao-web/src/main/resources/i18n/wao-web_en_GB.properties 2014-03-27 16:51:58 UTC (rev 1769)
@@ -69,12 +69,16 @@
wao.ui.action.save.success=Modifications saved
wao.ui.action.showDetails=Show details
wao.ui.action.showFilters=Show filters
+wao.ui.action.switchToCompactView=Switch to compact view
+wao.ui.action.switchToFullView=Switch to full view
wao.ui.action.unvalidateContact=Unvalidate contact
wao.ui.action.viewAssociatedContacts=View sample row contacts
wao.ui.action.viewBoatsForRow=View the boats for this sample row
wao.ui.action.viewCompanyWaoUsers=View users for this company
wao.ui.action.viewElligibleBoats=View eligible boats
+wao.ui.action.viewEstimated=View estimated observation effort
wao.ui.action.viewIndicatorsHistory=View indicators historic
+wao.ui.action.viewReal=View real observation effort
wao.ui.action.viewSampleRowLog=View sample row log
wao.ui.actions=Actions
wao.ui.boatList=List of %s boats
Modified: trunk/wao-web/src/main/resources/i18n/wao-web_fr_FR.properties
===================================================================
--- trunk/wao-web/src/main/resources/i18n/wao-web_fr_FR.properties 2014-03-27 16:23:08 UTC (rev 1768)
+++ trunk/wao-web/src/main/resources/i18n/wao-web_fr_FR.properties 2014-03-27 16:51:58 UTC (rev 1769)
@@ -69,12 +69,16 @@
wao.ui.action.save.success=Les informations ont bien été enregistrées
wao.ui.action.showDetails=Voir les détails
wao.ui.action.showFilters=Afficher les filtres
+wao.ui.action.switchToCompactView=Réduire la vue
+wao.ui.action.switchToFullView=Étendre la vue
wao.ui.action.unvalidateContact=Invalider le contact
wao.ui.action.viewAssociatedContacts=Voir les contacts associés à cette ligne
wao.ui.action.viewBoatsForRow=Voir les navires présentis pour cette ligne
wao.ui.action.viewCompanyWaoUsers=Voir les utilisateurs associés à cette société
wao.ui.action.viewElligibleBoats=Consulter les navires éligibles
+wao.ui.action.viewEstimated=Voir l'effort d'observation estimé
wao.ui.action.viewIndicatorsHistory=Voir l'historique des modifications des indicateurs
+wao.ui.action.viewReal=Voir l'effort d'observation réalisé
wao.ui.action.viewSampleRowLog=Consulter l'historique de cette ligne
wao.ui.actions=Actions
wao.ui.boatList=Liste de %s navires
Modified: trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/sampling-plan.jsp
===================================================================
--- trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/sampling-plan.jsp 2014-03-27 16:23:08 UTC (rev 1768)
+++ trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/sampling-plan.jsp 2014-03-27 16:51:58 UTC (rev 1769)
@@ -37,12 +37,19 @@
var sampleRowsFilterController = new SampleRowsFilterController(SAMPLE_ROWS_FILTER_VALUES_JSON_URL, $('#sampling-plan-filters-form'));
sampleRowsFilterController.init();
+ var fullView = <s:property value="fullView" />;
+
$('#switch-estimated-real').click(function () {
$('#switch-estimated-real').toggleClass('show-estimated').toggleClass('show-real');
$('table.sampling-plan').toggleClass('show-estimated').toggleClass('show-real');
$('.estimated-differ-from-real').effect( "highlight", "slow" )
});
+ $('#switch-compact-full-view').click(function () {
+ $('#switch-compact-full-view').toggleClass('full-view').toggleClass('compact-view');
+ $('table.sampling-plan').toggleClass('full-view').toggleClass('compact-view');
+ });
+
});
</script>
@@ -151,11 +158,20 @@
</s:form>
+ <button type="button" id="switch-compact-full-view" class="btn <s:if test="fullView">full-view</s:if><s:else>compact-view</s:else>">
+ <span class="only-in-full-view">
+ <i class="icon-resize-small"></i> <s:text name="wao.ui.action.switchToFullView" />
+ </span>
+ <span class="only-in-compact-view">
+ <i class="icon-resize-full"></i> <s:text name="wao.ui.action.switchToCompactView" />
+ </span>
+ </button>
+
<s:if test="authenticatedWaoUser.authorizedToViewSamplingPlanReal">
<button type="button" id="switch-estimated-real" class="btn show-estimated">
- <i class="icon-eye"></i>
- <span class="estimated">Voir le réel</span>
- <span class="real">Voir l'estimé</span>
+ <i class="icon-adjust"></i>
+ <span class="estimated"><s:text name="wao.ui.action.viewReal" /></span>
+ <span class="real"><s:text name="wao.ui.action.viewEstimated" /></span>
</button>
</s:if>
@@ -175,7 +191,7 @@
<s:set var="nbColumnsForOther" value="6"/>
<s:set var="nbColumnsTotal" value="%{#nbColumnsForProfession + #nbColumnsForMonths + #nbColumnsForOther}"/>
- <table id="sampling-plan" class="large-table sampling-plan show-estimated">
+ <table id="sampling-plan" class="large-table sampling-plan show-estimated <s:if test="fullView">full-view</s:if><s:else>compact-view</s:else>">
<thead>
<tr>
<th colspan="${nbColumnsForProfession}"> <s:text name="wao.ui.samplingPlan.sampledProfessions" /></th>
Modified: trunk/wao-web/src/main/webapp/WEB-INF/decorators/layout.jsp
===================================================================
--- trunk/wao-web/src/main/webapp/WEB-INF/decorators/layout.jsp 2014-03-27 16:23:08 UTC (rev 1768)
+++ trunk/wao-web/src/main/webapp/WEB-INF/decorators/layout.jsp 2014-03-27 16:51:58 UTC (rev 1769)
@@ -57,7 +57,7 @@
<li class="active">
<s:url namespace="/%{obsProgram.name().toLowerCase()}" action="sampling-plan" id="samplingPlanUrl" />
<s:a href="%{samplingPlanUrl}">
- <i class="icon-tasks"></i> <s:text name="wao.ui.page.SamplingPlan.title" />
+ <i class="icon-calendar"></i> <s:text name="wao.ui.page.SamplingPlan.title" />
</s:a>
</li>
<li>
@@ -69,7 +69,7 @@
<li>
<s:url namespace="/%{obsProgram.name().toLowerCase()}" action="contacts" id="contactsUrl" />
<s:a href="%{contactsUrl}">
- <s:text name="wao.ui.page.Contacts.title" />
+ <i class="icon-tasks"></i> <s:text name="wao.ui.page.Contacts.title" />
</s:a>
</li>
<li>
Modified: trunk/wao-web/src/main/webapp/css/wao.css
===================================================================
--- trunk/wao-web/src/main/webapp/css/wao.css 2014-03-27 16:23:08 UTC (rev 1768)
+++ trunk/wao-web/src/main/webapp/css/wao.css 2014-03-27 16:51:58 UTC (rev 1769)
@@ -214,7 +214,10 @@
background-color: beige;
}
-.show-estimated .real, .show-real .estimated {
+.compact-view .only-in-full-view,
+.full-view .only-in-compact-view,
+.show-estimated .real,
+.show-real .estimated {
display: none;
}
1
0
r1768 - in trunk: wao-services/src/main/java/fr/ifremer/wao/services wao-web/src/main/java/fr/ifremer/wao/web/action/obsmer wao-web/src/main/webapp/WEB-INF/content/obsmer wao-web/src/main/webapp/css
by bleny@users.forge.codelutin.com 27 Mar '14
by bleny@users.forge.codelutin.com 27 Mar '14
27 Mar '14
Author: bleny
Date: 2014-03-27 17:23:08 +0100 (Thu, 27 Mar 2014)
New Revision: 1768
Url: http://forge.codelutin.com/projects/wao/repository/revisions/1768
Log:
refs #4483 start styling and rethinking sampling plan
Modified:
trunk/wao-services/src/main/java/fr/ifremer/wao/services/AuthenticatedWaoUser.java
trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/obsmer/SamplingPlanAction.java
trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/sampling-plan.jsp
trunk/wao-web/src/main/webapp/css/wao.css
Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/AuthenticatedWaoUser.java
===================================================================
--- trunk/wao-services/src/main/java/fr/ifremer/wao/services/AuthenticatedWaoUser.java 2014-03-27 13:34:21 UTC (rev 1767)
+++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/AuthenticatedWaoUser.java 2014-03-27 16:23:08 UTC (rev 1768)
@@ -212,4 +212,8 @@
return userProfile.isCoordinatorOrObserver();
}
+ public boolean isAuthorizedToViewSamplingPlanReal() {
+ return ! userProfile.isGuest();
+ }
+
}
Modified: trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/obsmer/SamplingPlanAction.java
===================================================================
--- trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/obsmer/SamplingPlanAction.java 2014-03-27 13:34:21 UTC (rev 1767)
+++ trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/obsmer/SamplingPlanAction.java 2014-03-27 16:23:08 UTC (rev 1768)
@@ -78,4 +78,9 @@
getSamplingPlan().getFilterValues());
return filterValues;
}
+
+ public boolean isFullView() {
+ boolean fullView = getAuthenticatedWaoUser().isAdmin() || getAuthenticatedWaoUser().isProfessional();
+ return fullView;
+ }
}
Modified: trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/sampling-plan.jsp
===================================================================
--- trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/sampling-plan.jsp 2014-03-27 13:34:21 UTC (rev 1767)
+++ trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/sampling-plan.jsp 2014-03-27 16:23:08 UTC (rev 1768)
@@ -37,6 +37,12 @@
var sampleRowsFilterController = new SampleRowsFilterController(SAMPLE_ROWS_FILTER_VALUES_JSON_URL, $('#sampling-plan-filters-form'));
sampleRowsFilterController.init();
+ $('#switch-estimated-real').click(function () {
+ $('#switch-estimated-real').toggleClass('show-estimated').toggleClass('show-real');
+ $('table.sampling-plan').toggleClass('show-estimated').toggleClass('show-real');
+ $('.estimated-differ-from-real').effect( "highlight", "slow" )
+ });
+
});
</script>
@@ -49,13 +55,6 @@
<s:text name="wao.ui.page.SamplingPlan.title" />
</h1>
- <s:if test="authenticatedWaoUser.authorizedToEditSamplingPlan">
- <s:url action="edit-sample-row!input" id="createSampleRow" />
- <s:a href="%{createSampleRow}" cssClass="btn">
- <i class="icon-plus"></i> <s:text name="wao.ui.action.createSampleRow" />
- </s:a>
- </s:if>
-
<s:form method="GET" id="sampling-plan-filters-form" cssClass="filters-form">
<fieldset>
@@ -152,8 +151,23 @@
</s:form>
+ <s:if test="authenticatedWaoUser.authorizedToViewSamplingPlanReal">
+ <button type="button" id="switch-estimated-real" class="btn show-estimated">
+ <i class="icon-eye"></i>
+ <span class="estimated">Voir le réel</span>
+ <span class="real">Voir l'estimé</span>
+ </button>
+ </s:if>
+
+ <s:if test="authenticatedWaoUser.authorizedToEditSamplingPlan">
+ <s:url action="edit-sample-row!input" id="createSampleRow" />
+ <s:a href="%{createSampleRow}" cssClass="btn">
+ <i class="icon-plus"></i> <s:text name="wao.ui.action.createSampleRow" />
+ </s:a>
+ </s:if>
+
<s:set var="estimatedTides" value="true"/>
-<s:set var="fullView" value="true"/>
+<s:set var="fullView" value="%{fullView}"/>
<s:set var="displayTidesReal" value="true"/>
<s:set var="nbColumnsForProfession" value="%{#fullView ? 13 : 5}"/>
@@ -161,211 +175,253 @@
<s:set var="nbColumnsForOther" value="6"/>
<s:set var="nbColumnsTotal" value="%{#nbColumnsForProfession + #nbColumnsForMonths + #nbColumnsForOther}"/>
- <table class="large-table table-hover">
+ <table id="sampling-plan" class="large-table sampling-plan show-estimated">
<thead>
- <tr>
- <th colspan="${nbColumnsForProfession}"> <s:text name="wao.ui.samplingPlan.sampledProfessions" /></th>
- <th colspan="${nbColumnsForMonths}">
- <s:text name="wao.ui.samplingPlan.effort" />
+ <tr>
+ <th colspan="${nbColumnsForProfession}"> <s:text name="wao.ui.samplingPlan.sampledProfessions" /></th>
+ <th colspan="${nbColumnsForMonths}">
+ <s:text name="wao.ui.samplingPlan.effort" />
- [ <s:text name="wao.ui.samplingPlan.expected"/> <em>
- ( <s:text name="wao.ui.samplingPlan.actual" />
- <s:if test="estimatedTides"> + <s:text name="wao.ui.samplingPlan.estimated" /> </s:if>)</em> ]
- </th>
- <th colspan="${nbColumnsForOther}"><s:text name="wao.ui.misc.others" /></th>
- </tr>
- <tr>
- <!-- Profession columns -->
- <td><s:text name="wao.ui.field.SampleRow.code"/></td>
- <td><s:text name="wao.ui.samplingPlan.program"/></td>
+ <s:if test="authenticatedWaoUser.authorizedToViewSamplingPlanReal">
+ [
+ <span class="estimated">
+ (<s:text name="wao.ui.samplingPlan.actual" /> + <s:text name="wao.ui.samplingPlan.estimated" />)
+ </span>
+ <span class="real">
+ <s:text name="wao.ui.samplingPlan.actual" />
+ </span>
+ /
+ <s:text name="wao.ui.samplingPlan.expected" />
+ ]
+ </s:if>
+ </th>
+ <th colspan="${nbColumnsForOther}"><s:text name="wao.ui.misc.others" /></th>
+ </tr>
+ <tr>
+ <!-- Profession columns -->
+ <th><s:text name="wao.ui.field.SampleRow.code"/></th>
+ <th><s:text name="wao.ui.samplingPlan.program"/></th>
<s:if test="fullView">
- <td class="only-visible-fullview"><s:text name="wao.ui.entity.Company"/></td>
+ <th class="only-visible-fullview"><s:text name="wao.ui.entity.Company"/></th>
</s:if>
- <td><s:text name="wao.ui.entity.FishingZone"/></td>
+ <th><s:text name="wao.ui.entity.FishingZone"/></th>
<s:if test="fullView">
- <td class="only-visible-fullview"><s:text name="wao.ui.samplingPlan.fishingZoneInfo"/></td>
- <td class="only-visible-fullview"><s:text name="wao.ui.misc.METIER"/> <br/> <s:text name="wao.ui.field.SampleRow.dcf5Code"/></td>
- <td class="only-visible-fullview"><s:text name="wao.ui.misc.METIER"/> <br/> <s:text name="wao.ui.field.SampleRow.meshSize"/></td>
- <td class="only-visible-fullview"><s:text name="wao.ui.misc.METIER"/> <br/> <s:text name="wao.ui.field.SampleRow.size"/></td>
- <td class="only-visible-fullview"><s:text name="wao.ui.misc.METIER"/> <br/> <s:text name="wao.ui.field.SampleRow.other"/></td>
- <td class="only-visible-fullview"><s:text name="wao.ui.misc.METIER"/> <br/> <s:text name="wao.ui.field.SampleRow.libelle"/></td>
- <td class="only-visible-fullview"><s:text name="wao.ui.misc.METIER"/> <br/> <s:text name="wao.ui.field.SampleRow.species"/></td>
- <td class="only-visible-fullview"><s:text name="wao.ui.field.SampleRow.periodBegin"/></td>
- <td class="only-visible-fullview"><s:text name="wao.ui.field.SampleRow.periodEnd"/></td>
+ <th class="only-visible-fullview"><s:text name="wao.ui.samplingPlan.fishingZoneInfo"/></th>
+ <th class="only-visible-fullview"><s:text name="wao.ui.misc.METIER"/> <br/> <s:text name="wao.ui.field.SampleRow.dcf5Code"/></th>
+ <th class="only-visible-fullview"><s:text name="wao.ui.misc.METIER"/> <br/> <s:text name="wao.ui.field.SampleRow.meshSize"/></th>
+ <th class="only-visible-fullview"><s:text name="wao.ui.misc.METIER"/> <br/> <s:text name="wao.ui.field.SampleRow.size"/></th>
+ <th class="only-visible-fullview"><s:text name="wao.ui.misc.METIER"/> <br/> <s:text name="wao.ui.field.SampleRow.other"/></th>
+ <th class="only-visible-fullview"><s:text name="wao.ui.misc.METIER"/> <br/> <s:text name="wao.ui.field.SampleRow.libelle"/></th>
+ <th class="only-visible-fullview"><s:text name="wao.ui.misc.METIER"/> <br/> <s:text name="wao.ui.field.SampleRow.species"/></th>
+ <th class="only-visible-fullview"><s:text name="wao.ui.field.SampleRow.periodBegin"/></th>
+ <th class="only-visible-fullview"><s:text name="wao.ui.field.SampleRow.periodEnd"/></th>
</s:if>
<s:else>
- <td class="only-visible-compactview"><s:text name="wao.ui.misc.METIER"/> <br/> <s:text name="wao.ui.field.SampleRow.dcf5Code"/></td>
- <td class="only-visible-compactview"><s:text name="wao.ui.misc.METIER"/> <br/> <s:text name="wao.ui.field.SampleRow.libelle"/></td>
+ <th class="only-visible-compactview"><s:text name="wao.ui.misc.METIER"/> <br/> <s:text name="wao.ui.field.SampleRow.dcf5Code"/></th>
+ <th class="only-visible-compactview"><s:text name="wao.ui.misc.METIER"/> <br/> <s:text name="wao.ui.field.SampleRow.libelle"/></th>
</s:else>
-
- <!-- Months columns -->
- <s:iterator value="samplingPlan.months" var="month">
- <td<s:if test="@fr.ifremer.wao.WaoUtils@isCurrentMonth(#month)"> class="current-month"</s:if>><s:property value="%{formatMonth(#month)}"/></td>
- </s:iterator>
- <td><s:text name="wao.ui.misc.total"/></td>
- <!-- Other columns -->
- <td>
- <s:text name="wao.ui.samplingPlan.observationTimesInDays"/>
- [ <s:text name="wao.ui.samplingPlan.expected"/><em>(<s:text name="wao.ui.samplingPlan.actual"/><s:if test="estimatedTides"> + <s:text name="wao.ui.samplingPlan.estimated"/></s:if>)</em> ]
- </td>
- <td><s:text name="wao.ui.samplingPlan.averageTideTime"/></td>
- <td><s:text name="wao.ui.samplingPlan.nbObservants"/></td>
- <td><s:text name="wao.ui.field.SampleRow.appliedCoverageRate"/></td>
- <td><s:text name="wao.ui.misc.comment"/></td>
- <td><s:text name="wao.ui.samplingPlan.actions"/></td>
- </tr>
+
+ <!-- Months columns -->
+ <s:iterator value="samplingPlan.months" var="month">
+ <th class="effort <s:if test="@fr.ifremer.wao.WaoUtils@isCurrentMonth(#month)"> now</s:if>">
+ <s:property value="%{formatMonth(#month)}"/>
+ </th>
+ </s:iterator>
+ <th><s:text name="wao.ui.misc.total"/></th>
+ <!-- Other columns -->
+ <th>
+ <s:text name="wao.ui.samplingPlan.observationTimesInDays"/>
+ [ <s:text name="wao.ui.samplingPlan.expected"/><em>(<s:text name="wao.ui.samplingPlan.actual"/><s:if test="estimatedTides"> + <s:text name="wao.ui.samplingPlan.estimated"/></s:if>)</em> ]
+ </th>
+ <th>
+ <s:text name="wao.ui.samplingPlan.averageTideTime"/>
+ </th>
+ <th>
+ <s:text name="wao.ui.samplingPlan.nbObservants"/>
+ </th>
+ <th>
+ <s:text name="wao.ui.field.SampleRow.appliedCoverageRate"/>
+ </th>
+ <th><s:text name="wao.ui.misc.comment"/></th>
+ <th><s:text name="wao.ui.samplingPlan.actions"/></th>
+ </tr>
</thead>
<tbody>
<%--Iterate on Facades--%>
<s:iterator value="samplingPlan" var="samplingPlanFacade">
- <tr>
- <td colspan="${nbColumnsTotal}" class="facade"><s:property value="%{#samplingPlanFacade.facade}"/></td>
- </tr>
+ <tr class="facade-row">
+ <th colspan="${nbColumnsTotal}" class="facade"><s:property value="%{#samplingPlanFacade.facade}"/></td>
+ </tr>
<%--Iterate on Sectors --%>
<s:iterator value="samplingPlanFacade" var="samplingPlanSector">
- <tr>
- <td colspan="${nbColumnsTotal}" class="sector"><s:property value="%{#samplingPlanSector.sectors}"/></td>
- </tr>
+ <tr class="sector-row">
+ <th colspan="${nbColumnsTotal}" class="sector"><s:property value="%{#samplingPlanSector.sectors}"/></td>
+ </tr>
<%--Iterate on SampleRows --%>
<s:iterator value="samplingPlanSector" var="samplingPlanRow">
- <tr<s:if test="sampleRowToHighlightId.equals(topiaId)"> class="highlight"</s:if>>
- <th>
- <s:property value="code" />
- </th>
- <td><s:property value="programName" /></td>
+ <tr class="sample-row-row<s:if test="sampleRowToHighlightId.equals(topiaId)"> highlight</s:if>">
+ <th>
+ <s:property value="code" />
+ </th>
+ <td><s:property value="programName" /></td>
<s:if test="fullView">
- <td class="only-visible-fullview"><s:property value="companyName" /></td>
+ <td class="only-visible-fullview"><s:property value="companyName" /></td>
</s:if>
- <td class="only-visible-fullview"><s:property value="fishingZones" /></td>
+ <td class="only-visible-fullview"><s:property value="fishingZones" /></td>
<s:if test="fullView">
- <td class="only-visible-fullview"><s:property value="fishingZonesInfos" /></td>
- <td class="only-visible-fullview">
- <s:iterator value="dcf5CodesAndDescriptions">
- <span>
- <s:property value="key"/>
- </span>
- </s:iterator>
- </td>
- <td class="only-visible-fullview"><s:property value="professionMeshSize" /></td>
- <td class="only-visible-fullview"><s:property value="professionSize" /></td>
- <td class="only-visible-fullview"><s:property value="professionOther" /></td>
- <td class="only-visible-fullview"><s:property value="professionLibelle" /></td>
- <td class="only-visible-fullview"><s:property value="professionSpecies" /></td>
- <td class="only-visible-fullview"><s:property value="%{formatMonth(periodBegin)}" /></td>
- <td class="only-visible-fullview"><s:property value="%{formatMonth(periodEnd)}" /></td>
+ <td class="only-visible-fullview"><s:property value="fishingZonesInfos" /></td>
+ <td class="only-visible-fullview">
+ <s:iterator value="dcf5CodesAndDescriptions">
+ <span>
+ <s:property value="key"/>
+ </span>
+ </s:iterator>
+ </td>
+ <td class="only-visible-fullview"><s:property value="professionMeshSize" /></td>
+ <td class="only-visible-fullview"><s:property value="professionSize" /></td>
+ <td class="only-visible-fullview"><s:property value="professionOther" /></td>
+ <td class="only-visible-fullview"><s:property value="professionLibelle" /></td>
+ <td class="only-visible-fullview"><s:property value="professionSpecies" /></td>
+ <td class="only-visible-fullview"><s:property value="%{formatMonth(periodBegin)}" /></td>
+ <td class="only-visible-fullview"><s:property value="%{formatMonth(periodEnd)}" /></td>
</s:if>
<s:else>
- <td class="only-visible-compactview">
- <s:iterator value="dcf5CodesAndDescriptions">
- <span>
- <s:property value="key"/>
- </span>
- </s:iterator>
- <s:property value="professionDescriptionWithoutDCF5" />
- </td>
- <td class="only-visible-compactview">
- <s:property value="professionLibelle" />
- </td>
+ <td class="only-visible-compactview">
+ <s:iterator value="dcf5CodesAndDescriptions">
+ <span>
+ <s:property value="key"/>
+ </span>
+ </s:iterator>
+ <s:property value="professionDescriptionWithoutDCF5" />
+ </td>
+ <td class="only-visible-compactview">
+ <s:property value="professionLibelle" />
+ </td>
</s:else>
- <!-- Months columns -->
+ <!-- Months columns -->
<s:iterator value="samplingPlan.months" var="month">
- <td<s:if test="@fr.ifremer.wao.WaoUtils@isCurrentMonth(#month)"> class="current-month"</s:if>>
- <s:property value="%{getNbTidesExpected(#month)}"/>
- <span<s:if test="hasNbTidesReal(#month) && !#authenticatedWaoUser.guest"> class="display-tides-real"</s:if>>
- <em>(<s:property value="%{getNbTidesReal(#month)}"/>)
- </em>
- </span>
- </td>
+ <s:set var="expected" value="%{getNbTidesExpected(#month)}"/>
+ <s:set var="estimated" value="%{getNbTidesEstimated(#month)}"/>
+ <s:set var="real" value="%{getNbTidesReal(#month)}"/>
+ <td class="effort <s:if test="@fr.ifremer.wao.WaoUtils@isCurrentMonth(#month)"> now</s:if><s:if test="#estimated != #real"> estimated-differ-from-real</s:if>">
+ <s:if test="#expected != null">
+ <s:if test="authenticatedWaoUser.authorizedToViewSamplingPlanReal">
+ <span class="estimated<s:if test="#estimated < #expected"> lower-than-expected</s:if><s:if test="#estimated > #expected"> higher-than-expected</s:if>">
+ <s:property value="#estimated"/>
+ </span>
+ <span class="real<s:if test="#real < #expected"> lower-than-expected</s:if><s:if test="#real > #expected"> higher-than-expected</s:if>">
+ <s:property value="#real"/>
+ </span>
+ /
+ </s:if>
+ <s:property value="#expected"/>
+ </s:if>
+ </td>
</s:iterator>
- <td>
- <span>
- <s:property value="totalTidesExpected" />
- <s:if test="!authenticatedWaoUser.guest">
- <em>(<s:property value="totalTidesReal" />)</em>
- <br/>
- <strong><s:property value="totalPercentage" /></strong>
- </s:if>
- </span>
- </td>
- <td>
- <s:property value="observationTimesInDaysExpected" /> <s:text name="wao.ui.misc.day"/>
- <span>
- <em>(<s:property value="observationTimesInDaysReal" /> <s:text name="wao.ui.misc.day"/>)</em>
- </span>
- </td>
- <td><s:property value="averageTideTime" /></td>
- <td><s:property value="nbObservants" /></td>
- <td>
- <s:if test="appliedCoverageRate">
- <s:property value="appliedCoverageRate" />%
- </s:if>
- </td>
- <td><s:property value="comment" /></td>
+ <td class="effort">
+ <s:if test="authenticatedWaoUser.authorizedToViewSamplingPlanReal">
+ <span class="estimated<s:if test="totalTidesEstimated < totalTidesExpected"> lower-than-expected</s:if><s:if test="totalTidesEstimated > totalTidesExpected"> higher-than-expected</s:if>">
+ <s:property value="totalTidesEstimated" />
+ </span>
+ <span class="real<s:if test="totalTidesReal < totalTidesExpected"> lower-than-expected</s:if><s:if test="totalTidesReal > totalTidesExpected"> higher-than-expected</s:if>">
+ <s:property value="totalTidesReal" />
+ </span>
+ /
+ </s:if>
+ <s:property value="totalTidesExpected" />
- <td class="actions">
- <div class="dropdown">
- <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
- <s:text name="wao.ui.actions" />
- <b class="caret"></b>
- </a>
- <ul class="dropdown-menu">
- <s:if test="authenticatedWaoUser.authorizedToEditSamplingPlan">
+ <s:if test="authenticatedWaoUser.authorizedToViewSamplingPlanReal">
+ (<s:property value="totalPercentage" />)
+ </s:if>
+ </td>
+ <td class="effort">
+
+ <s:if test="authenticatedWaoUser.authorizedToViewSamplingPlanReal">
+ <span class="estimated<s:if test="observationTimesInDaysEstimated < observationTimesInDaysExpected"> lower-than-expected</s:if><s:if test="observationTimesInDaysEstimated > observationTimesInDaysExpected"> higher-than-expected</s:if>">
+ <s:property value="observationTimesInDaysEstimated" /> <s:text name="wao.ui.misc.day"/>
+ </span>
+ <span class="real<s:if test="observationTimesInDaysReal < observationTimesInDaysExpected"> lower-than-expected</s:if><s:if test="observationTimesInDaysReal > observationTimesInDaysExpected"> higher-than-expected</s:if>">
+ <s:property value="observationTimesInDaysReal" /> <s:text name="wao.ui.misc.day"/>
+ </span>
+ /
+ </s:if>
+
+ <s:property value="observationTimesInDaysExpected" /> <s:text name="wao.ui.misc.day"/>
+
+ </td>
+ <td><s:property value="averageTideTime" /></td>
+ <td><s:property value="nbObservants" /></td>
+ <td>
+ <s:if test="appliedCoverageRate">
+ <s:property value="appliedCoverageRate" />%
+ </s:if>
+ </td>
+ <td><s:property value="comment" /></td>
+
+ <td class="actions">
+ <div class="dropdown">
+ <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
+ <s:text name="wao.ui.actions" />
+ <b class="caret"></b>
+ </a>
+ <ul class="dropdown-menu">
+ <s:if test="authenticatedWaoUser.authorizedToEditSamplingPlan">
+ <li>
+ <s:url action="edit-sample-row!input" id="editSampleRowUrl">
+ <s:param name="sampleRowId" value="sampleRowId" />
+ </s:url>
+ <s:a href="%{editSampleRowUrl}">
+ <i class="icon-edit"></i> <s:text name="wao.ui.action.edit" />
+ </s:a>
+ </li>
+ <li>
+ <s:url action="delete-sample-row" id="deleteSampleRowUrl">
+ <s:param name="companyId" value="sampleRowId" />
+ </s:url>
+ <s:a href="%{deleteSampleRowUrl}">
+ <i class="icon-trash"></i> <s:text name="wao.ui.action.delete" />
+ </s:a>
+ </li>
+ </s:if>
<li>
- <s:url action="edit-sample-row!input" id="editSampleRowUrl">
+ <s:url action="sample-row-log" id="sampleRowLogUrl">
<s:param name="sampleRowId" value="sampleRowId" />
</s:url>
- <s:a href="%{editSampleRowUrl}">
- <i class="icon-edit"></i> <s:text name="wao.ui.action.edit" />
+ <s:a href="%{sampleRowLogUrl}">
+ <i class="icon-time"></i> <s:text name="wao.ui.action.viewSampleRowLog" />
</s:a>
</li>
<li>
- <s:url action="delete-sample-row" id="deleteSampleRowUrl">
- <s:param name="companyId" value="sampleRowId" />
+ <s:url action="boats" id="viewElligibleBoatsUrl">
+ <s:param name="sampleRowIds" value="sampleRowId" />
</s:url>
- <s:a href="%{deleteSampleRowUrl}">
- <i class="icon-trash"></i> <s:text name="wao.ui.action.delete" />
+ <s:a href="%{viewElligibleBoatsUrl}">
+ <s:text name="wao.ui.action.viewElligibleBoats" />
</s:a>
</li>
- </s:if>
- <li>
- <s:url action="sample-row-log" id="sampleRowLogUrl">
- <s:param name="sampleRowId" value="sampleRowId" />
- </s:url>
- <s:a href="%{sampleRowLogUrl}">
- <i class="icon-time"></i> <s:text name="wao.ui.action.viewSampleRowLog" />
- </s:a>
- </li>
- <li>
- <s:url action="boats" id="viewElligibleBoatsUrl">
- <s:param name="sampleRowIds" value="sampleRowId" />
- </s:url>
- <s:a href="%{viewElligibleBoatsUrl}">
- <s:text name="wao.ui.action.viewElligibleBoats" />
- </s:a>
- </li>
- <li>
- <s:url action="contacts" id="viewAssociatedContactsUrl">
- <s:param name="sampleRowIds" value="sampleRowId" />
- </s:url>
- <s:a href="%{viewAssociatedContactsUrl}">
- <s:text name="wao.ui.action.viewAssociatedContacts" />
- </s:a>
- </li>
- <s:if test="authenticatedWaoUser.authorizedToCreateContact">
<li>
- <s:url action="contacts" id="createAssociatedContactUrl">
+ <s:url action="contacts" id="viewAssociatedContactsUrl">
<s:param name="sampleRowIds" value="sampleRowId" />
</s:url>
- <s:a href="%{createAssociatedContactUrl}">
- <i class="icon-add"></i> <s:text name="wao.ui.action.createAssociatedContact" />
+ <s:a href="%{viewAssociatedContactsUrl}">
+ <s:text name="wao.ui.action.viewAssociatedContacts" />
</s:a>
</li>
- </s:if>
- </ul>
- </div>
- </td>
- </tr>
+ <s:if test="authenticatedWaoUser.authorizedToCreateContact">
+ <li>
+ <s:url action="contacts" id="createAssociatedContactUrl">
+ <s:param name="sampleRowIds" value="sampleRowId" />
+ </s:url>
+ <s:a href="%{createAssociatedContactUrl}">
+ <i class="icon-add"></i> <s:text name="wao.ui.action.createAssociatedContact" />
+ </s:a>
+ </li>
+ </s:if>
+ </ul>
+ </div>
+ </td>
+ </tr>
<%--Iterate on SampleRows --%>
</s:iterator>
<%--Iterate on Sectors --%>
@@ -375,36 +431,64 @@
</todby>
<tfoot>
- <td colspan="${nbColumnsForProfession}">
- <s:text name="wao.ui.misc.totals" />
- </td>
- <!-- Months columns -->
- <s:iterator value="samplingPlan.months" var="month">
- <td<s:if test="@fr.ifremer.wao.WaoUtils@isCurrentMonth(#month)"> class="current-month"</s:if>>
- <s:property value="samplingPlan.getTotalExpected(#month)"/>
- <span class="display-tides-real">
- <span>
- <em>(<s:property value="samplingPlan.getTotalReal(#month)"/>)</em>
+ <th colspan="${nbColumnsForProfession}">
+ <s:text name="wao.ui.misc.totals" />
+ </th>
+ <!-- Months columns -->
+ <s:iterator value="samplingPlan.months" var="month">
+ <td class="effort<s:if test="@fr.ifremer.wao.WaoUtils@isCurrentMonth(#month)"> now</s:if>">
+ <s:set var="expected" value="%{samplingPlan.getTotalExpected(#month)}"/>
+ <s:set var="estimated" value="%{samplingPlan.getTotalEstimated(#month)}"/>
+ <s:set var="real" value="%{samplingPlan.getTotalReal(#month)}"/>
+ <s:if test="authenticatedWaoUser.authorizedToViewSamplingPlanReal">
+ <span class="estimated<s:if test="#estimated < #expected"> lower-than-expected</s:if><s:if test="#estimated > #expected"> higher-than-expected</s:if>">
+ <s:property value="#estimated"/>
+ </span>
+ <span class="real<s:if test="#real < #expected"> lower-than-expected</s:if><s:if test="#real > #expected"> higher-than-expected</s:if>">
+ <s:property value="#real"/>
+ </span>
+ /
+ </s:if>
+ <s:property value="#expected"/>
+ <s:if test="authenticatedWaoUser.authorizedToViewSamplingPlanReal">
+ <s:property value="samplingPlan.getTotalRatio(#month)"/>
+ </s:if>
+ </td>
+ </s:iterator>
+ <td class="effort">
+ <s:set var="expected" value="%{samplingPlan.highTotalExpected}"/>
+ <s:set var="estimated" value="%{samplingPlan.highTotalEstimated}"/>
+ <s:set var="real" value="%{samplingPlan.highTotalReal}"/>
+ <s:if test="authenticatedWaoUser.authorizedToViewSamplingPlanReal">
+ <span class="estimated<s:if test="#estimated < #expected"> lower-than-expected</s:if><s:if test="#estimated > #expected"> higher-than-expected</s:if>">
+ <s:property value="#estimated"/>
</span>
- <br/>
- <s:property value="samplingPlan.getTotalRatio(#month)"/>
- </span>
+ <span class="real<s:if test="#real < #expected"> lower-than-expected</s:if><s:if test="#real > #expected"> higher-than-expected</s:if>">
+ <s:property value="#real"/>
+ </span>
+ /
+ </s:if>
+ <s:property value="#expected"/>
+ <s:if test="authenticatedWaoUser.authorizedToViewSamplingPlanReal">
+ <s:property value="samplingPlan.highTotalRatio" />
+ </s:if>
</td>
- </s:iterator>
- <td>
- <s:property value="samplingPlan.highTotalExpected" />
- <s:if test="!authenticatedWaoUser.guest">
- <em>(<s:property value="samplingPlan.highTotalReal" />)</em>
- <strong><s:property value="samplingPlan.highTotalRatio" /></strong>
- </s:if>
- </td>
- <td>
- <s:property value="samplingPlan.observationTimesInDaysTotalExpected" /> <s:text name="wao.ui.misc.day"/>
- <span>
- <em>(<s:property value="samplingPlan.observationTimesInDaysTotalReal"/> <s:text name="wao.ui.misc.day"/>)</em>
- </span>
- </td>
- <td colspan="${nbColumnsForOther}"> </td>
+ <td>
+ <s:set var="expected" value="%{samplingPlan.observationTimesInDaysTotalExpected}"/>
+ <s:set var="estimated" value="%{samplingPlan.observationTimesInDaysTotalEstimated}"/>
+ <s:set var="real" value="%{samplingPlan.observationTimesInDaysTotalReal}"/>
+ <s:if test="authenticatedWaoUser.authorizedToViewSamplingPlanReal">
+ <span class="estimated<s:if test="#estimated < #expected"> lower-than-expected</s:if><s:if test="#estimated > #expected"> higher-than-expected</s:if>">
+ <s:property value="#estimated"/> <s:text name="wao.ui.misc.day"/>
+ </span>
+ <span class="real<s:if test="#real < #expected"> lower-than-expected</s:if><s:if test="#real > #expected"> higher-than-expected</s:if>">
+ <s:property value="#real"/> <s:text name="wao.ui.misc.day"/>
+ </span>
+ /
+ </s:if>
+ <s:property value="#expected"/> <s:text name="wao.ui.misc.day"/>
+ </td>
+ <th colspan="${nbColumnsForOther}"></th>
</tfoot>
</table>
Modified: trunk/wao-web/src/main/webapp/css/wao.css
===================================================================
--- trunk/wao-web/src/main/webapp/css/wao.css 2014-03-27 13:34:21 UTC (rev 1767)
+++ trunk/wao-web/src/main/webapp/css/wao.css 2014-03-27 16:23:08 UTC (rev 1768)
@@ -19,16 +19,58 @@
* #L%
*/
-/**
+/******************************************************************************
* Personnalisation de Bootstrap
- */
+ *****************************************************************************/
/* On surcharge left: 0px par left: 0% car ça pose problème pour Firefox qui place le menu complètement à gauche de la fenêtre et pas en dessous du bouton */
.dropdown-menu {
left: 0%;
}
+legend+.control-group {
+ margin-top: 0px;
+}
+
+/******************************************************************************
+ * Des classes à usage transverse
+ *****************************************************************************/
+
+/* pour représente qu'une entité (société, utilisateur) est inactive */
+.highlight {
+ background-color: #ffff99;
+}
+
+/* pour représenter qu'on est à l'instant présent */
+.now {
+ background-color: #ffff99;
+}
+
+.inactive {
+ text-decoration: line-through;
+}
+
/**
+ * Class permettant de faire faire une rotation à un élément de 90° sur la gauche.
+ * Ça peut par exemeple servir pour un th, afin de gagner de la largeur
+ *
+ * voir http://stackoverflow.com/questions/15806925/how-to-rotate-text-left-90-degr…
+ */
+.rotate {
+ display: block;
+ -moz-transform: rotate(-90.0deg); /* FF3.5+ */
+ -o-transform: rotate(-90.0deg); /* Opera 10.5 */
+ -webkit-transform: rotate(-90.0deg); /* Saf3.1+, Chrome */
+ -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0.083)"; /* IE8 */
+
+}
+
+
+/******************************************************************************
+ * Styles globaux à l'application
+ *****************************************************************************/
+
+/**
* Le style du layout
*/
@@ -77,23 +119,6 @@
float: right;
}
-legend+.control-group {
- margin-top: 0px;
-}
-
-/**
- * Des classes à usage transverse
- */
-
-/* pour représente qu'une entité (société, utilisateur) est inactive */
-.highlight {
- background-color: #ffff99;
-}
-
-.inactive {
- text-decoration: line-through;
-}
-
th.actions, td.actions {
white-space: nowrap;
}
@@ -106,10 +131,6 @@
list-style-type: none;
}
-.large-table tbody tr:hover {
- background-color: #f5f5f5;
-}
-
.large-table tbody th, .large-table td {
border: solid 1px #aaaaaa;
border-left-style: dashed;
@@ -133,9 +154,9 @@
margin-right: 5px;
}
-/**
+/******************************************************************************
* Styles spécifiques pour certaines pages de l'appli
- */
+ *****************************************************************************/
#expectedObservationsByMonthsTable th {
white-space: nowrap;
@@ -158,3 +179,53 @@
margin-bottom: 20px;
}
+table.sampling-plan tr.facade-row {
+ color: white;
+ background-color: seagreen;
+ background-color: darkslategrey;
+ font-size: 150%;
+ line-height: 150%;
+}
+
+table.sampling-plan tr.sector-row {
+ color: white;
+ background-color: darkcyan;
+ background-color: darkseagreen;
+ font-size: 120%;
+ line-height: 120%;
+}
+
+table.sampling-plan tr.facade-row th,
+table.sampling-plan tr.sector-row th {
+ text-align: left;
+ padding: 10px;
+}
+
+table.sampling-plan tbody tr.sample-row-row:nth-child(2n) {
+ background-color: #e6e6e6;
+}
+
+table.sampling-plan tbody tr.sample-row-row:hover {
+ background-color: tan;
+ background-color: antiquewhite;
+ background-color: palegoldenrod;
+ background-color: papayawhip;
+ background-color: wheat;
+ background-color: beige;
+}
+
+.show-estimated .real, .show-real .estimated {
+ display: none;
+}
+
+td.effort .lower-than-expected {
+ color : red;
+}
+
+td.effort .higher-than-expected {
+ color : green;
+}
+
+td.effort {
+ text-align: center;
+}
\ No newline at end of file
1
0
r1767 - in trunk: wao-persistence/src/main/java/fr/ifremer/wao/entity wao-services/src/main/java/fr/ifremer/wao/services/service wao-web/src/main/java/fr/ifremer/wao/web/action/obsmer wao-web/src/main/webapp/WEB-INF/content/obsmer wao-web/src/main/webapp/js
by bleny@users.forge.codelutin.com 27 Mar '14
by bleny@users.forge.codelutin.com 27 Mar '14
27 Mar '14
Author: bleny
Date: 2014-03-27 14:34:21 +0100 (Thu, 27 Mar 2014)
New Revision: 1767
Url: http://forge.codelutin.com/projects/wao/repository/revisions/1767
Log:
refs #4483 sort option by labels in select in filter form, introduce FilterOption
Added:
trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/FilterOption.java
Modified:
trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SamplingStrategy.java
trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/SampleRowsFilterValues.java
trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/obsmer/LocalizedSampleRowsFilterValues.java
trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/sampling-plan.jsp
trunk/wao-web/src/main/webapp/js/wao.js
Modified: trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SamplingStrategy.java
===================================================================
--- trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SamplingStrategy.java 2014-03-27 12:39:43 UTC (rev 1766)
+++ trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/SamplingStrategy.java 2014-03-27 13:34:21 UTC (rev 1767)
@@ -22,7 +22,7 @@
import static org.nuiton.i18n.I18n.n;
-public enum SamplingStrategy {
+public enum SamplingStrategy implements I18nAble {
SIMULTANEOUS_G1_SPECIES(n("SamplingStrategy.SIMULTANEOUS_G1_SPECIES")),
SIMULTANEOUS_G1_G2_SPECIES(n("SamplingStrategy.SIMULTANEOUS_G1_G2_SPECIES")),
@@ -45,9 +45,8 @@
}
@Override
- public String toString() {
- // return WaoUtils.t(i18nKey);
- throw new UnsupportedOperationException();
+ public String getI18nKey() {
+ return i18nKey;
}
public boolean isSpecificStock() {
Added: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/FilterOption.java
===================================================================
--- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/FilterOption.java (rev 0)
+++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/FilterOption.java 2014-03-27 13:34:21 UTC (rev 1767)
@@ -0,0 +1,50 @@
+package fr.ifremer.wao.services.service;
+
+import com.google.common.collect.Ordering;
+import fr.ifremer.wao.entity.I18nAble;
+
+public class FilterOption implements Comparable<FilterOption> {
+
+ protected String value;
+
+ protected String label;
+
+ /**
+ * Both label and value is the given str.
+ */
+ public static FilterOption forString(String str) {
+ FilterOption filterOption = new FilterOption(str, str);
+ return filterOption;
+ }
+
+ /**
+ * Both label and value is the given str.
+ */
+ public static <T extends Enum & I18nAble> FilterOption forEnum(T enumValue) {
+ FilterOption filterOption = new FilterOption(enumValue.name(), enumValue.getI18nKey());
+ return filterOption;
+ }
+
+ public static FilterOption forValueAndLabel(String value, String label) {
+ FilterOption filterOption = new FilterOption(value, label);
+ return filterOption;
+ }
+
+ public FilterOption(String value, String label) {
+ this.value = value;
+ this.label = label;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public String getLabel() {
+ return label;
+ }
+
+ @Override
+ public int compareTo(FilterOption other) {
+ return Ordering.natural().compare(label, other.label);
+ }
+}
Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/SampleRowsFilterValues.java
===================================================================
--- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/SampleRowsFilterValues.java 2014-03-27 12:39:43 UTC (rev 1766)
+++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/SampleRowsFilterValues.java 2014-03-27 13:34:21 UTC (rev 1767)
@@ -3,15 +3,11 @@
import fr.ifremer.wao.entity.DCF5Code;
import fr.ifremer.wao.entity.FishingZone;
import fr.ifremer.wao.entity.SampleRow;
-import fr.ifremer.wao.entity.SamplingStrategy;
import fr.ifremer.wao.entity.TerrestrialLocation;
-import org.apache.commons.lang3.tuple.Pair;
import java.io.Serializable;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
+import java.util.SortedSet;
+import java.util.TreeSet;
/**
* Bean to hold all values that user can select to fill {@link fr.ifremer.wao.SampleRowsFilter}.
@@ -20,86 +16,89 @@
private static final long serialVersionUID = 1L;
- protected Set<String> fishingZoneFacadeNames = new HashSet<>();
+ protected SortedSet<FilterOption> fishingZoneFacadeNames = new TreeSet<>();
- protected Set<String> fishingZoneSectorNames = new HashSet<>();
+ protected SortedSet<FilterOption> fishingZoneSectorNames = new TreeSet<>();
- protected Set<String> sampleRowCodes = new HashSet<>();
+ protected SortedSet<FilterOption> sampleRowCodes = new TreeSet<>();
- protected Set<String> programNames = new HashSet<>();
+ protected SortedSet<FilterOption> programNames = new TreeSet<>();
- protected Map<String, String> companies = new HashMap<>();
+ protected SortedSet<FilterOption> companies = new TreeSet<>();
- protected Set<SamplingStrategy> samplingStrategies = new HashSet<>();
+ protected SortedSet<FilterOption> samplingStrategies = new TreeSet<>();
- protected Map<String, String> terrestrialDistricts = new HashMap<>();
+ protected SortedSet<FilterOption> terrestrialDistricts = new TreeSet<>();
/** Values are the code and the label i18n key. */
- protected Map<String, Pair<String, String>> fishingGearDcfs = new HashMap<>();
+ protected SortedSet<FilterOption> fishingGearDcfs = new TreeSet<>();
/** Values are the code and the label i18n key. */
- protected Map<String, Pair<String, String>> targetSpeciesDcfs = new HashMap<>();
+ protected SortedSet<FilterOption> targetSpeciesDcfs = new TreeSet<>();
public void addSampleRow(SampleRow sampleRow) {
for (FishingZone fishingZone : sampleRow.getFishingZone()) {
- fishingZoneFacadeNames.add(fishingZone.getFacadeName());
- fishingZoneSectorNames.add(fishingZone.getSectorName());
+ fishingZoneFacadeNames.add(FilterOption.forString(fishingZone.getFacadeName()));
+ fishingZoneSectorNames.add(FilterOption.forString(fishingZone.getSectorName()));
}
- sampleRowCodes.add(sampleRow.getCode());
- programNames.add(sampleRow.getProgramName());
- companies.put(sampleRow.getCompany().getTopiaId(), sampleRow.getCompany().getName());
- samplingStrategies.add(sampleRow.getSamplingStrategy());
+ sampleRowCodes.add(FilterOption.forString(sampleRow.getCode()));
+ programNames.add(FilterOption.forString(sampleRow.getProgramName()));
+ companies.add(FilterOption.forValueAndLabel(sampleRow.getCompany().getTopiaId(), sampleRow.getCompany().getName()));
+ samplingStrategies.add(FilterOption.forEnum(sampleRow.getSamplingStrategy()));
if (sampleRow.getObsProgram().isObsVente()) {
TerrestrialLocation terrestrialDistrict = sampleRow.getTerrestrialLocation();
- terrestrialDistricts.put(terrestrialDistrict.getTopiaId(), terrestrialDistrict.getDescription());
+ terrestrialDistricts.add(
+ FilterOption.forValueAndLabel(
+ terrestrialDistrict.getTopiaId(),
+ terrestrialDistrict.getDescription()));
}
for (DCF5Code dcf5Code : sampleRow.getdCF5Code()) {
- fishingGearDcfs.put(
- dcf5Code.getFishingGearDCF().getTopiaId(),
- Pair.of(dcf5Code.getFishingGearDCF().getCode(),
+ fishingGearDcfs.add(
+ FilterOption.forValueAndLabel(
+ dcf5Code.getFishingGearDCF().getTopiaId(),
dcf5Code.getFishingGearDCF().getI18nKey()));
if (dcf5Code.getTargetSpeciesDCF() != null) {
- targetSpeciesDcfs.put(
- dcf5Code.getTargetSpeciesDCF().getTopiaId(),
- Pair.of(dcf5Code.getTargetSpeciesDCF().getCode(),
+ targetSpeciesDcfs.add(
+ FilterOption.forValueAndLabel(
+ dcf5Code.getTargetSpeciesDCF().getTopiaId(),
dcf5Code.getTargetSpeciesDCF().getI18nKey()));
}
}
}
- public Set<String> getFishingZoneFacadeNames() {
+ public SortedSet<FilterOption> getFishingZoneFacadeNames() {
return fishingZoneFacadeNames;
}
- public Set<String> getFishingZoneSectorNames() {
+ public SortedSet<FilterOption> getFishingZoneSectorNames() {
return fishingZoneSectorNames;
}
- public Set<String> getSampleRowCodes() {
+ public SortedSet<FilterOption> getSampleRowCodes() {
return sampleRowCodes;
}
- public Set<String> getProgramNames() {
+ public SortedSet<FilterOption> getProgramNames() {
return programNames;
}
- public Map<String, String> getCompanies() {
+ public SortedSet<FilterOption> getCompanies() {
return companies;
}
- public Set<SamplingStrategy> getSamplingStrategies() {
+ public SortedSet<FilterOption> getSamplingStrategies() {
return samplingStrategies;
}
- public Map<String, String> getTerrestrialDistricts() {
+ public SortedSet<FilterOption> getTerrestrialDistricts() {
return terrestrialDistricts;
}
- public Map<String, Pair<String, String>> getFishingGearDcfs() {
+ public SortedSet<FilterOption> getFishingGearDcfs() {
return fishingGearDcfs;
}
- public Map<String, Pair<String, String>> getTargetSpeciesDcfs() {
+ public SortedSet<FilterOption> getTargetSpeciesDcfs() {
return targetSpeciesDcfs;
}
}
Modified: trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/obsmer/LocalizedSampleRowsFilterValues.java
===================================================================
--- trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/obsmer/LocalizedSampleRowsFilterValues.java 2014-03-27 12:39:43 UTC (rev 1766)
+++ trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/obsmer/LocalizedSampleRowsFilterValues.java 2014-03-27 13:34:21 UTC (rev 1767)
@@ -1,16 +1,12 @@
package fr.ifremer.wao.web.action.obsmer;
import fr.ifremer.wao.entity.SampleRow;
-import fr.ifremer.wao.entity.SamplingStrategy;
import fr.ifremer.wao.services.WaoCacheElement;
+import fr.ifremer.wao.services.service.FilterOption;
import fr.ifremer.wao.services.service.SampleRowsFilterValues;
-import org.apache.commons.lang3.tuple.Pair;
-import org.nuiton.i18n.I18n;
-import java.util.HashMap;
import java.util.Locale;
-import java.util.Map;
-import java.util.Set;
+import java.util.SortedSet;
public class LocalizedSampleRowsFilterValues implements WaoCacheElement {
@@ -27,56 +23,39 @@
decorated.addSampleRow(sampleRow);
}
- public Set<String> getSampleRowCodes() {
- return decorated.getSampleRowCodes();
+ public SortedSet<FilterOption> getTargetSpeciesDcfs() {
+ return decorated.getTargetSpeciesDcfs();
}
- public Set<SamplingStrategy> getSamplingStrategies() {
- return decorated.getSamplingStrategies();
+ public SortedSet<FilterOption> getTerrestrialDistricts() {
+ return decorated.getTerrestrialDistricts();
}
- public Set<String> getFishingZoneSectorNames() {
- return decorated.getFishingZoneSectorNames();
+ public SortedSet<FilterOption> getSampleRowCodes() {
+ return decorated.getSampleRowCodes();
}
- public Set<String> getProgramNames() {
- return decorated.getProgramNames();
+ public SortedSet<FilterOption> getFishingZoneSectorNames() {
+ return decorated.getFishingZoneSectorNames();
}
- public Set<String> getFishingZoneFacadeNames() {
- return decorated.getFishingZoneFacadeNames();
- }
-
- public Map<String, String> getCompanies() {
+ public SortedSet<FilterOption> getCompanies() {
return decorated.getCompanies();
}
- public Map<String, String> getTerrestrialDistricts() {
- return decorated.getTerrestrialDistricts();
+ public SortedSet<FilterOption> getProgramNames() {
+ return decorated.getProgramNames();
}
- public Map<String, String> getFishingGearDcfs() {
- Map<String, String> translated = new HashMap<>();
- for (Map.Entry<String, Pair<String, String>> entry :
- decorated.getFishingGearDcfs().entrySet()) {
- String topiaId = entry.getKey();
- String code = entry.getValue().getLeft();
- String i18nKey = entry.getValue().getRight();
- translated.put(topiaId, code + " " + I18n.l(locale, i18nKey));
- }
- return translated;
+ public SortedSet<FilterOption> getSamplingStrategies() {
+ return decorated.getSamplingStrategies();
}
- public Map<String, String> getTargetSpeciesDcfs() {
- Map<String, String> translated = new HashMap<>();
- for (Map.Entry<String, Pair<String, String>> entry :
- decorated.getTargetSpeciesDcfs().entrySet()) {
- String topiaId = entry.getKey();
- String code = entry.getValue().getLeft();
- String i18nKey = entry.getValue().getRight();
- translated.put(topiaId, code + " " + I18n.l(locale, i18nKey));
- }
- return translated;
+ public SortedSet<FilterOption> getFishingZoneFacadeNames() {
+ return decorated.getFishingZoneFacadeNames();
}
+ public SortedSet<FilterOption> getFishingGearDcfs() {
+ return decorated.getFishingGearDcfs();
+ }
}
Modified: trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/sampling-plan.jsp
===================================================================
--- trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/sampling-plan.jsp 2014-03-27 12:39:43 UTC (rev 1766)
+++ trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/sampling-plan.jsp 2014-03-27 13:34:21 UTC (rev 1767)
@@ -77,36 +77,48 @@
<s:select name="filter.companyIds"
label="%{getText('wao.ui.entity.Company')}"
list="filterValues.companies"
+ listKey="value"
+ listValue="label"
multiple="true"
dataBinding="companies" />
<s:select name="filter.programNames"
label="%{getText('wao.ui.field.SampleRow.programName')}"
list="filterValues.programNames"
+ listKey="value"
+ listValue="label"
multiple="true"
dataBinding="programNames" />
<s:select name="filter.fishingZoneFacadeNames"
label="%{getText('wao.ui.field.FishingZone.facadeName')}"
list="filterValues.fishingZoneFacadeNames"
+ listKey="value"
+ listValue="label"
multiple="true"
dataBinding="fishingZoneFacadeNames" />
<s:select name="filter.fishingZoneSectorNames"
label="%{getText('wao.ui.field.FishingZone.sectorName')}"
list="filterValues.fishingZoneSectorNames"
+ listKey="value"
+ listValue="label"
multiple="true"
dataBinding="fishingZoneSectorNames" />
<s:select name="filter.sampleRowCodes"
label="%{getText('wao.ui.field.SampleRow.code')}"
list="filterValues.sampleRowCodes"
+ listKey="value"
+ listValue="label"
multiple="true"
dataBinding="sampleRowCodes" />
<s:select name="filter.fishingGearDcfIds"
label="%{getText('wao.ui.entity.fishingGearDCF')}"
list="filterValues.fishingGearDcfs"
+ listKey="value"
+ listValue="label"
value="%getText(#value)"
multiple="true"
dataBinding="fishingGearDcfs" />
@@ -114,6 +126,8 @@
<s:select name="filter.targetSpeciesDcfIds"
label="%{getText('wao.ui.entity.targetSpeciesDCF')}"
list="filterValues.targetSpeciesDcfs"
+ listKey="value"
+ listValue="label"
multiple="true"
dataBinding="targetSpeciesDcfs" />
Modified: trunk/wao-web/src/main/webapp/js/wao.js
===================================================================
--- trunk/wao-web/src/main/webapp/js/wao.js 2014-03-27 12:39:43 UTC (rev 1766)
+++ trunk/wao-web/src/main/webapp/js/wao.js 2014-03-27 13:34:21 UTC (rev 1767)
@@ -79,11 +79,8 @@
// FIXME brendan 26/03/14 should be data-binding but freemarker break the template :-(
var binding = $select.attr('databinding');
var options = filterValues[binding];
- $.each(options, function (value, label) {
- if (typeof value == "number") {
- value = label;
- }
- var optionHtml = '<option value="' + value + '">' + label + '</option>';
+ $.each(options, function (index, option) {
+ var optionHtml = '<option value="' + option.value + '">' + option.label + '</option>';
$select.append(optionHtml);
});
var selectedOptions = filter[name];
1
0
See <http://ci.codelutin.com/jenkins/job/wao-ci/58/changes>
Changes:
[Tony CHEMIT] refs #4483 (make SamplePlan fully serializable + use it in jsp)
------------------------------------------
[...truncated 103 lines...]
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.BoatImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.ContactImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.IndicatorImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.ContactStateMotifImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.TerrestrialLocationImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.BoatGroupImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.CompanyImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.IndicatorLevelImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.FishingZoneImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.SampleMonthImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.FleetImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.UserProfileImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.TargetSpeciesDCFImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.ObsDebCodeImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.SampleRowLogImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.NewsImpl], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.WaoUserTopiaDao], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.TerrestrialDivisionTopiaDao], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.SampleRowTopiaDao], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.ContactTopiaDao], already found in class-path.
INFO [pool-1-thread-1 for channel] (ObjectModelTransformerToJava.java:998) isInClassPath - Will not generate [fr.ifremer.wao.entity.TerrestrialLocationTopiaDao], already found in class-path.
[INFO] Add compile source root : <http://ci.codelutin.com/jenkins/job/wao-ci/ws/trunk/wao-persistence/target/…>
[INFO] Add resource root :Resource {targetPath: null, filtering: false, FileSet {directory: <http://ci.codelutin.com/jenkins/job/wao-ci/ws/trunk/wao-persistence/target/…,> PatternSet [includes: {}, excludes: {**/*.java}]}}
[INFO]
[INFO] --- i18n-maven-plugin:3.0:parserJava (parseOthersAndGen) @ wao-persistence ---
[INFO] start entry basedir:<http://ci.codelutin.com/jenkins/job/wao-ci/ws/trunk/wao-persistence/target/…,> includes:[**/*.java]
[INFO] 148 file(s) to process (among 148 files)
[INFO] start entry basedir:<http://ci.codelutin.com/jenkins/job/wao-ci/ws/trunk/wao-persistence/src/mai…,> includes:[**/*.java]
[INFO] 58 file(s) to process (among 58 files)
[INFO] Parsing is done. [treated file(s) : 12/206](total time:13.654s) ( ~ 66.284ms / file)
[INFO]
[INFO] >>> i18n-maven-plugin:3.0:gen (parseOthersAndGen) @ wao-persistence >>>
[INFO]
[INFO] --- i18n-maven-plugin:3.0:get (get) @ wao-persistence ---
[INFO] config - basedir : <http://ci.codelutin.com/jenkins/job/wao-ci/ws/trunk/wao-persistence/target/…>
[INFO] config - locales : [fr_FR, en_GB]
[INFO] import getter java.getter in 376190ns
[INFO] Copying wao-persistence.properties to <http://ci.codelutin.com/jenkins/job/wao-ci/ws/trunk/wao-persistence/target/…>
[INFO] Copying wao-persistence.properties to <http://ci.codelutin.com/jenkins/job/wao-ci/ws/trunk/wao-persistence/target/…>
[INFO]
[INFO] <<< i18n-maven-plugin:3.0:gen (parseOthersAndGen) @ wao-persistence <<<
[INFO]
[INFO] --- i18n-maven-plugin:3.0:gen (parseOthersAndGen) @ wao-persistence ---
[INFO] config - src basedir : <http://ci.codelutin.com/jenkins/job/wao-ci/ws/trunk/wao-persistence/src/mai…>
[INFO] config - out basedir : <http://ci.codelutin.com/jenkins/job/wao-ci/ws/trunk/wao-persistence/target/…>
[INFO] config - locales : [fr_FR, en_GB]
[INFO] prepare bundle for locale fr_FR
[INFO] merge bundle fr_FR to out
[WARNING] bundle fr_FR contains 1/139 empty entries! (use -Di18n.showEmpty to see these entries)
[INFO] copy bundle fr_FR to src
[INFO] prepare bundle for locale en_GB
[INFO] merge bundle en_GB to out
[WARNING] bundle en_GB contains 4/140 empty entries! (use -Di18n.showEmpty to see these entries)
[INFO] copy bundle en_GB to src
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ wao-persistence ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 6 resources
[INFO] Copying 28 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ wao-persistence ---
[INFO] Compiling 206 source files to <http://ci.codelutin.com/jenkins/job/wao-ci/ws/trunk/wao-persistence/target/…>
[WARNING] <http://ci.codelutin.com/jenkins/job/wao-ci/ws/trunk/wao-persistence/src/mai…>:[75,27] equals(java.lang.Object,java.lang.Object) in org.apache.commons.lang3.ObjectUtils has been deprecated
[WARNING] <http://ci.codelutin.com/jenkins/job/wao-ci/ws/trunk/wao-persistence/target/…>: Some input files use unchecked or unsafe operations.
[WARNING] <http://ci.codelutin.com/jenkins/job/wao-ci/ws/trunk/wao-persistence/target/…>: Recompile with -Xlint:unchecked for details.
[INFO]
[INFO] --- maven-antrun-plugin:1.7:run (generate-surefire-workdir) @ wao-persistence ---
[INFO] Executing tasks
main:
[mkdir] Created dir: <http://ci.codelutin.com/jenkins/job/wao-ci/ws/trunk/wao-persistence/target/…>
[INFO] Executed tasks
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ wao-persistence ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ wao-persistence ---
[INFO] Compiling 1 source file to <http://ci.codelutin.com/jenkins/job/wao-ci/ws/trunk/wao-persistence/target/…>
[INFO]
[INFO] --- maven-surefire-plugin:2.17:test (default-test) @ wao-persistence ---
[INFO] Surefire report directory: <http://ci.codelutin.com/jenkins/job/wao-ci/ws/trunk/wao-persistence/target/…>
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running fr.ifremer.wao.entity.SampleRowLogImplTest
2014/03/27 01:26:17 DEBUG (SampleRowLogImplTest.java:78) testNewSampleRowLog Le nombre d'observateurs est de 0
Le durée moyenne d'une marée est de 0.0
La ligne est sur la période du 03/2011 au 06/2011
Le métier de la ligne est null
2014/03/27 01:26:17 DEBUG (SampleRowLogImplTest.java:94) testCompareSampleRowToItself
2014/03/27 01:26:17 DEBUG (SampleRowLogImplTest.java:118) testModifySampleRow La durée moyenne d'une marée est passé de 0.0 jours à 1.0
La ligne est désormais associée au programme programName
La date de fin est passée de 06/2011 à 07/2011
Les zones de pêches suivantes ont été ajoutées : null - null - IV
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.148 sec - in fr.ifremer.wao.entity.SampleRowLogImplTest
Results :
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0
[JENKINS] Recording test results
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ wao-persistence ---
[INFO] Building jar: <http://ci.codelutin.com/jenkins/job/wao-ci/ws/trunk/wao-persistence/target/…>
[INFO]
[INFO] --- maven-site-plugin:3.3:attach-descriptor (attach-descriptor) @ wao-persistence ---
[JENKINS] Archiving disabled
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Wao :: Services 4.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ wao-services ---
[INFO] Deleting <http://ci.codelutin.com/jenkins/job/wao-ci/ws/trunk/wao-services/target>
[INFO]
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (check-project-files) @ wao-services ---
[INFO]
[INFO] --- i18n-maven-plugin:3.0:parserJava (parseOthersAndGen) @ wao-services ---
[INFO] start entry basedir:<http://ci.codelutin.com/jenkins/job/wao-ci/ws/trunk/wao-services/src/main/j…,> includes:[**/*.java]
[INFO] 69 file(s) to process (among 69 files)
[INFO] Parsing is done. [treated file(s) : 18/69](total time:204.078ms) ( ~ 2.958ms / file)
[INFO]
[INFO] >>> i18n-maven-plugin:3.0:gen (parseOthersAndGen) @ wao-services >>>
[INFO]
[INFO] --- i18n-maven-plugin:3.0:get (get) @ wao-services ---
[INFO] config - basedir : <http://ci.codelutin.com/jenkins/job/wao-ci/ws/trunk/wao-services/target/gen…>
[INFO] config - locales : [fr_FR, en_GB]
[INFO] import getter java.getter in 129476ns
[INFO] Copying wao-services.properties to <http://ci.codelutin.com/jenkins/job/wao-ci/ws/trunk/wao-services/target/gen…>
[INFO] Copying wao-services.properties to <http://ci.codelutin.com/jenkins/job/wao-ci/ws/trunk/wao-services/target/gen…>
[INFO]
[INFO] <<< i18n-maven-plugin:3.0:gen (parseOthersAndGen) @ wao-services <<<
[INFO]
[INFO] --- i18n-maven-plugin:3.0:gen (parseOthersAndGen) @ wao-services ---
[INFO] config - src basedir : <http://ci.codelutin.com/jenkins/job/wao-ci/ws/trunk/wao-services/src/main/r…>
[INFO] config - out basedir : <http://ci.codelutin.com/jenkins/job/wao-ci/ws/trunk/wao-services/target/gen…>
[INFO] config - locales : [fr_FR, en_GB]
[INFO] prepare bundle for locale fr_FR
[INFO] merge bundle fr_FR to out
[INFO] copy bundle fr_FR to src
[INFO] prepare bundle for locale en_GB
[INFO] merge bundle en_GB to out
[INFO] copy bundle en_GB to src
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ wao-services ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 4 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ wao-services ---
[INFO] Compiling 69 source files to <http://ci.codelutin.com/jenkins/job/wao-ci/ws/trunk/wao-services/target/cla…>
[INFO] -------------------------------------------------------------
[WARNING] COMPILATION WARNING :
[INFO] -------------------------------------------------------------
[WARNING] <http://ci.codelutin.com/jenkins/job/wao-ci/ws/trunk/wao-services/src/main/j…>:[173,46] findByEntityClassFqn(java.lang.String) in fr.ifremer.wao.entity.GeneratedReferentialMetaTopiaDao has been deprecated
[WARNING] <http://ci.codelutin.com/jenkins/job/wao-ci/ws/trunk/wao-services/src/main/j…>:[180,68] TOPIA_ID in org.nuiton.topia.persistence.TopiaEntity has been deprecated
[WARNING] <http://ci.codelutin.com/jenkins/job/wao-ci/ws/trunk/wao-services/src/main/j…>: Some input files use unchecked or unsafe operations.
[WARNING] <http://ci.codelutin.com/jenkins/job/wao-ci/ws/trunk/wao-services/src/main/j…>: Recompile with -Xlint:unchecked for details.
[INFO] 4 warnings
[INFO] -------------------------------------------------------------
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] <http://ci.codelutin.com/jenkins/job/wao-ci/ws/trunk/wao-services/src/main/j…>:[418,63] cannot find symbol
symbol: method getI18nKey()
location: class fr.ifremer.wao.entity.SamplingStrategy
[INFO] 1 error
[INFO] -------------------------------------------------------------
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[JENKINS] Archiving disabled
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Wao ............................................... SUCCESS [ 2.354 s]
[INFO] Wao :: Persistence ................................ SUCCESS [ 21.105 s]
[INFO] Wao :: Services ................................... FAILURE [ 1.089 s]
[INFO] Wao :: Web ........................................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 25.735 s
[INFO] Finished at: 2014-03-27T13:26:19+01:00
[INFO] Final Memory: 46M/809M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project wao-services: Compilation failure
[ERROR] <http://ci.codelutin.com/jenkins/job/wao-ci/ws/trunk/wao-services/src/main/j…>:[418,63] cannot find symbol
[ERROR] symbol: method getI18nKey()
[ERROR] location: class fr.ifremer.wao.entity.SamplingStrategy
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project wao-services: Compilation failure
<http://ci.codelutin.com/jenkins/job/wao-ci/ws/trunk/wao-services/src/main/j…>:[418,63] cannot find symbol
symbol: method getI18nKey()
location: class fr.ifremer.wao.entity.SamplingStrategy
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
at org.jvnet.hudson.maven3.launcher.Maven31Launcher.main(Maven31Launcher.java:132)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
at jenkins.maven3.agent.Maven31Main.launch(Maven31Main.java:181)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:134)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:69)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:328)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: org.apache.maven.plugin.compiler.CompilationFailureException: Compilation failure
<http://ci.codelutin.com/jenkins/job/wao-ci/ws/trunk/wao-services/src/main/j…>:[418,63] cannot find symbol
symbol: method getI18nKey()
location: class fr.ifremer.wao.entity.SamplingStrategy
at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:858)
at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:129)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 30 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :wao-services
Sending e-mails to: wao-commits(a)list.forge.codelutin.com chemit+codelutin-ci(a)codelutin.com
channel stopped
1
1
Build failed in Jenkins: wao-ci » Wao :: Services #58
by admin+ci-codelutin.com@codelutin.com 27 Mar '14
by admin+ci-codelutin.com@codelutin.com 27 Mar '14
27 Mar '14
See <http://ci.codelutin.com/jenkins/job/wao-ci/fr.ifremer$wao-services/58/chang…>
Changes:
[Tony CHEMIT] refs #4483 (make SamplePlan fully serializable + use it in jsp)
------------------------------------------
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Wao :: Services 4.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ wao-services ---
[INFO] Deleting <http://ci.codelutin.com/jenkins/job/wao-ci/fr.ifremer$wao-services/ws/target>
[INFO]
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (check-project-files) @ wao-services ---
[INFO]
[INFO] --- i18n-maven-plugin:3.0:parserJava (parseOthersAndGen) @ wao-services ---
[INFO] start entry basedir:<http://ci.codelutin.com/jenkins/job/wao-ci/fr.ifremer$wao-services/ws/src/m…,> includes:[**/*.java]
[INFO] 69 file(s) to process (among 69 files)
[INFO] Parsing is done. [treated file(s) : 18/69](total time:204.078ms) ( ~ 2.958ms / file)
[INFO]
[INFO] >>> i18n-maven-plugin:3.0:gen (parseOthersAndGen) @ wao-services >>>
[INFO]
[INFO] --- i18n-maven-plugin:3.0:get (get) @ wao-services ---
[INFO] config - basedir : <http://ci.codelutin.com/jenkins/job/wao-ci/fr.ifremer$wao-services/ws/targe…>
[INFO] config - locales : [fr_FR, en_GB]
[INFO] import getter java.getter in 129476ns
[INFO] Copying wao-services.properties to <http://ci.codelutin.com/jenkins/job/wao-ci/fr.ifremer$wao-services/ws/targe…>
[INFO] Copying wao-services.properties to <http://ci.codelutin.com/jenkins/job/wao-ci/fr.ifremer$wao-services/ws/targe…>
[INFO]
[INFO] <<< i18n-maven-plugin:3.0:gen (parseOthersAndGen) @ wao-services <<<
[INFO]
[INFO] --- i18n-maven-plugin:3.0:gen (parseOthersAndGen) @ wao-services ---
[INFO] config - src basedir : <http://ci.codelutin.com/jenkins/job/wao-ci/fr.ifremer$wao-services/ws/src/m…>
[INFO] config - out basedir : <http://ci.codelutin.com/jenkins/job/wao-ci/fr.ifremer$wao-services/ws/targe…>
[INFO] config - locales : [fr_FR, en_GB]
[INFO] prepare bundle for locale fr_FR
[INFO] merge bundle fr_FR to out
[INFO] copy bundle fr_FR to src
[INFO] prepare bundle for locale en_GB
[INFO] merge bundle en_GB to out
[INFO] copy bundle en_GB to src
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ wao-services ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 4 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ wao-services ---
[INFO] Compiling 69 source files to <http://ci.codelutin.com/jenkins/job/wao-ci/fr.ifremer$wao-services/ws/targe…>
[INFO] -------------------------------------------------------------
[WARNING] COMPILATION WARNING :
[INFO] -------------------------------------------------------------
[WARNING] <http://ci.codelutin.com/jenkins/job/wao-ci/fr.ifremer$wao-services/ws/src/m…>:[173,46] findByEntityClassFqn(java.lang.String) in fr.ifremer.wao.entity.GeneratedReferentialMetaTopiaDao has been deprecated
[WARNING] <http://ci.codelutin.com/jenkins/job/wao-ci/fr.ifremer$wao-services/ws/src/m…>:[180,68] TOPIA_ID in org.nuiton.topia.persistence.TopiaEntity has been deprecated
[WARNING] <http://ci.codelutin.com/jenkins/job/wao-ci/fr.ifremer$wao-services/ws/src/m…>: Some input files use unchecked or unsafe operations.
[WARNING] <http://ci.codelutin.com/jenkins/job/wao-ci/fr.ifremer$wao-services/ws/src/m…>: Recompile with -Xlint:unchecked for details.
[INFO] 4 warnings
[INFO] -------------------------------------------------------------
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] <http://ci.codelutin.com/jenkins/job/wao-ci/fr.ifremer$wao-services/ws/src/m…>:[418,63] cannot find symbol
symbol: method getI18nKey()
location: class fr.ifremer.wao.entity.SamplingStrategy
[INFO] 1 error
[INFO] -------------------------------------------------------------
[JENKINS] Archiving disabled
1
1
r1766 - in trunk: wao-services/src/main/java/fr/ifremer/wao/services/service wao-web/src/main/webapp/WEB-INF/content/obsmer
by tchemit@users.forge.codelutin.com 27 Mar '14
by tchemit@users.forge.codelutin.com 27 Mar '14
27 Mar '14
Author: tchemit
Date: 2014-03-27 13:39:43 +0100 (Thu, 27 Mar 2014)
New Revision: 1766
Url: http://forge.codelutin.com/projects/wao/repository/revisions/1766
Log:
refs #4483 (done for me)
Modified:
trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsMerSamplingPlan.java
trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsMerSamplingPlanBuilder.java
trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/sampling-plan.jsp
Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsMerSamplingPlan.java
===================================================================
--- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsMerSamplingPlan.java 2014-03-27 12:38:49 UTC (rev 1765)
+++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsMerSamplingPlan.java 2014-03-27 12:39:43 UTC (rev 1766)
@@ -47,44 +47,37 @@
protected Collection<ObsMerSamplingPlanFacadePart> facades;
/**
- * Statistics of total tides over the plan by month.
+ * Total tides over the plan by month.
*/
- protected Map<Date, ObsMerSamplingPlanStatistics> statisticsMap;
+ protected Map<Date, ObsMerSamplingPlanStatistics> totalsPerMonth;
/**
+ * High total over the hole plan.
+ */
+ protected ObsMerSamplingPlanStatistics highTotals;
+
+ /**
* Total of observation times in days expected.
- * FIXME Voir si on doit garder un *D*ouble
+ *
+ * <strong>Note:</strong> can be null.
*/
protected Double observationTimesInDaysTotalExpected;
/**
* Total of observation times in days real.
- * FIXME Voir si on doit garder un *L*ong
+ *
+ * <strong>Note:</strong> can be null.
*/
protected Long observationTimesInDaysTotalReal;
/**
* Total of observation times in days estimated.
- * FIXME Voir si on doit garder un *L*ong
+ *
+ * <strong>Note:</strong> can be null.
*/
protected Long observationTimesInDaysTotalEstimated;
/**
- * ?
- */
- protected int highTotalExpected;
-
- /**
- * ?
- */
- protected int highTotalReal;
-
- /**
- * ?
- */
- protected int highTotalEstimated;
-
- /**
* List of month used by sample rows.
*/
protected List<Date> months;
@@ -93,22 +86,18 @@
public ObsMerSamplingPlan(List<Date> months,
Collection<ObsMerSamplingPlanFacadePart> facadeParts,
- Map<Date, ObsMerSamplingPlanStatistics> statisticsMap,
- int highTotalExpected,
- int highTotalReal,
- int highTotalEstimated,
+ Map<Date, ObsMerSamplingPlanStatistics> totalsPerMonth,
+ ObsMerSamplingPlanStatistics highTotals,
Double observationTimesInDaysTotalExpected,
Long observationTimesInDaysTotalReal,
Long observationTimesInDaysTotalEstimated,
SampleRowsFilterValues filterValues) {
this.months = months;
this.facades = facadeParts;
- this.statisticsMap = statisticsMap;
+ this.totalsPerMonth = totalsPerMonth;
+ this.highTotals = highTotals;
this.observationTimesInDaysTotalExpected = observationTimesInDaysTotalExpected;
this.observationTimesInDaysTotalReal = observationTimesInDaysTotalReal;
- this.highTotalExpected = highTotalExpected;
- this.highTotalReal = highTotalReal;
- this.highTotalEstimated = highTotalEstimated;
this.observationTimesInDaysTotalEstimated = observationTimesInDaysTotalEstimated;
this.filterValues = filterValues;
}
@@ -134,46 +123,40 @@
return observationTimesInDaysTotalEstimated;
}
- public Integer getTotalExpectedForMonth(Date month) {
- Integer result = statisticsMap.get(month).getNbTidesExpected();
+ public Integer getTotalExpected(Date month) {
+ Integer result = totalsPerMonth.get(month).getNbTidesExpected();
return result;
}
- public Integer getTotalRealForMonth(Date month) {
- Integer result = statisticsMap.get(month).getNbTidesReal();
+ public Integer getTotalReal(Date month) {
+ Integer result = totalsPerMonth.get(month).getNbTidesReal();
return result;
}
- public Integer getTotalEstimatedForMonth(Date month) {
- Integer result = statisticsMap.get(month).getNbTidesEstimated();
+ public Integer getTotalEstimated(Date month) {
+ Integer result = totalsPerMonth.get(month).getNbTidesEstimated();
return result;
}
- //TODO Move this in UI?
- public String getRatioForMonth(Date month) {
- String result = statisticsMap.get(month).getRatioForMonth();
+ public String getTotalRatio(Date month) {
+ String result = totalsPerMonth.get(month).getRatio("-");
return result;
}
public Integer getHighTotalExpected() {
- return highTotalExpected;
+ return highTotals.getNbTidesExpected();
}
public Integer getHighTotalReal() {
- return highTotalReal;
+ return highTotals.getNbTidesReal();
}
public Integer getHighTotalEstimated() {
- return highTotalEstimated;
+ return highTotals.getNbTidesEstimated();
}
- //TODO Move this in UI?
public String getHighTotalRatio() {
- String ratio = "";
- if (highTotalExpected > 0) {
- double percent = ((double) highTotalReal / highTotalExpected);
- ratio = NumberFormat.getPercentInstance().format(percent);
- }
+ String ratio = highTotals.getRatio("");
return ratio;
}
@@ -261,38 +244,28 @@
protected Map<Date, ObsMerSamplingPlanStatistics> nbTidesPerMonth;
/**
- * Total of expected tides.
+ * Total of tides.
*/
- protected int totalTidesExpected;
+ protected ObsMerSamplingPlanStatistics totalTides;
/**
- * Total of real tides.
- */
- protected int totalTidesReal;
-
- /**
- * Total of estimated tides.
- */
- protected int totalTidesEstimated;
-
- /**
* Expected Times of observation days.
* <p/>
- * FIXME Voir si on doit garder un *D*ouble
+ * <strong>Note:</strong> can be null.
*/
protected Double observationTimesInDaysExpected;
/**
* Real times of observation in days.
* <p/>
- * FIXME Voir si on doit garder un *L*long
+ * <strong>Note:</strong> can be null.
*/
protected Long observationTimesInDaysReal;
/**
* Estimated times of observation in days.
* <p/>
- * FIXME Voir si on doit garder un *L*long
+ * <strong>Note:</strong> can be null.
*/
protected Long observationTimesInDaysEstimated;
@@ -357,6 +330,9 @@
this.nbTidesPerMonth = nbTidesPerMonth;
// compute total tides
+ int totalTidesExpected = 0;
+ int totalTidesEstimated = 0;
+ int totalTidesReal = 0;
for (ObsMerSamplingPlanStatistics obsMerSamplingPlanStatistics : nbTidesPerMonth.values()) {
Integer totalExpected = obsMerSamplingPlanStatistics.getNbTidesExpected();
if (totalExpected != null) {
@@ -372,6 +348,8 @@
}
}
+ totalTides = new ObsMerSamplingPlanStatistics(totalTidesExpected, totalTidesReal, totalTidesEstimated);
+
fishingZones = "";
for (FishingZone zone : sampleRow.getFishingZone()) {
fishingZones += zone.getDistrictCode() + ", ";
@@ -415,7 +393,7 @@
}
}
professionDescriptionWithoutDCF5 = sampleRow.getProfessionDescriptionWithoutDCF5();
- samplingStrategy = sampleRow.getSamplingStrategy().getI18nKey();
+ samplingStrategy = "";//TODO sampleRow.getSamplingStrategy().getI18nKey();
sampleRowId = sampleRow.getTopiaId();
}
@@ -512,15 +490,15 @@
}
public int getTotalTidesExpected() {
- return totalTidesExpected;
+ return totalTides.getNbTidesExpected();
}
public int getTotalTidesReal() {
- return totalTidesReal;
+ return totalTides.getNbTidesReal();
}
public int getTotalTidesEstimated() {
- return totalTidesEstimated;
+ return totalTides.getNbTidesEstimated();
}
public String getProfessionDescriptionWithoutDCF5() {
@@ -543,13 +521,7 @@
}
public String getTotalPercentage() {
- String result;
- if (totalTidesExpected > 0) {
- double percentage = (double) totalTidesReal / (double) totalTidesExpected;
- result = NumberFormat.getPercentInstance().format(percentage);
- } else {
- result = "- %";
- }
+ String result = totalTides.getRatio("-");
return result;
}
@@ -621,9 +593,8 @@
return nbTidesEstimated;
}
- //FIXME Move this in ui ?
- public String getRatioForMonth() {
- String ratio = "-";
+ public String getRatio(String defaultValue) {
+ String ratio = defaultValue;
if (nbTidesExpected != null && nbTidesExpected > 0 &&
nbTidesReal != null && nbTidesReal > 0) {
double percent = ((double) nbTidesReal / nbTidesExpected);
Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsMerSamplingPlanBuilder.java
===================================================================
--- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsMerSamplingPlanBuilder.java 2014-03-27 12:38:49 UTC (rev 1765)
+++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsMerSamplingPlanBuilder.java 2014-03-27 12:39:43 UTC (rev 1766)
@@ -218,12 +218,12 @@
statisticsMap.put(month, planStatistics);
}
+ ObsMerSamplingPlan.ObsMerSamplingPlanStatistics highTotals = new ObsMerSamplingPlan.ObsMerSamplingPlanStatistics(highTotalExpected, highTotalReal, highTotalEstimated);
+
ObsMerSamplingPlan result = new ObsMerSamplingPlan(months,
sortedFacades,
statisticsMap,
- highTotalExpected,
- highTotalReal,
- highTotalEstimated,
+ highTotals,
observationTimesInDaysTotalExpected.toDouble(),
observationTimesInDaysTotalReal.toLong(),
observationTimesInDaysTotalEstimated.toLong(),
Modified: trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/sampling-plan.jsp
===================================================================
--- trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/sampling-plan.jsp 2014-03-27 12:38:49 UTC (rev 1765)
+++ trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/sampling-plan.jsp 2014-03-27 12:39:43 UTC (rev 1766)
@@ -284,7 +284,7 @@
<td><s:property value="nbObservants" /></td>
<td>
<s:if test="appliedCoverageRate">
- <s:property value="appliedCoverageRate" /> %
+ <s:property value="appliedCoverageRate" />%
</s:if>
</td>
<td><s:property value="comment" /></td>
@@ -367,13 +367,13 @@
<!-- Months columns -->
<s:iterator value="samplingPlan.months" var="month">
<td<s:if test="@fr.ifremer.wao.WaoUtils@isCurrentMonth(#month)"> class="current-month"</s:if>>
- <s:property value="samplingPlan.getTotalExpectedForMonth(#month)"/>
+ <s:property value="samplingPlan.getTotalExpected(#month)"/>
<span class="display-tides-real">
<span>
- <em>(<s:property value="samplingPlan.getTotalRealForMonth(#month)"/>)</em>
+ <em>(<s:property value="samplingPlan.getTotalReal(#month)"/>)</em>
</span>
<br/>
- <s:property value="samplingPlan.getRatioForMonth(#month)"/>
+ <s:property value="samplingPlan.getTotalRatio(#month)"/>
</span>
</td>
</s:iterator>
1
0
Author: tchemit
Date: 2014-03-27 13:38:49 +0100 (Thu, 27 Mar 2014)
New Revision: 1765
Url: http://forge.codelutin.com/projects/wao/repository/revisions/1765
Log:
fix dependencies
Modified:
trunk/wao-services/pom.xml
Modified: trunk/wao-services/pom.xml
===================================================================
--- trunk/wao-services/pom.xml 2014-03-27 12:02:46 UTC (rev 1764)
+++ trunk/wao-services/pom.xml 2014-03-27 12:38:49 UTC (rev 1765)
@@ -62,6 +62,11 @@
</dependency>
<dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-core</artifactId>
+ </dependency>
+
+ <dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
1
0
r1764 - in trunk: wao-services/src/main/java/fr/ifremer/wao/services/service wao-services/src/test/java/fr/ifremer/wao/services/service wao-web/src/main/webapp/WEB-INF/content/obsmer
by tchemit@users.forge.codelutin.com 27 Mar '14
by tchemit@users.forge.codelutin.com 27 Mar '14
27 Mar '14
Author: tchemit
Date: 2014-03-27 13:02:46 +0100 (Thu, 27 Mar 2014)
New Revision: 1764
Url: http://forge.codelutin.com/projects/wao/repository/revisions/1764
Log:
refs #4483 (make SamplePlan fully serializable + use it in jsp)
Modified:
trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsMerSamplingPlan.java
trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsMerSamplingPlanBuilder.java
trunk/wao-services/src/test/java/fr/ifremer/wao/services/service/ObsMerSamplingPlanServiceTest.java
trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/sampling-plan.jsp
Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsMerSamplingPlan.java
===================================================================
--- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsMerSamplingPlan.java 2014-03-27 10:36:13 UTC (rev 1763)
+++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsMerSamplingPlan.java 2014-03-27 12:02:46 UTC (rev 1764)
@@ -22,16 +22,18 @@
*/
import fr.ifremer.wao.WaoUtils;
+import fr.ifremer.wao.entity.DCF5Code;
import fr.ifremer.wao.entity.FishingZone;
import fr.ifremer.wao.entity.SampleRow;
-import fr.ifremer.wao.entity.SampleRows;
+import fr.ifremer.wao.entity.TerrestrialLocation;
+import org.apache.commons.collections4.CollectionUtils;
import java.io.Serializable;
import java.text.NumberFormat;
-import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.Iterator;
+import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
@@ -45,7 +47,7 @@
protected Collection<ObsMerSamplingPlanFacadePart> facades;
/**
- * Statistics over the plan by month.
+ * Statistics of total tides over the plan by month.
*/
protected Map<Date, ObsMerSamplingPlanStatistics> statisticsMap;
@@ -69,21 +71,18 @@
/**
* ?
- * FIXME Voir si on doit garder un *I*integer
*/
- protected Integer highTotalExpected;
+ protected int highTotalExpected;
/**
* ?
- * FIXME Voir si on doit garder un *I*integer
*/
- protected Integer highTotalReal;
+ protected int highTotalReal;
/**
* ?
- * FIXME Voir si on doit garder un *I*integer
*/
- protected Integer highTotalEstimated;
+ protected int highTotalEstimated;
/**
* List of month used by sample rows.
@@ -95,9 +94,9 @@
public ObsMerSamplingPlan(List<Date> months,
Collection<ObsMerSamplingPlanFacadePart> facadeParts,
Map<Date, ObsMerSamplingPlanStatistics> statisticsMap,
- Integer highTotalExpected,
- Integer highTotalReal,
- Integer highTotalEstimated,
+ int highTotalExpected,
+ int highTotalReal,
+ int highTotalEstimated,
Double observationTimesInDaysTotalExpected,
Long observationTimesInDaysTotalReal,
Long observationTimesInDaysTotalEstimated,
@@ -114,19 +113,6 @@
this.filterValues = filterValues;
}
- //FIXME Remove this
- public List<SampleRow> getRows() {
- List<SampleRow> result = new ArrayList<>();
- for (ObsMerSamplingPlanFacadePart facade : facades) {
- for (ObsMerSamplingPlanSectorPart sectors : facade) {
- for (ObsMerSamplingPlanSampleRowPart row : sectors) {
- result.add(row.getSampleRow());
- }
- }
- }
- return result;
- }
-
@Override
public Iterator<ObsMerSamplingPlanFacadePart> iterator() {
return facades.iterator();
@@ -149,17 +135,17 @@
}
public Integer getTotalExpectedForMonth(Date month) {
- Integer result = statisticsMap.get(month).getTotalExpected();
+ Integer result = statisticsMap.get(month).getNbTidesExpected();
return result;
}
public Integer getTotalRealForMonth(Date month) {
- Integer result = statisticsMap.get(month).getTotalReal();
+ Integer result = statisticsMap.get(month).getNbTidesReal();
return result;
}
public Integer getTotalEstimatedForMonth(Date month) {
- Integer result = statisticsMap.get(month).getTotalEstimated();
+ Integer result = statisticsMap.get(month).getNbTidesEstimated();
return result;
}
@@ -270,9 +256,9 @@
private static final long serialVersionUID = 1L;
/**
- * Boxed sample row.
+ * Nb tides by month.
*/
- protected SampleRow sampleRow;
+ protected Map<Date, ObsMerSamplingPlanStatistics> nbTidesPerMonth;
/**
* Total of expected tides.
@@ -310,27 +296,221 @@
*/
protected Long observationTimesInDaysEstimated;
+ protected String fishingZones;
- public ObsMerSamplingPlanSampleRowPart(SampleRow sampleRow,
- int totalTidesExpected,
- int totalTidesReal,
- int totalTidesEstimated,
+ protected int nbObservants;
+
+ protected double averageTideTime;
+
+ protected String code;
+
+ protected String fishingZonesInfos;
+
+ protected String comment;
+
+ protected String programName;
+
+ protected Date periodBegin;
+
+ protected Date periodEnd;
+
+ protected String terrestrialLocationInfos;
+
+ protected Date expectedDate;
+
+ protected String groupName;
+
+ protected Double appliedCoverageRate;
+
+ protected int averageObservationsCount;
+
+ protected String professionMeshSize;
+
+ protected String professionSize;
+
+ protected String professionOther;
+
+ protected String professionLibelle;
+
+ protected String professionSpecies;
+
+ protected String companyName;
+
+ protected String samplingStrategy;
+
+ protected String professionDescriptionWithoutDCF5;
+
+ protected Map<String, String> dcf5CodesAndDescriptions;
+
+ protected Map<String, String> terrestrialLocationNamesAndDescriptions;
+
+ protected String sampleRowId;
+
+ public ObsMerSamplingPlanSampleRowPart(Map<Date, ObsMerSamplingPlanStatistics> nbTidesPerMonth,
+ SampleRow sampleRow,
Double observationTimesInDaysExpected,
Long observationTimesInDaysReal,
Long observationTimesInDaysEstimated) {
- this.sampleRow = sampleRow;
- this.totalTidesExpected = totalTidesExpected;
- this.totalTidesReal = totalTidesReal;
- this.totalTidesEstimated = totalTidesEstimated;
this.observationTimesInDaysExpected = observationTimesInDaysExpected;
this.observationTimesInDaysReal = observationTimesInDaysReal;
this.observationTimesInDaysEstimated = observationTimesInDaysEstimated;
+
+ this.nbTidesPerMonth = nbTidesPerMonth;
+ // compute total tides
+ for (ObsMerSamplingPlanStatistics obsMerSamplingPlanStatistics : nbTidesPerMonth.values()) {
+ Integer totalExpected = obsMerSamplingPlanStatistics.getNbTidesExpected();
+ if (totalExpected != null) {
+ totalTidesExpected += totalExpected;
+ }
+ Integer totalEstimated = obsMerSamplingPlanStatistics.getNbTidesEstimated();
+ if (totalEstimated != null) {
+ totalTidesEstimated += totalEstimated;
+ }
+ Integer totalReal = obsMerSamplingPlanStatistics.getNbTidesReal();
+ if (totalReal != null) {
+ totalTidesReal += totalReal;
+ }
+ }
+
+ fishingZones = "";
+ for (FishingZone zone : sampleRow.getFishingZone()) {
+ fishingZones += zone.getDistrictCode() + ", ";
+ }
+ fishingZones = fishingZones.substring(0, fishingZones.length() - 2);
+ nbObservants = sampleRow.getNbObservants();
+ averageTideTime = sampleRow.getAverageTideTime();
+ fishingZonesInfos = sampleRow.getFishingZonesInfos();
+ comment = sampleRow.getComment();
+ programName = sampleRow.getProgramName();
+ periodBegin = sampleRow.getPeriodBegin();
+ periodEnd = sampleRow.getPeriodEnd();
+ terrestrialLocationInfos = sampleRow.getTerrestrialLocationInfos();
+ expectedDate = sampleRow.getExpectedDate();
+ groupName = sampleRow.getGroupName();
+ appliedCoverageRate = sampleRow.getAppliedCoverageRate();
+ averageObservationsCount = sampleRow.getAverageObservationsCount();
+ companyName = sampleRow.getCompany().getName();
+ code = sampleRow.getCode();
+ professionMeshSize = sampleRow.getProfession().getMeshSize();
+ professionSize = sampleRow.getProfession().getSize();
+ professionOther = sampleRow.getProfession().getOther();
+ professionLibelle = sampleRow.getProfession().getLibelle();
+ professionSpecies = sampleRow.getProfession().getSpecies();
+ dcf5CodesAndDescriptions = new LinkedHashMap<>();
+ for (DCF5Code dcf5Code : sampleRow.getdCF5Code()) {
+ String key = dcf5Code.getCode();
+ String description = dcf5Code.getFishingGearCode() + " - " + dcf5Code.getFishingGearDCF().getI18nKey();
+ if (dcf5Code.getTargetSpeciesCode() != null) {
+ description += " ; " + dcf5Code.getTargetSpeciesCode() + " - " + dcf5Code.getTargetSpeciesDCF().getI18nKey();
+ }
+ dcf5CodesAndDescriptions.put(key, description);
+ }
+ terrestrialLocationNamesAndDescriptions = new LinkedHashMap<>();
+
+ if (CollectionUtils.isNotEmpty(sampleRow.getTerrestrialLocations())) {
+ for (TerrestrialLocation terrestrialLocation : sampleRow.getTerrestrialLocations()) {
+ String key = terrestrialLocation.getDistrictName();
+ String description = terrestrialLocation.getDescription();
+ dcf5CodesAndDescriptions.put(key, description);
+ }
+ }
+ professionDescriptionWithoutDCF5 = sampleRow.getProfessionDescriptionWithoutDCF5();
+ samplingStrategy = sampleRow.getSamplingStrategy().getI18nKey();
+ sampleRowId = sampleRow.getTopiaId();
}
- public SampleRow getSampleRow() {
- return sampleRow;
+ public String getSamplingStrategy() {
+ return samplingStrategy;
}
+ public String getSampleRowId() {
+ return sampleRowId;
+ }
+
+ public int getNbObservants() {
+ return nbObservants;
+ }
+
+ public double getAverageTideTime() {
+ return averageTideTime;
+ }
+
+ public String getCode() {
+ return code;
+ }
+
+ public String getFishingZonesInfos() {
+ return fishingZonesInfos;
+ }
+
+ public String getTerrestrialLocationInfos() {
+ return terrestrialLocationInfos;
+ }
+
+ public String getProfessionSize() {
+ return professionSize;
+ }
+
+ public Map<String, String> getDcf5CodesAndDescriptions() {
+ return dcf5CodesAndDescriptions;
+ }
+
+ public Map<String, String> getTerrestrialLocationNamesAndDescriptions() {
+ return terrestrialLocationNamesAndDescriptions;
+ }
+
+ public String getComment() {
+ return comment;
+ }
+
+ public String getProgramName() {
+ return programName;
+ }
+
+ public Date getPeriodBegin() {
+ return periodBegin;
+ }
+
+ public Date getPeriodEnd() {
+ return periodEnd;
+ }
+
+ public Date getExpectedDate() {
+ return expectedDate;
+ }
+
+ public String getGroupName() {
+ return groupName;
+ }
+
+ public Double getAppliedCoverageRate() {
+ return appliedCoverageRate;
+ }
+
+ public int getAverageObservationsCount() {
+ return averageObservationsCount;
+ }
+
+ public String getProfessionMeshSize() {
+ return professionMeshSize;
+ }
+
+ public String getProfessionOther() {
+ return professionOther;
+ }
+
+ public String getProfessionLibelle() {
+ return professionLibelle;
+ }
+
+ public String getProfessionSpecies() {
+ return professionSpecies;
+ }
+
+ public String getCompanyName() {
+ return companyName;
+ }
+
public int getTotalTidesExpected() {
return totalTidesExpected;
}
@@ -343,25 +523,28 @@
return totalTidesEstimated;
}
+ public String getProfessionDescriptionWithoutDCF5() {
+ return professionDescriptionWithoutDCF5;
+ }
+
public Integer getNbTidesExpected(Date month) {
- Integer result = SampleRows.getExpectedTidesValue(sampleRow, month);
+ Integer result = nbTidesPerMonth.get(month).getNbTidesExpected();
return result;
}
public Integer getNbTidesReal(Date month) {
- Integer result = SampleRows.getRealTidesValue(sampleRow, month);
+ Integer result = nbTidesPerMonth.get(month).getNbTidesReal();
return result;
}
public Integer getNbTidesEstimated(Date month) {
- Integer result = SampleRows.getEstimatedTidesValue(sampleRow, month);
+ Integer result = nbTidesPerMonth.get(month).getNbTidesEstimated();
return result;
}
- //FIXME Move this in ui ?
public String getTotalPercentage() {
String result;
- if (sampleRow.getTotalTidesExpected() > 0) {
+ if (totalTidesExpected > 0) {
double percentage = (double) totalTidesReal / (double) totalTidesExpected;
result = NumberFormat.getPercentInstance().format(percentage);
} else {
@@ -371,11 +554,7 @@
}
public String getFishingZones() {
- String result = "";
- for (FishingZone zone : sampleRow.getFishingZone()) {
- result += zone.getDistrictCode() + ", ";
- }
- return result.substring(0, result.length() - 2);
+ return fishingZones;
}
public Double getObservationTimesInDaysExpected() {
@@ -408,52 +587,46 @@
private static final long serialVersionUID = 1L;
/**
- * Total of expected tides.
- * <p/>
- * FIXME Voir si on doit garder un *I*nteger
+ * Number of expected tides.
*/
- protected Integer totalExpected;
+ protected Integer nbTidesExpected;
/**
- * Total of real tides.
- * <p/>
- * FIXME Voir si on doit garder un *I*nteger
+ * Number of real tides.
*/
- protected Integer totalReal;
+ protected Integer nbTidesReal;
/**
- * Total of estimated tides.
- * <p/>
- * FIXME Voir si on doit garder un *I*nteger
+ * Number of estimated tides.
*/
- protected Integer totalEstimated;
+ protected Integer nbTidesEstimated;
- public ObsMerSamplingPlanStatistics(Integer totalExpected,
- Integer totalReal,
- Integer totalEstimated) {
- this.totalExpected = totalExpected;
- this.totalReal = totalReal;
- this.totalEstimated = totalEstimated;
+ public ObsMerSamplingPlanStatistics(Integer nbTidesExpected,
+ Integer nbTidesReal,
+ Integer nbTidesEstimated) {
+ this.nbTidesExpected = nbTidesExpected;
+ this.nbTidesReal = nbTidesReal;
+ this.nbTidesEstimated = nbTidesEstimated;
}
- public Integer getTotalExpected() {
- return totalExpected;
+ public Integer getNbTidesExpected() {
+ return nbTidesExpected;
}
- public Integer getTotalReal() {
- return totalReal;
+ public Integer getNbTidesReal() {
+ return nbTidesReal;
}
- public Integer getTotalEstimated() {
- return totalEstimated;
+ public Integer getNbTidesEstimated() {
+ return nbTidesEstimated;
}
//FIXME Move this in ui ?
public String getRatioForMonth() {
String ratio = "-";
- if (totalExpected != null && totalExpected > 0 &&
- totalReal != null && totalReal > 0) {
- double percent = ((double) totalReal / totalExpected);
+ if (nbTidesExpected != null && nbTidesExpected > 0 &&
+ nbTidesReal != null && nbTidesReal > 0) {
+ double percent = ((double) nbTidesReal / nbTidesExpected);
ratio = NumberFormat.getPercentInstance().format(percent);
}
return ratio;
Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsMerSamplingPlanBuilder.java
===================================================================
--- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsMerSamplingPlanBuilder.java 2014-03-27 10:36:13 UTC (rev 1763)
+++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/ObsMerSamplingPlanBuilder.java 2014-03-27 12:02:46 UTC (rev 1764)
@@ -74,21 +74,21 @@
*
* @see ObsMerSamplingPlan#highTotalExpected
*/
- protected MutableInt highTotalExpected;
+ protected int highTotalExpected;
/**
* To compute the high total real.
*
* @see ObsMerSamplingPlan#highTotalReal
*/
- protected MutableInt highTotalReal;
+ protected int highTotalReal;
/**
* To compute the high total estimated.
*
* @see ObsMerSamplingPlan#highTotalEstimated
*/
- protected MutableInt highTotalEstimated;
+ protected int highTotalEstimated;
/**
* To compute the total of expected observation times in days.
@@ -114,21 +114,21 @@
/**
* To compute by month the total of expected tides.
*
- * @see ObsMerSamplingPlan.ObsMerSamplingPlanStatistics#totalExpected
+ * @see ObsMerSamplingPlan.ObsMerSamplingPlanStatistics#nbTidesExpected
*/
protected Map<Date, MutableInt> totalExpectedForMonths;
/**
* To compute by month the total of expected tides.
*
- * @see ObsMerSamplingPlan.ObsMerSamplingPlanStatistics#totalEstimated
+ * @see ObsMerSamplingPlan.ObsMerSamplingPlanStatistics#nbTidesEstimated
*/
protected Map<Date, MutableInt> totalEstimatedForMonths;
/**
* To compute by month the total of real tides.
*
- * @see ObsMerSamplingPlan.ObsMerSamplingPlanStatistics#totalReal
+ * @see ObsMerSamplingPlan.ObsMerSamplingPlanStatistics#nbTidesReal
*/
protected Map<Date, MutableInt> totalRealForMonths;
@@ -136,9 +136,6 @@
this.sampleRowsFilter = sampleRowsFilter;
this.sampleRowsFilterValues = new SampleRowsFilterValues();
this.facadeMap = new TreeMap<>();
- this.highTotalExpected = new MutableInt();
- this.highTotalReal = new MutableInt();
- this.highTotalEstimated = new MutableInt();
this.observationTimesInDaysTotalExpected = new MutableDouble();
this.observationTimesInDaysTotalReal = new MutableLong();
this.observationTimesInDaysTotalEstimated = new MutableLong();
@@ -149,12 +146,6 @@
PeriodDates periodDates = new PeriodDates(sampleRowsFilter.getPeriodFrom(),
sampleRowsFilter.getPeriodTo());
this.months = periodDates.getMonths();
-
- for (Date month : months) {
- totalExpectedForMonths.put(month, new MutableInt());
- totalRealForMonths.put(month, new MutableInt());
- totalEstimatedForMonths.put(month, new MutableInt());
- }
}
public ObsMerSamplingPlanBuilder addSampleRow(SampleRow sampleRow,
@@ -177,18 +168,12 @@
// get sector context
ServiceContext sectorPart = facadeContext.getOrAddSectorContext(sectors);
- // compute nb expected tides for sample row
- int totalTidesExpected = getNbTidesExpected(sampleRow);
- // compute nb real tides for sample row
- int totalTidesReal = getNbTidesReal(sampleRow);
- // compute nb estimated tides for sample row
- int totalTidesEstimated = getNbTidesEstimated(sampleRow);
+ // compute nb tides per month
+ Map<Date, ObsMerSamplingPlan.ObsMerSamplingPlanStatistics> nbTidesPerMonth = computeNbTidesPerMonth(sampleRow);
// add sample row
sectorPart.addSampleRow(sampleRow,
- totalTidesExpected,
- totalTidesReal,
- totalTidesEstimated,
+ nbTidesPerMonth,
observationTimesInDaysExpected,
observationTimesInDaysReal,
observationTimesInDaysEstimated);
@@ -236,9 +221,9 @@
ObsMerSamplingPlan result = new ObsMerSamplingPlan(months,
sortedFacades,
statisticsMap,
- highTotalExpected.toInteger(),
- highTotalReal.toInteger(),
- highTotalEstimated.toInteger(),
+ highTotalExpected,
+ highTotalReal,
+ highTotalEstimated,
observationTimesInDaysTotalExpected.toDouble(),
observationTimesInDaysTotalReal.toLong(),
observationTimesInDaysTotalEstimated.toLong(),
@@ -246,42 +231,42 @@
return result;
}
- protected int getNbTidesExpected(SampleRow sampleRow) {
- int result = 0;
+ protected Map<Date, ObsMerSamplingPlan.ObsMerSamplingPlanStatistics> computeNbTidesPerMonth(SampleRow sampleRow) {
+ Map<Date, ObsMerSamplingPlan.ObsMerSamplingPlanStatistics> result = new TreeMap<>();
for (Date month : months) {
- Integer tidesValue = SampleRows.getExpectedTidesValue(sampleRow, month);
- if (tidesValue != null) {
- result += tidesValue;
- totalExpectedForMonths.get(month).add(tidesValue);
+ Integer expectedTidesValue = SampleRows.getExpectedTidesValue(sampleRow, month);
+ if (expectedTidesValue != null) {
+ MutableInt mutableInt = totalExpectedForMonths.get(month);
+ if (mutableInt == null) {
+ totalExpectedForMonths.put(month, mutableInt = new MutableInt());
+ }
+ mutableInt.add(expectedTidesValue);
+ highTotalExpected += expectedTidesValue;
}
- }
- highTotalExpected.add(result);
- return result;
- }
-
- protected int getNbTidesReal(SampleRow sampleRow) {
- int result = 0;
- for (Date month : months) {
- Integer tidesValue = SampleRows.getRealTidesValue(sampleRow, month);
- if (tidesValue != null) {
- result += tidesValue;
- totalRealForMonths.get(month).add(tidesValue);
+ Integer realTidesValue = SampleRows.getRealTidesValue(sampleRow, month);
+ if (realTidesValue != null) {
+ MutableInt mutableInt = totalRealForMonths.get(month);
+ if (mutableInt == null) {
+ totalRealForMonths.put(month, mutableInt = new MutableInt());
+ }
+ mutableInt.add(realTidesValue);
+ highTotalReal += realTidesValue;
}
- }
- highTotalReal.add(result);
- return result;
- }
- protected int getNbTidesEstimated(SampleRow sampleRow) {
- int result = 0;
- for (Date month : months) {
- Integer tidesValue = SampleRows.getEstimatedTidesValue(sampleRow, month);
- if (tidesValue != null) {
- result += tidesValue;
- totalEstimatedForMonths.get(month).add(tidesValue);
+ Integer estimatedTidesValue = SampleRows.getEstimatedTidesValue(sampleRow, month);
+ if (estimatedTidesValue != null) {
+ MutableInt mutableInt = totalEstimatedForMonths.get(month);
+ if (mutableInt == null) {
+ totalEstimatedForMonths.put(month, mutableInt = new MutableInt());
+ }
+ mutableInt.add(estimatedTidesValue);
+ highTotalEstimated += estimatedTidesValue;
}
+ result.put(month, new ObsMerSamplingPlan.ObsMerSamplingPlanStatistics(expectedTidesValue,
+ realTidesValue,
+ estimatedTidesValue));
+
}
- highTotalEstimated.add(result);
return result;
}
@@ -335,22 +320,18 @@
protected ServiceContext(String sectors) {
this.sectors = sectors;
- rows = new ArrayList<>();
+ this.rows = new ArrayList<>();
}
protected ObsMerSamplingPlan.ObsMerSamplingPlanSampleRowPart addSampleRow(SampleRow row,
- int totalTidesExpected,
- int totalTidesReal,
- int totalTidesEstimated,
+ Map<Date, ObsMerSamplingPlan.ObsMerSamplingPlanStatistics> nbTidesPerMonth,
Double observationTimesInDaysExpected,
Long observationTimesInDaysReal,
Long observationTimesInDaysEstimated) {
ObsMerSamplingPlan.ObsMerSamplingPlanSampleRowPart rowPart =
- new ObsMerSamplingPlan.ObsMerSamplingPlanSampleRowPart(row,
- totalTidesExpected,
- totalTidesReal,
- totalTidesEstimated,
+ new ObsMerSamplingPlan.ObsMerSamplingPlanSampleRowPart(nbTidesPerMonth,
+ row,
observationTimesInDaysExpected,
observationTimesInDaysReal,
observationTimesInDaysEstimated);
@@ -363,7 +344,7 @@
Collection<ObsMerSamplingPlan.ObsMerSamplingPlanSampleRowPart> sortedRows = Ordering.natural().onResultOf(new Function<ObsMerSamplingPlan.ObsMerSamplingPlanSampleRowPart, String>() {
public String apply(ObsMerSamplingPlan.ObsMerSamplingPlanSampleRowPart input) {
- return input.getSampleRow().getCode();
+ return input.getCode();
}
}).immutableSortedCopy(rows);
ObsMerSamplingPlan.ObsMerSamplingPlanSectorPart result =
Modified: trunk/wao-services/src/test/java/fr/ifremer/wao/services/service/ObsMerSamplingPlanServiceTest.java
===================================================================
--- trunk/wao-services/src/test/java/fr/ifremer/wao/services/service/ObsMerSamplingPlanServiceTest.java 2014-03-27 10:36:13 UTC (rev 1763)
+++ trunk/wao-services/src/test/java/fr/ifremer/wao/services/service/ObsMerSamplingPlanServiceTest.java 2014-03-27 12:02:46 UTC (rev 1764)
@@ -23,7 +23,6 @@
import com.google.common.collect.ImmutableSet;
import fr.ifremer.wao.SampleRowsFilter;
-import fr.ifremer.wao.entity.SampleRow;
import fr.ifremer.wao.services.AbstractWaoServiceTest;
import fr.ifremer.wao.services.ObsMerFixtures;
import org.apache.commons.io.IOUtils;
@@ -36,8 +35,11 @@
import java.io.IOException;
import java.io.InputStream;
+import java.util.ArrayList;
import java.util.List;
+import static fr.ifremer.wao.services.service.ObsMerSamplingPlan.*;
+
public class ObsMerSamplingPlanServiceTest extends AbstractWaoServiceTest {
private static final Log log = LogFactory.getLog(ObsMerSamplingPlanServiceTest.class);
@@ -83,25 +85,37 @@
serviceContext.setDate(DateUtil.createDate(15, 5, 2010));
SampleRowsFilter filter = service.newSampleRowsFilter(fixtures.admin());
- List<SampleRow> samplingPlan = service.getSamplingPlan(filter).getRows();
- Assert.assertEquals(12, samplingPlan.size());
+ ObsMerSamplingPlan samplingPlan = service.getSamplingPlan(filter);
+ assertSamplePlanRowsNumber(12, samplingPlan);
filter = service.newSampleRowsFilter(fixtures.admin());
filter.setFishingGearDcfIds(ImmutableSet.of(fixtures.ptb().getTopiaId()));
- samplingPlan = service.getSamplingPlan(filter).getRows();
- Assert.assertEquals(3, samplingPlan.size());
+ samplingPlan = service.getSamplingPlan(filter);
+ assertSamplePlanRowsNumber(3, samplingPlan);
filter = service.newSampleRowsFilter(fixtures.admin());
filter.setTargetSpeciesDcfIds(ImmutableSet.of(fixtures.def().getTopiaId()));
- samplingPlan = service.getSamplingPlan(filter).getRows();
- Assert.assertEquals(4, samplingPlan.size());
+ samplingPlan = service.getSamplingPlan(filter);
+ assertSamplePlanRowsNumber(4, samplingPlan );
filter = service.newSampleRowsFilter(fixtures.admin());
filter.setFishingGearDcfIds(ImmutableSet.of(fixtures.ptb().getTopiaId()));
filter.setTargetSpeciesDcfIds(ImmutableSet.of(fixtures.def().getTopiaId()));
- samplingPlan = service.getSamplingPlan(filter).getRows();
- Assert.assertEquals(1, samplingPlan.size());
+ samplingPlan = service.getSamplingPlan(filter);
+ assertSamplePlanRowsNumber(1, samplingPlan );
+ }
+ protected void assertSamplePlanRowsNumber(int expectedRowsSize, ObsMerSamplingPlan samplingPlan) {
+ int actualRowsSize = 0;
+ for (ObsMerSamplingPlanFacadePart facade : samplingPlan) {
+ for (ObsMerSamplingPlanSectorPart sectors : facade) {
+
+ for (ObsMerSamplingPlanSampleRowPart row : sectors) {
+ actualRowsSize++;
+ }
+ }
+ }
+ Assert.assertEquals(expectedRowsSize, actualRowsSize);
}
@Test
Modified: trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/sampling-plan.jsp
===================================================================
--- trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/sampling-plan.jsp 2014-03-27 10:36:13 UTC (rev 1763)
+++ trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/sampling-plan.jsp 2014-03-27 12:02:46 UTC (rev 1764)
@@ -215,80 +215,79 @@
</tr>
<%--Iterate on SampleRows --%>
<s:iterator value="samplingPlanSector" var="samplingPlanRow">
-<s:set var="sampleRow" value="%{#samplingPlanRow.sampleRow}"/>
- <tr<s:if test="sampleRowToHighlightId.equals(#sampleRow.topiaId)"> class="highlight"</s:if>>
+ <tr<s:if test="sampleRowToHighlightId.equals(topiaId)"> class="highlight"</s:if>>
<th>
- <s:property value="#sampleRow.code" />
+ <s:property value="code" />
</th>
- <td><s:property value="#sampleRow.programName" /></td>
+ <td><s:property value="programName" /></td>
<s:if test="fullView">
- <td class="only-visible-fullview"><s:property value="#sampleRow.company.name" /></td>
+ <td class="only-visible-fullview"><s:property value="companyName" /></td>
</s:if>
- <td class="only-visible-fullview"><s:property value="#samplingPlanRow.fishingZones" /></td>
+ <td class="only-visible-fullview"><s:property value="fishingZones" /></td>
<s:if test="fullView">
- <td class="only-visible-fullview"><s:property value="#sampleRow.fishingZonesInfos" /></td>
+ <td class="only-visible-fullview"><s:property value="fishingZonesInfos" /></td>
<td class="only-visible-fullview">
- <s:iterator value="%{#sampleRow.getdCF5Code()}" var="dcf5code">
+ <s:iterator value="dcf5CodesAndDescriptions">
<span>
- <s:property value="code"/>
+ <s:property value="key"/>
</span>
</s:iterator>
</td>
- <td class="only-visible-fullview"><s:property value="#sampleRow.profession.meshSize" /></td>
- <td class="only-visible-fullview"><s:property value="#sampleRow.profession.size" /></td>
- <td class="only-visible-fullview"><s:property value="#sampleRow.profession.other" /></td>
- <td class="only-visible-fullview"><s:property value="#sampleRow.profession.libelle" /></td>
- <td class="only-visible-fullview"><s:property value="#sampleRow.profession.species" /></td>
- <td class="only-visible-fullview"><s:property value="%{formatMonth(#sampleRow.periodBegin)}" /></td>
- <td class="only-visible-fullview"><s:property value="%{formatMonth(#sampleRow.periodEnd)}" /></td>
+ <td class="only-visible-fullview"><s:property value="professionMeshSize" /></td>
+ <td class="only-visible-fullview"><s:property value="professionSize" /></td>
+ <td class="only-visible-fullview"><s:property value="professionOther" /></td>
+ <td class="only-visible-fullview"><s:property value="professionLibelle" /></td>
+ <td class="only-visible-fullview"><s:property value="professionSpecies" /></td>
+ <td class="only-visible-fullview"><s:property value="%{formatMonth(periodBegin)}" /></td>
+ <td class="only-visible-fullview"><s:property value="%{formatMonth(periodEnd)}" /></td>
</s:if>
<s:else>
<td class="only-visible-compactview">
- <s:iterator value="%{#sampleRow.getdCF5Code()}" var="dcf5code">
- <span>
- <s:property value="code"/>
- </span>
+ <s:iterator value="dcf5CodesAndDescriptions">
+ <span>
+ <s:property value="key"/>
+ </span>
</s:iterator>
- <s:property value="#sampleRow.professionDescriptionWithoutDCF5" />
+ <s:property value="professionDescriptionWithoutDCF5" />
</td>
<td class="only-visible-compactview">
- <s:property value="#row.profession.libelle" />
+ <s:property value="professionLibelle" />
</td>
</s:else>
<!-- Months columns -->
<s:iterator value="samplingPlan.months" var="month">
<td<s:if test="@fr.ifremer.wao.WaoUtils@isCurrentMonth(#month)"> class="current-month"</s:if>>
- <s:property value="%{#samplingPlanRow.getNbTidesExpected(#month)}"/>
- <span<s:if test="#samplingPlanRow.hasNbTidesReal(#month) && !#authenticatedWaoUser.guest"> class="display-tides-real"</s:if>>
- <em>(<s:property value="%{#samplingPlanRow.getNbTidesReal(#month)}"/>)
+ <s:property value="%{getNbTidesExpected(#month)}"/>
+ <span<s:if test="hasNbTidesReal(#month) && !#authenticatedWaoUser.guest"> class="display-tides-real"</s:if>>
+ <em>(<s:property value="%{getNbTidesReal(#month)}"/>)
</em>
</span>
</td>
</s:iterator>
<td>
<span>
- <s:property value="#samplingPlanRow.totalTidesExpected" />
+ <s:property value="totalTidesExpected" />
<s:if test="!authenticatedWaoUser.guest">
- <em>(<s:property value="#samplingPlanRow.totalTidesReal" />)</em>
+ <em>(<s:property value="totalTidesReal" />)</em>
<br/>
- <strong><s:property value="#samplingPlanRow.totalPercentage" /></strong>
+ <strong><s:property value="totalPercentage" /></strong>
</s:if>
</span>
</td>
<td>
- <s:property value="#samplingPlanRow.observationTimesInDaysExpected" /> <s:text name="wao.ui.misc.day"/>
+ <s:property value="observationTimesInDaysExpected" /> <s:text name="wao.ui.misc.day"/>
<span>
- <em>(<s:property value="#samplingPlanRow.observationTimesInDaysReal" /> <s:text name="wao.ui.misc.day"/>)</em>
+ <em>(<s:property value="observationTimesInDaysReal" /> <s:text name="wao.ui.misc.day"/>)</em>
</span>
</td>
- <td><s:property value="#sampleRow.averageTideTime" /></td>
- <td><s:property value="#sampleRow.nbObservants" /></td>
+ <td><s:property value="averageTideTime" /></td>
+ <td><s:property value="nbObservants" /></td>
<td>
- <s:if test="sampleRow.appliedCoverageRate">
- <s:property value="#sampleRow.appliedCoverageRate" /> %
+ <s:if test="appliedCoverageRate">
+ <s:property value="appliedCoverageRate" /> %
</s:if>
</td>
- <td><s:property value="#sampleRow.comment" /></td>
+ <td><s:property value="comment" /></td>
<td class="actions">
<div class="dropdown">
@@ -300,7 +299,7 @@
<s:if test="authenticatedWaoUser.authorizedToEditSamplingPlan">
<li>
<s:url action="edit-sample-row!input" id="editSampleRowUrl">
- <s:param name="sampleRowId" value="sampleRow.topiaId" />
+ <s:param name="sampleRowId" value="sampleRowId" />
</s:url>
<s:a href="%{editSampleRowUrl}">
<i class="icon-edit"></i> <s:text name="wao.ui.action.edit" />
@@ -308,7 +307,7 @@
</li>
<li>
<s:url action="delete-sample-row" id="deleteSampleRowUrl">
- <s:param name="companyId" value="sampleRow.topiaId" />
+ <s:param name="companyId" value="sampleRowId" />
</s:url>
<s:a href="%{deleteSampleRowUrl}">
<i class="icon-trash"></i> <s:text name="wao.ui.action.delete" />
@@ -317,7 +316,7 @@
</s:if>
<li>
<s:url action="sample-row-log" id="sampleRowLogUrl">
- <s:param name="sampleRowId" value="sampleRow.topiaId" />
+ <s:param name="sampleRowId" value="sampleRowId" />
</s:url>
<s:a href="%{sampleRowLogUrl}">
<i class="icon-time"></i> <s:text name="wao.ui.action.viewSampleRowLog" />
@@ -325,7 +324,7 @@
</li>
<li>
<s:url action="boats" id="viewElligibleBoatsUrl">
- <s:param name="sampleRowIds" value="sampleRow.topiaId" />
+ <s:param name="sampleRowIds" value="sampleRowId" />
</s:url>
<s:a href="%{viewElligibleBoatsUrl}">
<s:text name="wao.ui.action.viewElligibleBoats" />
@@ -333,7 +332,7 @@
</li>
<li>
<s:url action="contacts" id="viewAssociatedContactsUrl">
- <s:param name="sampleRowIds" value="sampleRow.topiaId" />
+ <s:param name="sampleRowIds" value="sampleRowId" />
</s:url>
<s:a href="%{viewAssociatedContactsUrl}">
<s:text name="wao.ui.action.viewAssociatedContacts" />
@@ -342,7 +341,7 @@
<s:if test="authenticatedWaoUser.authorizedToCreateContact">
<li>
<s:url action="contacts" id="createAssociatedContactUrl">
- <s:param name="sampleRowIds" value="sampleRow.topiaId" />
+ <s:param name="sampleRowIds" value="sampleRowId" />
</s:url>
<s:a href="%{createAssociatedContactUrl}">
<i class="icon-add"></i> <s:text name="wao.ui.action.createAssociatedContact" />
1
0
27 Mar '14
Author: bleny
Date: 2014-03-27 11:36:13 +0100 (Thu, 27 Mar 2014)
New Revision: 1763
Url: http://forge.codelutin.com/projects/wao/repository/revisions/1763
Log:
refs #4483 translate dcfs code labels in ui
Added:
trunk/wao-services/src/main/java/fr/ifremer/wao/services/WaoCacheElement.java
trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/obsmer/LocalizedSampleRowsFilterValues.java
Modified:
trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/TargetSpeciesDCFImpl.java
trunk/wao-persistence/src/main/resources/i18n/wao-persistence_en_GB.properties
trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/SampleRowsFilterValues.java
trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/obsmer/SampleRowsFilterValuesJsonAction.java
trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/obsmer/SamplingPlanAction.java
trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/sampling-plan.jsp
trunk/wao-web/src/main/webapp/WEB-INF/decorators/layout.jsp
trunk/wao-web/src/main/webapp/css/wao.css
trunk/wao-web/src/main/webapp/js/wao.js
Modified: trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/TargetSpeciesDCFImpl.java
===================================================================
--- trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/TargetSpeciesDCFImpl.java 2014-03-26 17:16:44 UTC (rev 1762)
+++ trunk/wao-persistence/src/main/java/fr/ifremer/wao/entity/TargetSpeciesDCFImpl.java 2014-03-27 10:36:13 UTC (rev 1763)
@@ -79,6 +79,6 @@
@Override
public String getI18nKey() {
- return "fr.ifr.mer.wao.entity.TargetSpeciesDCF." + getCode();
+ return "fr.ifremer.wao.entity.TargetSpeciesDCF." + getCode();
}
}
Modified: trunk/wao-persistence/src/main/resources/i18n/wao-persistence_en_GB.properties
===================================================================
--- trunk/wao-persistence/src/main/resources/i18n/wao-persistence_en_GB.properties 2014-03-26 17:16:44 UTC (rev 1762)
+++ trunk/wao-persistence/src/main/resources/i18n/wao-persistence_en_GB.properties 2014-03-27 10:36:13 UTC (rev 1763)
@@ -67,6 +67,7 @@
fr.ifremer.wao.entity.FishingGearDCF.FWR=Barriers, fences, weirs, etc.
fr.ifremer.wao.entity.FishingGearDCF.FYK=Fyke nets
fr.ifremer.wao.entity.FishingGearDCF.GEN=Gillnets and entangling nets (not specified)
+fr.ifremer.wao.entity.FishingGearDCF.GES=
fr.ifremer.wao.entity.FishingGearDCF.GN=Gillnets (not specified)
fr.ifremer.wao.entity.FishingGearDCF.GNC=Encircling gillnets
fr.ifremer.wao.entity.FishingGearDCF.GND=Driftnets
Added: trunk/wao-services/src/main/java/fr/ifremer/wao/services/WaoCacheElement.java
===================================================================
--- trunk/wao-services/src/main/java/fr/ifremer/wao/services/WaoCacheElement.java (rev 0)
+++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/WaoCacheElement.java 2014-03-27 10:36:13 UTC (rev 1763)
@@ -0,0 +1,7 @@
+package fr.ifremer.wao.services;
+
+import java.io.Serializable;
+
+public interface WaoCacheElement extends Serializable {
+
+}
Modified: trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/SampleRowsFilterValues.java
===================================================================
--- trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/SampleRowsFilterValues.java 2014-03-26 17:16:44 UTC (rev 1762)
+++ trunk/wao-services/src/main/java/fr/ifremer/wao/services/service/SampleRowsFilterValues.java 2014-03-27 10:36:13 UTC (rev 1763)
@@ -5,6 +5,7 @@
import fr.ifremer.wao.entity.SampleRow;
import fr.ifremer.wao.entity.SamplingStrategy;
import fr.ifremer.wao.entity.TerrestrialLocation;
+import org.apache.commons.lang3.tuple.Pair;
import java.io.Serializable;
import java.util.HashMap;
@@ -33,11 +34,11 @@
protected Map<String, String> terrestrialDistricts = new HashMap<>();
- /** Values are the i18n keys. */
- protected Map<String, String> fishingGearDcfs = new HashMap<>();
+ /** Values are the code and the label i18n key. */
+ protected Map<String, Pair<String, String>> fishingGearDcfs = new HashMap<>();
- /** Values are the i18n keys. */
- protected Map<String, String> targetSpeciesDcfs = new HashMap<>();
+ /** Values are the code and the label i18n key. */
+ protected Map<String, Pair<String, String>> targetSpeciesDcfs = new HashMap<>();
public void addSampleRow(SampleRow sampleRow) {
for (FishingZone fishingZone : sampleRow.getFishingZone()) {
@@ -53,9 +54,15 @@
terrestrialDistricts.put(terrestrialDistrict.getTopiaId(), terrestrialDistrict.getDescription());
}
for (DCF5Code dcf5Code : sampleRow.getdCF5Code()) {
- fishingGearDcfs.put(dcf5Code.getFishingGearDCF().getTopiaId(), dcf5Code.getFishingGearDCF().getI18nKey());
+ fishingGearDcfs.put(
+ dcf5Code.getFishingGearDCF().getTopiaId(),
+ Pair.of(dcf5Code.getFishingGearDCF().getCode(),
+ dcf5Code.getFishingGearDCF().getI18nKey()));
if (dcf5Code.getTargetSpeciesDCF() != null) {
- targetSpeciesDcfs.put(dcf5Code.getTargetSpeciesDCF().getTopiaId(), dcf5Code.getTargetSpeciesDCF().getI18nKey());
+ targetSpeciesDcfs.put(
+ dcf5Code.getTargetSpeciesDCF().getTopiaId(),
+ Pair.of(dcf5Code.getTargetSpeciesDCF().getCode(),
+ dcf5Code.getTargetSpeciesDCF().getI18nKey()));
}
}
}
@@ -88,12 +95,11 @@
return terrestrialDistricts;
}
- public Map<String, String> getFishingGearDcfs() {
+ public Map<String, Pair<String, String>> getFishingGearDcfs() {
return fishingGearDcfs;
}
- public Map<String, String> getTargetSpeciesDcfs() {
+ public Map<String, Pair<String, String>> getTargetSpeciesDcfs() {
return targetSpeciesDcfs;
}
-
}
Added: trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/obsmer/LocalizedSampleRowsFilterValues.java
===================================================================
--- trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/obsmer/LocalizedSampleRowsFilterValues.java (rev 0)
+++ trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/obsmer/LocalizedSampleRowsFilterValues.java 2014-03-27 10:36:13 UTC (rev 1763)
@@ -0,0 +1,82 @@
+package fr.ifremer.wao.web.action.obsmer;
+
+import fr.ifremer.wao.entity.SampleRow;
+import fr.ifremer.wao.entity.SamplingStrategy;
+import fr.ifremer.wao.services.WaoCacheElement;
+import fr.ifremer.wao.services.service.SampleRowsFilterValues;
+import org.apache.commons.lang3.tuple.Pair;
+import org.nuiton.i18n.I18n;
+
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+
+public class LocalizedSampleRowsFilterValues implements WaoCacheElement {
+
+ protected Locale locale;
+
+ protected SampleRowsFilterValues decorated;
+
+ public LocalizedSampleRowsFilterValues(Locale locale, SampleRowsFilterValues decorated) {
+ this.locale = locale;
+ this.decorated = decorated;
+ }
+
+ public void addSampleRow(SampleRow sampleRow) {
+ decorated.addSampleRow(sampleRow);
+ }
+
+ public Set<String> getSampleRowCodes() {
+ return decorated.getSampleRowCodes();
+ }
+
+ public Set<SamplingStrategy> getSamplingStrategies() {
+ return decorated.getSamplingStrategies();
+ }
+
+ public Set<String> getFishingZoneSectorNames() {
+ return decorated.getFishingZoneSectorNames();
+ }
+
+ public Set<String> getProgramNames() {
+ return decorated.getProgramNames();
+ }
+
+ public Set<String> getFishingZoneFacadeNames() {
+ return decorated.getFishingZoneFacadeNames();
+ }
+
+ public Map<String, String> getCompanies() {
+ return decorated.getCompanies();
+ }
+
+ public Map<String, String> getTerrestrialDistricts() {
+ return decorated.getTerrestrialDistricts();
+ }
+
+ public Map<String, String> getFishingGearDcfs() {
+ Map<String, String> translated = new HashMap<>();
+ for (Map.Entry<String, Pair<String, String>> entry :
+ decorated.getFishingGearDcfs().entrySet()) {
+ String topiaId = entry.getKey();
+ String code = entry.getValue().getLeft();
+ String i18nKey = entry.getValue().getRight();
+ translated.put(topiaId, code + " " + I18n.l(locale, i18nKey));
+ }
+ return translated;
+ }
+
+ public Map<String, String> getTargetSpeciesDcfs() {
+ Map<String, String> translated = new HashMap<>();
+ for (Map.Entry<String, Pair<String, String>> entry :
+ decorated.getTargetSpeciesDcfs().entrySet()) {
+ String topiaId = entry.getKey();
+ String code = entry.getValue().getLeft();
+ String i18nKey = entry.getValue().getRight();
+ translated.put(topiaId, code + " " + I18n.l(locale, i18nKey));
+ }
+ return translated;
+ }
+
+}
Modified: trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/obsmer/SampleRowsFilterValuesJsonAction.java
===================================================================
--- trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/obsmer/SampleRowsFilterValuesJsonAction.java 2014-03-26 17:16:44 UTC (rev 1762)
+++ trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/obsmer/SampleRowsFilterValuesJsonAction.java 2014-03-27 10:36:13 UTC (rev 1763)
@@ -15,7 +15,7 @@
protected transient SampleRowsFilter filter;
- protected SampleRowsFilterValues filterValues;
+ protected LocalizedSampleRowsFilterValues filterValues;
public void setService(ObsMerSamplingPlanService service) {
this.service = service;
@@ -40,12 +40,14 @@
ObsMerSamplingPlan samplingPlan = service.getSamplingPlan(filter);
- filterValues = samplingPlan.getFilterValues();
+ SampleRowsFilterValues filterValues = samplingPlan.getFilterValues();
+ this.filterValues = new LocalizedSampleRowsFilterValues(getLocale(), filterValues);
+
return SUCCESS;
}
- public SampleRowsFilterValues getFilterValues() {
+ public LocalizedSampleRowsFilterValues getFilterValues() {
return filterValues;
}
Modified: trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/obsmer/SamplingPlanAction.java
===================================================================
--- trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/obsmer/SamplingPlanAction.java 2014-03-26 17:16:44 UTC (rev 1762)
+++ trunk/wao-web/src/main/java/fr/ifremer/wao/web/action/obsmer/SamplingPlanAction.java 2014-03-27 10:36:13 UTC (rev 1763)
@@ -71,4 +71,11 @@
return getSession().getSampleRowToHighlightId();
}
+ public LocalizedSampleRowsFilterValues getFilterValues() {
+ LocalizedSampleRowsFilterValues filterValues =
+ new LocalizedSampleRowsFilterValues(
+ getLocale(),
+ getSamplingPlan().getFilterValues());
+ return filterValues;
+ }
}
Modified: trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/sampling-plan.jsp
===================================================================
--- trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/sampling-plan.jsp 2014-03-26 17:16:44 UTC (rev 1762)
+++ trunk/wao-web/src/main/webapp/WEB-INF/content/obsmer/sampling-plan.jsp 2014-03-27 10:36:13 UTC (rev 1763)
@@ -34,7 +34,7 @@
$(document).ready(function () {
- var sampleRowsFilterController = new SampleRowsFilterController(SAMPLE_ROWS_FILTER_VALUES_JSON_URL);
+ var sampleRowsFilterController = new SampleRowsFilterController(SAMPLE_ROWS_FILTER_VALUES_JSON_URL, $('#sampling-plan-filters-form'));
sampleRowsFilterController.init();
});
@@ -43,6 +43,8 @@
</head>
+ <content tag="mainClass">large</content>
+
<h1>
<s:text name="wao.ui.page.SamplingPlan.title" />
</h1>
@@ -54,81 +56,86 @@
</s:a>
</s:if>
- <s:form method="GET">
+ <s:form method="GET" id="sampling-plan-filters-form" cssClass="filters-form">
- <s:textfield name="filter.periodFrom"
- label="%{getText('wao.ui.form.periodFrom')}"
- placeholder="04/2014"
- cssClass="input-small" />
+ <fieldset>
- <s:textfield name="filter.periodTo"
- label="%{getText('wao.ui.form.period.to')}"
- placeholder="03/2015"
- cssClass="input-small" />
+ <s:textfield name="filter.periodFrom"
+ label="%{getText('wao.ui.form.periodFrom')}"
+ placeholder="04/2014"
+ cssClass="input-small" />
+ <s:textfield name="filter.periodTo"
+ label="%{getText('wao.ui.form.period.to')}"
+ placeholder="03/2015"
+ cssClass="input-small" />
+
+ </fieldset>
+
+ <fieldset>
+
<s:select name="filter.companyIds"
label="%{getText('wao.ui.entity.Company')}"
- list="samplingPlan.filterValues.companies"
+ list="filterValues.companies"
multiple="true"
- dataBinding="companies"
- cssClass="input-xlarge" />
+ dataBinding="companies" />
<s:select name="filter.programNames"
label="%{getText('wao.ui.field.SampleRow.programName')}"
- list="samplingPlan.filterValues.programNames"
+ list="filterValues.programNames"
multiple="true"
- dataBinding="programNames"
- cssClass="input-xlarge" />
+ dataBinding="programNames" />
<s:select name="filter.fishingZoneFacadeNames"
label="%{getText('wao.ui.field.FishingZone.facadeName')}"
- list="samplingPlan.filterValues.fishingZoneFacadeNames"
+ list="filterValues.fishingZoneFacadeNames"
multiple="true"
- dataBinding="fishingZoneFacadeNames"
- cssClass="input-xlarge" />
+ dataBinding="fishingZoneFacadeNames" />
<s:select name="filter.fishingZoneSectorNames"
label="%{getText('wao.ui.field.FishingZone.sectorName')}"
- list="samplingPlan.filterValues.fishingZoneSectorNames"
+ list="filterValues.fishingZoneSectorNames"
multiple="true"
- dataBinding="fishingZoneSectorNames"
- cssClass="input-xlarge" />
+ dataBinding="fishingZoneSectorNames" />
<s:select name="filter.sampleRowCodes"
label="%{getText('wao.ui.field.SampleRow.code')}"
- list="samplingPlan.filterValues.sampleRowCodes"
+ list="filterValues.sampleRowCodes"
multiple="true"
- dataBinding="sampleRowCodes"
- cssClass="input-xlarge" />
+ dataBinding="sampleRowCodes" />
<s:select name="filter.fishingGearDcfIds"
label="%{getText('wao.ui.entity.fishingGearDCF')}"
- list="samplingPlan.filterValues.fishingGearDcfs"
+ list="filterValues.fishingGearDcfs"
value="%getText(#value)"
multiple="true"
- dataBinding="fishingGearDcfs"
- cssClass="input-xlarge" />
+ dataBinding="fishingGearDcfs" />
<s:select name="filter.targetSpeciesDcfIds"
label="%{getText('wao.ui.entity.targetSpeciesDCF')}"
- list="samplingPlan.filterValues.targetSpeciesDcfs"
+ list="filterValues.targetSpeciesDcfs"
multiple="true"
- dataBinding="targetSpeciesDcfs"
- cssClass="input-xlarge" />
+ dataBinding="targetSpeciesDcfs" />
- <s:url action="sampling-plan" id="samplingPlanUrl" />
- <s:a href="%{samplingPlanUrl}" cssClass="btn">
- <i class="icon-reset"></i> <s:text name="wao.ui.action.reset" />
- </s:a>
+ </fieldset>
- <s:submit type="button" cssClass="btn">
- <i class="icon-filter"></i> <s:text name="wao.ui.action.filter" />
- </s:submit>
+ <div class="form-actions" style="clear: both;">
- <s:submit action="export-sampling-plan" type="button" cssClass="btn">
- <i class="icon-download"></i> <s:text name="wao.ui.action.csvExport" />
- </s:submit>
+ <s:url action="sampling-plan" id="samplingPlanUrl" />
+ <s:a href="%{samplingPlanUrl}" cssClass="btn">
+ <i class="icon-reset"></i> <s:text name="wao.ui.action.reset" />
+ </s:a>
+ <s:submit type="button" cssClass="btn">
+ <i class="icon-filter"></i> <s:text name="wao.ui.action.filter" />
+ </s:submit>
+
+ <s:submit action="export-sampling-plan" type="button" cssClass="btn">
+ <i class="icon-download"></i> <s:text name="wao.ui.action.csvExport" />
+ </s:submit>
+
+ </div>
+
</s:form>
<s:set var="estimatedTides" value="true"/>
Modified: trunk/wao-web/src/main/webapp/WEB-INF/decorators/layout.jsp
===================================================================
--- trunk/wao-web/src/main/webapp/WEB-INF/decorators/layout.jsp 2014-03-26 17:16:44 UTC (rev 1762)
+++ trunk/wao-web/src/main/webapp/WEB-INF/decorators/layout.jsp 2014-03-27 10:36:13 UTC (rev 1763)
@@ -28,7 +28,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><decorator:title default="Wao"/> - Wao</title>
- <sj:head locale="fr" jqueryui="true" />
+ <sj:head locale="fr" loadFromGoogle="true" jqueryui="true" />
<sb:head />
<script type="text/javascript" src="<s:url value='/js/moment-js-2.5.1/moment-with-langs.js' />"></script>
<script type="text/javascript" src="<s:url value='/js/select2-3.4.5/select2.min.js' />"></script>
@@ -48,13 +48,13 @@
<div class="navbar-inner">
<a class="brand" href="#">Wao <s:property value="getText(obsProgram)" /></a>
<ul class="nav">
- <li class="active">
+ <li>
<s:url namespace="/%{obsProgram.name().toLowerCase()}" action="news" id="newsUrl" />
<s:a href="%{newsUrl}">
<i class="icon-home"></i> <s:text name="wao.ui.page.Index.title" />
</s:a>
</li>
- <li>
+ <li class="active">
<s:url namespace="/%{obsProgram.name().toLowerCase()}" action="sampling-plan" id="samplingPlanUrl" />
<s:a href="%{samplingPlanUrl}">
<i class="icon-tasks"></i> <s:text name="wao.ui.page.SamplingPlan.title" />
@@ -163,7 +163,7 @@
</div>
</div>
- <main>
+ <main class="<decorator:getProperty property="page.mainClass"/>">
<s:actionerror theme="bootstrap" />
<s:actionmessage theme="bootstrap" />
<s:fielderror theme="bootstrap" />
Modified: trunk/wao-web/src/main/webapp/css/wao.css
===================================================================
--- trunk/wao-web/src/main/webapp/css/wao.css 2014-03-26 17:16:44 UTC (rev 1762)
+++ trunk/wao-web/src/main/webapp/css/wao.css 2014-03-27 10:36:13 UTC (rev 1763)
@@ -53,6 +53,13 @@
margin-right: auto;
}
+main.large {
+ width: 100%;
+ max-width: 100%;
+ margin-left: 10px;
+ margin-right: 10px;
+}
+
/**
* Le style général des formulaires
*/
@@ -111,9 +118,25 @@
}
/**
- * Styles spécifiques pour certainse pages de l'appli
+ * Les filtres
*/
+form.filters-form {
+ width: auto;
+ margin-left: auto;
+ margin-right: auto;
+}
+
+form.filters-form .control-group {
+ float: left;
+ margin-left: 5px;
+ margin-right: 5px;
+}
+
+/**
+ * Styles spécifiques pour certaines pages de l'appli
+ */
+
#expectedObservationsByMonthsTable th {
white-space: nowrap;
}
Modified: trunk/wao-web/src/main/webapp/js/wao.js
===================================================================
--- trunk/wao-web/src/main/webapp/js/wao.js 2014-03-26 17:16:44 UTC (rev 1762)
+++ trunk/wao-web/src/main/webapp/js/wao.js 2014-03-27 10:36:13 UTC (rev 1763)
@@ -40,15 +40,18 @@
};
-var SampleRowsFilterView = function (sampleRowsFilterModel) {
+var SampleRowsFilterView = function (sampleRowsFilterModel, $filtersForm) {
var self = this;
this.model = sampleRowsFilterModel;
+ this.$filtersForm = $filtersForm;
+ this.$selects = $filtersForm.find('select');
+ this.$inputs = $filtersForm.find('input[type=text]');
this.getFilter = function () {
var filter = {};
- $('select').each(function (index, select) {
+ this.$selects.each(function (index, select) {
var $select = $(select);
var parameterName = $select.prop('name');
var parameterValues = [];
@@ -57,7 +60,7 @@
});
filter[parameterName] = parameterValues;
});
- $('input[type=text]').each(function (index, input) {
+ this.$inputs.each(function (index, input) {
var $input = $(input);
var parameterName = $(input).prop('name');
var parameterValue = $(input).prop('value');
@@ -70,7 +73,7 @@
// store options selected by user to re-select them after update
var filter = this.getFilter();
var filterValues = this.model.filterValues;
- $('select').each(function (index, select) {
+ this.$selects.each(function (index, select) {
var $select = $(select).empty();
var name = $select.prop('name');
// FIXME brendan 26/03/14 should be data-binding but freemarker break the template :-(
@@ -88,6 +91,7 @@
$select.find('option[value="' + selectedOption + '"]').prop('selected', 'selected');
});
});
+ this.$filtersForm.effect( "highlight", "slow" );
}
$(this.model).on('updated', function () {
@@ -96,12 +100,12 @@
};
-var SampleRowsFilterController = function (filterValuesUrl) {
+var SampleRowsFilterController = function (filterValuesUrl, $filtersForm) {
var self = this;
this.model = new SampleRowsFilterModel(filterValuesUrl);
- this.view = new SampleRowsFilterView(this.model);
+ this.view = new SampleRowsFilterView(this.model, $filtersForm);
this.onFilterChange = function () {
var filter = this.view.getFilter();
@@ -109,10 +113,10 @@
};
this.init = function () {
- $('input').change(function () {
+ this.view.$selects.blur(function () {
self.onFilterChange();
});
- $('select').change(function () {
+ this.view.$inputs.blur(function () {
self.onFilterChange();
});
}
@@ -121,6 +125,6 @@
$(document).ready(function () {
- $('select').select2();
+ // $('select').select2();
});
\ No newline at end of file
1
0