public List<Label> getLabelListForCategorie(TopiaContext transaction, String categorie) throws TopiaException { if (log.isDebugEnabled()) { log.debug("[" + getUserLogin() + "]" + " getLabelListForCategorie categorie[" + categorie + "]"); } LabelDAO dao = SandraDAOHelper.getLabelDAO(transaction); List<Label> labels = dao.findAllByCategorie(categorie); return labels; }
public List<Label> getLabelListForCategorie(TopiaContext transaction, String categorie) throws TopiaException { if (log.isDebugEnabled()) { log.debug("[" + getUserLogin() + "]" + " getLabelListForCategorie categorie[" + categorie + "]"); } LabelDAO dao = SandraDAOHelper.getLabelDAO(transaction); List<Label> labels = dao.findAllByCategorie(categorie); return labels; }
protected void addLabelMapInContext(TopiaContext transaction, Map<String, Object> context) throws Exception { Map<String, String> labelMap = new HashMap<String, String>(); LabelDAO labelDAO = SandraDAOHelper.getLabelDAO(transaction); List<Label> labels = new ArrayList<Label>(labelDAO.findAll()); for (Label lbl : new ArrayList<Label>(labels)) { labelMap.put(lbl.getCategorie() + "-" + lbl.getId(), lbl.getValeur()); } if (log.isDebugEnabled()) { log.debug("Found " + labelMap.size() + " label"); } context.put("lbl", labelMap); }
protected void addLabelMapInContext(TopiaContext transaction, Map<String, Object> context) throws Exception { Map<String, String> labelMap = new HashMap<String, String>(); LabelDAO labelDAO = SandraDAOHelper.getLabelDAO(transaction); List<Label> labels = new ArrayList<Label>(labelDAO.findAll()); for (Label lbl : new ArrayList<Label>(labels)) { labelMap.put(lbl.getCategorie() + "-" + lbl.getId(), lbl.getValeur()); } if (log.isDebugEnabled()) { log.debug("Found " + labelMap.size() + " label"); } context.put("lbl", labelMap); }
@Override @Transaction public void deleteLabel(TopiaContext transaction, String topiaId) throws TopiaException, LogicException { if (log.isDebugEnabled()) { log.debug("deleteLabel " + topiaId); } Label label = getLabel(transaction, topiaId); SandraDAOHelper.getLabelDAO(transaction).delete(label); }
/** * Classe utilitaire pour retrouver le label corresondant */ @Override public String getLabel(TopiaContext context, String category, String id) throws TopiaException { if (id != null) { Label lbl = SandraDAOHelper.getLabelDAO(context).findByNaturalId(id, category); if (lbl != null) { return lbl.getValeur(); } } return null; }
@Override @Transaction public void deleteLabel(TopiaContext transaction, String topiaId) throws TopiaException, LogicException { if (log.isDebugEnabled()) { log.debug("deleteLabel " + topiaId); } Label label = getLabel(transaction, topiaId); SandraDAOHelper.getLabelDAO(transaction).delete(label); }
@Override @Transaction public String getMessageBienvenue(TopiaContext transaction) throws TopiaException, LogicException { if (log.isDebugEnabled()) { log.debug("getMessageBienvenue"); } String valeur = null; LabelDAO labelDAO = SandraDAOHelper.getLabelDAO(transaction); Label label = labelDAO.findById("msg0"); if (label != null) { valeur = label.getValeur(); } return valeur; }
/** * Classe utilitaire pour retrouver le label corresondant */ @Override public String getLabel(TopiaContext context, String category, String id) throws TopiaException { if (id != null) { Label lbl = SandraDAOHelper.getLabelDAO(context).findByNaturalId(id, category); if (lbl != null) { return lbl.getValeur(); } } return null; }
@Override @Transaction public String getCopyright(TopiaContext transaction) throws TopiaException, LogicException { if (log.isDebugEnabled()) { log.debug("getCopyright"); } String valeur = null; LabelDAO labelDAO = SandraDAOHelper.getLabelDAO(transaction); Label label = labelDAO.findById("copyright"); if (label != null) { valeur = label.getValeur(); } return valeur; }
@Override @Transaction public String getCopyright(TopiaContext transaction) throws TopiaException, LogicException { if (log.isDebugEnabled()) { log.debug("getCopyright"); } String valeur = null; LabelDAO labelDAO = SandraDAOHelper.getLabelDAO(transaction); Label label = labelDAO.findById("copyright"); if (label != null) { valeur = label.getValeur(); } return valeur; }
@Override @Transaction public String getMessageBienvenue(TopiaContext transaction) throws TopiaException, LogicException { if (log.isDebugEnabled()) { log.debug("getMessageBienvenue"); } String valeur = null; LabelDAO labelDAO = SandraDAOHelper.getLabelDAO(transaction); Label label = labelDAO.findById("msg0"); if (label != null) { valeur = label.getValeur(); } return valeur; }
public void createLabel(TopiaContext transaction, Label label) throws TopiaException { if (log.isDebugEnabled()) { log.debug("[" + getUserLogin() + "]" + " createLabel label[" + label + "]"); } LabelDAO dao = SandraDAOHelper.getLabelDAO(transaction); Label dbLabel = dao.findByNaturalId(label.getId(), label.getCategorie()); if (dbLabel == null) { dbLabel = dao.createByNaturalId(label.getId(), label.getCategorie()); } dbLabel.setValeur(label.getValeur()); dao.update(dbLabel); }
public void createLabel(TopiaContext transaction, Label label) throws TopiaException { if (log.isDebugEnabled()) { log.debug("[" + getUserLogin() + "]" + " createLabel label[" + label + "]"); } LabelDAO dao = SandraDAOHelper.getLabelDAO(transaction); Label dbLabel = dao.findByNaturalId(label.getId(), label.getCategorie()); if (dbLabel == null) { dbLabel = dao.createByNaturalId(label.getId(), label.getCategorie()); } dbLabel.setValeur(label.getValeur()); dao.update(dbLabel); }
public Label saveLabel(TopiaContext transaction, Label label) throws TopiaException, LogicException { Label label2; LabelDAO dao = SandraDAOHelper.getLabelDAO(transaction); String categorie = label.getCategorie(); String id = label.getId();
@Override @Transaction public Label saveLabel(TopiaContext transaction, Label label) throws TopiaException, LogicException { LabelDAO dao = SandraDAOHelper.getLabelDAO(transaction); String categorie = label.getCategorie(); String id = label.getId();
public void inject(ManagerInjector manager, IbuLabel ibuLabel) throws TopiaException { LabelDAO dao = SandraDAOHelper.getLabelDAO(manager.getTransaction()); // Recherche label = dao.findByNaturalId(ibuLabel.getId(), ibuLabel.getCategory()); if (label == null) { // creation label = dao.createByNaturalId(ibuLabel.getId(), ibuLabel.getCategory()); } label.setValeur(ibuLabel.getValue()); dao.update(label); } }
public void inject(ManagerInjector manager, IbuLabel ibuLabel) throws TopiaException { LabelDAO dao = SandraDAOHelper.getLabelDAO(manager.getTransaction()); // Recherche label = dao.findByNaturalId(ibuLabel.getId(), ibuLabel.getCategory()); if (label == null) { // creation label = dao.createByNaturalId(ibuLabel.getId(), ibuLabel.getCategory()); } label.setValeur(ibuLabel.getValue()); dao.update(label); } }
context.put("types", types); LabelDAO labelDAO = SandraDAOHelper.getLabelDAO(transaction); List<Label> labels = labelDAO.findAllByCategorie("ACT"); for (Label label : labels) {