This is an automated email from the git hooks/post-receive script. New commit to branch develop-4.x in repository observe. See http://git.codelutin.com/observe.git commit 643c4a1e47f9719abd7b7cf149841acee90145a5 Author: Tony CHEMIT <chemit@codelutin.com> Date: Tue Nov 3 12:19:54 2015 +0100 Ajout d'un préfixe sur le décorateur des programmes (See #7504) --- .../src/main/java/fr/ird/observe/DecoratorService.java | 3 +-- .../java/fr/ird/observe/entities/constants/GearType.java | 14 ++++++++++---- .../fr/ird/observe/entities/referentiel/ProgramImpl.java | 13 +++++++++++++ 3 files changed, 24 insertions(+), 6 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 883457c..5d5e14c 100644 --- a/observe-business/src/main/java/fr/ird/observe/DecoratorService.java +++ b/observe-business/src/main/java/fr/ird/observe/DecoratorService.java @@ -396,8 +396,7 @@ public class DecoratorService extends DecoratorProvider { String libelle = referentielLocale.getLibelle(); registerJXPathDecorator(Program.class, - t("observe.common.program") + - " ${" + libelle + "}$s"); + "[${programPrefix}$s] " + t("observe.common.program") + " ${" + libelle + "}$s"); registerJXPathDecorator(Route.class, "${date}$td/%1$tm/%1$tY"); registerMultiJXPathDecorator( diff --git a/observe-entities/src/main/java/fr/ird/observe/entities/constants/GearType.java b/observe-entities/src/main/java/fr/ird/observe/entities/constants/GearType.java index 26f07f9..89a7db6 100644 --- a/observe-entities/src/main/java/fr/ird/observe/entities/constants/GearType.java +++ b/observe-entities/src/main/java/fr/ird/observe/entities/constants/GearType.java @@ -34,15 +34,17 @@ import static org.nuiton.i18n.I18n.t; public enum GearType { /** Seine */ - seine(n("observe.common.reference.gearType.seine")), + seine(n("observe.common.reference.gearType.seine"),"PS"), /** Longline */ - longline(n("observe.common.reference.gearType.longline")); + longline(n("observe.common.reference.gearType.longline"), "LL"); - private String i18nKey; + private final String i18nKey; + private final String prefix; - GearType(String i18nKey) { + GearType(String i18nKey, String prefix) { this.i18nKey = i18nKey; + this.prefix=prefix; } public String getI18nKey() { @@ -54,6 +56,10 @@ public enum GearType { return t(i18nKey); } + public String getPrefix() { + return prefix; + } + public static GearType fromOrdinal(int ordinal) { GearType result = null; diff --git a/observe-entities/src/main/java/fr/ird/observe/entities/referentiel/ProgramImpl.java b/observe-entities/src/main/java/fr/ird/observe/entities/referentiel/ProgramImpl.java new file mode 100644 index 0000000..485bfad --- /dev/null +++ b/observe-entities/src/main/java/fr/ird/observe/entities/referentiel/ProgramImpl.java @@ -0,0 +1,13 @@ +package fr.ird.observe.entities.referentiel; + +public class ProgramImpl extends ProgramAbstract { + + private static final long serialVersionUID = 3546129729498396258L; + + public String getProgramPrefix() { + + return gearType == null ? "?" : gearType.getPrefix(); + + } + +} -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@list.forge.codelutin.com>.