r2883 - in trunk: pollen-business pollen-business/src/main/java/org/chorem/pollen/business/converters pollen-business/src/main/java/org/chorem/pollen/business/dto pollen-business/src/main/java/org/chorem/pollen/business/migration pollen-business/src/main/java/org/chorem/pollen/business/services pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence pollen-business/src/main/xmi pollen-business/src/test/java/org/chorem/pollen/business pollen-business/
Author: fdesbois Date: 2010-02-24 17:19:22 +0100 (Wed, 24 Feb 2010) New Revision: 2883 Added: trunk/pollen-business/src/test/java/org/chorem/pollen/business/TestData.java Removed: trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataCommentConverter.java trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServiceComment.java trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServiceCommentImpl.java trunk/pollen-business/src/test/java/org/chorem/pollen/business/services/ServiceCommentImplTest.java Modified: trunk/pollen-business/pom.xml trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/ConverterHelper.java trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataPollConverter.java trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataVoteCountingConverter.java trunk/pollen-business/src/main/java/org/chorem/pollen/business/dto/CommentDTO.java trunk/pollen-business/src/main/java/org/chorem/pollen/business/dto/PollDTO.java trunk/pollen-business/src/main/java/org/chorem/pollen/business/migration/PollenMigrationCallbackHandler.java trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServicePoll.java trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServicePollImpl.java trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/CommentImpl.hbm.xml trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/PollAccountImpl.hbm.xml trunk/pollen-business/src/main/xmi/pollen.zargo trunk/pollen-business/src/test/java/org/chorem/pollen/business/services/ServicePollImplTest.java trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/pages/poll/VoteForPoll.java trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/services/AppModule.java trunk/pollen-ui/src/main/webapp/poll/VoteForPoll.tml Log: Refactor comment managment : delete ServiceComment and DataCommentConverter -> Comments are only manipulated by the poll. The model also changed, the link between comment and pollAccount is useless, only the author name is needed (new attribute in comment). Modified: trunk/pollen-business/pom.xml =================================================================== --- trunk/pollen-business/pom.xml 2010-02-24 13:18:29 UTC (rev 2882) +++ trunk/pollen-business/pom.xml 2010-02-24 16:19:22 UTC (rev 2883) @@ -96,6 +96,7 @@ <executions> <execution> <phase>generate-sources</phase> + <id>generate-entities</id> <!-- By default, generation from ObjectModel --> <configuration> <!-- Corresponding to extracted package from zargo file --> @@ -105,6 +106,15 @@ <templates> org.nuiton.topia.generator.TopiaMetaTransformer </templates> + </configuration> + <goals> + <goal>smart-generate</goal> + </goals> + </execution> + <execution> + <phase>generate-sources</phase> + <id>copy-mapping-files</id> + <configuration> <!-- Config for copyVersionFiles --> <includes>**/*.objectmodel</includes> <copyVersionDir>${project.basedir}/src/main/resources/oldmappings/pollen</copyVersionDir> @@ -113,7 +123,6 @@ <overwrite>true</overwrite> </configuration> <goals> - <goal>smart-generate</goal> <goal>copyVersionFiles</goal> </goals> </execution> Modified: trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/ConverterHelper.java =================================================================== --- trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/ConverterHelper.java 2010-02-24 13:18:29 UTC (rev 2882) +++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/ConverterHelper.java 2010-02-24 16:19:22 UTC (rev 2883) @@ -133,7 +133,8 @@ public static void prepareCommentConverters() { String[] properties = new String[] { Comment.TEXT, - Comment.POST_DATE + Comment.POST_DATE, + Comment.AUTHOR }; prepare(Comment.class, CommentDTO.class, properties); @@ -269,10 +270,6 @@ public static CommentDTO convert(Comment entity, CommentDTO dto) { BinderProvider.getBinder(Comment.class, CommentDTO.class).copy(entity, dto); dto.setId(entity.getTopiaId()); - Poll poll = entity.getPoll(); - dto.setPollId(poll.getTopiaId()); - PollAccount account = entity.getPollAccount(); - dto.setPollAccountId(account.getTopiaId()); return dto; } Deleted: trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataCommentConverter.java =================================================================== --- trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataCommentConverter.java 2010-02-24 13:18:29 UTC (rev 2882) +++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataCommentConverter.java 2010-02-24 16:19:22 UTC (rev 2883) @@ -1,108 +0,0 @@ -/* *##% Pollen - * Copyright (C) 2009 CodeLutin - * - * 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/>. ##%*/ - -package org.chorem.pollen.business.converters; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; - -import org.chorem.pollen.business.dto.CommentDTO; -import org.chorem.pollen.business.persistence.Comment; -import org.chorem.pollen.business.persistence.Poll; -import org.chorem.pollen.business.persistence.PollAccount; -import org.chorem.pollen.business.persistence.PollAccountDAO; -import org.chorem.pollen.business.persistence.PollDAO; -import org.chorem.pollen.business.persistence.PollenModelDAOHelper; -import org.nuiton.topia.TopiaException; - -/** - * Gestion de la conversion des dtos Comment en entité et vice-versa. - * - * @author enema - * @version $Id$ - */ -public class DataCommentConverter extends DataConverter { - - /** - * Création d'un commentaire de sondage à partir d'un dto commentaire. - * - * @param commentDTO le dto choix - * @param eComment l'entité choix - */ - public void populateCommentEntity(CommentDTO commentDTO, Comment eComment) - throws TopiaException { - eComment.setText(commentDTO.getText()); - eComment.setPostDate(commentDTO.getPostDate()); - - if (commentDTO.getPollId().length() > 0) { - PollDAO pollDAO = PollenModelDAOHelper - .getPollDAO(super.transaction); - Poll pollEntity = pollDAO.findByTopiaId(commentDTO.getPollId()); - eComment.setPoll(pollEntity); - } - if (commentDTO.getPollAccountId().length() > 0) { - PollAccountDAO pollAccountDAO = PollenModelDAOHelper - .getPollAccountDAO(super.transaction); - PollAccount pollAccountEntity = pollAccountDAO - .findByTopiaId(commentDTO.getPollAccountId()); - eComment.setPollAccount(pollAccountEntity); - } - } - - /** - * Créer un DTO à partir d'un objet comment. - * - * @param eComment l'objet comment à transformer - * @return le commentDTO créé - * @deprecated use {@link ConverterHelper} - */ - @Deprecated - public CommentDTO createCommentDTO(Comment eComment) { - CommentDTO commentDTO = new CommentDTO(); - commentDTO.setId(eComment.getTopiaId()); - commentDTO.setText(eComment.getText()); - commentDTO.setPostDate(eComment.getPostDate()); - - if (eComment.getPoll() != null) { - commentDTO.setPollId(eComment.getPoll().getTopiaId()); - } - if (eComment.getPollAccount() != null) { - commentDTO - .setPollAccountId(eComment.getPollAccount().getVotingId()); - } - - return commentDTO; - } - - /** - * Retourne une liste de dtos comment à partir d'une collection d'entités. - * - * @param cComments collection des entités comment - * @return la liste des dtos comment - * @deprecated use {@link ConverterHelper} - */ - @Deprecated - public List<CommentDTO> createCommentDTOs(Collection<Comment> cComments) { - List<CommentDTO> results = new ArrayList<CommentDTO>(); - CommentDTO dto; - for (Comment c : cComments) { - dto = this.createCommentDTO(c); - results.add(dto); - } - return results; - } -} Modified: trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataPollConverter.java =================================================================== --- trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataPollConverter.java 2010-02-24 13:18:29 UTC (rev 2882) +++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataPollConverter.java 2010-02-24 16:19:22 UTC (rev 2883) @@ -23,13 +23,13 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.pollen.business.dto.ChoiceDTO; +import org.chorem.pollen.business.dto.CommentDTO; import org.chorem.pollen.business.dto.PollDTO; import org.chorem.pollen.business.dto.PreventRuleDTO; import org.chorem.pollen.business.persistence.Choice; +import org.chorem.pollen.business.persistence.Comment; import org.chorem.pollen.business.persistence.Poll; -import org.chorem.pollen.business.persistence.PollAccount; import org.chorem.pollen.business.persistence.PreventRule; -import org.chorem.pollen.business.persistence.UserAccount; import org.chorem.pollen.business.services.ServiceChoice; import org.chorem.pollen.business.services.ServiceChoiceImpl; import org.chorem.pollen.business.services.ServicePreventRule; @@ -45,7 +45,6 @@ public class DataPollConverter extends DataConverter { DataChoiceConverter choiceConverter = new DataChoiceConverter(); DataVoteConverter voteConverter = new DataVoteConverter(); - DataCommentConverter commentConverter = new DataCommentConverter(); DataPreventRuleConverter preventRuleConverter = new DataPreventRuleConverter(); DataVotingListConverter votingListConverter = new DataVotingListConverter(); @@ -93,10 +92,15 @@ if (ePoll.getVote().size() > 0) { pollDTO.setVoteDTOs(voteConverter.createVoteDTOs(ePoll.getVote())); } - if (ePoll.getComment().size() > 0) { - pollDTO.setCommentDTOs(commentConverter.createCommentDTOs(ePoll - .getComment())); + for (Comment comment : ePoll.getComment()) { + CommentDTO dto = + ConverterHelper.convert(comment, new CommentDTO()); + pollDTO.addComment(dto); } +// if (ePoll.getComment().size() > 0) { +// pollDTO.setComments(commentConverter.createCommentDTOs(ePoll +// .getComment())); +// } if (ePoll.getPreventRule().size() > 0) { pollDTO.setPreventRuleDTOs(preventRuleConverter .createPreventRuleDTOs(ePoll.getPreventRule())); Modified: trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataVoteCountingConverter.java =================================================================== --- trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataVoteCountingConverter.java 2010-02-24 13:18:29 UTC (rev 2882) +++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataVoteCountingConverter.java 2010-02-24 16:19:22 UTC (rev 2883) @@ -96,8 +96,7 @@ } private static CommentDTO createPollCommentDTO(Comment comment) { - CommentDTO commentDTO = new CommentDTO(comment.getPollAccount() - .getVotingId(), comment.getText()); + CommentDTO commentDTO = new CommentDTO(comment.getAuthor(), comment.getText()); return commentDTO; } @@ -186,7 +185,7 @@ bPollDTO.setVoteCounting(pollDTO.getVoteCounting()); for (CommentDTO comment : pollDTO.getComments()) { - bPollDTO.getCommentDTOs().add(createPollCommentDTO(comment)); + bPollDTO.getComments().add(createPollCommentDTO(comment)); } for (PollChoiceDTO choice : pollDTO.getChoices()) { bPollDTO.getChoiceDTOs().add(createPollChoiceDTO(choice)); @@ -198,12 +197,15 @@ private static org.chorem.pollen.business.dto.CommentDTO createPollCommentDTO( CommentDTO commentDTO) { - ServicePollAccount spa = new ServicePollAccountImpl(); - PollAccount account = spa.createPollAccount(commentDTO.getVotingID(), - null, null); +// ServicePollAccount spa = new ServicePollAccountImpl(); +// PollAccount account = spa.createPollAccount(commentDTO.getVotingID(), +// null, null); +// org.chorem.pollen.business.dto.CommentDTO bCommentDTO = new org.chorem.pollen.business.dto.CommentDTO( +// commentDTO.getText(), null, account.getTopiaId()); - org.chorem.pollen.business.dto.CommentDTO bCommentDTO = new org.chorem.pollen.business.dto.CommentDTO( - commentDTO.getText(), null, account.getTopiaId()); + org.chorem.pollen.business.dto.CommentDTO bCommentDTO = new org.chorem.pollen.business.dto.CommentDTO(); + bCommentDTO.setText(commentDTO.getText()); + bCommentDTO.setAuthor(commentDTO.getVotingID()); return bCommentDTO; } Modified: trunk/pollen-business/src/main/java/org/chorem/pollen/business/dto/CommentDTO.java =================================================================== --- trunk/pollen-business/src/main/java/org/chorem/pollen/business/dto/CommentDTO.java 2010-02-24 13:18:29 UTC (rev 2882) +++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/dto/CommentDTO.java 2010-02-24 16:19:22 UTC (rev 2883) @@ -29,42 +29,17 @@ public class CommentDTO implements Serializable { /** main id (topiaId) **/ - private String id = ""; + private String id; /** content of the comment **/ - private String text = ""; + private String text; /** date where the comment were created **/ - private Date postDate = null; + private Date postDate; - /** - * topiaId of the poll owner of this comment - * FIXME-FD20100224 Is it really needed ?? - **/ - private String pollId = ""; + /** author of the comment **/ + private String author; - /** - * topiaId of the pollAccount which has created this comment - * FIXME-FD20100224 What is needed in pollAccount ? if only votingId, - * may be this will be refactored. - **/ - private String pollAccountId = ""; - - public CommentDTO() { - - } - - public CommentDTO(String id) { - this.id = id; - } - - public CommentDTO(String text, String pollId, String pollAccountId) { - super(); - this.text = text; - this.pollId = pollId; - this.pollAccountId = pollAccountId; - } - public String getId() { return id; } @@ -89,20 +64,12 @@ this.postDate = postDate; } - public String getPollId() { - return pollId; + public String getAuthor() { + return author; } - public void setPollId(String pollId) { - this.pollId = pollId; + public void setAuthor(String author) { + this.author = author; } - public String getPollAccountId() { - return pollAccountId; - } - - public void setPollAccountId(String pollAccountId) { - this.pollAccountId = pollAccountId; - } - } \ No newline at end of file Modified: trunk/pollen-business/src/main/java/org/chorem/pollen/business/dto/PollDTO.java =================================================================== --- trunk/pollen-business/src/main/java/org/chorem/pollen/business/dto/PollDTO.java 2010-02-24 13:18:29 UTC (rev 2882) +++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/dto/PollDTO.java 2010-02-24 16:19:22 UTC (rev 2883) @@ -19,6 +19,7 @@ import java.io.Serializable; import java.util.ArrayList; import java.util.Date; +import java.util.Iterator; import java.util.List; import org.chorem.pollen.common.ChoiceType; @@ -78,7 +79,7 @@ private String creatorEmail = ""; - private List<CommentDTO> commentDTOs = new ArrayList<CommentDTO>(); + private List<CommentDTO> comments = new ArrayList<CommentDTO>(); private List<VotingListDTO> votingListDTOs = new ArrayList<VotingListDTO>(); @@ -310,21 +311,36 @@ this.creatorEmail = creatorEmail; } - public List<CommentDTO> getCommentDTOs() { - return commentDTOs; + public List<CommentDTO> getComments() { + return comments; } - public void setCommentDTOs(List<CommentDTO> commentDTOs) { - this.commentDTOs = commentDTOs; + public void setComments(List<CommentDTO> commentDTOs) { + this.comments = commentDTOs; } - public void addComment(CommentDTO comment) { - if (commentDTOs == null) { - commentDTOs = new ArrayList<CommentDTO>(); + public boolean addComment(CommentDTO comment) { + if (comments == null) { + comments = new ArrayList<CommentDTO>(); } - commentDTOs.add(comment); + return comments.add(comment); } + public boolean removeComment(String commentId) { + if (comments == null) { + return false; + } + Iterator<CommentDTO> it = comments.iterator(); + while (it.hasNext()) { + CommentDTO comment = it.next(); + if (commentId.equals(comment.getId())) { + it.remove(); + return true; + } + } + return false; + } + public List<VotingListDTO> getVotingListDTOs() { return votingListDTOs; } Modified: trunk/pollen-business/src/main/java/org/chorem/pollen/business/migration/PollenMigrationCallbackHandler.java =================================================================== --- trunk/pollen-business/src/main/java/org/chorem/pollen/business/migration/PollenMigrationCallbackHandler.java 2010-02-24 13:18:29 UTC (rev 2882) +++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/migration/PollenMigrationCallbackHandler.java 2010-02-24 16:19:22 UTC (rev 2883) @@ -190,7 +190,12 @@ "update poll as p set choicetype1 = (select t.name from choicetype t where t.topiaId = p.choicetype);", "alter table poll drop column choicetype;", "alter table poll rename choicetype1 to choicetype;", - "drop table choicetype;" + "drop table choicetype;", + // Remove link between comment and pollAccount : only name + // is needed + "alter table comment add author varchar;", + "update comment as c set author = (select a.votingId from pollaccount a where a.topiaId = c.pollaccount);", + "alter table comment drop column pollaccount;" }; } else if (dialect instanceof H2Dialect) { sqls = new String[] { @@ -215,7 +220,18 @@ "update poll as p set choicetype1 = (select t.name from choicetype t where t.topiaId = p.choicetype);", "drop table choicetype;", "alter table poll drop column choicetype;", - "alter table poll alter column choicetype1 rename to choicetype;" + "alter table poll alter column choicetype1 rename to choicetype;", + // Remove link between comment and pollAccount : only name + // is needed + "alter table comment add author varchar;", + "update comment as c set author = (select a.votingId from pollaccount a where a.topiaId = c.pollaccount);", + "update comment set pollaccount = null;" + // FIXME-FD20100224 + // org.h2.jdbc.JdbcSQLException: Column may be referenced + // by "PUBLIC.FK38A5EE5F65D3F731"; SQL statement: + // can't drop constraint because the name is generated by + // hibernate +// "alter table comment drop column pollaccount;" }; } else { if (log.isErrorEnabled()) { Deleted: trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServiceComment.java =================================================================== --- trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServiceComment.java 2010-02-24 13:18:29 UTC (rev 2882) +++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServiceComment.java 2010-02-24 16:19:22 UTC (rev 2883) @@ -1,84 +0,0 @@ -/* *##% Pollen - * Copyright (C) 2009 CodeLutin - * - * 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/>. ##%*/ - -package org.chorem.pollen.business.services; - -import java.util.List; -import java.util.Map; - -import org.chorem.pollen.business.dto.CommentDTO; -import org.chorem.pollen.business.persistence.Comment; -import org.nuiton.topia.TopiaContext; - -/** - * Interface de gestion des commentaires d'un sondage - * - * @author enema - * @version $Id$ - */ -public interface ServiceComment { - - /** - * Création d'un commentaire - * - * @param comment le commentaire - * @return identifiant du commentaire créé - */ - public String createComment(CommentDTO comment); - - /** - * Création des commentaires d'un sondage - * - * @param comments les dtos commentaires - * @param pollId l'identifiant du sondage - * @param transaction la transaction du sondage - * @return les commentaires créés - */ - public List<Comment> createComments(List<CommentDTO> comments, - String pollId, TopiaContext transaction); - - /** - * Mise à jour d'un commentaire - * - * @param comment le commentaire - * @return true si le commentaire a été mise à jours - */ - public boolean updateComment(CommentDTO comment); - - /** - * Suppression d'un commentaire - * - * @param commentId identifiant du commentaire - * @return true si le commentaire a été supprimé - */ - public boolean deleteComment(String commentId); - - /** - * Récupération d'un commentaire à partir de son identifiant - * - * @param commentId identifiant du commentaire - * @return le commentaire - */ - public CommentDTO findCommentById(String commentId); - - /** - * Recherche des commentaires d'un sondage à partir d'un filtre - * - * @param properties filtre sur les champs de la table commentaire - * @return les commentaires - */ - public List<CommentDTO> selectComments(Map<String, Object> properties); -} \ No newline at end of file Deleted: trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServiceCommentImpl.java =================================================================== --- trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServiceCommentImpl.java 2010-02-24 13:18:29 UTC (rev 2882) +++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServiceCommentImpl.java 2010-02-24 16:19:22 UTC (rev 2883) @@ -1,236 +0,0 @@ -/* *##% Pollen - * Copyright (C) 2009 CodeLutin - * - * 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/>. ##%*/ - -package org.chorem.pollen.business.services; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.chorem.pollen.business.converters.DataCommentConverter; -import org.chorem.pollen.business.dto.CommentDTO; -import org.chorem.pollen.business.persistence.Comment; -import org.chorem.pollen.business.persistence.CommentDAO; -import org.chorem.pollen.business.persistence.PollenModelDAOHelper; -import org.chorem.pollen.business.utils.ContextUtil; -import org.nuiton.topia.TopiaContext; - -/** - * Implémentation du service de gestion des commentaires. - * - * @author enema - * @author rannou - * @version $Id$ - */ -public class ServiceCommentImpl implements ServiceComment { - private TopiaContext rootContext = ContextUtil.getInstance().getContext(); - private CommentDAO commentDAO = null; - private DataCommentConverter converter = new DataCommentConverter(); - - /** log. */ - private static final Log log = LogFactory.getLog(ServiceCommentImpl.class); - - public ServiceCommentImpl() { - } - - @Override - public String createComment(CommentDTO comment) { - TopiaContext transaction = null; - String topiaId = ""; - try { - transaction = rootContext.beginTransaction(); - - commentDAO = PollenModelDAOHelper.getCommentDAO(transaction); - - Comment commentEntity = commentDAO.create(); - converter.setTransaction(transaction); - converter.populateCommentEntity(comment, commentEntity); - - // FIXME do not call a Service from an other one - ServicePollAccount spa = new ServicePollAccountImpl(); - commentEntity.setPollAccount(spa.createPollAccount(comment - .getPollAccountId(), null, null)); - - topiaId = commentEntity.getTopiaId(); - transaction.commitTransaction(); - - if (log.isDebugEnabled()) { - log.debug("Entity created: " + topiaId); - } - - return topiaId; - } catch (Exception e) { - ContextUtil.doCatch(e, transaction); - return ""; - } finally { - ContextUtil.doFinally(transaction); - } - } - - @Override - public List<Comment> createComments(List<CommentDTO> comments, - String pollId, TopiaContext transaction) { - if (comments.isEmpty() || pollId.length() == 0) { - return null; - } - - List<Comment> result = null; - try { - commentDAO = PollenModelDAOHelper.getCommentDAO(transaction); - converter.setTransaction(transaction); - - result = new ArrayList<Comment>(); - for (CommentDTO comment : comments) { - Comment commentEntity = commentDAO.create(); - comment.setPollId(pollId); - converter.populateCommentEntity(comment, commentEntity); - result.add(commentEntity); - } - - return result; - } catch (Exception e) { - ContextUtil.doCatch(e, transaction); - return null; - } - } - - @Override - public boolean updateComment(CommentDTO comment) { - TopiaContext transaction = null; - try { - transaction = rootContext.beginTransaction(); - - commentDAO = PollenModelDAOHelper.getCommentDAO(transaction); - - Comment commentEntity = commentDAO.findByTopiaId(comment.getId()); - - converter.setTransaction(transaction); - converter.populateCommentEntity(comment, commentEntity); - - commentDAO.update(commentEntity); - transaction.commitTransaction(); - - if (log.isDebugEnabled()) { - log.debug("Entity updated: " + comment.getId()); - } - - return true; - } catch (Exception e) { - ContextUtil.doCatch(e, transaction); - return false; - } finally { - ContextUtil.doFinally(transaction); - } - } - - @Override - public boolean deleteComment(String commentId) { - TopiaContext transaction = null; - try { - transaction = rootContext.beginTransaction(); - - commentDAO = PollenModelDAOHelper.getCommentDAO(transaction); - - Comment commentEntity = commentDAO.findByTopiaId(commentId); - - commentDAO.delete(commentEntity); - transaction.commitTransaction(); - - if (log.isDebugEnabled()) { - log.debug("Entity deleted: " + commentId); - } - - return true; - } catch (Exception e) { - ContextUtil.doCatch(e, transaction); - return false; - } finally { - ContextUtil.doFinally(transaction); - } - } - - @Override - public CommentDTO findCommentById(String commentId) { - TopiaContext transaction = null; - CommentDTO result = null; - try { - transaction = rootContext.beginTransaction(); - - commentDAO = PollenModelDAOHelper.getCommentDAO(transaction); - - Comment commentEntity = commentDAO.findByTopiaId(commentId); - - if (commentEntity != null) { - converter.setTransaction(transaction); - result = converter.createCommentDTO(commentEntity); - } - - transaction.commitTransaction(); - - if (log.isDebugEnabled()) { - log.debug("Entity found: " - + ((result == null) ? "null" : result.getId())); - } - - return result; - } catch (Exception e) { - ContextUtil.doCatch(e, transaction); - return null; - } finally { - ContextUtil.doFinally(transaction); - } - } - - @Override - public List<CommentDTO> selectComments(Map<String, Object> properties) { - TopiaContext transaction = null; - List<CommentDTO> results = null; - List<Comment> commentEntities = null; - try { - transaction = rootContext.beginTransaction(); - - commentDAO = PollenModelDAOHelper.getCommentDAO(transaction); - - if (properties == null) { - commentEntities = commentDAO.findAll(); - if (log.isWarnEnabled()) { - log - .warn("Attention : tous les commentaires ont été sélectionnés !"); - } - } else { - commentEntities = commentDAO.findAllByProperties(properties); - } - converter.setTransaction(transaction); - results = converter.createCommentDTOs(commentEntities); - - transaction.commitTransaction(); - - if (log.isDebugEnabled()) { - log.debug("Entities found: " - + ((results == null) ? "null" : results.size())); - } - - return results; - } catch (Exception e) { - ContextUtil.doCatch(e, transaction); - return null; - } finally { - ContextUtil.doFinally(transaction); - } - } -} \ No newline at end of file Modified: trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServicePoll.java =================================================================== --- trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServicePoll.java 2010-02-24 13:18:29 UTC (rev 2882) +++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServicePoll.java 2010-02-24 16:19:22 UTC (rev 2883) @@ -19,6 +19,7 @@ import java.util.List; import java.util.Map; +import org.chorem.pollen.business.dto.CommentDTO; import org.chorem.pollen.business.dto.PollDTO; /** @@ -130,4 +131,9 @@ */ @Deprecated public boolean addVoteToPoll(String pollId, String voteId); + + + public void createComment(PollDTO poll, CommentDTO comment); + + public void deleteComment(PollDTO poll, String commentId); } \ No newline at end of file Modified: trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServicePollImpl.java =================================================================== --- trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServicePollImpl.java 2010-02-24 13:18:29 UTC (rev 2882) +++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServicePollImpl.java 2010-02-24 16:19:22 UTC (rev 2883) @@ -27,7 +27,6 @@ import org.apache.commons.logging.LogFactory; import org.chorem.pollen.business.converters.ConverterHelper; import org.chorem.pollen.business.converters.DataPollConverter; -import org.chorem.pollen.business.converters.DataPreventRuleConverter; import org.chorem.pollen.business.converters.DataVotingListConverter; import org.chorem.pollen.business.dto.ChoiceDTO; import org.chorem.pollen.business.dto.CommentDTO; @@ -39,6 +38,7 @@ import org.chorem.pollen.business.persistence.Choice; import org.chorem.pollen.business.persistence.ChoiceDAO; import org.chorem.pollen.business.persistence.Comment; +import org.chorem.pollen.business.persistence.CommentDAO; import org.chorem.pollen.business.persistence.PersonToList; import org.chorem.pollen.business.persistence.Poll; import org.chorem.pollen.business.persistence.PollAccount; @@ -79,6 +79,8 @@ ConverterHelper.prepareVotingListConverters(); ConverterHelper.preparePollAccountConverters(); ConverterHelper.preparePreventRuleConverters(); + ConverterHelper.prepareVoteConverters(); + ConverterHelper.prepareCommentConverters(); } @Override @@ -694,4 +696,68 @@ ContextUtil.doFinally(transaction); } } + + @Override + public void createComment(PollDTO poll, CommentDTO comment) { + TopiaContext transaction = null; + try { + transaction = rootContext.beginTransaction(); + + // Create the new comment + CommentDAO dao = PollenModelDAOHelper.getCommentDAO(transaction); + Comment eComment = + ConverterHelper.convert(comment, dao.create()); + + // Get the poll entity corresponding + Poll ePoll = PollenModelDAOHelper.getPollDAO(transaction). + findByTopiaId(poll.getId()); + + // Add the comment into the poll + ePoll.addComment(eComment); + + transaction.commitTransaction(); + + // Update change in dtos + comment.setId(eComment.getTopiaId()); + poll.addComment(comment); + + } catch (Exception eee) { + ContextUtil.doCatch(eee, transaction, + _("pollen.error.servicePoll.addComment")); + } finally { + ContextUtil.doFinally(transaction); + } + } + + @Override + public void deleteComment(PollDTO poll, String commentId) { + TopiaContext transaction = null; + try { + transaction = rootContext.beginTransaction(); + + // Find the comment + CommentDAO dao = PollenModelDAOHelper.getCommentDAO(transaction); + Comment eComment = dao.findByTopiaId(commentId); + + // Get the poll entity corresponding + Poll ePoll = PollenModelDAOHelper.getPollDAO(transaction). + findByTopiaId(poll.getId()); + + ePoll.removeComment(eComment); + + // test if the comment is deleted, must be because of the composition + // (delete-orphan) + + transaction.commitTransaction(); + + // Update change in dto + poll.removeComment(commentId); + + } catch (Exception eee) { + ContextUtil.doCatch(eee, transaction, + _("pollen.error.servicePoll.addComment")); + } finally { + ContextUtil.doFinally(transaction); + } + } } \ No newline at end of file Modified: trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/CommentImpl.hbm.xml =================================================================== --- trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/CommentImpl.hbm.xml 2010-02-24 13:18:29 UTC (rev 2882) +++ trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/CommentImpl.hbm.xml 2010-02-24 16:19:22 UTC (rev 2883) @@ -7,7 +7,7 @@ <property name="topiaCreateDate" type="timestamp" node="@topiaCreateDate"/> <property name="text" type="text" access="field" column="text" node="text"/> <property name="postDate" type="java.util.Date" access="field" column="postDate" node="postDate"/> + <property name="author" type="text" access="field" column="author" node="author"/> <many-to-one name="poll" class="org.chorem.pollen.business.persistence.PollImpl" column="poll" node="poll/@topiaId" embed-xml="false"/> - <many-to-one name="pollAccount" class="org.chorem.pollen.business.persistence.PollAccountImpl" column="pollAccount" node="pollAccount/@topiaId" embed-xml="false"/> </class> </hibernate-mapping> Modified: trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/PollAccountImpl.hbm.xml =================================================================== --- trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/PollAccountImpl.hbm.xml 2010-02-24 13:18:29 UTC (rev 2882) +++ trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/PollAccountImpl.hbm.xml 2010-02-24 16:19:22 UTC (rev 2883) @@ -18,10 +18,6 @@ <key column="creator"/> <one-to-many class="org.chorem.pollen.business.persistence.PollImpl" node="topiaId" embed-xml="false"/> </bag> - <bag name="comment" inverse="true" lazy="true" node="comment" embed-xml="false"> - <key column="pollAccount"/> - <one-to-many class="org.chorem.pollen.business.persistence.CommentImpl" node="topiaId" embed-xml="false"/> - </bag> <bag name="vote" inverse="true" lazy="true" node="vote" embed-xml="false"> <key column="pollAccount"/> <one-to-many class="org.chorem.pollen.business.persistence.VoteImpl" node="topiaId" embed-xml="false"/> Modified: trunk/pollen-business/src/main/xmi/pollen.zargo =================================================================== --- trunk/pollen-business/src/main/xmi/pollen.zargo 2010-02-24 13:18:29 UTC (rev 2882) +++ trunk/pollen-business/src/main/xmi/pollen.zargo 2010-02-24 16:19:22 UTC (rev 2883) @@ -1,99 +1,90 @@ -PKI_X<pollen.argo}Tˎ�0��W >�LFU�a�tѪUG�v9pW�1�4�����v2$�����uMe/��B1n��e�Tu'Z�a�T[�!�FB��CSW����)�����C�晼|!���ڞ�@���(<Q�0�M�V�5�� +PKO�X<pollen.argo}Tˎ�0��W >�LFU�a�tѪUG�v9pW�1�4�����v2$�����uMe/��B1n��e�Tu'Z�a�T[�!�FB��CSW����)�����C�晼|!���ڞ�@���(<Q�0�M�V�5�� �F�9F����??��@ �|�sը�D����A/4 -z��z�`�H�-.�-M�{G�S3*<"C}II�(�i��7��rQ#e3eRy�G�$�Rcޑ�R}���y�A��h�+����aT&U`����z�N��j��8���C�qw���;8b�Z7j�J!D{���y�^v`o;(��Z��+����s����vaF87�1ۜ[f3��C�Kʛ���*����eIJ(�Z���&��b�pږ�o����>쿽�E�h8����[�K`[ڹ��Av��PK-��\��筟�� �}���s�A��^z�2�u�RȞ��pF�X������|��b��wc�N���]�>�5������u/tB�L��O�������̎ۖ�<�PKptB�PKI_X<pollen_DC_Pollen.pgml�]k��6���_�۸�O��!J����3�Iv�LX,������j������m=�Eٴ�H�"ɶ-���U��S�⛿��}�W�y�|{����Q��$��r������/Ë�_��{�_������F�3~�o���㻟G�W���_!>����j��ߖ�fW��,y���L���j�t�ތ7�ɿכ��d^�W�����b�^�o���KF//������×&��_#?� ?>��/C��^{��.���r��������d����]���V�������?��������^�(��F�����������z����>�����&^����s�i}���<ǫq�k�����?�7����e�����ϫ���š8��������ϓd���^|�<���|�����wv?,Ɠ��]���<��_ƛx��������f��-�\eS��M�����^pl�?}�O7��^��s<�}ޤ�d� ��j`�qy�7�a�F���"�U���!m����K�R5��_�o�7��k���j��w���_1�� T��@1� c(�C����z����F���&�cS��H���q0`�Q��L�1�?��c���ϋd��;ߌ�������Ty3����SPq�����7���d�u��xɝb���_�����ͷ���O��7ߧߵ,�w?��g�&4�:���lǒj�!�A��!�5_��ƛ�$yYnJ�*����=���j���.��(܅9�;�<�S�9R�8Ffa��0�Қ�8 -���y��r��ܦ`��>ca6��1����7Oɗx��� MG�g1_��!����c�.���a.w�G��(#;����r��Y�Q�r�Y]������h�r�{�.Pz�����j*E�����q���xK~��^�~�g9+�nRw)pG��/Ɇ#�lZv��v�T�1����x��.?���Lf��T�ҏ��*�Q�b� 3�|�mhb�1Ĺ�S�a�5��7��Đ��\�&��lM>Q�):�:�BC51Ʉ�jbE��&�M�"Y� cpCC�&F�4��T4���4�r0�g�:�t]�}�41d[K�\��AN�����Ĥ0�12sD!��-�Q�4��4H�Q�@��=ƚ��� f��{f���s�(&SHS��B])��t�S�*�.���NW�G��!@S,B��ADe���K3����t�T�3Kw���z�5Y*bP�d�C�]ho�~��֛_8��p�z�2n:��½7E�ՠ -)��N�O���9�{�>��6I�xY�yP�9�,����/g/�YkЦ�� �-�G$4��а A�����9>�A=�Ո����E��|��|�N�3p)��-��e[¹��%�zٖN������Y�f�/.��f`%�Q0� Sp#���d-�Y15���Q9Ð��kr��ːI �2�@��TFZޫ�a`�9�BJ���� -nm�X�a���cd܊��m˩�k9��4H�Q���rꕷg0��ƖLD������� �MDj�t8�9�c��*�K���Õo�f/���P�P I&}]?s�`Za��셌��T�+��>"�)��P��J�B�.�t�t!�����K�"�~�g����d>���#�c���q�GP�TQ�&Xz���s4@-����&@�z��t3������� ��G���&�ūZ�#-�L8)P�d���a�S�V��.�"� -ֽ[���tz�X$_��.���P�9��S���d��)yYJ6���W��?#<X|�&x�ח��NSx?�<�o�5^�,6�0�/5T�φ-�� ����7�p�/9Y�����sV�|���+��������ϻt��|93U�~����k�ُߞH�H�������r[z^�wm�.��٨rj�b.�\�W̅a�jD������P�l��}�y�T�)U�qD���g,���,\��lK'��#�*�d�X1w��4���R1W0�j -��X1G���0��a��)�P1'�T̑RŜH�%\u �z��'�a��Z���ح��'t�v*µU�C��99�q��"\qQ�v�Z�\i�٨(≊1���9b�jnK(�`�n�-Bў��Es -��><����ő�ֱ��*wKg����o����fN��^5s�u�4ޤK��9�!穵�������W1�T�M^��6�cHI����nO�����n@C�`��]=�P��C5zS��B�Z����m��z����&}*�黭��Z=��+�Q���zv0�/���F��=�);�@�u=�C�Z'�:=��@��1k��1�G����V��6�p��ch_��t6���ʑ�[��z=�����nuz61:�n=�cX��*wc�{i���0�Q'��cjU�Q [ٵ��ѡIH^���\���~l̽;��8�6yYM��j��P�(>�M�B������%���3-һ�d��w�R�S���ħm�#|8��5I����?�����>�8�q�_���w��#7q�<�����2^ٛZ�%<�Ǜ�+>ǔ���qo�+��ԁ&�N����b3恌/�N�]-��&�7�8^� �A��rz�\&�r;�P�S�rvb -Z4���1[��w�3�~� ��E�$H�#i!��0��ŏ��wu��w|H�)��^��蛳�xy�̊����������F7�W#�=�>]}����.��$�C8�Ѓ���D��ć���]z�J1��ea�@=%��қ��W�ؓ灘�N�%�Ѥ��lǓ@hcYZ�S����V�3怘��Rjb�%�:�cH5N1��e1�`�"W -!]�mw��?�v�W#�]\����[�kmi��`Y�>.x�.��3�ͺ�����MF�a@X?*�'~�����ƞ`�iA?=Mm]Y~�R � -yZpVO�Xҧ����h�i�[�9���la(�=��M+�03�wh��ùq+E��,�@���9}�d~�_>�v���Ԧ3�� ���8H�h/��?��f3�2���{l�2qu.��r��xW�L�;�V�:��<|b���2�A�2�MaW��<f��<��������l��&֞*�t;�ii8�f�z8�At��p������(���x��\�!w�y(�M�jrGt�tW��f����䮵�[_�`�h��һ�D���M4Bg�^[f�Nc�;�/eF��wW �9�`S��p�콛�ē~Mc����]�:�C�W��%hUuH����P���N�x�D^�6�b^�4R��$����ϩ�T��Z�I��fI� )ʻ��T�Y+PS�^�Z)�8]�)%jE3� -27��"�H���H��Gg-�>>�L-*��ɡ$�,�:�t�Pm۪�cR �[���r���(��CQ��2�H)XS�%@��r��m�D]+Y+O�4U�4��^�㪵�n�ڎVD���H�K����TZU�����9�c�k��NGS�+ߣ-^���55{*τ:���J�����@��V!�î�5U���췊S�jk��RM��Eu{UU�źY��K�$Q9�=p��tW�쮝���A�9/�vpe�{U�_���X��BX8��� -�,�^�&�a�hf�.IH&hL�0�8Fc<C������)���J�!-ij���q�G����"dM%�M����aS�L�*��!Ȧ�2��Ɓ�q@���2��\#r��:�LB��%�t]&���t��S9�V%B�B�v!k6ڝ!ĵ%Y��ք�:� -q�����8:�Y��A�� -ɢJ4�K�S����`�q:���'����yPa���)�q���� -���op8�{PIfQ��F(�4�s)�&z�1p�� -�������Zu�C_�m��[Ts�N�B��3.��[�jz�b]i~.\��`������;[�L��fWy�l�%�����#{i6A8(NB�����U��iڝ�#��Z�ߢ���ﵾ ��ja����~,��D��T���T�v�r�D\��L��bm�=�0���d����dϠ}�}�G��>�`z2�G��t��=2�����OF��@��N�m�G\'{A��Y�C��_�c��z�6���7c�6Ϩfi��� kq -'su��{����*�*Q�JE�YY��j�*k{�'�wF�l@�v~'���.��j&��2GJ��3������$%]�t���BI�R�����t}X�_�Ͽ�,�� ��T� �r�6~Zr�����T�A.(�n��sn�D�;��U�CK����$�8ٺt�yQ��s���1���-������oJI��o�{�[tΒ�ΝS]�o�t4���-��.��j�����n���z=�VÚ.��t�H����x�W��g��9}�ūzĩq�` -{��+Ǖ�la�}=�@��a���d3�RqN�5�c -i��п,��Fhz�#������rܧx�9��O��r\Z.ǵ���X��{�������b�X�]����_f���#�i�0f�z$a�ǩ,���\�����^������\fFX:I��r�oMN���ӏ�lץt_��K�U�FP�|�R��H���q@�c��~�+��%)] -#�>��0�u)=m��1�?�#iUK�P��p�s$µ�����.G8��Y��%mU�}�����Tt��b���vu���y}�5YCW|��s�Z�4�J_���W�k+�5t� v9������Ƌ��u�5���Xܵ��b���q!��FM7�|>�}�~~�};;��2�K R"Qڟϯ(�/'a�]D -����}R��w -¢�y�r�'f�[�����4�� �V���-�*( U�t�3���ezg��b -�F{z�*�&T�T[�yȄ�.V�XE�#�qqáj -��U�"VQ��q ol��*�N� -Jb�J"��5��A�ҊT�]�JD7�]t�/�l1���x�J�n$�Pt;k�g�5��4 -�tT,�}��dn1��B���P��7���&�U��!��.�o�y��cbU���ʃ>*� -��!p�z{�*���ī�9j����Zo(�XO��� -�k��S�7\5�Q�/�巧�e}�*��kC�hQ�͍�V:�����NQsRXV��$�fϢ�G�+��v�i������5s ���sT?���o��K�l+�V��q� -\Bg;�n���7n�b���s҄i��;��=A -��������� M�k MV��$Pc��ˁ�8�2l���'�J��v.Y��5��SF��>�?�l�>��}դo:��EΒ�f���V�u�Ή��������3���Y�g�vX��:ю�e}����8c�iG�R��M��K� �ؔ�E��?5�s���\!ua��y��qHi�knSoT���-�9m;�J>6�:E��V�u2:���kz��a��q�;L���o?EM���k��A�q�|�c�a>g�]���:���,����Dylp= -�u�.^oFs:s���y�F��XDĿXK-:���m��S[0*����L� �;YA� ���#{=:$���q�l;��!�R�V�~�&��ځ��8�&���{��o��{����t�㈺�A�#]���k��<V��ch�=G܂0�7�\ nm�a���7�Yp+n�j�[��Seإi����g���-��8�v�sgC{g*�st�ٔ��A{ g+.��l��P�l�{*��|σ�����b��X���hV�/�&z��:���Ho�پ�)�T8��a����X|�h�z�����}�}�c�6��K^��n9;�0��R�Q{�L�e��rӷg)5,J{ -�ӹ���Q���=�Nߞ�ؐ#������ -9�Cv��ņ�^'�o�Pl�1�����NNcד�TU��1!u����0l�Α��N����4��IH!k��N9�;6���#� -I���!��NG�H'�9�'����<����u:G:I��! -I�ۧs��t�&���q���L9�T����,5W?�z�vN.��g�7g�j��Ar^���,L�l6���7&�MBБ���O�uH�Moϱل��� u�MX����Y���f|��Z���|�-�9r�˞Zf>���������9��l�VYE*��W����5��:��{N�����ɜ?����&s������bgoB�_�r32wбzv��]>�m&g�l�:9ېαӹ;�5�}:��M��4�v2:�:��t����������96й�ۦsΟR[��������0���ii^�Cm�?�Q �!��Qv��?]j�X�G�wQ�t��2���t�/�$�3�]��s?��_�M&�4Ȍ��ƨ�;Gj6�<����m��N���.�Z���>��٧Mk�=���б�F!����>��1l -����y����=��P>wȬ*���9w�e;��f�y���l����,=�l�o]�s�\�V^y*��'r��ֺ���o�ǹ6��`��ȁ��9���iq���PK��A����PKI_X<pollen.todo�����Q(K-*���S�UP2�3PRH�K�O��K ����Z()��q�(��;�D�*���+G���*(�8z)%)J -@% ���,.2���E���9e�)�E�%��� Y,B3PK4�[-m�PKI_X<pollen_profile.profile�����Q(K-*���S�UP2�3PRH�K�O��K ����Z()��qq��e��q��ÙPK7Rp:BPKI_X< -pollen.xmi�]m��8��>��5�U=S����KW&[ncoM�$��d��U�p������_������Ɉ��Il���G��s��ߟv�g�~�~�݉�n't�`�}�ח�ܸ����O�������'Q�]�K?���_��> ��"|�.���=p�"��n���_����7tgh�$e&��� �����LD���O�Y�s�o�0z?���� -������N����0J�{��6̰�r��W�� �e����-��M_��w��֨G~=��^XH�B�E�u�g?N_ }�?,������u.J3�x������~:��3H�w�~���o�u��Y�W�����EsLO0`��ݬ�o?�o��y�����P~�|ҋ�:a���}yd�����q����\S�sØ��|. -�\�tۑ5� �Гux��07AxίGA�{_�+{ԧp��A�w3?������N�R����0���0LJ������c�xi�I��{O=vz��f�[$`���W�;�⦗۾�~�xo��^]�%۔<�A�DC���֒%�w����_���M� .H�����������Ǿt��-�����_7���6��� -�2����>�o�i�[|<QI�wݗ�/��p���}*J�L��Г�MiF�T�TB�ˉ��xޝ�@�X��F�i���������b�M�8�Sl�!re�7���9ݸځ8F��T*�|.�� -���nS6]�QQ�{�Zݕ��*�շ��^>�D��w~�#�t�w��3�/�J,هN�?C��NB( -���"V����ϧ��u8�M[U�1��'M0GFNQP��d����^�0�!��!�C�L�ȷ z�5�b��@SLW:�i\v�y�g����l�F��p�?�R] �4��q��`��Ëv�cmaR}NU"�ތN*3��e�x:���M�jV����*O��S�({ٺ� -���+�%�#�k���M٣�f����sed� ��T�nd_ޓuf�@O�S�s�D.�sՁN���z�$�&U�D�E�j�Ђ�{�b�/����c��wa�D�>�ߜ�ĺ��,N� -n����uMhN6d�0�E��lb�g��S�d��H��3>$�'����p����pvWo�F��G�b����=5v�=B�8?Бm��� Fq| ����ܢ1}֩�;4�ι7���u�v������G��o�e0�4��lU�\����?C�[`������ �����e�B�N�VMѵu ���4�pQRy=��� ��=e���JT��A�� -���=Yj���D������@L��8SԴ�����T�J���J�橞�*6R)��(�8@�S�)���!��rO��ѕ�����&��o�o��6�e�ns_F.2���������}h�����@�5LRU��H��D��!����pK��Ko�Ë`pi���H��<r�gI�# -��Z��\����n�4Y<�hz�k� -J��K1H��h����Q��"� -���\�W�B��4wy�r��i���#W��i����堮q�^z���9�R�Xtn��Ȕr���}^���&�fiz!�L^�V�f�P=���]M1ud��T1y -"yS���|ԫtb�a�:r��\�;�u8'|ڇ��ܦ"�,(r�8i�㰃6�ViTb�}=���[("7�ʍn����ZA#��U\ML�h�o?�ޮ��+������t�W�nHI#!ȅ��i�z�ʽf:��ʍX���V;�ˋ" گ�̲2BK� O����H���Q]W�<�:t�a� _5�^�}�1��r��)F^s���� -`q�R)0�]g[���8e" �5Ndk|HwDqq`�k��l����w�eR���H���uə�R&��IRg�%�5�"x� -ɹ���6� -S�\//]&����5�K�KV�I�c�c����qހ����)COqT'��*�c ������s�� Q}3�=@���8����b�hN�L���SU��1�N���0�łT�8D�p(5`m��Xil�s§���KD"> - �+5�!���(ۢ-:J�[�]Ӏ�VdБn�h� ~<��x�D@,�ڃ䎤R�[����&��v�F<��r{���Ҥ(z}n�ɟ��'O�#�e��(�ŗ��G�рf,f�>��a4��5<�>RNȈ����<����6��=?�����B ����1rGr���I�1�%� -�|��~x��YJ -n�Zo,ȲG'/���~�IV�ϐE���+aÉ�Rr+"�`�&�@�F��ˮ-�c�>��U����H��0@{|�J -nRh?�U1y6�<��^N���>�)��}l �ؓ��Ȥ�3��q�S|ۘ�mc��^!�Nx��<��E�vG��e��e���o5���B�/V�w�,�sTjp�4�S����ٮ�I�b蒤#k�,`��W��p$:d�]|#�wY��T8���]5�jx�gK�eT�(ls���VYȰl���r2�� O;(5`M�?{�uV�T{��>� ���I��z�.���Ն����"h�)�5�,5�<�3���A,�!����OJ -X[;Z���T -�d`P�g\ɪ���P�+Aqq>xr�i{�@t�lB�͖�tt(�!Ihkt,Ep��NL"��g;�4������|L��.4�$��D�d�+�!�H1��RN�� *�şr� �T��Zcd��G�o5tӅ����m�HO�ڸ���o!7�:��ۭA� -�R֜�Tս���.g�8�'Z��H"،�}�}����6L��Tj�=@��Tj��Z�54�MN��$�`�0R���y��R��@c�c'�����4�%V�s���TjpC4p��O��,I0 �MG��V������~�����I:�G��t@,^y���� ��G��i�-����p#��b�@�7���u��ؤy��R�Jc�l��H�:d�lR��Xv�� -qA�t9N�����R�hO�H�j�]0��^\���cG����c:�0�r\:�D�*�� ��YjpC�g$����N�,]w��F>܌ϐH�#���C J -n�.pK@�����qU -BM:sc8���կa'� �22$�2(5�!n Z*��d~.�ۄ��]A@�*'�I��[�5Ey6�*ٮ �*T�e�)�8���z��B�I�9���\I�*�f�A�]M�l$fQj�Bp¬T�!U -H �f"���� �o%���54E��#*)f%�[�ltBsc�+�o�<�̀H�C�"�+^��d\F1�F"�U���:��y������Cc�q����ǔ���tȐc"�<�`��l|�.�,�-�!����H�R�X��r6�Y�s=���Q�1?����6�w-dX?��X�&���RM(.�^��B�ˆ�@���BH}�V�;�X�O��ł�Ţ��v��v�)I���h�"@t�������}~+�L�8k$w9���p��O� -������T�T��gj�6{�d�;��b�(��y6C�k��]h��8�8y��=T�^˦��`ϒGq���M��8"լ��\8a@'�c���N����s%���<�ی(s�-:�C�"F~���9�߲$��Fp{zf -t�Hҵ3�,�ys�-`L�����IT��A�� -� H�8�����D�8�P-��Ɯs<���@R�.6�0K ����>�v�g���9�`l��%�{ju�ʝ�u<�Z��sACoR�V�^�����(h�_�`\'|J�s?a�v�#^\�͌���hӓ\�D��jC!�"�����ۛ���D��FDȔ��I�=e0��a�Ř�V�ٮ�дU4�y6(SЪ�i'�)p0�O�~����H"�d�C��UDx��Mg\���K���.{ڬ<a%No��SkȽ���d�c�1@�+� p+�ċ�ܚnG�Wٰg��F��ȕ����Ӯʂ�Mi�|�iX0E��k #/����U����'Ne��7=�A��G��VY�����mg��]s�Ӈu虊 -�<}X�dUAW6CR.@��qшkjU�@��<��v�l1��+x�<��܈��Zn�����r -�zѫ#CιJֆdu�tmU6s -�L�1]�q��=>��]4j��㱡����S�dž��i�*�NX/e�^(Y��kb]��8�Xk|+|��d9��ad�Ԇ�ݼ�DƦ��VoL(,��(���$�R�֚4�?�n�t�k���7�f�,؆+�G3ΔM�uT�;Z2���Nmq��W���q���ڪ�M���tK��r�l���0��7��M�!M8"����UȰ�p����U%[Ul�ɨd+�ߘ�xcb5�2���;Y�����j����s�8�X{|<'�܈+b-1�5t�4͜idCMU �!�nn���ӷy��bؓ�G��y"U��E'���5߯�(]���~D?w��P�t�iP1 -hӸ��ڒ��ZW�3���s�75�Z�o>X��-7���Hhy�W�:&���o��Q\|�r����ˏ����qD������������EX9U��^�8R�W���0�N�t�5���6��������b@~��!������<���[z~�_(��R%]L�s�xRC��"�/�6k���a��o�ʫ�p5�����m���.��̋���K��;֎c����m�nA�y1�^8�>~��1y&j��x���k��Ǜמ��K�v�2�m�p����il9 m�B�a�� ���\��F���J����I�hOK ��Y�!?(vB1R�$pKv��pi�r��YQ;OB퐒+{��H���%#�9�7�Ӡ[o���7}Q�B�^>h��%/����*���^\����g�Y˭�n���A��t���6���~1:���PG�ߙkN3t ��~tAWSL Z�RtD�R�~�Z��3�R���h��f3��6�pu�Hv:�eod��¼:m)_Z -> -��B�賨�E����YC��V���o���ʁ�b��ڱJi��-�\;V+� +z��z�`�H�-.�-M�{G�S3*<"C}II�(�i��7��rQ#e3eRy�G�$�Rcޑ�R}���y�A��h�+����aT&U`����z�N��j��8���C�qw���;8b�Z7j�J!D{���y�^v`o;(��Z��+����s����vaF87�1ۜ[f3��C�Kʛ���*����eIJ(�Z���&��b�pږ�o����>쿽�E�h8����[�K`[ڹ��Av��PK-��\��筟�� �}���s�A��^z�2�u�RȞ��pF�X������|��b��wc�N���]�>�5������u/tB�L��O�������̎ۖ�<�PKptB�PKO�X<pollen_DC_Pollen.pgml�]k��6���_�۸�O��!J����_��d�d��b�P�j�ﺭ�3����/%�z�E��i���E�m[r7�J����w��e>�-W�x��]9�h1�'������>\���^����~��F�S~�o�����ϣ�䇫�zr��H?�D��r��N�-^N���4����&�p�_�V�p=�{�^n���2��̮~����y�Z�o���KF//}��������DŽ�o����OO��K�q��N�u밋�F�k�D�/����1�ϣ��w���w�e�y�}�a6u�W���oI��"�7#��r|�/���5\?��f����S8_E?���2���^�ϳ��{��5Z�ɯ]�/��������f������e����P��ni�MO����}��q<���/�>��Q�v���x����ŏ�p������w��ٗp�~������e4^���<*L�U6%���!������v����d��/p��;��l��N�ɾA�j`�q9�7�a�F���"�U���!m���VK�R6!�_�o67��WL;4�j��w���_2�� ���f �h +�1���ߓ�30dՈ3���YG���@�8<a.0��=j��8F���?y�����yO�wg�p>��Hc[��c<�Ho&߽��o*�����j={��í��E�����2_����ߝ���e�����>��}`I�q������`B3��g_`:�����qP�0�@�:y6ތ��f�.�*E8rX��{�p��_^������]�s��sص*�9�{� +s�.�q���n!<�a.�5�q~[�x�p��ܦ`��<��l��Qc� +���5�^�/�:��A��~�|���CѸ��� +]����\����QFv.����h-�(�c�˹gu9��K���˕�)�@��3]���9� +���S����2ܒ�'����x�YL�<������A0����%^s���Mk�d���vq�����p6�.?���L�l0�b�~�Zy�� +�0�y�A܄&F�C�{ 7��X�}�*M ��k�؊��ɚ���c�2�� &dT+��51hb��ʦ��41B�qx�80�Ak��!A+�|&������h���!ӚX�<o��*̵�@G�&&�9��^�#B4hs������A��ݧ�hkbȴ&�2��3�W��E1�Z�@� +���N�9UL�t�|4u��=��T1�"�(�C��2 +�U���F�ALD�C��9�u�k�Z}����1m`�ڻE�i�\��h���V��9�qC�=�{6E�ՠ +)�ЖV��G;���3��&|�mϣpQ��W�9�,�,|�Z�b� � +,ܯA��dHh�`��@BBÀ�^B#����u�7#��R`���0{��[����|G�`K�m �j�ޖ8�e[:y:Kgd4��X�:���lF�DC�L��d����g�aȹ������h����\�H<1����2��ު6��Hc�O�>�9�U��-=K91�q�4��#- +ړSq�r�i�C���r��[�3�lcK&w�p�������&9:��ױ�����h�p�[*�X�^����$���_9gЭ0�R�BD�E�����iNy�����vAJ�C��To�o +Ⱥx�PJ�����s<G���1O�S�8�FP�Œ�"�k�k �P�PG�I��j��t3���=D�%�cD~y�h��XG�hYxP 8�C +4|<�W�D3���V��]`E:�{vj�7���|m�(:�C)gp]a���K�Y}����W�,�Fx��2�M�^_2�:L=��u�ȿ��h���a^��dP>��iu�1���ņ��W/9Y����Lq笼��U�8="�W졦�?>�MR��T_TA��NC�2�"�(����6�Q���#��a���\�wm�.�̙�rj�b.�\�W����fDi�����ڊ�{diR���m)�X�3�((���+戱�9рV�ݣ?��"U��@4��g�+�T1���0����@7T̥�WT̑RŜH�%�:�t�b�s�a�٪r�?1[7�F8��]�#ت�V�����!ҋp�Eq�E<�kUs�YfCQ�c����9b�jnK(|o�n�.Bў��Es���><����ő�ֱ�9��%����ʷT���fN��^�C%W�^ho�%RŜ��s����-7��>�_ӱ'�n���H�!%=���==&w3CzK6�!'e��^=�P�m�C+�&i{�"�|_-����jV�)�I�T,ӷ[���z�!�W<�Ck��`�e�A�i��� +=�I;�@�u=�c�\ŋ:=��@��1k��1�G����V��p��ch_��d6T�b��m=��@�a�.�~�[�ÀM��[O���èr7������1��Ck7�zL�J@+T��Vv��yth�W�x<KA�n?6��f�t�b�_o���c�\�?T< +��q]��=����~�'Q�L����d��p����7�$��i��_���ye{i����ȿ�#z��8��߬���/��M<]���.�����Vz������c�_������Ba +�@\+P�y3_�^y �K�W<A��Mp�ײ�B�zXLn�x]�`�j| +�^�VLA����>�`㸻��~&ӯ�D�9�(�au$,$�ң�3��?��n������<3E��+3����;^^0�⪠��|EP��r�o���ݞU���Y{�;�_^�џ8�1��������.�V%���ʲ�Z���S���V�)[���@�`'˒�T���l˓@hcYZ�S����V�3怘��Rhb�%�:�cH5N1��e1�`�"W!]�mw�Ue��.�oF.ƻ�F+�n=���E3��e)"���Uq���lֵ���n2T�1`�(ݢ��a��W&{���y��4�ue��K�+�i�Y=�cI��%����ʷT�|зR�����\4�,��� +ܡ���ƭк���[Z�������ɶ��E�6�ɄM����A�D{���ߌf3�2���{L�2�:�ɪr��xW�L�;b���u,�y��J��e2��e2���P��<���<��0������l�}E�=U��v�� �p���� L�t��c?����Z�˜����̥rw��B���Q�;RE�Jw?�aZ��[K�Z���Ɖ�o-�;Kĭ��D÷��e���Q���! +p������5�1ը�[���d�>Oj��4��yG�����;�]� ���UU��d�p���E���҉���fX�I�F�{1���i���<-(��%�`�k�r�#��B�F{���X��d@�J�J���@*Q+��h5��3�R��4��Z�}|d�ZP*SC��Y�:�t�Pm۪�S\ 0[���r���(��EQ��2�@*X��%@�Y��y{�4A�J��� L����Z���ѮZ�V��hE���t8�nM�P5�����:V��t�d:�:\����@*^�#�#�L��a����lBMj�F@��a�Ú��0=�Mq�[mMUP��2��n���p`c�X7��t)��$*������*~�ݵ��*}9���\���*�_��6RgW����Λ��ҳA����o��)�$>����ԣ�8!S����k�H�PI%����θ�#;�� +��"!B�TBфjۙ6�˄ ��/�h +�1�!��@�8�0�����0��B&��uB!��� 3R0�L��Z�J!� ���3�qU +�B\[�E�jM���Ω���fQ�a:�E!�Tܢ-rL�j�[�s��ǹ��8Q%�<Z���:�*=�QnpUz����5��L2��V�5�L�=�)Фh3��{�k�Z�#�BM��2��p�r +u�Y?���z�r�J� �E!6��z�Љ�8�w�h�vA����f�����*ak�AӰ��ٕ^'���a�u#đmK� ��' o| +�� +�����{P�غ�E�o�l|�+��=g2��I0��a۳���7])vE�b.�\/�Ge9Ϥ����\UzD�u[��G_�2����,UppdŅ�+8X��"1���ض��۞�$r�S��*d +��;����E��f�!�y@�����PH'8ʡ���Ώ�����ͼ��/�l�3 r�� gnW�� �Z���O!�q���Y3��sOE�v2��K�8��t�~Ɠ�x&�Ɛ���ئ�?��I�N��T� +�[p�M�8z�o�t4���-��N"�;%{Nq�j�z�jv5�V̈́'��"���U����_���s���m-��ՈS`�� +?)�KC�&n�n�xm�^�E;�g_M�a�Y56��N��>��"�4{i��W�v�g�},�x������ +R.�0���X@�O�ѭ����E�D,خ`N3Y����$x٘/������i�!�0[�tZ�������\�%KfFXh3z9���E����&�v)�JRz��X�j:�SJ����]O��z8o��R:-I�B�7q��Hץ�d�����@<D�j�i�#��"u,�p��zT�����ыpT����z�k::��2���G<x�C�}���ѷ�����D +]�5���k�Е��4�5G�k+5t� v (�}lv�s���|��n�F@K���]�A�v�9.�g�[��~l����n��vvRY���^�I����5������M�>Y3������q�8�X���n��m�3�-��f�]M�n��k�P�JB-������L�̒�g�tÌ U���}2ᶋUL��p).��˦`�X�$��R$�Hxc��� V��W�U�$V �$��aˡ�bU�H�̊Tit#�E�����[k�g& Ubt#�x���Y>Yׄ*�8Q>����e��#�}����������U��鲿�b��o�6��Yܰ��UJC�.�JC�M�Sq�=`�]UZ�Q�jR +5��`���m5�k�T�)��j���(�x��%ެl9��/��&��E�<��;��.����5'Y�e��J�k���#�{x�6�i�t�Q��z�x�6�9���i�7�eų��M+_����*���mZ7�z����[L�Y�#~��^��6|�/��&b�5� M�Hh�4`����9=�o������&���\2�á��j�&��}88��}����I.�t��%}ͺ9���t� +}k9����g�پ�L��0��q��[���1���8c�i��R��M��K� �X�����?4�s����\�� +�9'�'�) +�d-�ma℞b-�7�l��9U"���e��y}�):w�J��ѹ�kt�!��2�y:t�Ι�_~����1>�shG���y>t����tS��v6w���$^J����S�Q\O�"���b������qތ�c�I��Zj��̼os������r��XA�� +���U� +rK[��l�G�`=�϶��,�m�N��oBk|������Ch�� aоh�ư����IG9����8��}�F+�c�v>pͶ�H�������-���2�К����n� +Rm�a���Tvi��P��@�_�E{���l������<e�;�ԠCt6h��l�����c{�Φ��t6�=)����=>�y��u� �zE�)Фhh��(|���}/]�i5�Ю�����o��[�p��[�6�~$q=l�4���7|U�����@�Տ���]&�mEg�Mߞ�����{��a`�����9� +9��Nߞ�ؐc>d���7]l���ur��ņ�!9�����4F�'���*�T܇�DŽ�]��;�}����������&t2�)d +��)�x�ƊÕt)w7�s�{t�^��s��tN�'����<�3��q:�;I��! + ���s��t�$�����ιL:�4�q��,5W?�z�vN�y�>��9�VD���^� =�7��l��5����l�뀎�&�P�@�ox{��&���� ��M�j�p�,^�r=>w�i�f��m>���at�!��=fs��l�l�����J�H t�j�\���9�s2W�7O��@��o���?'�s�bg��C�_�r=2wбzf��]>�m&g+ٜ:9ېι=�swkf�t��7�������9w�s +�7N��~ӹ��|�y:�t�������*��TqJ��]�?J���5<Զ�s'��Aj<�w�������K��+�h�# +�X���!�*�N��X'��>�g��Y繟I�/ �:@d�Y'�6��HͲ��?�����v�u��r�v���.mZkw�mJB�"�(d�5L<2yď!l +����y��0���=��P>wȬJ���9{�e;����y���l����=�L�o\ȳ�\�V^zJ��'r���ֺ���o���6��`HI���k�k�2����PK�ʜ5RŋPKO�X<pollen.todo�����Q(K-*���S�UP2�3PRH�K�O��K ����Z()��q�(��;�D�*���+G���*(�8z)%)J +@% ���,.2���E���9e�)�E�%��� Y,B3PK4�[-m�PKO�X<pollen_profile.profile�����Q(K-*���S�UP2�3PRH�K�O��K ����Z()��qq��e��q��ÙPK7Rp:BPKO�X< +pollen.xmi�]k��8��>��5�U=S����ҕɖ��[S5I�&��~ κ��'��p�6F`��"1�;����+��{ӫw�����=�(��`���N\w38���샿�l�����z���Ͼ?�����]��.����G�Im��v���'��w��O����}v߿�;�@{&)3Q{P�Y���_f� +w��Ͳ�[|���������n��`��$��u�~߇Q���a��C���G���,C���Oo9�o�����/�F=������B2�/گ�>�q��3�a�>��}.�sQ� �C�������/�A����G~ۯ��ʿZ�@��ǯ/�cz��C�f���9}۟�;淟Ņ�����^DXH� �$}��#ӦN��ݬg�2��\T�sQ�溤ێ��Q�����!p~= +��2\٣>��������=t|�w�ʾ��.��7�aR����^��K;N"���{�ӫ�w0��"�-t���7������{�f��-٦��$��@���,A�;=}V����n��pA�@Ņ���릇$?��^o���~�������x�Y�ݗ�T��T�?��}�N����J¿��~ѯ���_�=�SQJge��8��$خ�bO�M�� D��((���Y�՜oa��|L/�^`/�٤��9���1^"WF{�8o-�Ӎ��c�8O�"��`� ���6e�u5��]�ٯ�Y}���SN�m�'?�O�{�;8����Ē}�$�3DK�$�� K{+�au����|��<a^��ܴU5S�x��qd�dU(O��q_�S�h�A��:��$�|���'�\��(f> +4�t��a��ew��x�_����i�� ��3� ��I�����>��`�>&�&��T%r����2��Qv���.��)���fŠ9����4���?������������\�:��v�ߩޔ=�nv��?WF� �=�KU�F��=Yg��?58gM�r9W��j�I�jQ�M�^$�� +-���!�����{�?6��N����iK�+�i��4p���h@L��]״��d�A6C�\�h��&x;?5M&� ��t98��Cqqx<@ǯ��gw�f1n� +{�-��_Qx�Sc7�#$�����s��ֺN(�`����?N��-�g���C�{��o^n��A�+~o��6[�OS��V�ȅы�>�3tQ���nOO a)m\�kY�,���l�][b>P<MS%eQ����������Q�Y̮Du�DI�`.ݓ�F +-n$b��4��8�P-b��ę���Uu|���U�5%U�4O�dU��J���F��1���B�LA��� +��{���X֟,4�C��@7���/�t��2r�).n����0��Ck�����a�� +�0D:�%��i�'�[��]z��^�K��fD�%�#�8�H��P������gtWv3����Dӓ\�TP�]b�Ar��E���?5�"w W ��b�b��b���������S�\�*��:�+���Ʃwx���TK�sѹɋ#S�}^:�y�th����(3yѡ��%�z�1�]M1udT1y +"y��AP�҉�����%�s +�����i�~r���"���1�\�A��Nr�HtZ}�QɅ�.n���l����+7�}��rgk��WVq51�����0�{�j��7#�.nF2�R\\I�!%�t� f��u�53(���\;+7b5�vV�/�$i�F3��-'<|c�UF�V��H��r�1֡�����8����9$��GH1�#�7Wl�ÔJ���:Ŧj┉�D��8� [�C�#���@X3@F�v+H>7] ��[I1��.9P�}�!��YcI~͵^a�Cr�����eÔ$��K����)D��f��R�o��qcl�2_;���v�3#e�)�����]�ud�bV�?���7HTnjl�D,.�oa�!v��_�'Q�^w�[U��1�N���0�łT�8D�p(5`m��Xil��O�M��D:�60L�|X�� +ٍ�E�m�QRܲd��"��t;e#a��)<��%b����=H�H*5��ZH}!V��A��b�t6��I�RjH����]��'Z�<)ψ����_.�IF2�����T4������D�H9 3����wv���K��(N>N:�H������ɥS'���,�l8�˔��sU�����69�u`�@�=:y��'?�3�LF���|�,zE�] N�z�[��5AZ6\]vm���Y��@�=�-�pD�����Pjp��@�р���w��s���$��9���G�Ğ|�d&��'�Ӟ�ac���x��B����k��T(w���ʗ J�����7:2>?�_��G�,9*5�IЀ)]�G�l��$T1tIґ�p +��+ +{�8��.>��»,�*���i���Y5<ͳ%[�2j�(l�dGQ���a?�N�0�:��"�|�A�kz@���[�j�j\��g$v|;�ޣ�a��@����'��a +j�9K�%O⌯��fuȪ'� y�R�֎d��(�&�u�,�W�*�e-�JP\�����m�^9(��q�%"�mH��Kܧx�7&�u���pA���TjpC>&�Cs�@n�q2�ꐉI�yrR���i����O9��T����1�r�#炷� ��B��N�[�� +� e�'Im?=��[ȍ|��y�vk�<Uj�����W�����G{�5�D��f4Ɲ�i��0%:R���y��Ԁ���kh���� I��� `�����ɥS'���K.����g���Xi��d�=L�7D��F�x��f�H���h:����]�p��o��@���xt +APN��G�7���>*.No��5�����X;g">���T�CV�&��+d�p6P�d���\@"�!e�b�ŲK +n�J����p�6��GK�=]. ��Ew�|�����;;�ȇ�X�م���I$:V���y}�R�J<#���lL pr`��]62��f|�D�)��=@�JPjpC\p�[������ǎ�zPj�37���_�&p�@,�!3�A�,�R�����H��2�M�K��V���$�0 �q˺�� �ͬJ�kB�E� +��F�u�7�g��^ꄩ�P�C�!DN�7D%W�� +��p�tWS4�Y�CN��J<�J)!܌�@$��# �y(����� ��)�PQI1+�ƨغg�747V������Û��;d�+"���U��M�`�m$^E�X�#�@{��J +nhC�phL;ζ&�1媸D22� �7.5�:4&�8`Ku�dc"�<ӸԀ5����eV������(�?����BQ��QG��ď�$��Iy��B� ����^�sِ�R�^@( ���*vg���)�;�XкX}>��.��.7%��r� +AS���nt9&�;A��ʂA,�1����]���-��t�/i��"�3U��Z��^�8�v�T����#��Pjp�qH�0][���噞c��ާ��C�-��K$'��=���taD.�8t�����X�w}����m<KB��b)Vɪ݈����s�A��u��z�:p;�Kc�gΑ$F�G��o3�̭����\��6��������6���3�0h��Fr���e9���3����H�9̞D��DI�`�������?jM$��b8�h,9��0�H���f ���cT��G�n��pF%s�%1���rO��R����GR +�v*h�MJ��jѫ#wru��5 +��.� ��a�'l�nq+���oz�k����ڐu�HA�ȵ�����&�m#Ѥ��r�W�ў2�QҰ�b�C�Z�lWIl�*�<�)h�δ���7A�@��þ7"� Ϗ>�Q����s���W�d�0ȴYy�J��X�-�V��贼�ēs�����"p+�ċ�ܚnG��[��a��F��ȕ����Ӯʂ�Mi�|���7��@f^p��k����O��HMz��Z�o`o\���r�0��ѫ#�����mv�<K��;.5p��`:I�Rѩǃ�T�4U�qCX/��{��f�Qղ�$��W�·�7�&��sFV��6*z�z����k��m_��h��HMz&9��pgk�xD�;���[�Y`�R\܌C�q���L����S[~���Gd�����^TO瘢B/�5UOV���zH�%؎j�b6Q�l�H7��M�!M8"���f�UȰ�y����U%[Ul�ɨd+d؊&:L��Q����7{'K��^���o�<G��������ˍ�"�RS]C�L�̙F6�T���B�悗�_���%C$�aO��G�����[ר�X�xe�@�%�I$k�¯���b<�,cTLCZ�4�.��d���+�W�ڿye/Cvq]�k��h>X��-7��z�$4�<J��b��HG����Q\<B9AU����T]��������r@��}ǻ>��{sV�m��1m;�U(p)��ӻ��vM��x�� +bx<�!�������O0�_�ͣ.��������]N(U�E��<7�'54ہ*R��j�F��Fq�����z W��m����,��2kͼ����1!�dm�c�8��[�߶�ĝ����۟�b�����g0�l�F}}�ym��]ڵ�T�l#���u�b�i��x�A�G��Bv�)b}�V"���|N2E{Zi<b� +�d��X��� �[����H;���Ί�yj��\�i"=$�nB����~�oD�26��`]o���e�P�|�B �ۼ�>K�����Vzq1������f-�N��Cv�ӑ����';��nZ��G��,�3לf�P=��<����:�ܥ���F�����g�� e'�.��ft�m��l��0tV����yu�R*�>�|h=���gQ!>�5?XC��V���o���ʁ�b��ڱJi��-�\;V+� �} -�˪f�`@|T�>kͨ���F_9wat'r� -�Ɍ�k� -���^*֎�2��ۈ4�oê��ه�BcU|}�n�@��VۆU�mC�A[m��z���@���/�_~V�~��,�Q��%R1�Df��(S!?����i0�,�Q��iP^,�Q��% T�oê�h�Z�>SK�/0 -�i�ȩX<��.�ʏ�hK���R*?� +�˪f�`@|T�>kͨ�ζ5�(��ޅѝ,8�*�'3�v�u*�g�:{�X;j���o#� � +�z�g> +�U����G�vY1 >*�� +�Vۆ +�y���pY���G��;�_��9����x��,�Q��%R1�Df��(S!?����i0�,�Q��iP^,�Q��% T�oê�h�Z�>SK�/1 +�؉i�ȩX<��.�ʏ�lK���R*?� �YA�~�/ -[F�r��(�I���[F�[ -~�۔V���PX��(4�M-�۔N�T,�*�;��F�欱�vѨ�>�U��A�~�e0�_nTL^��� -��y�kE�����0Y5zM*&��h����b�.Y��K�L�%z�=OL��.���(]J�G��e�h���H�v�#:Ğ~�{���xd��XQ�_��_Q��M�,*�ʭ�5p(���^yߚ -OR�G�����x$�;�� ��H���P#*UE�fn��>� -\���%�����b�� -�[�}%�.l - -in(��[�m|�mFEGAQ��,!�E�K�.JB-pa�h����0Lؽw�b`��:5%1�iMl�>�xp1P� [�ck%۸���I�ŀ��L��(X&T6� ��eB�d��.��ieyr����+��ࠠ�o���XT���b -��+w -�J��UY����,�((�Z�O��/%)l�z�g8(� -���_ -���p��Ƀ�b����y�uMhN -ٓ -�P<}����K��#��$��ԒI~d��r�$�?�fd�KF#����I � �����k -Y�Rk#���+\�`yfJ���N�r$�Ϟ�ѩ/�����2:�����؞7�]z=H~�2�$���{ ���zu2S��� ���� k#�f5���SS�Md#�2��Q62�i#�y>B�@�UStm�f��4�pQ�� wohb�(߳L z��B�A�4O�dU�Q�z���I�DF.�B������F{̝��H�w{���>��p� �A�������PK�\��tPKI_X<ptB�pollen.argoPKI_X<��A����Gpollen_DC_Pollen.pgmlPKI_X<4�[-m�(pollen.todoPKI_X<7Rp:B�pollen_profile.profilePKI_X<�\��t -Lpollen.xmiPK1D5 \ No newline at end of file +!#K�N��ϤB|����B��@��6����0=V�. + +nSK��6�S|*K��h��ҨМ5V�.ܧ��v1h��[��rˠb��n�0�p��V������ɪ�kR1yMF�]�%�w���]Ґfj-�+���T�N�Q�rY^�ҥT|T�\��f�Y�T���)��s�#V�#�VNJ +o��Uo����w��ˢ"Tn]��C���P\,��ˀ��T�o�m�$�{�.i��ȌG��Ӽ"�4�ˀQ�*J�A�U���*p1PbS����×���7<n��>�9\�hs��)(����BnU��E�E�jv �.�^���b�$�v��(I����Kr7.6��SS����F�#ă����PL�j�m\��qa�����]m�z�Q�L�l.*˄F�2�]�����((q`W���AA��x�8(����_�.��;��)�*�Weu����࣠Dk�?���d�x�����m=�AAU<����pPP�G���L#��~��ˮk�@sRȞl��胼�.�\��y�%�ܥ�L��#��$��X����� +�b��F��#g%�@�'A���S���ԥ�F��cW�$�<�̔؛����H~�=-�S_�ﳧet�#���=o$���z����eI0w��������L�2���G�~ ������Qϧ�@��Fe��ld2�F.�|��������:3̚�i���DA����0�Q�g;�t虊 +�Q�<ՓU�Fm��NO�$0ry"��LO�85�c���E"�ۛ������� ��?�}���PK��t���PKO�X<ptB�pollen.argoPKO�X<�ʜ5RŋGpollen_DC_Pollen.pgmlPKO�X<4�[-m��pollen.todoPKO�X<7Rp:B�pollen_profile.profilePKO�X<��t��� +pollen.xmiPK1�4 \ No newline at end of file Added: trunk/pollen-business/src/test/java/org/chorem/pollen/business/TestData.java =================================================================== --- trunk/pollen-business/src/test/java/org/chorem/pollen/business/TestData.java (rev 0) +++ trunk/pollen-business/src/test/java/org/chorem/pollen/business/TestData.java 2010-02-24 16:19:22 UTC (rev 2883) @@ -0,0 +1,41 @@ +package org.chorem.pollen.business; + +import org.chorem.pollen.business.utils.ContextUtil; +import org.nuiton.topia.TopiaContext; + +/** + * TestData + * + * Created: 24 févr. 2010 + * + * @author fdesbois + * @version $Revision$ + * + * Mise a jour: $Date$ + * par : $Author$ + */ +public abstract class TestData { + + protected TopiaContext transaction; + + public void execute() throws Exception { + transaction = null; + try { + transaction = ContextUtil.getInstance().getContext().beginTransaction(); + + test(); + + } catch (Exception eee) { + if (transaction != null) { + transaction.rollbackTransaction(); + } + throw eee; + } finally { + if (transaction != null) { + transaction.closeContext(); + } + } + } + + protected abstract void test() throws Exception; +} Property changes on: trunk/pollen-business/src/test/java/org/chorem/pollen/business/TestData.java ___________________________________________________________________ Added: svn:keywords + "Author Date Id Revision HeadURL" Deleted: trunk/pollen-business/src/test/java/org/chorem/pollen/business/services/ServiceCommentImplTest.java =================================================================== --- trunk/pollen-business/src/test/java/org/chorem/pollen/business/services/ServiceCommentImplTest.java 2010-02-24 13:18:29 UTC (rev 2882) +++ trunk/pollen-business/src/test/java/org/chorem/pollen/business/services/ServiceCommentImplTest.java 2010-02-24 16:19:22 UTC (rev 2883) @@ -1,152 +0,0 @@ -/* *##% Pollen - * Copyright (C) 2009 CodeLutin - * - * 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/>. ##%*/ - -package org.chorem.pollen.business.services; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - -import java.util.Date; -import java.util.List; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.chorem.pollen.business.dto.CommentDTO; -import org.chorem.pollen.business.services.ServiceCommentImpl; -import org.chorem.pollen.business.utils.ContextUtil; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * Tests du service de gestion de commentaires. - * - * @author enema - * @version $Id$ - */ -public class ServiceCommentImplTest { - private ServiceCommentImpl instance; - - /** log. */ - private static final Log log = LogFactory - .getLog(ServiceCommentImplTest.class); - - public ServiceCommentImplTest() { - } - - @BeforeClass - public static void setUpClass() throws Exception { - ContextUtil.getInstance().buildContext(); - } - - @AfterClass - public static void tearDownClass() throws Exception { - ContextUtil.getInstance().getContext().clear(false); - } - - @Before - public void setUp() { - instance = new ServiceCommentImpl(); - } - - @After - public void tearDown() { - } - - /** - * Test of createComment method, of class ServiceCommentImpl. - */ - @Test - public void testCreateComment() { - CommentDTO comment = new CommentDTO(); - comment.setText("Test_CreateComment"); - comment.setPostDate(new Date()); - String result = instance.createComment(comment); - assertTrue(result.length() > 0); - } - - /** - * Test of createComments method, of class ServiceCommentImpl. - */ - @Test - public void testCreateComments() { - /* Couvert par le test unitaire sur Poll - List<CommentDTO> comments = null; - String pollId = ""; - TopiaContext trans = null; - ServiceCommentImpl instance = new ServiceCommentImpl(); - boolean expResult = false; - boolean result = instance.createComments(comments, pollId, trans); - assertEquals(expResult, result); - */ - } - - /** - * Test of updateComment method, of class ServiceCommentImpl. - */ - @Test - public void testUpdateComment() { - CommentDTO dto = new CommentDTO(); - dto.setText("test_UpdateComment"); - String commentId = instance.createComment(dto); - dto.setId(commentId); - dto.setText("update text"); - boolean result = instance.updateComment(dto); - if (log.isDebugEnabled()) { - log.debug("result: " + result); - } - assertTrue(result); - } - - /** - * Test of deleteComment method, of class ServiceCommentImpl. - */ - @Test - public void testDeleteComment() { - CommentDTO dto = new CommentDTO(); - dto.setText("Test_DeleteComment"); - String commentId = instance.createComment(dto); - boolean result = instance.deleteComment(commentId); - assertTrue(result); - } - - /** - * Test of findCommentById method, of class ServiceCommentImpl. - */ - @Test - public void testFindCommentById() { - CommentDTO dto = new CommentDTO(); - dto.setText("test findCommentById"); - String commentId = instance.createComment(dto); - CommentDTO result = instance.findCommentById(commentId); - String resultId = result.getId(); - assertEquals(commentId, resultId); - } - - /** - * Test of selectComments method, of class ServiceCommentImpl. - */ - @Test - public void testSelectComments() { - CommentDTO dto = new CommentDTO(); - dto.setText("Test_selectComments"); - String choiceId = instance.createComment(dto); - List<CommentDTO> result = instance.selectComments(null); - assertTrue(result.size() > 1); - } -} \ No newline at end of file Modified: trunk/pollen-business/src/test/java/org/chorem/pollen/business/services/ServicePollImplTest.java =================================================================== --- trunk/pollen-business/src/test/java/org/chorem/pollen/business/services/ServicePollImplTest.java 2010-02-24 13:18:29 UTC (rev 2882) +++ trunk/pollen-business/src/test/java/org/chorem/pollen/business/services/ServicePollImplTest.java 2010-02-24 16:19:22 UTC (rev 2883) @@ -13,10 +13,10 @@ * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. ##%*/ - package org.chorem.pollen.business.services; import java.util.ArrayList; +import org.chorem.pollen.business.dto.CommentDTO; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; @@ -25,11 +25,14 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.chorem.pollen.business.TestData; import org.chorem.pollen.business.dto.ChoiceDTO; import org.chorem.pollen.business.dto.PollAccountDTO; import org.chorem.pollen.business.dto.PollDTO; import org.chorem.pollen.business.dto.UserDTO; import org.chorem.pollen.business.dto.VoteDTO; +import org.chorem.pollen.business.persistence.Comment; +import org.chorem.pollen.business.persistence.CommentDAO; import org.chorem.pollen.business.persistence.Poll; import org.chorem.pollen.business.persistence.PollenModelDAOHelper; import org.chorem.pollen.business.utils.ContextUtil; @@ -43,7 +46,6 @@ import org.junit.BeforeClass; import org.junit.Test; import org.nuiton.topia.TopiaContext; -import org.nuiton.topia.TopiaException; /** * Tests du service de gestion des sondages. @@ -52,8 +54,8 @@ * @version $Id$ */ public class ServicePollImplTest { + private static ServicePollImpl instance; - /** log. */ private static final Log log = LogFactory.getLog(ServicePollImplTest.class); @@ -85,7 +87,7 @@ */ @Test public void testCreatePoll() throws Exception { - log.info("### START ###"); + log.info("## START ##"); PollDTO dto = new PollDTO(); dto.setBeginChoiceDate(new Date()); dto.setBeginDate(new Date()); @@ -125,8 +127,7 @@ try { transaction = ContextUtil.getInstance().getContext().beginTransaction(); - Poll entity = PollenModelDAOHelper. - getPollDAO(transaction).findByTopiaId(result); + Poll entity = PollenModelDAOHelper.getPollDAO(transaction).findByTopiaId(result); Assert.assertNotNull(entity); Assert.assertEquals(3, entity.getChoice().size()); @@ -151,7 +152,7 @@ */ @Test public void testUpdatePoll() { - log.info("### START ###"); + log.info("## START ##"); String pollId = ""; PollDTO dto = new PollDTO(); dto.setDescription("Test_updatePoll"); @@ -173,7 +174,7 @@ */ @Test public void testDeletePoll() { - log.info("### START ###"); + log.info("## START ##"); PollDTO dto = new PollDTO(); dto.setDescription("Test_deletePoll"); dto.setCreatorId("erwan"); @@ -191,7 +192,7 @@ */ @Test public void testFindPollById() { - log.info("### START ###"); + log.info("## START ##"); String pollId = ""; PollDTO dto = new PollDTO(); dto.setDescription("Test_findPollById"); @@ -210,7 +211,7 @@ */ @Test public void testFindPollByPollId() { - log.info("### START ###"); + log.info("## START ##"); String pollId = ""; PollDTO dto = new PollDTO(); dto.setDescription("Test_findPollByPollId"); @@ -233,7 +234,7 @@ */ @Test public void testFindPollsByName() { - log.info("### START ###"); + log.info("## START ##"); PollDTO dto = new PollDTO(); dto.setDescription("Test_findPollsByName"); dto.setCreatorId("erwan"); @@ -252,8 +253,7 @@ */ @Test public void testFindPollsByUser() { - log.info("### START ###"); - + log.info("## START ##"); // création de l'utilisateur UserDTO user = new UserDTO(); user.setLogin("login_findPollsByUser"); @@ -280,8 +280,7 @@ */ @Test public void testFindParticipatedPolls() { - log.info("### START ###"); - + log.info("## START ##"); // création de l'utilisateur UserDTO user = new UserDTO(); user.setLogin("login_findParticipatedPolls"); @@ -318,7 +317,7 @@ */ @Test public void testFindRunningPolls() { - log.info("### START ###"); + log.info("## START ##"); Date now = new Date(); // sondage en cours sans date de fin @@ -367,7 +366,7 @@ */ @Test public void testSelectPolls() { - log.info("### START ###"); + log.info("## START ##"); PollDTO dto = new PollDTO(); dto.setDescription("test selectPolls"); dto.setTitle("selectPolls"); @@ -379,4 +378,106 @@ List<PollDTO> result = instance.selectPolls(null); assertTrue(result.size() > 0); } -} \ No newline at end of file + + /** + * Test of findInvitedPolls method, of class ServicePollImpl. + */ + //@Test + public void testFindInvitedPolls() { + System.out.println("findInvitedPolls"); + } + + /** + * Test of addVoteToPoll method, of class ServicePollImpl. + */ + //@Test + public void testAddVoteToPoll() { + System.out.println("addVoteToPoll"); + } + + /** + * Test of createComment method, of class ServicePollImpl. + */ + @Test + public void testCreateComment() throws Exception { + log.info("## START ##"); + + /** PREPARE DATA **/ + PollDTO poll = new PollDTO(); + poll.setTitle("createComment"); + poll.setPollType(PollType.FREE); + poll.setChoiceType(ChoiceType.TEXT); + poll.setVoteCounting(VoteCountingType.NORMAL); + final String id = instance.createPoll(poll); + poll.setId(id); + + /** EXEC METHOD **/ + final CommentDTO comment = new CommentDTO(); + comment.setAuthor("Jack Pot"); + comment.setText("Un petit commentaire"); + comment.setPostDate(new Date()); + + instance.createComment(poll, comment); + + Assert.assertEquals(1, poll.getComments().size()); + Assert.assertNotNull(comment.getId()); + + // Test if the comment entity exist in database + TestData test = new TestData() { + + @Override + protected void test() throws Exception { + CommentDAO dao = PollenModelDAOHelper.getCommentDAO(transaction); + Comment result = dao.findByTopiaId(comment.getId()); + Assert.assertNotNull(result); + Assert.assertNotNull(result.getPoll()); + Assert.assertEquals(id, result.getPoll().getTopiaId()); + } + }; + + test.execute(); + + } + + /** + * Test of deleteComment method, of class ServicePollImpl. + */ + @Test + public void testDeleteComment() throws Exception { + log.info("## START ##"); + + /** PREPARE DATA **/ + PollDTO poll = new PollDTO(); + poll.setTitle("deleteComment"); + poll.setPollType(PollType.FREE); + poll.setChoiceType(ChoiceType.TEXT); + poll.setVoteCounting(VoteCountingType.NORMAL); + String id = instance.createPoll(poll); + poll.setId(id); + + final CommentDTO comment = new CommentDTO(); + comment.setAuthor("Jack Pot"); + comment.setText("Un petit commentaire"); + comment.setPostDate(new Date()); + instance.createComment(poll, comment); + + /** EXEC METHOD **/ + + instance.deleteComment(poll, comment.getId()); + + Assert.assertEquals(0, poll.getComments().size()); + + // Test if the comment entity not exist anymore in database + TestData test = new TestData() { + + @Override + protected void test() throws Exception { + CommentDAO dao = PollenModelDAOHelper.getCommentDAO(transaction); + Comment result = dao.findByTopiaId(comment.getId()); + Assert.assertNull(result); + } + }; + + test.execute(); + } +} Modified: trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/pages/poll/VoteForPoll.java =================================================================== --- trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/pages/poll/VoteForPoll.java 2010-02-24 13:18:29 UTC (rev 2882) +++ trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/pages/poll/VoteForPoll.java 2010-02-24 16:19:22 UTC (rev 2883) @@ -59,7 +59,6 @@ import org.chorem.pollen.business.dto.VoteDTO; import org.chorem.pollen.business.dto.VotingListDTO; import org.chorem.pollen.business.services.ServiceChoice; -import org.chorem.pollen.business.services.ServiceComment; import org.chorem.pollen.business.services.ServicePoll; import org.chorem.pollen.business.services.ServicePollAccount; import org.chorem.pollen.business.services.ServiceResults; @@ -258,9 +257,8 @@ private ServicePoll servicePoll; @Inject private ServiceVote serviceVote; + @Inject - private ServiceComment serviceComment; - @Inject private ServicePollAccount servicePollAccount; @Inject private ServiceResults serviceResults; @@ -879,11 +877,12 @@ /** Méthode appelée lors de l'ajout d'un commentaire. */ Object onSuccessFromCommentForm() { - newComment.setPollId(poll.getId()); + //newComment.setPollId(poll.getId()); newComment.setPostDate(new Date()); - serviceComment.createComment(newComment); - poll = servicePoll.findPollByPollId(poll.getPollId()); - addFeedEntry(PollAction.ADDCOMMENT, newComment.getPollAccountId(), + servicePoll.createComment(poll, newComment); + //serviceComment.createComment(newComment); + //poll = servicePoll.findPollByPollId(poll.getPollId()); + addFeedEntry(PollAction.ADDCOMMENT, newComment.getAuthor(), newComment.getText()); newComment = new CommentDTO(); return commentZone.getBody(); @@ -891,8 +890,9 @@ /** Méthode appelée lors de la suppression d'un commentaire. */ Object onActionFromDeleteComment(String commentId) { - serviceComment.deleteComment(commentId); - poll = servicePoll.findPollByPollId(poll.getPollId()); + //serviceComment.deleteComment(commentId); + //poll = servicePoll.findPollByPollId(poll.getPollId()); + servicePoll.deleteComment(poll, commentId); return commentZone.getBody(); } @@ -1110,7 +1110,7 @@ newImageChoice = new ImageChoiceUIO(); newComment = new CommentDTO(); - newComment.setPollId(poll.getId()); + //newComment.setPollId(poll.getId()); } } Modified: trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/services/AppModule.java =================================================================== --- trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/services/AppModule.java 2010-02-24 13:18:29 UTC (rev 2882) +++ trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/services/AppModule.java 2010-02-24 16:19:22 UTC (rev 2883) @@ -30,7 +30,6 @@ import org.apache.tapestry5.upload.services.UploadSymbols; import org.chorem.pollen.business.services.ServiceAuth; import org.chorem.pollen.business.services.ServiceChoice; -import org.chorem.pollen.business.services.ServiceComment; import org.chorem.pollen.business.services.ServiceList; import org.chorem.pollen.business.services.ServicePoll; import org.chorem.pollen.business.services.ServicePollAccount; @@ -60,7 +59,6 @@ // Pollen-Business services binder.bind(ServiceAuth.class); - binder.bind(ServiceComment.class); binder.bind(ServiceList.class); binder.bind(ServiceUser.class); binder.bind(ServicePoll.class); @@ -84,7 +82,7 @@ // overriding to false is a good idea. In addition, this is often overridden // on the command line as -Dtapestry.production-mode=false // The primary difference is how exceptions are reported. - configuration.add(SymbolConstants.PRODUCTION_MODE, "true"); + configuration.add(SymbolConstants.PRODUCTION_MODE, "false"); // Restricting file size in upload component configuration.add(UploadSymbols.FILESIZE_MAX, "1048576"); Modified: trunk/pollen-ui/src/main/webapp/poll/VoteForPoll.tml =================================================================== --- trunk/pollen-ui/src/main/webapp/poll/VoteForPoll.tml 2010-02-24 13:18:29 UTC (rev 2882) +++ trunk/pollen-ui/src/main/webapp/poll/VoteForPoll.tml 2010-02-24 16:19:22 UTC (rev 2883) @@ -300,7 +300,7 @@ <h3>${message:comments}</h3> <t:zone t:id="commentZone" show="show" update="show"> <div id="commentsDiv"> - <div t:type="loop" t:source="poll.commentDTOs" t:value="comment" class="${evenodd.next}"> + <div t:type="loop" t:source="poll.comments" t:value="comment" class="${evenodd.next}"> <t:if test="creatorUser"> <span class="cmd"> <t:actionlink t:id="deleteComment" context="comment.id" t:zone="commentZone"> @@ -308,7 +308,7 @@ </t:actionlink> </span> </t:if> - <span class="name">${comment.pollAccountId}</span> : + <span class="name">${comment.author}</span> : <span class="date"> <t:output value="comment.postDate" format="dateFormat"/> </span> @@ -319,7 +319,7 @@ <t:form t:id="commentForm" t:zone="commentZone" t:volatile="true"> <t:label for="commenterName" /> <br/> - <t:textField t:value="newComment.pollAccountId" t:id="commenterName" + <t:textField t:value="newComment.author" t:id="commenterName" t:validate="required" /> <br/> <t:label for="commentArea" />
participants (1)
-
fdesbois@users.chorem.org