This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository observe. See https://gitlab.nuiton.org/codelutin/observe.git commit 10c3c1bcde040a4d40abb7b948eabf84d724edde Author: Tony CHEMIT <chemit@codelutin.com> Date: Wed Nov 2 21:15:16 2016 +0100 Ajout du référentiel Armateur (ui) --- .../swing/decoration/DecoratorService.java | 121 +-------------------- .../application-swing-decoration_en_GB.properties | 2 + .../application-swing-decoration_es_ES.properties | 2 + .../application-swing-decoration_fr_FR.properties | 2 + .../ShipOwnerDto-ui-create-error-validation.xml | 57 ++++++++++ .../ShipOwnerDto-ui-create-warning-validation.xml | 46 ++++++++ .../ShipOwnerDto-ui-update-error-validation.xml | 57 ++++++++++ .../ShipOwnerDto-ui-update-warning-validation.xml | 46 ++++++++ .../VesselDto-ui-create-error-validation.xml | 10 ++ .../VesselDto-ui-update-error-validation.xml | 10 ++ .../application-swing-validation_en_GB.properties | 6 + .../application-swing-validation_es_ES.properties | 6 + .../application-swing-validation_fr_FR.properties | 6 + .../swing/ui/content/ref/impl/ShipOwnerUI.jaxx | 109 +++++++++++++++++++ .../swing/ui/content/ref/impl/ShipOwnerUI.jcss | 39 +++++++ .../ui/content/ref/impl/ShipOwnerUIModel.java | 23 ++++ .../swing/ui/content/ref/impl/VesselUI.jaxx | 11 ++ .../swing/ui/content/ref/impl/VesselUI.jcss | 10 ++ .../swing/ui/content/ref/impl/VesselUIModel.java | 6 +- .../i18n/application-swing_en_GB.properties | 2 + .../i18n/application-swing_es_ES.properties | 2 + .../i18n/application-swing_fr_FR.properties | 2 + 22 files changed, 456 insertions(+), 119 deletions(-) diff --git a/application-swing-decoration/src/main/java/fr/ird/observe/application/swing/decoration/DecoratorService.java b/application-swing-decoration/src/main/java/fr/ird/observe/application/swing/decoration/DecoratorService.java index 81d5cc3..fb91ce2 100644 --- a/application-swing-decoration/src/main/java/fr/ird/observe/application/swing/decoration/DecoratorService.java +++ b/application-swing-decoration/src/main/java/fr/ird/observe/application/swing/decoration/DecoratorService.java @@ -62,12 +62,15 @@ import fr.ird.observe.services.dto.referential.ProgramDto; import fr.ird.observe.services.dto.referential.ReferentialDto; import fr.ird.observe.services.dto.referential.ReferentialReference; import fr.ird.observe.services.dto.referential.SexDto; +import fr.ird.observe.services.dto.referential.ShipOwnerDto; +import fr.ird.observe.services.dto.referential.SizeMeasureTypeDto; import fr.ird.observe.services.dto.referential.SpeciesDto; import fr.ird.observe.services.dto.referential.SpeciesGroupDto; import fr.ird.observe.services.dto.referential.SpeciesListDto; import fr.ird.observe.services.dto.referential.VesselDto; import fr.ird.observe.services.dto.referential.VesselSizeCategoryDto; import fr.ird.observe.services.dto.referential.VesselTypeDto; +import fr.ird.observe.services.dto.referential.WeightMeasureTypeDto; import fr.ird.observe.services.dto.referential.longline.BaitHaulingStatusDto; import fr.ird.observe.services.dto.referential.longline.BaitSettingStatusDto; import fr.ird.observe.services.dto.referential.longline.BaitTypeDto; @@ -88,11 +91,9 @@ import fr.ird.observe.services.dto.referential.longline.SensorBrandDto; import fr.ird.observe.services.dto.referential.longline.SensorDataFormatDto; import fr.ird.observe.services.dto.referential.longline.SensorTypeDto; import fr.ird.observe.services.dto.referential.longline.SettingShapeDto; -import fr.ird.observe.services.dto.referential.SizeMeasureTypeDto; import fr.ird.observe.services.dto.referential.longline.StomacFullnessDto; import fr.ird.observe.services.dto.referential.longline.TripTypeDto; import fr.ird.observe.services.dto.referential.longline.VesselActivityLonglineDto; -import fr.ird.observe.services.dto.referential.WeightMeasureTypeDto; import fr.ird.observe.services.dto.referential.seine.DetectionModeDto; import fr.ird.observe.services.dto.referential.seine.ObjectFateDto; import fr.ird.observe.services.dto.referential.seine.ObjectOperationDto; @@ -236,121 +237,6 @@ public class DecoratorService extends DecoratorProvider { n("observe.common.observerLabel"); n("observe.common.label"); - -// n("observe.common.targetSample"); -// n("observe.common.targetLength"); -// n("observe.common.nonTargetSample"); -// n("observe.common.nonTargetLength"); -// n("observe.common.nonTargetCatch"); -// n("observe.common.setSeine"); -// n("observe.common.targetCatch"); -// n("observe.common.transmittingBuoy"); -// n("observe.common.objectObservedSpecies"); -// n("observe.common.schoolEstimate"); -// n("observe.common.objectSchoolEstimate"); -// n("observe.common.floatingObject"); -// n("observe.common.activitySeine"); -// n("observe.common.route"); -// n("observe.common.tripSeine"); - -// n("observe.common.activityLongline"); -// n("observe.common.baitsComposition"); -// n("observe.common.basket"); -// n("observe.common.branchline"); -// n("observe.common.branchlinesComposition"); -// n("observe.common.catchLongline"); -// n("observe.common.encounter"); -// n("observe.common.setLongline"); -// n("observe.common.time"); -// n("observe.common.floatlinesComposition"); -// n("observe.common.hooksComposition"); -// n("observe.common.section"); -// n("observe.common.sensorUsed"); -// n("observe.common.sizeMeasure"); -// n("observe.common.tdr"); -// n("observe.common.tdrRecord"); -// n("observe.common.tripLongline"); -// n("observe.common.weightMeasure"); -// n("observe.common.gearUseFeaturesSeine"); -// n("observe.common.gearUseFeaturesLongline"); -// n("observe.common.longlineDetailComposition"); - -// n("observe.common.vesselSizeCategory"); -// n("observe.common.harbour"); -// n("observe.common.country"); -// n("observe.common.vesselType"); -// n("observe.common.vessel"); -// n("observe.common.speciesGroup"); -// n("observe.common.species"); -// n("observe.common.sex"); -// n("observe.common.fpaZone"); -// n("observe.common.speciesList"); -// n("observe.common.person"); -// n("observe.common.ocean"); -// n("observe.common.organism"); -// n("observe.common.lengthWeightParameter"); -// n("observe.common.program"); - -// n("observe.common.vesselActivitySeine"); -// n("observe.common.surroundingActivity"); -// n("observe.common.reasonForNullSet"); -// n("observe.common.reasonForNoFishing"); -// n("observe.common.speciesFate"); -// n("observe.common.objectFate"); -// n("observe.common.weightCategory"); -// n("observe.common.detectionMode"); -// n("observe.common.transmittingBuoyOperation"); -// n("observe.common.objectOperation"); -// n("observe.common.reasonForDiscard"); -// n("observe.common.speciesStatus"); -// n("observe.common.observedSystem"); -// n("observe.common.transmittingBuoyType"); -// n("observe.common.objectType"); -// n("observe.common.wind"); -// -// n("observe.common.baitHaulingStatus"); -// n("observe.common.baitSettingStatus"); -// n("observe.common.baitType"); -// n("observe.common.catchFateLongline"); -// n("observe.common.encounterType"); -// n("observe.common.healthness"); -// n("observe.common.hookPosition"); -// n("observe.common.hookSize"); -// n("observe.common.hookType"); -// n("observe.common.itemVerticalPosition"); -// n("observe.common.itemHorizontalPosition"); -// n("observe.common.lightsticksColor"); -// n("observe.common.lightsticksType"); -// n("observe.common.lineType"); -// n("observe.common.maturityStatus"); -// n("observe.common.mitigationType"); -// n("observe.common.sensorBrand"); -// n("observe.common.sensorDataFormat"); -// n("observe.common.sensorPosition"); -// n("observe.common.sensorType"); -// n("observe.common.settingShape"); -// n("observe.common.sizeMeasureType"); -// n("observe.common.stomacFullness"); -// n("observe.common.tripType"); -// n("observe.common.vesselActivityLongline"); -// n("observe.common.weightMeasureType"); -// n("observe.common.id"); -// n("observe.common.floatlineLengths"); -// n("observe.common.locode"); -// n("observe.common.name"); -// n("observe.common.gearCaracteristicType"); -// n("observe.common.gearCaracteristic"); -// n("observe.common.gear"); -// n("observe.common.gender"); - -// n("observe.common.floatline1Length"); -// n("observe.common.floatline2Length"); -// n("observe.common.branchlineLength"); -// n("observe.common.tracelineLength"); - -// n("observe.common.gearUseFeaturesMeasurementSeine"); -// n("observe.common.gearUseFeaturesMeasurementLongline"); - } @Override @@ -372,6 +258,7 @@ public class DecoratorService extends DecoratorProvider { registerReferentialAndReferentialReferenceDecorator(VesselSizeCategoryDto.class, "${code}$s##${gaugeLabel}$s##${capacityLabel}$s"); registerReferentialAndReferentialReferenceDecorator(WindDto.class, "${code}$s##${label}$s##${speedRange}$s"); + registerReferentialAndReferentialReferenceDecorator(ShipOwnerDto.class, "${code}$s##${label}$s"); registerReferentialAndReferentialReferenceDecorator(SensorBrandDto.class, "${code}$s##${brandName}$s"); registerReferentialAndReferentialReferenceDecorator(HarbourDto.class, "${code}$s##${name}$s##${locode}$s"); // Species decorator diff --git a/application-swing-decoration/src/main/resources/i18n/application-swing-decoration_en_GB.properties b/application-swing-decoration/src/main/resources/i18n/application-swing-decoration_en_GB.properties index 479728a..ef91476 100644 --- a/application-swing-decoration/src/main/resources/i18n/application-swing-decoration_en_GB.properties +++ b/application-swing-decoration/src/main/resources/i18n/application-swing-decoration_en_GB.properties @@ -200,6 +200,8 @@ observe.type.settingShape=Setting shape observe.type.settingShapes=Settings shape observe.type.sex=Sex observe.type.sexes=Sexs +observe.type.shipOwner=Ship owner +observe.type.shipOwners=Ship owners observe.type.sizeMeasure=Size measure observe.type.sizeMeasureType=Size measure type observe.type.sizeMeasureTypes=Sizes measure type diff --git a/application-swing-decoration/src/main/resources/i18n/application-swing-decoration_es_ES.properties b/application-swing-decoration/src/main/resources/i18n/application-swing-decoration_es_ES.properties index d44dbe6..e459f93 100644 --- a/application-swing-decoration/src/main/resources/i18n/application-swing-decoration_es_ES.properties +++ b/application-swing-decoration/src/main/resources/i18n/application-swing-decoration_es_ES.properties @@ -200,6 +200,8 @@ observe.type.settingShape=Forma en la calada observe.type.settingShapes=Formas en la calada observe.type.sex=Sexo observe.type.sexes=Sexos +observe.type.shipOwner=Armateur \#TODO +observe.type.shipOwners=Armateurs \#TODO observe.type.sizeMeasure=Medida del tamaño observe.type.sizeMeasureType=Tipo de medida del tamaño observe.type.sizeMeasureTypes=Tipos de medida del tamaño diff --git a/application-swing-decoration/src/main/resources/i18n/application-swing-decoration_fr_FR.properties b/application-swing-decoration/src/main/resources/i18n/application-swing-decoration_fr_FR.properties index f77afac..84164e5 100644 --- a/application-swing-decoration/src/main/resources/i18n/application-swing-decoration_fr_FR.properties +++ b/application-swing-decoration/src/main/resources/i18n/application-swing-decoration_fr_FR.properties @@ -200,6 +200,8 @@ observe.type.settingShape=Forme au filage observe.type.settingShapes=Formes au filage observe.type.sex=Sexe observe.type.sexes=Sexes +observe.type.shipOwner=Armateur +observe.type.shipOwners=Armateurs observe.type.sizeMeasure=Mesure de taille observe.type.sizeMeasureType=Type de mesure de taille observe.type.sizeMeasureTypes=Types de mesure de taille diff --git a/application-swing-validation/src/main/resources/fr/ird/observe/services/dto/referential/ShipOwnerDto-ui-create-error-validation.xml b/application-swing-validation/src/main/resources/fr/ird/observe/services/dto/referential/ShipOwnerDto-ui-create-error-validation.xml new file mode 100644 index 0000000..faf84f5 --- /dev/null +++ b/application-swing-validation/src/main/resources/fr/ird/observe/services/dto/referential/ShipOwnerDto-ui-create-error-validation.xml @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!DOCTYPE validators PUBLIC + "-//Apache Struts//XWork Validator 1.0.3//EN" + "http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd"> +<validators> + + <field name="code"> + + <!-- pas de organism renseigne --> + <field-validator type="required" short-circuit="true"> + <message>validator.ui.shipOwner.required.code</message> + </field-validator> + + <!-- clef unique sur le code --> + <field-validator type="collectionUniqueKeyDto" short-circuit="true"> + <param name="collectionFieldName">editingReferentielListEntity</param> + <param name="keys">code</param> + <param name="againstMe">true</param> + <param name="nullValueSkipped">true</param> + <message>validator.ui.referentiel.invalid.code.uniqueKey##${code}</message> + </field-validator> + + </field> + + <field name="label"> + + <!-- pas de label renseigne --> + <field-validator type="required" short-circuit="true"> + <message>validator.ui.shipOwner.required.label</message> + </field-validator> + + </field> + + <field name="uri"> + <!-- clef unique sur l'uri --> + <field-validator type="collectionUniqueKeyDto" short-circuit="true"> + <param name="collectionFieldName">editingReferentielListEntity</param> + <param name="keys">uri</param> + <param name="againstMe">true</param> + <param name="nullValueSkipped">true</param> + <message>validator.ui.referentiel.invalid.uri.uniqueKey##${uri}</message> + </field-validator> + </field> + + <field name="country"> + + <!-- country desactivee --> + <field-validator type="fieldexpression"> + <param name="expression"> + <![CDATA[ country == null || country.enabled ]]> + </param> + <message>validator.ui.shipOwner.desactivated.country</message> + </field-validator> + </field> + +</validators> diff --git a/application-swing-validation/src/main/resources/fr/ird/observe/services/dto/referential/ShipOwnerDto-ui-create-warning-validation.xml b/application-swing-validation/src/main/resources/fr/ird/observe/services/dto/referential/ShipOwnerDto-ui-create-warning-validation.xml new file mode 100644 index 0000000..a513615 --- /dev/null +++ b/application-swing-validation/src/main/resources/fr/ird/observe/services/dto/referential/ShipOwnerDto-ui-create-warning-validation.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + #%L + ObServe :: Application Swing Validation + %% + Copyright (C) 2008 - 2016 IRD, Codelutin, Tony Chemit + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this program. If not, see + <http://www.gnu.org/licenses/gpl-3.0.html>. + #L% + --> + +<!DOCTYPE validators PUBLIC + "-//Apache Struts//XWork Validator 1.0.3//EN" + "http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd"> +<validators> + + <field name="status"> + <!-- objet desactive --> + <field-validator type="fieldexpression" short-circuit="true"> + <param name="expression"> + <![CDATA[ enabled ]]> + </param> + <message>validator.ui.referentiel.status.desactivated</message> + </field-validator> + </field> + + <field name="uri"> + <!-- pas d'uri selectionne --> + <field-validator type="requiredstring" short-circuit="true"> + <message>validator.ui.referentiel.null.uri</message> + </field-validator> + </field> + +</validators> diff --git a/application-swing-validation/src/main/resources/fr/ird/observe/services/dto/referential/ShipOwnerDto-ui-update-error-validation.xml b/application-swing-validation/src/main/resources/fr/ird/observe/services/dto/referential/ShipOwnerDto-ui-update-error-validation.xml new file mode 100644 index 0000000..faf84f5 --- /dev/null +++ b/application-swing-validation/src/main/resources/fr/ird/observe/services/dto/referential/ShipOwnerDto-ui-update-error-validation.xml @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!DOCTYPE validators PUBLIC + "-//Apache Struts//XWork Validator 1.0.3//EN" + "http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd"> +<validators> + + <field name="code"> + + <!-- pas de organism renseigne --> + <field-validator type="required" short-circuit="true"> + <message>validator.ui.shipOwner.required.code</message> + </field-validator> + + <!-- clef unique sur le code --> + <field-validator type="collectionUniqueKeyDto" short-circuit="true"> + <param name="collectionFieldName">editingReferentielListEntity</param> + <param name="keys">code</param> + <param name="againstMe">true</param> + <param name="nullValueSkipped">true</param> + <message>validator.ui.referentiel.invalid.code.uniqueKey##${code}</message> + </field-validator> + + </field> + + <field name="label"> + + <!-- pas de label renseigne --> + <field-validator type="required" short-circuit="true"> + <message>validator.ui.shipOwner.required.label</message> + </field-validator> + + </field> + + <field name="uri"> + <!-- clef unique sur l'uri --> + <field-validator type="collectionUniqueKeyDto" short-circuit="true"> + <param name="collectionFieldName">editingReferentielListEntity</param> + <param name="keys">uri</param> + <param name="againstMe">true</param> + <param name="nullValueSkipped">true</param> + <message>validator.ui.referentiel.invalid.uri.uniqueKey##${uri}</message> + </field-validator> + </field> + + <field name="country"> + + <!-- country desactivee --> + <field-validator type="fieldexpression"> + <param name="expression"> + <![CDATA[ country == null || country.enabled ]]> + </param> + <message>validator.ui.shipOwner.desactivated.country</message> + </field-validator> + </field> + +</validators> diff --git a/application-swing-validation/src/main/resources/fr/ird/observe/services/dto/referential/ShipOwnerDto-ui-update-warning-validation.xml b/application-swing-validation/src/main/resources/fr/ird/observe/services/dto/referential/ShipOwnerDto-ui-update-warning-validation.xml new file mode 100644 index 0000000..a513615 --- /dev/null +++ b/application-swing-validation/src/main/resources/fr/ird/observe/services/dto/referential/ShipOwnerDto-ui-update-warning-validation.xml @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + #%L + ObServe :: Application Swing Validation + %% + Copyright (C) 2008 - 2016 IRD, Codelutin, Tony Chemit + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this program. If not, see + <http://www.gnu.org/licenses/gpl-3.0.html>. + #L% + --> + +<!DOCTYPE validators PUBLIC + "-//Apache Struts//XWork Validator 1.0.3//EN" + "http://struts.apache.org/dtds/xwork-validator-1.0.3.dtd"> +<validators> + + <field name="status"> + <!-- objet desactive --> + <field-validator type="fieldexpression" short-circuit="true"> + <param name="expression"> + <![CDATA[ enabled ]]> + </param> + <message>validator.ui.referentiel.status.desactivated</message> + </field-validator> + </field> + + <field name="uri"> + <!-- pas d'uri selectionne --> + <field-validator type="requiredstring" short-circuit="true"> + <message>validator.ui.referentiel.null.uri</message> + </field-validator> + </field> + +</validators> diff --git a/application-swing-validation/src/main/resources/fr/ird/observe/services/dto/referential/VesselDto-ui-create-error-validation.xml b/application-swing-validation/src/main/resources/fr/ird/observe/services/dto/referential/VesselDto-ui-create-error-validation.xml index 9f10ba6..8b0a20f 100644 --- a/application-swing-validation/src/main/resources/fr/ird/observe/services/dto/referential/VesselDto-ui-create-error-validation.xml +++ b/application-swing-validation/src/main/resources/fr/ird/observe/services/dto/referential/VesselDto-ui-create-error-validation.xml @@ -131,4 +131,14 @@ </field-validator> </field> + <field name="shipOwner"> + + <!-- shipOwner desactivee --> + <field-validator type="fieldexpression"> + <param name="expression"><![CDATA[ shipOwner == null || shipOwner.enabled ]]> + </param> + <message>validator.ui.vessel.desactivated.shipOwner</message> + </field-validator> + </field> + </validators> diff --git a/application-swing-validation/src/main/resources/fr/ird/observe/services/dto/referential/VesselDto-ui-update-error-validation.xml b/application-swing-validation/src/main/resources/fr/ird/observe/services/dto/referential/VesselDto-ui-update-error-validation.xml index 4ef8a9e..6658295 100644 --- a/application-swing-validation/src/main/resources/fr/ird/observe/services/dto/referential/VesselDto-ui-update-error-validation.xml +++ b/application-swing-validation/src/main/resources/fr/ird/observe/services/dto/referential/VesselDto-ui-update-error-validation.xml @@ -131,4 +131,14 @@ </field-validator> </field> + <field name="shipOwner"> + + <!-- shipOwner desactivee --> + <field-validator type="fieldexpression"> + <param name="expression"><![CDATA[ shipOwner == null || shipOwner.enabled ]]> + </param> + <message>validator.ui.vessel.desactivated.shipOwner</message> + </field-validator> + </field> + </validators> diff --git a/application-swing-validation/src/main/resources/i18n/application-swing-validation_en_GB.properties b/application-swing-validation/src/main/resources/i18n/application-swing-validation_en_GB.properties index 8bf986a..e13198a 100644 --- a/application-swing-validation/src/main/resources/i18n/application-swing-validation_en_GB.properties +++ b/application-swing-validation/src/main/resources/i18n/application-swing-validation_en_GB.properties @@ -88,6 +88,7 @@ observe.common.iso3Code=Iso 3 code observe.common.itemHorizontalPosition=Item horizontal position observe.common.itemVerticalPosition=Item vertical position observe.common.keelCode=Keel code +observe.common.label=Label observe.common.label1=English label observe.common.label2=French label observe.common.label3=Spanish label @@ -152,6 +153,7 @@ observe.common.settingStartQuadrant=Setting start quadrant observe.common.settingStartTimeStamp=Setting start timeStamp observe.common.settingVesselSpeed=Setting vessel speed observe.common.sex=Sex +observe.common.shipOwner=Ship owner observe.common.shooterSpeed=Shooter speed observe.common.sizeMeasureType=Size measure type observe.common.snapWeight=Snap weight @@ -500,6 +502,9 @@ validator.ui.setLongline.required.settingStartTimeStamp=Timestamp must be filled validator.ui.setLongline.required.totalSectionsCount=Total sections count must be filled. validator.ui.setLongline.settingEndTimeStamp.before.haulingStartTimeStamp=Setting end time must be before hauling start time. validator.ui.setLongline.settingStartTimeStamp.before.settingEndTimeStamp=Setting start time must be before setting end time. +validator.ui.shipOwner.desactivated.country=Selected ship owner is disabled. +validator.ui.shipOwner.required.code=Code is mandatory. +validator.ui.shipOwner.required.label=Label is mandatory. validator.ui.species.desactivated.sizeMeasureType=Selected size measure type is dabled. validator.ui.species.desactivated.speciesGroup=Selected species group is disabled. validator.ui.species.invalid.faoCode.uniqueKey=Fao code must be unique, value %s is already used. @@ -600,6 +605,7 @@ validator.ui.trip.required.vessel=Vessel must be filled. validator.ui.tripLongline.unclosed.activity=There is an open activity on trip (%1$s). validator.ui.tripSeine.unclosed.route=There is an open route on trip (%1$s). validator.ui.vessel.desactivated.flagCountry=Selected flag country is disabled. +validator.ui.vessel.desactivated.shipOwner=Selected ship owner is disabled. validator.ui.vessel.desactivated.vesselSizeCategory=Selected vessel size category is disabled. validator.ui.vessel.desactivated.vesselType=Selected vessel type is disabled. validator.ui.vessel.invalid.capacity=Capacity is not filled. diff --git a/application-swing-validation/src/main/resources/i18n/application-swing-validation_es_ES.properties b/application-swing-validation/src/main/resources/i18n/application-swing-validation_es_ES.properties index 35d081f..a136d1b 100644 --- a/application-swing-validation/src/main/resources/i18n/application-swing-validation_es_ES.properties +++ b/application-swing-validation/src/main/resources/i18n/application-swing-validation_es_ES.properties @@ -88,6 +88,7 @@ observe.common.iso3Code=Código ISO-3 observe.common.itemHorizontalPosition=Localización del elemento sobre la línea principal observe.common.itemVerticalPosition=Localización del elemento sobre el arponcillo observe.common.keelCode=Código de Quilla +observe.common.label=Texto observe.common.label1=Texto en inglés observe.common.label2=Texto en francés observe.common.label3=Nombre @@ -152,6 +153,7 @@ observe.common.settingStartQuadrant=Calada quadrant observe.common.settingStartTimeStamp=Timestamp de inicio observe.common.settingVesselSpeed=Velocidad del barco (nd) observe.common.sex=Sexo +observe.common.shipOwner=Armateur \#TODO observe.common.shooterSpeed=Velocidad shooter (nd) observe.common.sizeMeasureType=Size measure type \#TODO observe.common.snapWeight=Peso snap (kg) @@ -500,6 +502,9 @@ validator.ui.setLongline.required.settingStartTimeStamp=Timestamp de inicio de c validator.ui.setLongline.required.totalSectionsCount=Número de secciones vacío. validator.ui.setLongline.settingEndTimeStamp.before.haulingStartTimeStamp=La hora de inicio de arrastre debe ser superior o igual a la hora de fin de calada. validator.ui.setLongline.settingStartTimeStamp.before.settingEndTimeStamp=L'heure de fin de calada debe ser superior o igual a la hora de inicio de calada. +validator.ui.shipOwner.desactivated.country=L'armateur sélectionné est désactivé. \#TODO +validator.ui.shipOwner.required.code=Le code est obligatoire. \#TODO +validator.ui.shipOwner.required.label=Le code est obligatoire. \#TODO validator.ui.species.desactivated.sizeMeasureType=Le type de mesure taille est désactivé. \#TODO validator.ui.species.desactivated.speciesGroup=El grupo de especies seleccionado está desactivado. validator.ui.species.invalid.faoCode.uniqueKey=El código debe ser único, el valor %1$s ya se ha usado. @@ -600,6 +605,7 @@ validator.ui.trip.required.vessel=Es obligatorio seleccionar un barco. validator.ui.tripLongline.unclosed.activity=Existe una actividad que no fue cerrada (%1$s). validator.ui.tripSeine.unclosed.route=Existe una ruta que no fue cerrada (%1$s). validator.ui.vessel.desactivated.flagCountry=la bandera seleccionada está desactivada. +validator.ui.vessel.desactivated.shipOwner=L'armateur sélectionné est désactivé. \#TODO validator.ui.vessel.desactivated.vesselSizeCategory=la capacidad seleccionada está desactivada. validator.ui.vessel.desactivated.vesselType=La perquería seleccionada está desactivada. validator.ui.vessel.invalid.capacity=No se ha especificado el año de servicio. diff --git a/application-swing-validation/src/main/resources/i18n/application-swing-validation_fr_FR.properties b/application-swing-validation/src/main/resources/i18n/application-swing-validation_fr_FR.properties index 0246150..a34f2d1 100644 --- a/application-swing-validation/src/main/resources/i18n/application-swing-validation_fr_FR.properties +++ b/application-swing-validation/src/main/resources/i18n/application-swing-validation_fr_FR.properties @@ -88,6 +88,7 @@ observe.common.iso3Code=Code ISO-3 observe.common.itemHorizontalPosition=Position sur la ligne observe.common.itemVerticalPosition=Position verticale observe.common.keelCode=Code quille +observe.common.label=Libellé observe.common.label1=Libellé anglais observe.common.label2=Libellé français observe.common.label3=Libellé espagnol @@ -152,6 +153,7 @@ observe.common.settingStartQuadrant=Quadrant de début de filage observe.common.settingStartTimeStamp=Horodatage début observe.common.settingVesselSpeed=Vitesse bateau (nd) observe.common.sex=Sexe +observe.common.shipOwner=Armateur observe.common.shooterSpeed=Vitesse shooter (nd) observe.common.sizeMeasureType=Type de mesure observe.common.snapWeight=Poids snap (kg) @@ -500,6 +502,9 @@ validator.ui.setLongline.required.settingStartTimeStamp=Horodatage de début de validator.ui.setLongline.required.totalSectionsCount=Nombre de sections non renseigné. validator.ui.setLongline.settingEndTimeStamp.before.haulingStartTimeStamp=L'heure de début de virage doit être supérieure ou égal à l'heure de fin de filage. validator.ui.setLongline.settingStartTimeStamp.before.settingEndTimeStamp=L'heure de fin de filage doit être supérieure ou égal à l'heure de début de filage. +validator.ui.shipOwner.desactivated.country=L'armateur sélectionné est désactivé. +validator.ui.shipOwner.required.code=Le code est obligatoire. +validator.ui.shipOwner.required.label=Le libellé est obligatoire. validator.ui.species.desactivated.sizeMeasureType=Le type de lensuration est désactivé. validator.ui.species.desactivated.speciesGroup=Le groupe d'espèce sélectionnée est désactivé. validator.ui.species.invalid.faoCode.uniqueKey=Le codeFAO doit être unique, la valeur %1$s est déjà utilisée. @@ -600,6 +605,7 @@ validator.ui.trip.required.vessel=La sélection d'un bateau est obligatoire. validator.ui.tripLongline.unclosed.activity=Il existe une activité non clôturée (%1$s). validator.ui.tripSeine.unclosed.route=Il existe une route non clôturée (%1$s). validator.ui.vessel.desactivated.flagCountry=Le pavillon sélectionné est désactivée. +validator.ui.vessel.desactivated.shipOwner=L'armateur sélectionné est désactivé. validator.ui.vessel.desactivated.vesselSizeCategory=La jauge sélectionnée est désactivée. validator.ui.vessel.desactivated.vesselType=La pêcherie sélectionnée est désactivée. validator.ui.vessel.invalid.capacity=Année de mise en service non renseignée. diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/ShipOwnerUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/ShipOwnerUI.jaxx new file mode 100644 index 0000000..ea15f40 --- /dev/null +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/ShipOwnerUI.jaxx @@ -0,0 +1,109 @@ +<!-- + #%L + ObServe :: Application Swing + %% + Copyright (C) 2008 - 2016 IRD, Codelutin, Tony Chemit + %% + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this program. If not, see + <http://www.gnu.org/licenses/gpl-3.0.html>. + #L% + --> + +<fr.ird.observe.application.swing.ui.content.ref.ContentReferenceUI superGenericType='ShipOwnerDto'> + + <style source="ReferenceEntity.jcss"/> + <style source="I18nReferenceEntity.jcss"/> + + <import> + fr.ird.observe.services.dto.constants.ReferenceStatus + fr.ird.observe.services.dto.referential.ReferentialReference + fr.ird.observe.services.dto.referential.ShipOwnerDto + fr.ird.observe.services.dto.referential.CountryDto + fr.ird.observe.application.swing.ui.content.ref.ContentReferenceUIModel + + jaxx.runtime.swing.editor.bean.BeanComboBox + + static fr.ird.observe.application.swing.ui.UIHelper.getStringValue + static org.nuiton.i18n.I18n.n + </import> + + <!-- validator --> + <BeanValidator id='validator' autoField='true' + beanClass='fr.ird.observe.services.dto.referential.ShipOwnerDto' + context='ui-create' + errorTableModel='{getErrorTableModel()}'/> + + <!-- model --> + <ShipOwnerUIModel id='model'/> + + <!-- edit bean --> + <ShipOwnerDto id='bean'/> + + <Table id='editTable'> + + <!-- uri --> + <row> + <cell anchor="west"> + <JLabel id='uriLabel'/> + </cell> + <cell anchor='east' weightx="1" fill="both"> + <JTextField id='uri' onKeyReleased='getBean().setUri(uri.getText())'/> + </cell> + </row> + + <!-- code / status --> + <row> + <cell anchor="west"> + <JLabel id='codeStatusLabel'/> + </cell> + <cell anchor='east' weightx="1" fill="both"> + <JPanel id='codeStatusPanel' layout='{new BorderLayout()}'> + <JTextField id='code' constraints='BorderLayout.WEST' onKeyReleased='getBean().setCode(code.getText())'/> + <EnumEditor id='status' constraints='BorderLayout.CENTER' constructorParams='ReferenceStatus.class' + genericType='ReferenceStatus' + onItemStateChanged='getBean().setStatus((ReferenceStatus)status.getSelectedItem())'/> + </JPanel> + </cell> + </row> + + <!-- country --> + <row> + <cell anchor='west'> + <JLabel id='countryLabel'/> + </cell> + <cell anchor='east' weightx="1" fill="both"> + <BeanComboBox id='country' constructorParams='this' genericType='ReferentialReference<CountryDto>' + _entityClass='CountryDto.class'/> + </cell> + </row> + + <row> + <cell anchor="west"> + <JLabel id='labelLabel'/> + </cell> + <cell anchor='east' weightx="1" fill="both"> + <JTextField id='label' onKeyReleased='getBean().setLabel(label.getText())'/> + </cell> + </row> + + <!-- needComment --> + <row> + <cell anchor='east' weightx="1" fill="both" columns="2"> + <JCheckBox id='needComment' + onItemStateChanged='getBean().setNeedComment(needComment.isSelected())'/> + </cell> + </row> + </Table> + +</fr.ird.observe.application.swing.ui.content.ref.ContentReferenceUI> diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/ShipOwnerUI.jcss b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/ShipOwnerUI.jcss new file mode 100644 index 0000000..b56d75b --- /dev/null +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/ShipOwnerUI.jcss @@ -0,0 +1,39 @@ +/* + * #%L + * ObServe :: Swing + * %% + * Copyright (C) 2008 - 2010 IRD, Codelutin, Tony Chemit + * %% + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program. If not, see + * <http://www.gnu.org/licenses/gpl-3.0.html>. + * #L% + */ +#countryLabel { + text:"observe.common.country"; + labelFor:{country}; +} + +#country { + property:{ShipOwnerDto.PROPERTY_COUNTRY}; + selectedItem:{bean.getCountry()}; +} + +#labelLabel { + text:"observe.common.label"; + labelFor:{label}; +} + +#label { + text:{getStringValue(bean.getLabel())}; +} diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/ShipOwnerUIModel.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/ShipOwnerUIModel.java new file mode 100644 index 0000000..0fd6504 --- /dev/null +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/ShipOwnerUIModel.java @@ -0,0 +1,23 @@ +package fr.ird.observe.application.swing.ui.content.ref.impl; + +import fr.ird.observe.application.swing.ui.content.ref.ContentReferenceUIModel; +import fr.ird.observe.services.dto.referential.ShipOwnerDto; + +/** + * Created on 02/11/16. + * + * @author Tony Chemit - chemit@codelutin.com + * @since 5.1 + */ +public class ShipOwnerUIModel extends ContentReferenceUIModel<ShipOwnerDto> { + + private static final long serialVersionUID = 1L; + + public ShipOwnerUIModel() { + super(ShipOwnerDto.class, + new String[]{ShipOwnerDto.PROPERTY_LABEL, ShipOwnerDto.PROPERTY_COUNTRY}, + new String[]{ShipOwnerUI.BINDING_LABEL_TEXT, ShipOwnerUI.BINDING_COUNTRY_SELECTED_ITEM} + ); + } + +} \ No newline at end of file diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/VesselUI.jaxx b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/VesselUI.jaxx index 6858c74..5362f29 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/VesselUI.jaxx +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/VesselUI.jaxx @@ -32,6 +32,7 @@ fr.ird.observe.services.dto.referential.VesselSizeCategoryDto fr.ird.observe.services.dto.referential.CountryDto fr.ird.observe.services.dto.referential.VesselTypeDto + fr.ird.observe.services.dto.referential.ShipOwnerDto fr.ird.observe.application.swing.ui.content.ref.ContentReferenceUIModel jaxx.runtime.swing.editor.NumberEditor @@ -343,6 +344,16 @@ <JTextField id='tuviId' onKeyReleased='getBean().setTuviId(tuviId.getText())'/> </cell> </row> + + <!-- shipOwner --> + <row> + <cell anchor='west'> + <JLabel id='shipOwnerLabel'/> + </cell> + <cell anchor='east' weightx="1" fill="both"> + <BeanComboBox id='shipOwner' constructorParams='this' genericType='ReferentialReference<ShipOwnerDto>' _entityClass='ShipOwnerDto.class'/> + </cell> + </row> </Table> </tab> </JTabbedPane> diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/VesselUI.jcss b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/VesselUI.jcss index 0ceb74e..25f573e 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/VesselUI.jcss +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/VesselUI.jcss @@ -84,6 +84,16 @@ selectedItem:{bean.getFlagCountry()}; } +#shipOwnerLabel { + text:"observe.common.shipOwner"; + labelFor:{shipOwner}; +} + +#shipOwner { + property:{VesselDto.PROPERTY_SHIP_OWNER}; + selectedItem:{bean.getShipOwner()}; +} + #lengthLabel { text:"observe.common.length"; labelFor:{length}; diff --git a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/VesselUIModel.java b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/VesselUIModel.java index 3461ea3..a212824 100644 --- a/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/VesselUIModel.java +++ b/application-swing/src/main/java/fr/ird/observe/application/swing/ui/content/ref/impl/VesselUIModel.java @@ -74,7 +74,8 @@ public class VesselUIModel extends ContentReferenceUIModel<VesselDto> { VesselDto.PROPERTY_IMO_ID, VesselDto.PROPERTY_NATIONAL_ID, VesselDto.PROPERTY_RADIO_CALL_SIGN_ID, - VesselDto.PROPERTY_TUVI_ID).build(); + VesselDto.PROPERTY_TUVI_ID, + VesselDto.PROPERTY_SHIP_OWNER).build(); private static final long serialVersionUID = 1L; @@ -102,7 +103,8 @@ public class VesselUIModel extends ContentReferenceUIModel<VesselDto> { VesselDto.PROPERTY_IMO_ID, VesselDto.PROPERTY_NATIONAL_ID, VesselDto.PROPERTY_RADIO_CALL_SIGN_ID, - VesselDto.PROPERTY_TUVI_ID}, + VesselDto.PROPERTY_TUVI_ID, + VesselDto.PROPERTY_SHIP_OWNER}, new String[]{VesselUI.BINDING_VESSEL_TYPE_SELECTED_ITEM, VesselUI.BINDING_VESSEL_SIZE_CATEGORY_SELECTED_ITEM, VesselUI.BINDING_FLAG_COUNTRY_SELECTED_ITEM, diff --git a/application-swing/src/main/resources/i18n/application-swing_en_GB.properties b/application-swing/src/main/resources/i18n/application-swing_en_GB.properties index 68ce77b..198bfaf 100644 --- a/application-swing/src/main/resources/i18n/application-swing_en_GB.properties +++ b/application-swing/src/main/resources/i18n/application-swing_en_GB.properties @@ -402,6 +402,7 @@ observe.common.imoId=IMO Id observe.common.iso2Code=Iso 2 code observe.common.iso3Code=Iso 3 code observe.common.keelCodeFlotte=Keel / Flotte +observe.common.label=Label observe.common.label1=English label observe.common.label2=French label observe.common.label3=Spanish label @@ -479,6 +480,7 @@ observe.common.scientificLabel=Scientific label observe.common.seaSurfaceTemperature=Sea surface temperature observe.common.searchMaximum=Search maximum observe.common.sex=Sex +observe.common.shipOwner=Ship owner observe.common.sizeMeasureType=Measure type observe.common.species=Species observe.common.speciesFate=Species fate diff --git a/application-swing/src/main/resources/i18n/application-swing_es_ES.properties b/application-swing/src/main/resources/i18n/application-swing_es_ES.properties index 704c15a..97a8530 100644 --- a/application-swing/src/main/resources/i18n/application-swing_es_ES.properties +++ b/application-swing/src/main/resources/i18n/application-swing_es_ES.properties @@ -402,6 +402,7 @@ observe.common.imoId=Id IMO observe.common.iso2Code=Código ISO-2 observe.common.iso3Code=Código ISO-3 observe.common.keelCodeFlotte=Código de Quilla / Flota +observe.common.label=Texto observe.common.label1=Texto en inglés observe.common.label2=Texto en francés observe.common.label3=Nombre @@ -479,6 +480,7 @@ observe.common.scientificLabel=Texto científico observe.common.seaSurfaceTemperature=Temperatura en superficie (°) observe.common.searchMaximum=Velocidad máxima de prospección observe.common.sex=Sexo +observe.common.shipOwner=Armateur \#TODO observe.common.sizeMeasureType=Tipo de medida observe.common.species=Especie observe.common.speciesFate=Devenir de fauna diff --git a/application-swing/src/main/resources/i18n/application-swing_fr_FR.properties b/application-swing/src/main/resources/i18n/application-swing_fr_FR.properties index 8642fa7..1a40c31 100644 --- a/application-swing/src/main/resources/i18n/application-swing_fr_FR.properties +++ b/application-swing/src/main/resources/i18n/application-swing_fr_FR.properties @@ -402,6 +402,7 @@ observe.common.imoId=Id IMO observe.common.iso2Code=code ISO-2 observe.common.iso3Code=Code ISO-3 observe.common.keelCodeFlotte=Code quille /Code flotte +observe.common.label=Libellé observe.common.label1=Libellé anglais observe.common.label2=Libellé français observe.common.label3=Libellé espagnol @@ -479,6 +480,7 @@ observe.common.scientificLabel=Libellé scientifique observe.common.seaSurfaceTemperature=Température surface (°) observe.common.searchMaximum=Vitesse maximale observe.common.sex=Sexe +observe.common.shipOwner=Armateur observe.common.sizeMeasureType=Type de mensuration observe.common.species=Espèce observe.common.speciesFate=Devenir espèce -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.