branch develop-4.x updated (8efc8a1 -> 9779695)
This is an automated email from the git hooks/post-receive script. New change to branch develop-4.x in repository tutti. See http://git.codelutin.com/tutti.git discards 8efc8a1 Ajout de l'unité dans la décoration d'une caractéristique (See #7695) new 9779695 Ajout de l'unité dans la décoration d'une caractéristique (Fixes #7695) This update added new revisions after undoing existing revisions. That is to say, some revisions that were in the old version of the branch are not in the new version. This situation occurs when a user --force pushes a change and generates a repository containing something like this: * -- * -- B -- O -- O -- O (8efc8a1) \ N -- N -- N refs/heads/develop-4.x (9779695) You should already have received notification emails for all of the O revisions, and so the following emails describe only the N revisions from the common base, B. Any revisions marked "omits" are not gone; other references still refer to them. Any revisions marked "discards" are gone forever. The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 97796951d6880b3d71b9f8428628ea99f99d4927 Author: Tony CHEMIT <chemit@codelutin.com> Date: Wed Jan 13 15:03:18 2016 +0100 Ajout de l'unité dans la décoration d'une caractéristique (Fixes #7695) Summary of changes: -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop-4.x in repository tutti. See http://git.codelutin.com/tutti.git commit 97796951d6880b3d71b9f8428628ea99f99d4927 Author: Tony CHEMIT <chemit@codelutin.com> Date: Wed Jan 13 15:03:18 2016 +0100 Ajout de l'unité dans la décoration d'une caractéristique (Fixes #7695) --- .../main/java/fr/ird/observe/DecoratorService.java | 5 +++-- .../decorator/GearCaracteristicDecorator.java | 22 ++++++++++++++++++++++ .../i18n/observe-business_en_GB.properties | 1 + .../i18n/observe-business_es_ES.properties | 1 + .../i18n/observe-business_fr_FR.properties | 1 + 5 files changed, 28 insertions(+), 2 deletions(-) diff --git a/observe-business/src/main/java/fr/ird/observe/DecoratorService.java b/observe-business/src/main/java/fr/ird/observe/DecoratorService.java index 5d5e14c..ad83c55 100644 --- a/observe-business/src/main/java/fr/ird/observe/DecoratorService.java +++ b/observe-business/src/main/java/fr/ird/observe/DecoratorService.java @@ -21,6 +21,7 @@ */ package fr.ird.observe; +import fr.ird.observe.decorator.GearCaracteristicDecorator; import fr.ird.observe.decorator.LengthWeightParameterDecorator; import fr.ird.observe.decorator.NonTargetCatchDecorator; import fr.ird.observe.decorator.NonTargetLengthDecorator; @@ -41,7 +42,6 @@ import fr.ird.observe.entities.longline.Tdr; import fr.ird.observe.entities.referentiel.Country; import fr.ird.observe.entities.referentiel.FpaZone; import fr.ird.observe.entities.referentiel.Gear; -import fr.ird.observe.entities.referentiel.GearCaracteristic; import fr.ird.observe.entities.referentiel.GearCaracteristicType; import fr.ird.observe.entities.referentiel.Harbour; import fr.ird.observe.entities.referentiel.Ocean; @@ -469,7 +469,8 @@ public class DecoratorService extends DecoratorProvider { registerDefaultReferenceEntityDecorator(VesselActivityLongline.class, libelle); registerDefaultReferenceEntityDecorator(WeightMeasureType.class, libelle); registerDefaultReferenceEntityDecorator(GearCaracteristicType.class, libelle); - registerDefaultReferenceEntityDecorator(GearCaracteristic.class, libelle); + String unit = l(locale, "observe.common.unit"); + registerDecorator(new GearCaracteristicDecorator("${code}$s##${" + libelle + "}$s##( " + unit + " ${unit}$s )")); registerDefaultReferenceEntityDecorator(Gear.class, libelle); registerReferenceEntityDecorator(Harbour.class, "${code}$s##${name}$s##${locode}$s"); diff --git a/observe-business/src/main/java/fr/ird/observe/decorator/GearCaracteristicDecorator.java b/observe-business/src/main/java/fr/ird/observe/decorator/GearCaracteristicDecorator.java new file mode 100644 index 0000000..d8cbe71 --- /dev/null +++ b/observe-business/src/main/java/fr/ird/observe/decorator/GearCaracteristicDecorator.java @@ -0,0 +1,22 @@ +package fr.ird.observe.decorator; + +import fr.ird.observe.entities.referentiel.GearCaracteristic; + +/** + * Created on 13/01/16. + * + * @author Tony Chemit - chemit@codelutin.com + */ +public class GearCaracteristicDecorator extends ReferenceDecorator<GearCaracteristic> { + + private static final long serialVersionUID = 1L; + + public GearCaracteristicDecorator(String expression) { + super(GearCaracteristic.class, expression); + } + + @Override + protected Comparable<?> getDefaultNullValue(String token) { + return GearCaracteristic.PROPERTY_UNIT.equals(token) ? "n/a" : super.getDefaultNullValue(token); + } +} diff --git a/observe-business/src/main/resources/i18n/observe-business_en_GB.properties b/observe-business/src/main/resources/i18n/observe-business_en_GB.properties index 4a1d43f..794d93d 100644 --- a/observe-business/src/main/resources/i18n/observe-business_en_GB.properties +++ b/observe-business/src/main/resources/i18n/observe-business_en_GB.properties @@ -122,6 +122,7 @@ observe.common.transmittingBuoyType= observe.common.tripLongline=Trip observe.common.tripSeine=Trip observe.common.tripType=Trip type +observe.common.unit=Unit observe.common.vessel=Boat observe.common.vessel/label1=Boat observe.common.vessel/label2=Boat diff --git a/observe-business/src/main/resources/i18n/observe-business_es_ES.properties b/observe-business/src/main/resources/i18n/observe-business_es_ES.properties index 729e862..864c6f0 100644 --- a/observe-business/src/main/resources/i18n/observe-business_es_ES.properties +++ b/observe-business/src/main/resources/i18n/observe-business_es_ES.properties @@ -122,6 +122,7 @@ observe.common.transmittingBuoyType= observe.common.tripLongline=Marea observe.common.tripSeine=Marea observe.common.tripType= +observe.common.unit=Unidad observe.common.vessel=Barco observe.common.vessel/label1=Barco observe.common.vessel/label2=Barco diff --git a/observe-business/src/main/resources/i18n/observe-business_fr_FR.properties b/observe-business/src/main/resources/i18n/observe-business_fr_FR.properties index 6160b02..c66b8dd 100644 --- a/observe-business/src/main/resources/i18n/observe-business_fr_FR.properties +++ b/observe-business/src/main/resources/i18n/observe-business_fr_FR.properties @@ -122,6 +122,7 @@ observe.common.transmittingBuoyType=Type de balise observe.common.tripLongline=Marée observe.common.tripSeine=Marée observe.common.tripType=Type de marée +observe.common.unit=Unité observe.common.vessel=Bateau observe.common.vessel/label1=Bateau observe.common.vessel/label2=Bateau -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
participants (1)
-
codelutin.com scm