Author: tchemit Date: 2008-02-17 15:54:06 +0000 (Sun, 17 Feb 2008) New Revision: 1043 Modified: trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/entities/EntityHelper.java Log: ajout d'une propriete sur le type pour savoir si le type est un LE Modified: trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/entities/EntityHelper.java =================================================================== --- trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/entities/EntityHelper.java 2008-02-17 15:53:39 UTC (rev 1042) +++ trunk/simexplorer-is/simexplorer-is-storage/src/java/fr/cemagref/simexplorer/is/entities/EntityHelper.java 2008-02-17 15:54:06 UTC (rev 1043) @@ -39,7 +39,7 @@ */ public class EntityHelper { /** - * Une enum pour definir les differents typed'entities rencontres dans le projet. + * Une enum pour definir les differents types d'entities rencontres dans le projet. * <p/> * On ajoute ici une clef i18n pour pouvoir traduire plus tard ces types. * <p/> @@ -49,20 +49,21 @@ * @author chemit */ public static enum Type { - Attachment(n_("simexplorer.common.attachment"), n_("simexplorer.common.attachments")), - Code(n_("simexplorer.common.code"), n_("simexplorer.common.codes")), - Component(n_("simexplorer.common.component"), n_("simexplorer.common.components")), - Constant(n_("simexplorer.common.constant"), n_("simexplorer.common.constants")), - ConstantValue(n_("simexplorer.common.constantvalue"), n_("simexplorer.common.constantvalues")), - ExplorationApplication(n_("simexplorer.common.explorationapplication"), n_("simexplorer.common.explorationapplications")), - ExplorationData(n_("simexplorer.common.explorationdata"), n_("simexplorer.common.explorationdatas")), - Library(n_("simexplorer.common.library"), n_("simexplorer.common.libraries")), - Repository(n_("simexplorer.common.repository"), n_("simexplorer.common.repositories")), - Result(n_("simexplorer.common.result"), n_("simexplorer.common.results")), - Structure(n_("simexplorer.common.structure"), n_("simexplorer.common.structures")); + Attachment(false,n_("simexplorer.common.attachment"), n_("simexplorer.common.attachments")), + Code(false,n_("simexplorer.common.code"), n_("simexplorer.common.codes")), + Component(true,n_("simexplorer.common.component"), n_("simexplorer.common.components")), + Constant(false,n_("simexplorer.common.constant"), n_("simexplorer.common.constants")), + ConstantValue(false,n_("simexplorer.common.constantvalue"), n_("simexplorer.common.constantvalues")), + ExplorationApplication(true,n_("simexplorer.common.explorationapplication"), n_("simexplorer.common.explorationapplications")), + ExplorationData(true,n_("simexplorer.common.explorationdata"), n_("simexplorer.common.explorationdatas")), + Library(true,n_("simexplorer.common.library"), n_("simexplorer.common.libraries")), + Repository(false,n_("simexplorer.common.repository"), n_("simexplorer.common.repositories")), + Result(false,n_("simexplorer.common.result"), n_("simexplorer.common.results")), + Structure(false,n_("simexplorer.common.structure"), n_("simexplorer.common.structures")); private String i18nKey; private String i18nKeys; + private boolean le; public static String getLibelle(Object entity) { if (entity == null) { @@ -90,6 +91,10 @@ return _(i18nKeys); } + public boolean isLe() { + return le; + } + protected static String getLibelle(String type) { if (type != null) { try { @@ -103,7 +108,8 @@ return ""; } - private Type(String i18nKey, String i18nKeys) { + private Type(boolean isLE,String i18nKey, String i18nKeys) { + this.le = isLE; this.i18nKey = i18nKey; this.i18nKeys = i18nKeys; }
participants (1)
-
tchemit@users.labs.libre-entreprise.org