Pollen-commits
Threads by month
- ----- 2026 -----
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- 3196 discussions
Author: fdesbois
Date: 2010-02-25 14:13:26 +0100 (Thu, 25 Feb 2010)
New Revision: 2885
Added:
trunk/pollen-business/src/main/java/org/chorem/pollen/business/PollenConverter.java
Removed:
trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/ConverterHelper.java
trunk/pollen-business/src/test/java/org/chorem/pollen/business/converters/
trunk/pollen-business/src/test/java/org/chorem/pollen/business/utils/
Modified:
trunk/pollen-business/src/main/java/org/chorem/pollen/business/PollenProperty.java
trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataPollConverter.java
trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServicePollImpl.java
trunk/pollen-business/src/main/java/org/chorem/pollen/business/utils/PropertiesLoader.java
trunk/pollen-business/src/main/resources/i18n/pollen-business-en_GB.properties
trunk/pollen-business/src/main/resources/i18n/pollen-business-fr_FR.properties
trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/components/HeadLink.java
trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/filters/PollenExceptionsFilter.java
Log:
- Change ConverterHelper to PollenConverter : will be the only converter helper needed, the package converters will be deleted
- Improve messages and refactor deprecated
Copied: trunk/pollen-business/src/main/java/org/chorem/pollen/business/PollenConverter.java (from rev 2883, trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/ConverterHelper.java)
===================================================================
--- trunk/pollen-business/src/main/java/org/chorem/pollen/business/PollenConverter.java (rev 0)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/PollenConverter.java 2010-02-25 13:13:26 UTC (rev 2885)
@@ -0,0 +1,277 @@
+
+package org.chorem.pollen.business;
+
+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.PollAccountDTO;
+import org.chorem.pollen.business.dto.PollDTO;
+import org.chorem.pollen.business.dto.PreventRuleDTO;
+import org.chorem.pollen.business.dto.VoteDTO;
+import org.chorem.pollen.business.dto.VotingListDTO;
+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.persistence.Vote;
+import org.chorem.pollen.business.persistence.VoteToChoice;
+import org.chorem.pollen.business.persistence.VotingList;
+import org.chorem.pollen.common.ChoiceType;
+import org.chorem.pollen.common.PollType;
+import org.chorem.pollen.common.VoteCountingType;
+import org.chorem.pollen.votecounting.business.NumberMethod;
+import org.nuiton.topia.persistence.TopiaEntity;
+import org.nuiton.util.beans.BinderBuilder;
+import org.nuiton.util.beans.BinderProvider;
+
+/**
+ * ConverterFactory
+ *
+ * Created: 22 févr. 2010
+ *
+ * @author fdesbois
+ * @version $Revision$
+ *
+ * Mise a jour: $Date$
+ * par : $Author$
+ */
+public class PollenConverter {
+
+ private static final Log log = LogFactory.getLog(PollenConverter.class);
+
+ private static BinderBuilder builder = new BinderBuilder();
+
+ private static final void prepare(Class<? extends TopiaEntity> entityClass, Class<?> dtoClass, String... properties) {
+ // Binder DTO -> Entity
+ builder.createBinderModel(dtoClass, entityClass).
+ addSimpleProperties(properties);
+
+ BinderProvider.registerBinder(builder);
+
+ // Binder Entity -> DTO
+ builder.createBinderModel(entityClass, dtoClass).
+ addSimpleProperties(properties);
+ //builder.addProperty(TopiaEntity.TOPIA_ID, "id");
+
+ BinderProvider.registerBinder(builder);
+ }
+
+ public static void preparePollConverters() {
+ String[] properties = new String[] {
+ Poll.TITLE,
+ Poll.DESCRIPTION,
+ Poll.BEGIN_CHOICE_DATE,
+ Poll.END_CHOICE_DATE,
+ Poll.BEGIN_DATE,
+ Poll.END_DATE,
+ Poll.CLOSED,
+ Poll.ANONYMOUS,
+ Poll.ANONYMOUS_VOTE_ALLOWED,
+ Poll.PUBLIC_RESULTS,
+ Poll.CONTINUOUS_RESULTS,
+ Poll.CHOICE_ADD_ALLOWED,
+ Poll.MAX_CHOICE_NB
+ };
+
+ prepare(Poll.class, PollDTO.class, properties);
+ }
+
+ public static void prepareChoiceConverters() {
+ String[] properties = new String[] {
+ Choice.NAME,
+ Choice.DESCRIPTION,
+ Choice.VALIDATE
+ };
+
+ prepare(Choice.class, ChoiceDTO.class, properties);
+ }
+
+ public static void prepareVotingListConverters() {
+ String[] properties = new String[] {
+ VotingList.NAME,
+ VotingList.WEIGHT
+ };
+
+ prepare(VotingList.class, VotingListDTO.class, properties);
+ }
+
+ public static void preparePollAccountConverters() {
+ String[] properties = new String[] {
+ PollAccount.VOTING_ID,
+ PollAccount.EMAIL
+ };
+
+ prepare(PollAccount.class, PollAccountDTO.class, properties);
+ }
+
+ public static void preparePreventRuleConverters() {
+ String[] properties = new String[] {
+ PreventRule.ACTIVE,
+ PreventRule.METHOD,
+ PreventRule.ONE_TIME,
+ PreventRule.REPEATED,
+ PreventRule.SCOPE,
+ PreventRule.SENSIBILITY
+ };
+
+ prepare(PreventRule.class, PreventRuleDTO.class, properties);
+ }
+
+ public static void prepareVoteConverters() {
+ String[] properties = new String[] {
+ Vote.WEIGHT,
+ Vote.COMMENT,
+ Vote.ANONYMOUS
+ };
+
+ prepare(Vote.class, VoteDTO.class, properties);
+ }
+
+ public static void prepareCommentConverters() {
+ String[] properties = new String[] {
+ Comment.TEXT,
+ Comment.POST_DATE,
+ Comment.AUTHOR
+ };
+
+ prepare(Comment.class, CommentDTO.class, properties);
+ }
+
+ public static Choice convert(ChoiceDTO dto, Choice entity) {
+ BinderProvider.getBinder(ChoiceDTO.class, Choice.class).copy(dto, entity);
+ return entity;
+ }
+
+ public static ChoiceDTO convert(Choice entity, ChoiceDTO dto) {
+ BinderProvider.getBinder(Choice.class, ChoiceDTO.class).copy(entity, dto);
+ dto.setId(entity.getTopiaId());
+ String name = entity.getName();
+ dto.setHidden(name != null
+ && name.startsWith(NumberMethod.HIDDEN_PREFIX));
+ dto.setPollId(entity.getPoll().getTopiaId());
+ return dto;
+ }
+
+ public static Poll convert(PollDTO dto, Poll entity) {
+ BinderProvider.getBinder(PollDTO.class, Poll.class).copy(dto, entity);
+ entity.setChoiceType(dto.getChoiceType().name());
+ entity.setPollType(dto.getPollType().name());
+ entity.setVoteCounting(dto.getVoteCounting().name());
+ return entity;
+ }
+
+ public static PollDTO convert(Poll entity, PollDTO dto) {
+ BinderProvider.getBinder(Poll.class, PollDTO.class).copy(entity, dto);
+ dto.setId(entity.getTopiaId());
+ dto.setPollId(entity.getPollId());
+ dto.setChoiceType(ChoiceType.valueOf(entity.getChoiceType()));
+ dto.setPollType(PollType.valueOf(entity.getPollType()));
+ dto.setVoteCounting(VoteCountingType.valueOf(entity.getVoteCounting()));
+
+ PollAccount creator = entity.getCreator();
+ UserAccount user = creator.getUserAccount();
+ dto.setCreatorId(creator.getTopiaId());
+ dto.setCreatorEmail(creator.getEmail());
+ if (creator.getUserAccount() != null) {
+ dto.setUserId(user.getTopiaId());
+ }
+ return dto;
+ }
+
+ public static VotingList convert(VotingListDTO dto, VotingList entity) {
+ BinderProvider.getBinder(VotingListDTO.class, VotingList.class).copy(dto, entity);
+ return entity;
+ }
+
+ public static VotingListDTO convert(VotingList entity, VotingListDTO dto) {
+ BinderProvider.getBinder(VotingList.class, VotingListDTO.class).copy(entity, dto);
+ dto.setId(entity.getTopiaId());
+ return dto;
+ }
+
+ public static PollAccount convert(PollAccountDTO dto, PollAccount entity) {
+ BinderProvider.getBinder(PollAccountDTO.class, PollAccount.class).copy(dto, entity);
+ return entity;
+ }
+
+ public static PollAccountDTO convert(PollAccount entity, PollAccountDTO dto) {
+ BinderProvider.getBinder(PollAccount.class, PollAccountDTO.class).copy(entity, dto);
+ dto.setId(entity.getTopiaId());
+ dto.setAccountId(entity.getAccountId());
+ return dto;
+ }
+
+ public static PreventRule convert(PreventRuleDTO dto, PreventRule entity) {
+ BinderProvider.getBinder(PreventRuleDTO.class, PreventRule.class).copy(dto, entity);
+ return entity;
+ }
+
+ public static PreventRuleDTO convert(PreventRule entity, PreventRuleDTO dto) {
+ BinderProvider.getBinder(PreventRule.class, PreventRuleDTO.class).copy(entity, dto);
+ dto.setId(entity.getTopiaId());
+ Poll poll = entity.getPoll();
+ dto.setPollId(poll.getTopiaId());
+ return dto;
+ }
+
+ public static Vote convert(VoteDTO dto, Vote entity) {
+ BinderProvider.getBinder(VoteDTO.class, Vote.class).copy(dto, entity);
+ return entity;
+ }
+
+ /**
+ * Convert a Vote entity to a VoteDTO.
+ * Add pollId in the DTO corresponding to the poll topiaId owner of the
+ * vote. Add choices (ChoiceDTO) for vote values.
+ * The user linked with the vote may be a votingList (group voteCounting)
+ * or a pollAccount (other voteCounting type).
+ *
+ * @param entity Vote
+ * @param dto VoteDTO
+ * @return VoteDTO
+ */
+ public static VoteDTO convert(Vote entity, VoteDTO dto) {
+ BinderProvider.getBinder(Vote.class, VoteDTO.class).copy(entity, dto);
+ dto.setId(entity.getTopiaId());
+ Poll poll = entity.getPoll();
+ dto.setPollId(poll.getTopiaId());
+
+ // Set reference only if not anonymous
+ //if (!entity.getAnonymous()) {
+ PollAccount account = entity.getPollAccount();
+ VotingList list = entity.getVotingList();
+ // vote for a list
+ if (list != null) {
+ dto.setVotingListId(list.getTopiaId());
+ // vote for a person (pollAccount)
+ } else if (account != null) {
+ dto.setPollAccountId(account.getTopiaId());
+ }
+ //}
+
+ // Choices for voteValues
+ for (VoteToChoice choice : entity.getChoiceVoteToChoice()) {
+ ChoiceDTO choiceDTO =
+ convert(choice.getChoice(), new ChoiceDTO());
+ choiceDTO.setValue(choice.getVoteValue());
+ dto.addChoice(choiceDTO);
+ }
+ return dto;
+ }
+
+ public static Comment convert(CommentDTO dto, Comment entity) {
+ BinderProvider.getBinder(CommentDTO.class, Comment.class).copy(dto, entity);
+ return entity;
+ }
+
+ public static CommentDTO convert(Comment entity, CommentDTO dto) {
+ BinderProvider.getBinder(Comment.class, CommentDTO.class).copy(entity, dto);
+ dto.setId(entity.getTopiaId());
+ return dto;
+ }
+
+
+}
Property changes on: trunk/pollen-business/src/main/java/org/chorem/pollen/business/PollenConverter.java
___________________________________________________________________
Added: svn:keywords
+ "Author Date Id Revision HeadURL"
Added: svn:mergeinfo
+
Modified: trunk/pollen-business/src/main/java/org/chorem/pollen/business/PollenProperty.java
===================================================================
--- trunk/pollen-business/src/main/java/org/chorem/pollen/business/PollenProperty.java 2010-02-25 12:07:51 UTC (rev 2884)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/PollenProperty.java 2010-02-25 13:13:26 UTC (rev 2885)
@@ -13,7 +13,7 @@
* par : $Author$
*/
public enum PollenProperty {
- /** version of the application (maven version) **/
+ /** version of the application **/
APP_VERSION("version"),
/** url of the server **/
SERVER_URL("siteUrl"),
Deleted: 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-25 12:07:51 UTC (rev 2884)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/ConverterHelper.java 2010-02-25 13:13:26 UTC (rev 2885)
@@ -1,277 +0,0 @@
-
-package org.chorem.pollen.business.converters;
-
-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.PollAccountDTO;
-import org.chorem.pollen.business.dto.PollDTO;
-import org.chorem.pollen.business.dto.PreventRuleDTO;
-import org.chorem.pollen.business.dto.VoteDTO;
-import org.chorem.pollen.business.dto.VotingListDTO;
-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.persistence.Vote;
-import org.chorem.pollen.business.persistence.VoteToChoice;
-import org.chorem.pollen.business.persistence.VotingList;
-import org.chorem.pollen.common.ChoiceType;
-import org.chorem.pollen.common.PollType;
-import org.chorem.pollen.common.VoteCountingType;
-import org.chorem.pollen.votecounting.business.NumberMethod;
-import org.nuiton.topia.persistence.TopiaEntity;
-import org.nuiton.util.beans.BinderBuilder;
-import org.nuiton.util.beans.BinderProvider;
-
-/**
- * ConverterFactory
- *
- * Created: 22 févr. 2010
- *
- * @author fdesbois
- * @version $Revision$
- *
- * Mise a jour: $Date$
- * par : $Author$
- */
-public class ConverterHelper {
-
- private static final Log log = LogFactory.getLog(ConverterHelper.class);
-
- private static BinderBuilder builder = new BinderBuilder();
-
- private static final void prepare(Class<? extends TopiaEntity> entityClass, Class<?> dtoClass, String... properties) {
- // Binder DTO -> Entity
- builder.createBinderModel(dtoClass, entityClass).
- addSimpleProperties(properties);
-
- BinderProvider.registerBinder(builder);
-
- // Binder Entity -> DTO
- builder.createBinderModel(entityClass, dtoClass).
- addSimpleProperties(properties);
- //builder.addProperty(TopiaEntity.TOPIA_ID, "id");
-
- BinderProvider.registerBinder(builder);
- }
-
- public static void preparePollConverters() {
- String[] properties = new String[] {
- Poll.TITLE,
- Poll.DESCRIPTION,
- Poll.BEGIN_CHOICE_DATE,
- Poll.END_CHOICE_DATE,
- Poll.BEGIN_DATE,
- Poll.END_DATE,
- Poll.CLOSED,
- Poll.ANONYMOUS,
- Poll.ANONYMOUS_VOTE_ALLOWED,
- Poll.PUBLIC_RESULTS,
- Poll.CONTINUOUS_RESULTS,
- Poll.CHOICE_ADD_ALLOWED,
- Poll.MAX_CHOICE_NB
- };
-
- prepare(Poll.class, PollDTO.class, properties);
- }
-
- public static void prepareChoiceConverters() {
- String[] properties = new String[] {
- Choice.NAME,
- Choice.DESCRIPTION,
- Choice.VALIDATE
- };
-
- prepare(Choice.class, ChoiceDTO.class, properties);
- }
-
- public static void prepareVotingListConverters() {
- String[] properties = new String[] {
- VotingList.NAME,
- VotingList.WEIGHT
- };
-
- prepare(VotingList.class, VotingListDTO.class, properties);
- }
-
- public static void preparePollAccountConverters() {
- String[] properties = new String[] {
- PollAccount.VOTING_ID,
- PollAccount.EMAIL
- };
-
- prepare(PollAccount.class, PollAccountDTO.class, properties);
- }
-
- public static void preparePreventRuleConverters() {
- String[] properties = new String[] {
- PreventRule.ACTIVE,
- PreventRule.METHOD,
- PreventRule.ONE_TIME,
- PreventRule.REPEATED,
- PreventRule.SCOPE,
- PreventRule.SENSIBILITY
- };
-
- prepare(PreventRule.class, PreventRuleDTO.class, properties);
- }
-
- public static void prepareVoteConverters() {
- String[] properties = new String[] {
- Vote.WEIGHT,
- Vote.COMMENT,
- Vote.ANONYMOUS
- };
-
- prepare(Vote.class, VoteDTO.class, properties);
- }
-
- public static void prepareCommentConverters() {
- String[] properties = new String[] {
- Comment.TEXT,
- Comment.POST_DATE,
- Comment.AUTHOR
- };
-
- prepare(Comment.class, CommentDTO.class, properties);
- }
-
- public static Choice convert(ChoiceDTO dto, Choice entity) {
- BinderProvider.getBinder(ChoiceDTO.class, Choice.class).copy(dto, entity);
- return entity;
- }
-
- public static ChoiceDTO convert(Choice entity, ChoiceDTO dto) {
- BinderProvider.getBinder(Choice.class, ChoiceDTO.class).copy(entity, dto);
- dto.setId(entity.getTopiaId());
- String name = entity.getName();
- dto.setHidden(name != null
- && name.startsWith(NumberMethod.HIDDEN_PREFIX));
- dto.setPollId(entity.getPoll().getTopiaId());
- return dto;
- }
-
- public static Poll convert(PollDTO dto, Poll entity) {
- BinderProvider.getBinder(PollDTO.class, Poll.class).copy(dto, entity);
- entity.setChoiceType(dto.getChoiceType().name());
- entity.setPollType(dto.getPollType().name());
- entity.setVoteCounting(dto.getVoteCounting().name());
- return entity;
- }
-
- public static PollDTO convert(Poll entity, PollDTO dto) {
- BinderProvider.getBinder(Poll.class, PollDTO.class).copy(entity, dto);
- dto.setId(entity.getTopiaId());
- dto.setPollId(entity.getPollId());
- dto.setChoiceType(ChoiceType.valueOf(entity.getChoiceType()));
- dto.setPollType(PollType.valueOf(entity.getPollType()));
- dto.setVoteCounting(VoteCountingType.valueOf(entity.getVoteCounting()));
-
- PollAccount creator = entity.getCreator();
- UserAccount user = creator.getUserAccount();
- dto.setCreatorId(creator.getTopiaId());
- dto.setCreatorEmail(creator.getEmail());
- if (creator.getUserAccount() != null) {
- dto.setUserId(user.getTopiaId());
- }
- return dto;
- }
-
- public static VotingList convert(VotingListDTO dto, VotingList entity) {
- BinderProvider.getBinder(VotingListDTO.class, VotingList.class).copy(dto, entity);
- return entity;
- }
-
- public static VotingListDTO convert(VotingList entity, VotingListDTO dto) {
- BinderProvider.getBinder(VotingList.class, VotingListDTO.class).copy(entity, dto);
- dto.setId(entity.getTopiaId());
- return dto;
- }
-
- public static PollAccount convert(PollAccountDTO dto, PollAccount entity) {
- BinderProvider.getBinder(PollAccountDTO.class, PollAccount.class).copy(dto, entity);
- return entity;
- }
-
- public static PollAccountDTO convert(PollAccount entity, PollAccountDTO dto) {
- BinderProvider.getBinder(PollAccount.class, PollAccountDTO.class).copy(entity, dto);
- dto.setId(entity.getTopiaId());
- dto.setAccountId(entity.getAccountId());
- return dto;
- }
-
- public static PreventRule convert(PreventRuleDTO dto, PreventRule entity) {
- BinderProvider.getBinder(PreventRuleDTO.class, PreventRule.class).copy(dto, entity);
- return entity;
- }
-
- public static PreventRuleDTO convert(PreventRule entity, PreventRuleDTO dto) {
- BinderProvider.getBinder(PreventRule.class, PreventRuleDTO.class).copy(entity, dto);
- dto.setId(entity.getTopiaId());
- Poll poll = entity.getPoll();
- dto.setPollId(poll.getTopiaId());
- return dto;
- }
-
- public static Vote convert(VoteDTO dto, Vote entity) {
- BinderProvider.getBinder(VoteDTO.class, Vote.class).copy(dto, entity);
- return entity;
- }
-
- /**
- * Convert a Vote entity to a VoteDTO.
- * Add pollId in the DTO corresponding to the poll topiaId owner of the
- * vote. Add choices (ChoiceDTO) for vote values.
- * The user linked with the vote may be a votingList (group voteCounting)
- * or a pollAccount (other voteCounting type).
- *
- * @param entity Vote
- * @param dto VoteDTO
- * @return VoteDTO
- */
- public static VoteDTO convert(Vote entity, VoteDTO dto) {
- BinderProvider.getBinder(Vote.class, VoteDTO.class).copy(entity, dto);
- dto.setId(entity.getTopiaId());
- Poll poll = entity.getPoll();
- dto.setPollId(poll.getTopiaId());
-
- // Set reference only if not anonymous
- //if (!entity.getAnonymous()) {
- PollAccount account = entity.getPollAccount();
- VotingList list = entity.getVotingList();
- // vote for a list
- if (list != null) {
- dto.setVotingListId(list.getTopiaId());
- // vote for a person (pollAccount)
- } else if (account != null) {
- dto.setPollAccountId(account.getTopiaId());
- }
- //}
-
- // Choices for voteValues
- for (VoteToChoice choice : entity.getChoiceVoteToChoice()) {
- ChoiceDTO choiceDTO =
- convert(choice.getChoice(), new ChoiceDTO());
- choiceDTO.setValue(choice.getVoteValue());
- dto.addChoice(choiceDTO);
- }
- return dto;
- }
-
- public static Comment convert(CommentDTO dto, Comment entity) {
- BinderProvider.getBinder(CommentDTO.class, Comment.class).copy(dto, entity);
- return entity;
- }
-
- public static CommentDTO convert(Comment entity, CommentDTO dto) {
- BinderProvider.getBinder(Comment.class, CommentDTO.class).copy(entity, dto);
- dto.setId(entity.getTopiaId());
- return dto;
- }
-
-
-}
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-25 12:07:51 UTC (rev 2884)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataPollConverter.java 2010-02-25 13:13:26 UTC (rev 2885)
@@ -16,6 +16,7 @@
package org.chorem.pollen.business.converters;
+import org.chorem.pollen.business.PollenConverter;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
@@ -61,7 +62,7 @@
*/
@Deprecated
public PollDTO createPollDTO(Poll ePoll) {
- PollDTO pollDTO = ConverterHelper.convert(ePoll, new PollDTO());
+ PollDTO pollDTO = PollenConverter.convert(ePoll, new PollDTO());
// pollDTO.setId(ePoll.getTopiaId());
// pollDTO.setPollId(ePoll.getPollId());
@@ -95,7 +96,7 @@
}
for (Comment comment : ePoll.getComment()) {
CommentDTO dto =
- ConverterHelper.convert(comment, new CommentDTO());
+ PollenConverter.convert(comment, new CommentDTO());
pollDTO.addComment(dto);
}
// if (ePoll.getComment().size() > 0) {
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-25 12:07:51 UTC (rev 2884)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServicePollImpl.java 2010-02-25 13:13:26 UTC (rev 2885)
@@ -27,7 +27,7 @@
import org.apache.commons.logging.LogFactory;
import org.chorem.pollen.business.PollenBusinessException;
import org.chorem.pollen.business.PollenContext;
-import org.chorem.pollen.business.converters.ConverterHelper;
+import org.chorem.pollen.business.PollenConverter;
import org.chorem.pollen.business.converters.DataPollConverter;
import org.chorem.pollen.business.converters.DataVotingListConverter;
import org.chorem.pollen.business.dto.ChoiceDTO;
@@ -79,13 +79,13 @@
public ServicePollImpl() {
rootContext = PollenContext.getRootContext();
- ConverterHelper.preparePollConverters();
- ConverterHelper.prepareChoiceConverters();
- ConverterHelper.prepareVotingListConverters();
- ConverterHelper.preparePollAccountConverters();
- ConverterHelper.preparePreventRuleConverters();
- ConverterHelper.prepareVoteConverters();
- ConverterHelper.prepareCommentConverters();
+ PollenConverter.preparePollConverters();
+ PollenConverter.prepareChoiceConverters();
+ PollenConverter.prepareVotingListConverters();
+ PollenConverter.preparePollAccountConverters();
+ PollenConverter.preparePreventRuleConverters();
+ PollenConverter.prepareVoteConverters();
+ PollenConverter.prepareCommentConverters();
}
@Override
@@ -99,7 +99,7 @@
// Create with a new pollId generated for links
Poll entity = pollDAO.create(PollenContext.createPollenUrlId());
- ConverterHelper.convert(pollDTO, entity);
+ PollenConverter.convert(pollDTO, entity);
// ** Manage the poll creator
PollAccount creator = prepareCreator(transaction, pollDTO);
@@ -109,7 +109,7 @@
ChoiceDAO choiceDAO = PollenModelDAOHelper.getChoiceDAO(transaction);
for (ChoiceDTO choiceDTO : pollDTO.getChoiceDTOs()) {
Choice choice =
- ConverterHelper.convert(choiceDTO, choiceDAO.create());
+ PollenConverter.convert(choiceDTO, choiceDAO.create());
choice.setPoll(entity);
}
@@ -124,7 +124,7 @@
PollenModelDAOHelper.getPreventRuleDAO(transaction);
for (PreventRuleDTO ruleDTO : pollDTO.getPreventRuleDTOs()) {
PreventRule rule =
- ConverterHelper.convert(ruleDTO, ruleDAO.create());
+ PollenConverter.convert(ruleDTO, ruleDAO.create());
rule.setPoll(entity);
}
@@ -204,7 +204,7 @@
VotingListDAO dao = PollenModelDAOHelper.getVotingListDAO(transaction);
VotingList votingList =
- ConverterHelper.convert(listDTO, dao.create());
+ PollenConverter.convert(listDTO, dao.create());
PollAccountDAO pollAccountDAO =
PollenModelDAOHelper.getPollAccountDAO(transaction);
@@ -218,7 +218,7 @@
if (account == null) {
String accountId = PollenContext.createPollenUrlId();
account = pollAccountDAO.create(accountId);
- ConverterHelper.convert(accountDTO, account);
+ PollenConverter.convert(accountDTO, account);
}
// Create association between VotingList and PollAccount
@@ -241,14 +241,14 @@
Poll pollEntity = pollDAO.findByTopiaId(pollDTO.getId());
- ConverterHelper.convert(pollDTO, pollEntity);
+ PollenConverter.convert(pollDTO, pollEntity);
ChoiceDAO choiceDAO = PollenModelDAOHelper.getChoiceDAO(transaction);
// ** Update choices (no add, no remove)
for (ChoiceDTO choiceDTO : pollDTO.getChoiceDTOs()) {
Choice choice = choiceDAO.findByTopiaId(choiceDTO.getId());
- ConverterHelper.convert(choiceDTO, choice);
+ PollenConverter.convert(choiceDTO, choice);
choice.update();
}
@@ -295,7 +295,8 @@
return true;
} catch (Exception eee) {
PollenContext.doCatch(eee,
- _("pollen.error.servicePoll.delete", pollId), transaction);
+ _("pollen.error.servicePoll.deletePoll", pollId),
+ transaction);
return false;
} finally {
PollenContext.doFinally(transaction);
@@ -323,7 +324,7 @@
Poll pollEntity = pollDAO.findByTopiaId(id);
if (pollEntity != null) {
- result = ConverterHelper.convert(pollEntity, new PollDTO());
+ result = PollenConverter.convert(pollEntity, new PollDTO());
}
// if (pollEntity != null) {
@@ -359,33 +360,33 @@
Poll pollEntity = pollDAO.findByPollId(pollId);
if (pollEntity != null) {
- result = ConverterHelper.convert(pollEntity, new PollDTO());
+ result = PollenConverter.convert(pollEntity, new PollDTO());
// Load choices
for (Choice choice : pollEntity.getChoice()) {
ChoiceDTO dto =
- ConverterHelper.convert(choice, new ChoiceDTO());
+ PollenConverter.convert(choice, new ChoiceDTO());
result.addChoice(dto);
}
// Load votes
for (Vote vote : pollEntity.getVote()) {
VoteDTO dto =
- ConverterHelper.convert(vote, new VoteDTO());
+ PollenConverter.convert(vote, new VoteDTO());
result.addVote(dto);
}
// Load comments
for (Comment comment : pollEntity.getComment()) {
CommentDTO dto =
- ConverterHelper.convert(comment, new CommentDTO());
+ PollenConverter.convert(comment, new CommentDTO());
result.addComment(dto);
}
// Load preventRules
for (PreventRule rule : pollEntity.getPreventRule()) {
PreventRuleDTO dto =
- ConverterHelper.convert(rule, new PreventRuleDTO());
+ PollenConverter.convert(rule, new PreventRuleDTO());
result.addPreventRule(dto);
}
@@ -661,7 +662,7 @@
// Create the new comment
CommentDAO dao = PollenModelDAOHelper.getCommentDAO(transaction);
Comment eComment =
- ConverterHelper.convert(comment, dao.create());
+ PollenConverter.convert(comment, dao.create());
// Get the poll entity corresponding
Poll ePoll = PollenModelDAOHelper.getPollDAO(transaction).
@@ -701,6 +702,8 @@
Poll ePoll = PollenModelDAOHelper.getPollDAO(transaction).
findByTopiaId(poll.getId());
+ // The remove will delete the comment because no poll will be
+ // attached to him (delete-orphan)
ePoll.removeComment(eComment);
transaction.commitTransaction();
@@ -710,7 +713,8 @@
} catch (Exception eee) {
PollenContext.doCatch(eee,
- _("pollen.error.servicePoll.deleteComment"), transaction);
+ _("pollen.error.servicePoll.deleteComment", commentId,
+ poll.getTitle(), poll.getId()), transaction);
} finally {
PollenContext.doFinally(transaction);
}
Modified: trunk/pollen-business/src/main/java/org/chorem/pollen/business/utils/PropertiesLoader.java
===================================================================
--- trunk/pollen-business/src/main/java/org/chorem/pollen/business/utils/PropertiesLoader.java 2010-02-25 12:07:51 UTC (rev 2884)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/utils/PropertiesLoader.java 2010-02-25 13:13:26 UTC (rev 2885)
@@ -28,7 +28,10 @@
*
* @author rannou
* @version $Id$
+ * @deprecated use {@link org.chorem.pollen.business.PollenContext } to manage
+ * configuration using {@link org.nuiton.util.ApplicationConfig }
*/
+@Deprecated
public class PropertiesLoader {
/** log. */
Modified: trunk/pollen-business/src/main/resources/i18n/pollen-business-en_GB.properties
===================================================================
--- trunk/pollen-business/src/main/resources/i18n/pollen-business-en_GB.properties 2010-02-25 12:07:51 UTC (rev 2884)
+++ trunk/pollen-business/src/main/resources/i18n/pollen-business-en_GB.properties 2010-02-25 13:13:26 UTC (rev 2885)
@@ -8,6 +8,7 @@
pollen.error.servicePoll.createPoll=
pollen.error.servicePoll.delete=
pollen.error.servicePoll.deleteComment=
+pollen.error.servicePoll.deletePoll=
pollen.error.servicePoll.getAllPolls=
pollen.error.servicePoll.getPoll=
pollen.error.servicePoll.updatePoll=
Modified: trunk/pollen-business/src/main/resources/i18n/pollen-business-fr_FR.properties
===================================================================
--- trunk/pollen-business/src/main/resources/i18n/pollen-business-fr_FR.properties 2010-02-25 12:07:51 UTC (rev 2884)
+++ trunk/pollen-business/src/main/resources/i18n/pollen-business-fr_FR.properties 2010-02-25 13:13:26 UTC (rev 2885)
@@ -6,9 +6,8 @@
pollen.error.context.stop=Erreur lors de l'arr\u00EAt de l'application
pollen.error.servicePoll.addComment=Impossible d'ajouter un nouveau commentaire cr\u00E9\u00E9 par %1$s pour le sondage %2$s (%3$s)
pollen.error.servicePoll.createPoll=Impossible d'enregistrer le sondage %1$s cr\u00E9\u00E9 par %2$s
-pollen.error.servicePoll.delete=
-pollen.error.servicePoll.deleteComment=
-pollen.error.servicePoll.deletePoll=Impossible de supprimer le sondage ayant pour identifiant ToPIA \: %1$s
+pollen.error.servicePoll.deleteComment=Impossible de supprimer le commentaire ayant pour identifiant "%1$s", appartenenant au sondage %2$s (%3$s)
+pollen.error.servicePoll.deletePoll=Impossible de supprimer le sondage ayant pour identifiant "%1$s"
pollen.error.servicePoll.getAllPolls=
pollen.error.servicePoll.getPoll=
pollen.error.servicePoll.updatePoll=Impossible de mettre \u00E0 jour le sondage %1$s (%2$s)
Modified: trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/components/HeadLink.java
===================================================================
--- trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/components/HeadLink.java 2010-02-25 12:07:51 UTC (rev 2884)
+++ trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/components/HeadLink.java 2010-02-25 13:13:26 UTC (rev 2885)
@@ -31,7 +31,6 @@
import org.apache.tapestry5.annotations.Parameter;
import org.apache.tapestry5.ioc.annotations.Inject;
import org.apache.tapestry5.services.Response;
-import org.chorem.pollen.business.PollenBusinessException;
import org.chorem.pollen.ui.base.ContextLink;
import org.slf4j.Logger;
@@ -82,7 +81,13 @@
writer.end();
}
- /** Affichage du fichier */
+ /**
+ * Affichage du fichier
+ *
+ * @param href
+ * @param type
+ * @return StreamResponse
+ */
public StreamResponse onFileLink(final String href, final String type) {
// security : src containing .. are filtered, to not access to full system
@@ -111,14 +116,17 @@
this.contentType = contentType;
}
+ @Override
public String getContentType() {
return contentType;
}
+ @Override
public InputStream getStream() throws IOException {
return stream;
}
+ @Override
public void prepareResponse(Response arg0) {
}
Modified: trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/filters/PollenExceptionsFilter.java
===================================================================
--- trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/filters/PollenExceptionsFilter.java 2010-02-25 12:07:51 UTC (rev 2884)
+++ trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/filters/PollenExceptionsFilter.java 2010-02-25 13:13:26 UTC (rev 2885)
@@ -11,7 +11,6 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.chorem.pollen.business.utils.ContextUtil;
/**
* Filtre permettant de capturer les exceptions. Ce filtre capture les
@@ -47,14 +46,14 @@
// capture des exceptions
try {
chain.doFilter(request, response);
- } catch (Exception e) {
+ } catch (Exception eee) {
if (log.isDebugEnabled()) {
- log.debug("Exception capturée", e);
+ log.debug("Exception capturée", eee);
}
// si la connexion est fermée, reconnexion et affichage d'un message
- ContextUtil.getInstance().buildContext();
+ //ContextUtil.getInstance().buildContext();
}
}
1
0
Author: fdesbois
Date: 2010-02-25 13:07:51 +0100 (Thu, 25 Feb 2010)
New Revision: 2884
Added:
trunk/pollen-business/src/main/java/org/chorem/pollen/business/PollenBusinessException.java
trunk/pollen-business/src/main/java/org/chorem/pollen/business/PollenContext.java
trunk/pollen-business/src/main/java/org/chorem/pollen/business/PollenProperty.java
trunk/pollen-business/src/main/resources/pollen.properties
trunk/pollen-business/src/test/java/org/chorem/pollen/business/TestManager.java
trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/services/PollenManager.java
Removed:
trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/services/Configuration.java
trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/services/ConfigurationImpl.java
trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/services/PollenShutdown.java
trunk/pollen-ui/src/main/resources/pollen.properties
Modified:
trunk/pollen-business/pom.xml
trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataPollConverter.java
trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServiceAuthImpl.java
trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServiceChoiceImpl.java
trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServiceListImpl.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/ServicePollAccountImpl.java
trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServicePollImpl.java
trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServicePreventRuleImpl.java
trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServiceResultsImpl.java
trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServiceUserImpl.java
trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServiceVoteImpl.java
trunk/pollen-business/src/main/java/org/chorem/pollen/business/utils/ContextUtil.java
trunk/pollen-business/src/main/resources/i18n/pollen-business-en_GB.properties
trunk/pollen-business/src/main/resources/i18n/pollen-business-fr_FR.properties
trunk/pollen-business/src/test/java/org/chorem/pollen/business/TestData.java
trunk/pollen-business/src/test/java/org/chorem/pollen/business/services/ServiceAuthImplTest.java
trunk/pollen-business/src/test/java/org/chorem/pollen/business/services/ServiceChoiceImplTest.java
trunk/pollen-business/src/test/java/org/chorem/pollen/business/services/ServiceListImplTest.java
trunk/pollen-business/src/test/java/org/chorem/pollen/business/services/ServicePollImplTest.java
trunk/pollen-business/src/test/java/org/chorem/pollen/business/services/ServicePreventRuleImplTest.java
trunk/pollen-business/src/test/java/org/chorem/pollen/business/services/ServiceUserImplTest.java
trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/base/ContextLink.java
trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/components/Border.java
trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/components/FeedContextLink.java
trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/components/FileLink.java
trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/components/HeadLink.java
trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/components/Image.java
trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/components/ImageContextLink.java
trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/pages/admin/UsersAdmin.java
trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/pages/poll/ImageDisplay.java
trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/pages/poll/PollCreation.java
trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/pages/poll/PollModification.java
trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/pages/poll/Results.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/pages/user/Register.java
trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/services/AppModule.java
trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/services/BackgroundWorkerImpl.java
trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/services/PropertiesFileSymbolProvider.java
Log:
- Move pollen.properties from UI to Business
- Add PollenContext to replace ContextUtil deprecated
- Add PollenProperty enum to easily get existing properties in configuration file
- Refactor UI to use PollenContext to get properties
- Refactor services to use PollenContext to get root context
- Add TestManager to start and stop tests (use different configuration than default one)
Modified: trunk/pollen-business/pom.xml
===================================================================
--- trunk/pollen-business/pom.xml 2010-02-24 16:19:22 UTC (rev 2883)
+++ trunk/pollen-business/pom.xml 2010-02-25 12:07:51 UTC (rev 2884)
@@ -137,19 +137,6 @@
<goal>parserJava</goal>
<goal>gen</goal>
</goals>
- <!-- restrict parsing beacause this is expensive -->
- <!-- if you want to parse more, add your package in includes -->
- <configuration>
- <treateDefaultEntry>false</treateDefaultEntry>
- <entries>
- <entry>
- <basedir>${maven.src.dir}/main/java</basedir>
- <includes>
- <include>org/nuiton/topia/framework/*.java</include>
- </includes>
- </entry>
- </entries>
- </configuration>
</execution>
</executions>
</plugin>
Added: trunk/pollen-business/src/main/java/org/chorem/pollen/business/PollenBusinessException.java
===================================================================
--- trunk/pollen-business/src/main/java/org/chorem/pollen/business/PollenBusinessException.java (rev 0)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/PollenBusinessException.java 2010-02-25 12:07:51 UTC (rev 2884)
@@ -0,0 +1,41 @@
+
+package org.chorem.pollen.business;
+import static org.nuiton.i18n.I18n._;
+
+/**
+ * PollenBusinessException
+ *
+ * Created: 24 févr. 2010
+ *
+ * @author fdesbois
+ * @version $Revision$
+ *
+ * Mise a jour: $Date$
+ * par : $Author$
+ */
+public class PollenBusinessException extends Exception {
+
+ private static final long serialVersionUID = 1L;
+
+ protected PollenExceptionType type;
+
+ public PollenBusinessException(PollenExceptionType type) {
+ super(type.toString());
+ }
+
+ public enum PollenExceptionType {
+ LOAD_CONFIGURATION(_("pollen.exception.load_configuration"));
+
+ private String name;
+
+ PollenExceptionType(String name) {
+ this.name = name;
+ }
+
+ @Override
+ public String toString() {
+ return name;
+ }
+
+ }
+}
Property changes on: trunk/pollen-business/src/main/java/org/chorem/pollen/business/PollenBusinessException.java
___________________________________________________________________
Added: svn:keywords
+ "Author Date Id Revision HeadURL"
Added: trunk/pollen-business/src/main/java/org/chorem/pollen/business/PollenContext.java
===================================================================
--- trunk/pollen-business/src/main/java/org/chorem/pollen/business/PollenContext.java (rev 0)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/PollenContext.java 2010-02-25 12:07:51 UTC (rev 2884)
@@ -0,0 +1,257 @@
+
+package org.chorem.pollen.business;
+
+import java.util.Properties;
+import java.util.UUID;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.chorem.pollen.business.PollenBusinessException.PollenExceptionType;
+import org.chorem.pollen.business.persistence.PollenModelDAOHelper;
+import org.chorem.pollen.business.services.ServiceUserImpl;
+import org.nuiton.i18n.I18n;
+import org.nuiton.topia.TopiaContext;
+import org.nuiton.topia.TopiaContextFactory;
+import org.nuiton.topia.TopiaException;
+import org.nuiton.topia.TopiaNotFoundException;
+import org.nuiton.util.ApplicationConfig;
+import org.nuiton.util.ArgumentsParserException;
+import static org.nuiton.i18n.I18n._;
+
+/**
+ * PollenContext
+ *
+ * Created: 24 févr. 2010
+ *
+ * @author fdesbois
+ * @version $Revision$
+ *
+ * Mise a jour: $Date$
+ * par : $Author$
+ */
+public class PollenContext {
+
+ /** log. */
+ private static final Log log = LogFactory.getLog(PollenContext.class);
+
+ public static final String DEFAULT_FILENAME = "pollen.properties";
+
+ private static ApplicationConfig configuration;
+
+ /**
+ * Default configuration file will be loaded using
+ * {@link org.nuiton.util.ApplicationConfig }.
+ * Then the other configuration initialization will be done in
+ * {@link #loadConfiguration(ApplicationConfig)} method.
+ */
+ private static void loadDefaultConfiguration() {
+ try {
+ if (log.isInfoEnabled()) {
+ log.info("load default configuration from " +
+ PollenContext.DEFAULT_FILENAME);
+ }
+ ApplicationConfig conf = new ApplicationConfig();
+ conf.setConfigFileName(PollenContext.DEFAULT_FILENAME);
+ conf.parse(new String[]{});
+
+ conf.printConfig();
+
+ loadConfiguration(conf);
+ } catch (ArgumentsParserException eee) {
+ doCatch(eee,
+ _("pollen.error.context.parse", PollenContext.DEFAULT_FILENAME));
+ }
+ }
+
+ /**
+ * Load the application configuration :
+ * <pre>
+ * - Add entities implementation classes for Topia-persistence
+ * - Add model version for Topia-migration-service
+ * </pre>
+ *
+ * @param conf ApplicationConfig
+ */
+ public static void loadConfiguration(ApplicationConfig conf) {
+ configuration = conf;
+ configuration.setOption("topia.persistence.classes",
+ PollenModelDAOHelper.getImplementationClassesAsString());
+ configuration.setOption("topia.service.migration.version",
+ PollenModelDAOHelper.getModelVersion());
+ }
+
+ /**
+ * Start of the application. The application configuration will be loaded
+ * automatically if needed using {@link #loadDefaultConfiguration }. Also
+ * you can manually load the configuration using
+ * {@link #loadConfiguration(ApplicationConfig)}
+ * This start does :
+ * <pre>
+ * - Initialize i18n for error messages
+ * - Create default admin if needed (this will load the topiaRootContext).
+ * </pre>
+ *
+ */
+ public static void start() {
+ try {
+ I18n.init();
+
+ ServiceUserImpl serviceUser = new ServiceUserImpl();
+ serviceUser.createDefaultAdmin(
+ PollenProperty.ADMIN_LOGIN.getValue(),
+ PollenProperty.ADMIN_PASSWORD.getValue(),
+ PollenProperty.ADMIN_EMAIL.getValue()
+ );
+
+ if (log.isInfoEnabled()) {
+ log.info("pollen is started !");
+ }
+
+ } catch (Exception eee) {
+ doCatch(eee, _("pollen.error.context.start"));
+ }
+ }
+
+ /**
+ * Stop the application. Close the Topia rootContext.
+ */
+ public static void stop() {
+ try {
+ getRootContext().closeContext();
+ } catch (Exception eee) {
+ doCatch(eee, _("pollen.error.context.stop"));
+ }
+ }
+
+ /**
+ * Get a property from the configuration.
+ *
+ * @param property PollenProperty
+ * @return value of this property
+ * @
+ */
+ public static String getProperty(PollenProperty property) {
+ return getConfiguration().getOption(property.getKey());
+ }
+
+ /**
+ * Get a property from the configuration.
+ *
+ * @param key of the property
+ * @return value of this property
+ * @
+ */
+ public static String getProperty(String key) {
+ return getConfiguration().getOption(key);
+ }
+
+ /**
+ * Get all properties from the configuration
+ *
+ * @return the Properties of the application
+ * @
+ */
+ public static Properties getProperties() {
+ return getConfiguration().getOptions();
+ }
+
+ /**
+ * Get the configuration of the application.
+ *
+ * @return the ApplicationConfig
+ * @
+ */
+ public static ApplicationConfig getConfiguration() {
+ if (configuration == null) {
+ loadDefaultConfiguration();
+ }
+ return configuration;
+ }
+
+ /**
+ * Get the Topia rootContext.
+ *
+ * @return the main TopiaContext needed to begin new transaction
+ * @
+ */
+ public static TopiaContext getRootContext() {
+ try {
+ return TopiaContextFactory.getContext(getProperties());
+ } catch (TopiaNotFoundException eee) {
+ doCatch(eee, _("pollen.error.context.getRootContext"));
+ }
+ return null;
+ }
+
+ /**
+ * Manage exceptions. The {@code exception} will be embedded in a
+ * PollenException with the {@code message} provided.
+ * Used in catch statement in services.
+ *
+ * @param eee the exception to manage
+ * @param message the message to add to the new PollenException
+ * @throws PollenException which contains the exception as the cause
+ */
+ public static void doCatch(Exception eee, String message) throws PollenException {
+ doCatch(eee, message, null);
+ }
+
+ /**
+ * Manage exceptions. The {@code exception} will be embedded in a
+ * PollenException with the {@code message} provided. Also, the current
+ * {@code transaction} will be rollback.
+ * Used in catch statement in services.
+ *
+ * @param eee the exception to manage
+ * @param message the message to add to the new PollenException
+ * @param transaction the current TopiaContext
+ * @throws PollenException
+ */
+ public static void doCatch(Exception eee, String message, TopiaContext transaction) throws PollenException {
+ if (log.isErrorEnabled()) {
+ log.error(message, eee);
+ }
+
+ // rollback de la transaction courante
+ if (transaction != null) {
+ try {
+ transaction.rollbackTransaction();
+ } catch (TopiaException ex) {
+ if (log.isErrorEnabled()) {
+ log.error(_("pollen.error.context.rollback"), ex);
+ }
+ }
+ }
+ // PollenBusinessException must be managed (catch and throw) when needed
+// if (! (eee instanceof PollenBusinessException)) {
+ throw new PollenException(message, eee);
+// }
+ }
+
+ /**
+ * Close current TopiaContext.
+ * Used in finally statement in services.
+ *
+ * @param transaction current TopiaContext
+ */
+ public static void doFinally(TopiaContext transaction) {
+ if (transaction != null) {
+ try {
+ transaction.closeContext();
+ } catch (TopiaException eee) {
+ if (log.isErrorEnabled()) {
+ log.error(_("pollen.error.context.close"), eee);
+ }
+ }
+ }
+ }
+
+ /**
+ * Create an id to easily managed polls using urls.
+ *
+ * @return a fresh generated String
+ */
+ public static String createPollenUrlId() {
+ return UUID.randomUUID().toString().replaceAll("-", "");
+ }
+
+}
Property changes on: trunk/pollen-business/src/main/java/org/chorem/pollen/business/PollenContext.java
___________________________________________________________________
Added: svn:keywords
+ "Author Date Id Revision HeadURL"
Added: trunk/pollen-business/src/main/java/org/chorem/pollen/business/PollenProperty.java
===================================================================
--- trunk/pollen-business/src/main/java/org/chorem/pollen/business/PollenProperty.java (rev 0)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/PollenProperty.java 2010-02-25 12:07:51 UTC (rev 2884)
@@ -0,0 +1,56 @@
+
+package org.chorem.pollen.business;
+
+/**
+ * PollenProp
+ *
+ * Created: 25 févr. 2010
+ *
+ * @author fdesbois
+ * @version $Revision$
+ *
+ * Mise a jour: $Date$
+ * par : $Author$
+ */
+public enum PollenProperty {
+ /** version of the application (maven version) **/
+ APP_VERSION("version"),
+ /** url of the server **/
+ SERVER_URL("siteUrl"),
+ /** login for default admin **/
+ ADMIN_LOGIN("adminLogin"),
+ /** password for default admin **/
+ ADMIN_PASSWORD("adminPassword"),
+ /** email for default admin **/
+ ADMIN_EMAIL("adminEmail"),
+ /** email for contact link **/
+ CONTACT_EMAIL(ADMIN_EMAIL.getKey()),
+ /** host for email sending configuration **/
+ EMAIL_HOST("email_host"),
+ /** port for email sending configuration **/
+ EMAIL_PORT("email_port"),
+ /** from for email sending configuration **/
+ EMAIL_FROM("email_from"),
+ /** path for feed directory **/
+ FEED_DIR("feedDir"),
+ /** path for uploaded images directory **/
+ IMG_DIR("upImgDir");
+
+ String key;
+
+ PollenProperty(String key) {
+ this.key = key;
+ }
+
+ public String getKey() {
+ return key;
+ }
+
+ public String getValue() {
+ return PollenContext.getProperty(this);
+ }
+
+ public boolean hasValue() {
+ return !getValue().equals("");
+ }
+}
Property changes on: trunk/pollen-business/src/main/java/org/chorem/pollen/business/PollenProperty.java
___________________________________________________________________
Added: svn:keywords
+ "Author Date Id Revision HeadURL"
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 16:19:22 UTC (rev 2883)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataPollConverter.java 2010-02-25 12:07:51 UTC (rev 2884)
@@ -22,6 +22,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.chorem.pollen.business.PollenBusinessException;
import org.chorem.pollen.business.dto.ChoiceDTO;
import org.chorem.pollen.business.dto.CommentDTO;
import org.chorem.pollen.business.dto.PollDTO;
@@ -140,7 +141,7 @@
*/
@Deprecated
public void persistChoices(PollDTO pollDTO, Poll ePoll)
- throws TopiaException {
+ throws TopiaException, PollenBusinessException {
// mise à jour ou création des choix
ServiceChoice sChoice = new ServiceChoiceImpl();
@@ -181,7 +182,7 @@
* @param ePoll l'entité sondage
*/
public void persistPreventRules(PollDTO pollDTO, Poll ePoll)
- throws TopiaException {
+ throws TopiaException, PollenBusinessException {
// mise à jour ou création des règles de notification
ServicePreventRule sPreventRule = new ServicePreventRuleImpl();
Modified: trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServiceAuthImpl.java
===================================================================
--- trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServiceAuthImpl.java 2010-02-24 16:19:22 UTC (rev 2883)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServiceAuthImpl.java 2010-02-25 12:07:51 UTC (rev 2884)
@@ -18,6 +18,8 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.chorem.pollen.business.PollenBusinessException;
+import org.chorem.pollen.business.PollenContext;
import org.chorem.pollen.business.converters.DataUserConverter;
import org.chorem.pollen.business.dto.UserDTO;
import org.chorem.pollen.business.persistence.PollenModelDAOHelper;
@@ -34,7 +36,8 @@
* @version $Id$
*/
public class ServiceAuthImpl implements ServiceAuth {
- private TopiaContext rootContext = ContextUtil.getInstance().getContext();
+
+ private TopiaContext rootContext;
private UserAccountDAO userDAO = null;
private DataUserConverter converter = new DataUserConverter();
@@ -42,6 +45,7 @@
private static final Log log = LogFactory.getLog(ServiceAuthImpl.class);
public ServiceAuthImpl() {
+ rootContext = PollenContext.getRootContext();
}
@Override
Modified: trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServiceChoiceImpl.java
===================================================================
--- trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServiceChoiceImpl.java 2010-02-24 16:19:22 UTC (rev 2883)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServiceChoiceImpl.java 2010-02-25 12:07:51 UTC (rev 2884)
@@ -23,6 +23,8 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.chorem.pollen.business.PollenBusinessException;
+import org.chorem.pollen.business.PollenContext;
import org.chorem.pollen.business.converters.DataChoiceConverter;
import org.chorem.pollen.business.dto.ChoiceDTO;
import org.chorem.pollen.business.persistence.Choice;
@@ -30,7 +32,6 @@
import org.chorem.pollen.business.persistence.PollenModelDAOHelper;
import org.chorem.pollen.business.utils.ContextUtil;
import org.nuiton.topia.TopiaContext;
-import org.nuiton.topia.TopiaException;
/**
* Gestion des choix d'un sondage.
@@ -38,9 +39,9 @@
* @author enema
* @version $Id$
*/
-public class ServiceChoiceImpl implements
- org.chorem.pollen.business.services.ServiceChoice {
- private TopiaContext rootContext = ContextUtil.getInstance().getContext();
+public class ServiceChoiceImpl implements ServiceChoice {
+
+ private TopiaContext rootContext;
private ChoiceDAO choiceDAO = null;
private DataChoiceConverter converter = new DataChoiceConverter();
@@ -48,6 +49,7 @@
private static final Log log = LogFactory.getLog(ServiceChoiceImpl.class);
public ServiceChoiceImpl() {
+ rootContext = PollenContext.getRootContext();
}
@Override
Modified: trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServiceListImpl.java
===================================================================
--- trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServiceListImpl.java 2010-02-24 16:19:22 UTC (rev 2883)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServiceListImpl.java 2010-02-25 12:07:51 UTC (rev 2884)
@@ -22,6 +22,8 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.chorem.pollen.business.PollenBusinessException;
+import org.chorem.pollen.business.PollenContext;
import org.chorem.pollen.business.converters.DataPersonListConverter;
import org.chorem.pollen.business.converters.DataVotingListConverter;
import org.chorem.pollen.business.dto.PersonListDTO;
@@ -45,7 +47,8 @@
* @version $Id$
*/
public class ServiceListImpl implements ServiceList {
- private TopiaContext rootContext = ContextUtil.getInstance().getContext();
+
+ private TopiaContext rootContext;
private VotingListDAO votingListDAO = null;
private PersonListDAO personListDAO = null;
private DataVotingListConverter votingListConverter = new DataVotingListConverter();
@@ -55,6 +58,7 @@
private static final Log log = LogFactory.getLog(ServiceListImpl.class);
public ServiceListImpl() {
+ rootContext = PollenContext.getRootContext();
}
@Override
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 16:19:22 UTC (rev 2883)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServicePoll.java 2010-02-25 12:07:51 UTC (rev 2884)
@@ -59,13 +59,15 @@
*
* @param pollId identifiant topia du sondage
* @return le sondage
+ * @deprecated use {@link #findPollByPollId } with the correct id instead
*/
+ @Deprecated
public PollDTO findPollById(String pollId);
/**
* Récupération d'un sondage à partir de son identifiant.
*
- * @param pollId identifiant du sondage
+ * @param pollId identifiant du sondage (différent du topiaId)
* @return le sondage
*/
public PollDTO findPollByPollId(String pollId);
@@ -122,18 +124,18 @@
public List<PollDTO> selectPolls(Map<String, Object> properties);
/**
- * Ajout d'un vote à un sondage
+ * Create a comment for the poll.
*
- * @param pollId identifiant topia du sondage
- * @param voteId l'identiiant topiaId du vote
- * @return true si le vote a été ajouté
- * @deprecated useless method : used nowhere
+ * @param poll owner of the comment
+ * @param comment to create
*/
- @Deprecated
- public boolean addVoteToPoll(String pollId, String voteId);
-
-
public void createComment(PollDTO poll, CommentDTO comment);
+ /**
+ * Delete a comment from a poll.
+ *
+ * @param poll owner of the comment
+ * @param commentId id of the comment to delete
+ */
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/ServicePollAccountImpl.java
===================================================================
--- trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServicePollAccountImpl.java 2010-02-24 16:19:22 UTC (rev 2883)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServicePollAccountImpl.java 2010-02-25 12:07:51 UTC (rev 2884)
@@ -23,6 +23,8 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.chorem.pollen.business.PollenBusinessException;
+import org.chorem.pollen.business.PollenContext;
import org.chorem.pollen.business.converters.DataPollAccountConverter;
import org.chorem.pollen.business.dto.PollAccountDTO;
import org.chorem.pollen.business.persistence.PollAccount;
@@ -41,7 +43,8 @@
* @version $Id$
*/
public class ServicePollAccountImpl implements ServicePollAccount {
- private TopiaContext rootContext = ContextUtil.getInstance().getContext();
+
+ private TopiaContext rootContext;
private PollAccountDAO pollAccountDAO = null;
private DataPollAccountConverter converter = new DataPollAccountConverter();
@@ -50,6 +53,7 @@
.getLog(ServicePollAccountImpl.class);
public ServicePollAccountImpl() {
+ rootContext = PollenContext.getRootContext();
}
@Override
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 16:19:22 UTC (rev 2883)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServicePollImpl.java 2010-02-25 12:07:51 UTC (rev 2884)
@@ -25,6 +25,8 @@
import java.util.Set;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.chorem.pollen.business.PollenBusinessException;
+import org.chorem.pollen.business.PollenContext;
import org.chorem.pollen.business.converters.ConverterHelper;
import org.chorem.pollen.business.converters.DataPollConverter;
import org.chorem.pollen.business.converters.DataVotingListConverter;
@@ -50,10 +52,10 @@
import org.chorem.pollen.business.persistence.UserAccount;
import org.chorem.pollen.business.persistence.UserAccountDAO;
import org.chorem.pollen.business.persistence.Vote;
-import org.chorem.pollen.business.persistence.VoteDAO;
import org.chorem.pollen.business.persistence.VotingList;
import org.chorem.pollen.business.persistence.VotingListDAO;
import org.chorem.pollen.business.utils.ContextUtil;
+import org.chorem.pollen.business.PollenContext;
import org.nuiton.topia.TopiaContext;
import org.nuiton.topia.TopiaException;
import static org.nuiton.i18n.I18n._;
@@ -66,14 +68,17 @@
* @version $Id$
*/
public class ServicePollImpl implements ServicePoll {
- private TopiaContext rootContext = ContextUtil.getInstance().getContext();
+
+ private TopiaContext rootContext;
private PollDAO pollDAO = null;
private DataPollConverter converter = new DataPollConverter();
/** log. */
private static final Log log = LogFactory.getLog(ServicePollImpl.class);
- public ServicePollImpl() {
+ public ServicePollImpl() {
+ rootContext = PollenContext.getRootContext();
+
ConverterHelper.preparePollConverters();
ConverterHelper.prepareChoiceConverters();
ConverterHelper.prepareVotingListConverters();
@@ -93,7 +98,7 @@
pollDAO = PollenModelDAOHelper.getPollDAO(transaction);
// Create with a new pollId generated for links
- Poll entity = pollDAO.create(ContextUtil.createPollenUrlId());
+ Poll entity = pollDAO.create(PollenContext.createPollenUrlId());
ConverterHelper.convert(pollDTO, entity);
// ** Manage the poll creator
@@ -131,11 +136,11 @@
result = entity.getTopiaId();
} catch (Exception eee) {
- ContextUtil.doCatch(eee, transaction,
+ PollenContext.doCatch(eee,
_("pollen.error.servicePoll.createPoll",
- pollDTO.getTitle(), pollDTO.getCreatorId()));
+ pollDTO.getTitle(), pollDTO.getCreatorId()), transaction);
} finally {
- ContextUtil.doFinally(transaction);
+ PollenContext.doFinally(transaction);
}
return result;
}
@@ -177,7 +182,7 @@
// Create new account if account properties changed or no user found
if (creator == null) {
accountProperties.put(
- PollAccount.ACCOUNT_ID, ContextUtil.createPollenUrlId());
+ PollAccount.ACCOUNT_ID, PollenContext.createPollenUrlId());
creator = accountDAO.create(accountProperties);
}
return creator;
@@ -211,7 +216,7 @@
// Create a new PollAccount if not already exists
if (account == null) {
- String accountId = ContextUtil.createPollenUrlId();
+ String accountId = PollenContext.createPollenUrlId();
account = pollAccountDAO.create(accountId);
ConverterHelper.convert(accountDTO, account);
}
@@ -260,13 +265,13 @@
}
return true;
- } catch (Exception e) {
- ContextUtil.doCatch(e, transaction,
+ } catch (Exception eee) {
+ PollenContext.doCatch(eee,
_("pollen.error.servicePoll.updatePoll",
- pollDTO.getTitle(), pollDTO.getPollId()));
+ pollDTO.getTitle(), pollDTO.getPollId()), transaction);
return false;
} finally {
- ContextUtil.doFinally(transaction);
+ PollenContext.doFinally(transaction);
}
}
@@ -288,11 +293,12 @@
}
return true;
- } catch (Exception e) {
- ContextUtil.doCatch(e, transaction);
+ } catch (Exception eee) {
+ PollenContext.doCatch(eee,
+ _("pollen.error.servicePoll.delete", pollId), transaction);
return false;
} finally {
- ContextUtil.doFinally(transaction);
+ PollenContext.doFinally(transaction);
}
}
@@ -337,7 +343,7 @@
ContextUtil.doCatch(e, transaction);
return null;
} finally {
- ContextUtil.doFinally(transaction);
+ PollenContext.doFinally(transaction);
}
}
@@ -353,9 +359,6 @@
Poll pollEntity = pollDAO.findByPollId(pollId);
if (pollEntity != null) {
-// converter.setTransaction(transaction);
-// result = converter.createPollDTO(pollEntity);
-
result = ConverterHelper.convert(pollEntity, new PollDTO());
// Load choices
@@ -386,24 +389,7 @@
result.addPreventRule(dto);
}
-// if (ePoll.getChoice().size() > 0) {
-// pollDTO.setChoiceDTOs(choiceConverter.createChoiceDTOs(ePoll
-// .getChoice()));
-// }
-// if (pollEntity.getVote().size() > 0) {
-// DataVoteConverter voteConverter = new DataVoteConverter();
-// result.setVoteDTOs(voteConverter.createVoteDTOs(pollEntity.getVote()));
-// }
-// if (pollEntity.getComment().size() > 0) {
-// DataCommentConverter commentConverter = new DataCommentConverter();
-// result.setCommentDTOs(commentConverter.createCommentDTOs(pollEntity
-// .getComment()));
-// }
-// if (pollEntity.getPreventRule().size() > 0) {
-// DataPreventRuleConverter preventRuleConverter = new DataPreventRuleConverter();
-// result.setPreventRuleDTOs(preventRuleConverter
-// .createPreventRuleDTOs(pollEntity.getPreventRule()));
-// }
+ // TODO Refactor this
if (pollEntity.getVotingList().size() > 0) {
DataVotingListConverter votingListConverter = new DataVotingListConverter();
result.setVotingListDTOs(votingListConverter
@@ -419,11 +405,12 @@
}
return result;
- } catch (Exception e) {
- ContextUtil.doCatch(e, transaction);
+ } catch (Exception eee) {
+ PollenContext.doCatch(eee,
+ _("pollen.error.servicePoll.getPoll", pollId), transaction);
return null;
} finally {
- ContextUtil.doFinally(transaction);
+ PollenContext.doFinally(transaction);
}
}
@@ -454,7 +441,7 @@
ContextUtil.doCatch(e, transaction);
return null;
} finally {
- ContextUtil.doFinally(transaction);
+ PollenContext.doFinally(transaction);
}
}
@@ -489,7 +476,7 @@
ContextUtil.doCatch(e, transaction);
return null;
} finally {
- ContextUtil.doFinally(transaction);
+ PollenContext.doFinally(transaction);
}
}
@@ -527,7 +514,7 @@
ContextUtil.doCatch(e, transaction);
return null;
} finally {
- ContextUtil.doFinally(transaction);
+ PollenContext.doFinally(transaction);
}
}
@@ -580,7 +567,7 @@
ContextUtil.doCatch(e, transaction);
return null;
} finally {
- ContextUtil.doFinally(transaction);
+ PollenContext.doFinally(transaction);
}
}
@@ -622,7 +609,7 @@
ContextUtil.doCatch(e, transaction);
return null;
} finally {
- ContextUtil.doFinally(transaction);
+ PollenContext.doFinally(transaction);
}
}
@@ -656,48 +643,16 @@
}
return results;
- } catch (Exception e) {
- ContextUtil.doCatch(e, transaction);
+ } catch (Exception eee) {
+ PollenContext.doCatch(eee,
+ _("pollen.error.servicePoll.getAllPolls"), transaction);
return null;
} finally {
- ContextUtil.doFinally(transaction);
+ PollenContext.doFinally(transaction);
}
}
@Override
- public boolean addVoteToPoll(String pollId, String voteId) {
- TopiaContext transaction = null;
- try {
- transaction = rootContext.beginTransaction();
-
- pollDAO = PollenModelDAOHelper.getPollDAO(transaction);
- Poll pollEntity = pollDAO.findByTopiaId(pollId);
- VoteDAO voteDAO = PollenModelDAOHelper.getVoteDAO(transaction);
- Vote voteEntity = voteDAO.findByTopiaId(voteId);
-
- if (log.isDebugEnabled()) {
- log.debug(pollEntity + " " + voteEntity);
- }
-
- pollEntity.addVote(voteEntity);
- pollEntity.update();
-
- transaction.commitTransaction();
-
- if (log.isDebugEnabled()) {
- log.debug("Entity updated: " + pollId);
- }
-
- return true;
- } catch (Exception e) {
- ContextUtil.doCatch(e, transaction);
- return false;
- } finally {
- ContextUtil.doFinally(transaction);
- }
- }
-
- @Override
public void createComment(PollDTO poll, CommentDTO comment) {
TopiaContext transaction = null;
try {
@@ -722,10 +677,13 @@
poll.addComment(comment);
} catch (Exception eee) {
- ContextUtil.doCatch(eee, transaction,
- _("pollen.error.servicePoll.addComment"));
+ PollenContext.doCatch(eee,
+ _("pollen.error.servicePoll.addComment",
+ comment.getAuthor(), poll.getTitle(), poll.getId()),
+ transaction
+ );
} finally {
- ContextUtil.doFinally(transaction);
+ PollenContext.doFinally(transaction);
}
}
@@ -745,19 +703,16 @@
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"));
+ PollenContext.doCatch(eee,
+ _("pollen.error.servicePoll.deleteComment"), transaction);
} finally {
- ContextUtil.doFinally(transaction);
+ PollenContext.doFinally(transaction);
}
}
}
\ No newline at end of file
Modified: trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServicePreventRuleImpl.java
===================================================================
--- trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServicePreventRuleImpl.java 2010-02-24 16:19:22 UTC (rev 2883)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServicePreventRuleImpl.java 2010-02-25 12:07:51 UTC (rev 2884)
@@ -22,6 +22,8 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.chorem.pollen.business.PollenBusinessException;
+import org.chorem.pollen.business.PollenContext;
import org.chorem.pollen.business.converters.DataPreventRuleConverter;
import org.chorem.pollen.business.dto.PreventRuleDTO;
import org.chorem.pollen.business.persistence.PollenModelDAOHelper;
@@ -36,9 +38,9 @@
* @author rannou
* @version $Id$
*/
-public class ServicePreventRuleImpl implements
- org.chorem.pollen.business.services.ServicePreventRule {
- private TopiaContext rootContext = ContextUtil.getInstance().getContext();
+public class ServicePreventRuleImpl implements ServicePreventRule {
+
+ private TopiaContext rootContext;
private PreventRuleDAO preventRuleDAO = null;
private DataPreventRuleConverter converter = new DataPreventRuleConverter();
@@ -47,6 +49,7 @@
.getLog(ServicePreventRuleImpl.class);
public ServicePreventRuleImpl() {
+ rootContext = PollenContext.getRootContext();
}
@Override
Modified: trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServiceResultsImpl.java
===================================================================
--- trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServiceResultsImpl.java 2010-02-24 16:19:22 UTC (rev 2883)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServiceResultsImpl.java 2010-02-25 12:07:51 UTC (rev 2884)
@@ -23,6 +23,8 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.chorem.pollen.business.PollenBusinessException;
+import org.chorem.pollen.business.PollenContext;
import org.chorem.pollen.business.converters.DataResultConverter;
import org.chorem.pollen.business.converters.DataVoteCountingConverter;
import org.chorem.pollen.business.dto.ResultDTO;
@@ -43,6 +45,7 @@
import org.chorem.pollen.votecounting.services.ServiceVoteCounting;
import org.chorem.pollen.votecounting.services.ServiceVoteCountingImpl;
import org.nuiton.topia.TopiaContext;
+import static org.nuiton.i18n.I18n._;
/**
* Implémentation du service de gestion des résultats.
@@ -52,12 +55,14 @@
* @version $Id$
*/
public class ServiceResultsImpl implements ServiceResults {
- private TopiaContext rootContext = ContextUtil.getInstance().getContext();
+ private TopiaContext rootContext;
+
/** log. */
private static final Log log = LogFactory.getLog(ServiceResultsImpl.class);
public ServiceResultsImpl() {
+ rootContext = PollenContext.getRootContext();
}
@Override
@@ -267,24 +272,32 @@
public String importPoll(String filePath, UserDTO user) {
String topiaId = "";
- // Import du sondage
- ServiceExport serviceExport = new ServiceExportImpl();
- PollExportDTO pollExportDTO = serviceExport.executeImport(filePath);
+ try {
- // Transformation du sondage
- // FIXME do not call a Service from an other one
- ServicePoll servicePoll = new ServicePollImpl();
- org.chorem.pollen.business.dto.PollDTO poll = DataVoteCountingConverter
- .createPollDTO(pollExportDTO.getPoll());
+ // Import du sondage
+ ServiceExport serviceExport = new ServiceExportImpl();
+ PollExportDTO pollExportDTO = serviceExport.executeImport(filePath);
- // Enregistrement du sondage
- if (user != null) {
- poll.setUserId(user.getId());
- }
- topiaId = servicePoll.createPoll(poll);
+ // Transformation du sondage
+ // FIXME do not call a Service from an other one
+ ServicePoll servicePoll;
+ servicePoll = new ServicePollImpl();
+ org.chorem.pollen.business.dto.PollDTO poll = DataVoteCountingConverter
+ .createPollDTO(pollExportDTO.getPoll());
- if (log.isInfoEnabled()) {
- log.info("Poll imported: " + topiaId);
+ // Enregistrement du sondage
+ if (user != null) {
+ poll.setUserId(user.getId());
+ }
+ topiaId = servicePoll.createPoll(poll);
+
+ if (log.isInfoEnabled()) {
+ log.info("Poll imported: " + topiaId);
+ }
+
+ } catch (Exception eee) {
+ PollenContext.doCatch(eee,
+ _("pollen.error.serviceResults.importPoll"));
}
return topiaId;
Modified: trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServiceUserImpl.java
===================================================================
--- trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServiceUserImpl.java 2010-02-24 16:19:22 UTC (rev 2883)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServiceUserImpl.java 2010-02-25 12:07:51 UTC (rev 2884)
@@ -21,13 +21,17 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.chorem.pollen.business.PollenBusinessException;
+import org.chorem.pollen.business.PollenContext;
import org.chorem.pollen.business.converters.DataUserConverter;
import org.chorem.pollen.business.dto.UserDTO;
import org.chorem.pollen.business.persistence.PollenModelDAOHelper;
import org.chorem.pollen.business.persistence.UserAccount;
import org.chorem.pollen.business.persistence.UserAccountDAO;
import org.chorem.pollen.business.utils.ContextUtil;
+import org.chorem.pollen.business.utils.MD5;
import org.nuiton.topia.TopiaContext;
+import static org.nuiton.i18n.I18n._;
/**
* Implémentation du service de gestion des utilisateurs.
@@ -37,7 +41,7 @@
* @version $Id$
*/
public class ServiceUserImpl implements ServiceUser {
- private TopiaContext rootContext = ContextUtil.getInstance().getContext();
+ private TopiaContext rootContext;
private UserAccountDAO userDAO = null;
private DataUserConverter converter = new DataUserConverter();
@@ -45,6 +49,7 @@
private static final Log log = LogFactory.getLog(ServiceUserImpl.class);
public ServiceUserImpl() {
+ rootContext = PollenContext.getRootContext();
}
@Override
@@ -306,4 +311,35 @@
}
return userExists;
}
+
+ public void createDefaultAdmin(String login, String password, String email) {
+ TopiaContext transaction = null;
+ try {
+ transaction = rootContext.beginTransaction();
+
+ UserAccountDAO dao =
+ PollenModelDAOHelper.getUserAccountDAO(transaction);
+
+ if (dao.findAllByAdministrator(true).size() == 0) {
+ UserAccount userEntity = dao.create();
+ userEntity.setLogin(login);
+ String encodedPassword = MD5.encode(password);
+ userEntity.setPassword(encodedPassword);
+ userEntity.setEmail(email);
+ userEntity.setAdministrator(true);
+
+ if (log.isInfoEnabled()) {
+ log.info("Utilisateur " + userEntity.getLogin() + " créé.");
+ }
+
+ transaction.commitTransaction();
+ }
+ } catch (Exception eee) {
+ PollenContext.doCatch(eee,
+ _("pollen.error.serviceUser.createDefaultAdmin",
+ login, email), transaction);
+ } finally {
+ PollenContext.doFinally(transaction);
+ }
+ }
}
\ No newline at end of file
Modified: trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServiceVoteImpl.java
===================================================================
--- trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServiceVoteImpl.java 2010-02-24 16:19:22 UTC (rev 2883)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServiceVoteImpl.java 2010-02-25 12:07:51 UTC (rev 2884)
@@ -21,6 +21,8 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.chorem.pollen.business.PollenBusinessException;
+import org.chorem.pollen.business.PollenContext;
import org.chorem.pollen.business.converters.DataPollAccountConverter;
import org.chorem.pollen.business.converters.DataVoteConverter;
import org.chorem.pollen.business.dto.PollAccountDTO;
@@ -40,7 +42,8 @@
* @version $Id$
*/
public class ServiceVoteImpl implements ServiceVote {
- private TopiaContext rootContext = ContextUtil.getInstance().getContext();
+
+ private TopiaContext rootContext;
private VoteDAO voteDAO = null;
private DataVoteConverter converter = new DataVoteConverter();
@@ -48,6 +51,7 @@
private static final Log log = LogFactory.getLog(ServiceVoteImpl.class);
public ServiceVoteImpl() {
+ rootContext = PollenContext.getRootContext();
}
@Override
Modified: trunk/pollen-business/src/main/java/org/chorem/pollen/business/utils/ContextUtil.java
===================================================================
--- trunk/pollen-business/src/main/java/org/chorem/pollen/business/utils/ContextUtil.java 2010-02-24 16:19:22 UTC (rev 2883)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/utils/ContextUtil.java 2010-02-25 12:07:51 UTC (rev 2884)
@@ -25,10 +25,13 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.chorem.pollen.business.PollenBusinessException;
+import org.chorem.pollen.business.PollenContext;
import org.chorem.pollen.business.PollenException;
import org.chorem.pollen.business.persistence.PollenModelDAOHelper;
import org.chorem.pollen.business.persistence.UserAccount;
import org.chorem.pollen.business.persistence.UserAccountDAO;
+import org.chorem.pollen.business.services.ServiceUserImpl;
import org.hibernate.exception.SQLGrammarException;
import org.nuiton.i18n.I18n;
import org.nuiton.topia.TopiaContext;
@@ -43,8 +46,14 @@
*
* @author rannou
* @version $Id$
+ * @deprecated use class {@link org.chorem.pollen.business.PollenContext}
*/
+@Deprecated
public class ContextUtil {
+
+ /** log. */
+ private static final Log log = LogFactory.getLog(ContextUtil.class);
+
/**
* Instance de la classe (patron singleton)
*/
@@ -58,32 +67,34 @@
/**
* Propriétés de la base de données.
*/
+ @Deprecated
private Properties conf;
-
- /** log. */
- private static final Log log = LogFactory.getLog(ContextUtil.class);
-
/**
* Retourne le contexte global.
*
* @return le contexte global
+ * @
+ * @deprecated use {@link #getRootContext } instead
*/
- public TopiaContext getContext() {
- return context;
+ @Deprecated
+ public TopiaContext getContext() {
+ return PollenContext.getRootContext();
}
/**
* Retourne la configuration de la base de données.
*
* @return la configuration
+ * @
*/
- public Properties getConf() {
- return conf;
+ public Properties getConf() {
+ return PollenContext.getProperties();
}
-
/**
* Construction du contexte global
+ * @deprecated use directly {@link #getRootContext} method
*/
+ @Deprecated
public void buildContext() {
if (context == null || context.isClosed()) {
try {
@@ -102,7 +113,9 @@
/**
* Fermeture du contexte global
+ * @deprecated not necessary, the close will be done in PollenRunner
*/
+ @Deprecated
public void closeContext() {
if (context != null && !context.isClosed()) {
try {
@@ -123,7 +136,9 @@
* Retourne l'instance unique de la classe (patron singleton)
*
* @return L'instance de la classe
+ * @deprecated ContextUtil methods are static
*/
+ @Deprecated
public static ContextUtil getInstance() {
if (instance == null) {
instance = new ContextUtil();
@@ -137,7 +152,10 @@
* Usefull to use un different war in embedded war context.
*
* @return properties filename found in JNDI (or a default one)
+ * @deprecated not usefull anymore, the default properties file is loaded
+ * even if the application is embedded.
*/
+ @Deprecated
protected String getPropertiesFileName() {
String filename = null;
@@ -173,14 +191,15 @@
*/
private ContextUtil() {
- String propertiesFilename = getPropertiesFileName();
+// String propertiesFilename = getPropertiesFileName();
+ String propertiesFilename = "pollen.properties";
// Chargement du fichier de configuration
conf = PropertiesLoader.loadPropertiesFile(propertiesFilename);
- conf.setProperty("topia.persistence.classes", PollenModelDAOHelper
- .getImplementationClassesAsString());
- conf.setProperty("topia.service.migration.version", PollenModelDAOHelper
- .getModelVersion());
+ conf.setProperty("topia.persistence.classes",
+ PollenModelDAOHelper.getImplementationClassesAsString());
+ conf.setProperty("topia.service.migration.version",
+ PollenModelDAOHelper.getModelVersion());
I18n.init();
@@ -210,7 +229,11 @@
* Chargement des valeurs initiales dans la base de données.
*
* @throws TopiaException
+ * @deprecated use
+ * {@link ServiceUserImpl#createDefaultAdmin(String, String, String) }
+ * method to create the default admin
*/
+ @Deprecated
protected void initDB() throws TopiaException {
TopiaContext transaction = null;
transaction = context.beginTransaction();
@@ -291,6 +314,14 @@
}
}
+ /**
+ *
+ * @param e
+ * @param transaction
+ * @throws PollenException
+ * @deprecated must defined a message using {@link PollenContext#doCatch(Exception, TopiaContext, String) }
+ */
+ @Deprecated
public static void doCatch(Exception e, TopiaContext transaction) throws PollenException {
doCatch(e, transaction, "Échec lors du déroulement de la transaction");
}
@@ -302,7 +333,9 @@
* @param message
* @param transaction la transaction courante
* @throws PollenException
+ * @deprecated must defined a message using {@link PollenContext#doCatch(Exception, TopiaContext, String) }
*/
+ @Deprecated
public static void doCatch(Exception eee, TopiaContext transaction, String message) throws PollenException {
if (log.isErrorEnabled()) {
log.error(message, eee);
@@ -328,7 +361,9 @@
* Méthode exécutée dans tous les cas pour libérer la transaction.
*
* @param transaction transaction en cours
+ * @deprecated must defined a message using {@link PollenContext#doFinally(TopiaContext) }
*/
+ @Deprecated
public static void doFinally(TopiaContext transaction) {
if (transaction != null) {
try {
@@ -341,6 +376,11 @@
}
}
+ /**
+ * @return generated string for urlId
+ * @deprecated must defined a message using {@link PollenContext#createPollenUrlId() }
+ */
+ @Deprecated
public static String createPollenUrlId() {
return UUID.randomUUID().toString().replaceAll("-", "");
}
Modified: trunk/pollen-business/src/main/resources/i18n/pollen-business-en_GB.properties
===================================================================
--- trunk/pollen-business/src/main/resources/i18n/pollen-business-en_GB.properties 2010-02-24 16:19:22 UTC (rev 2883)
+++ trunk/pollen-business/src/main/resources/i18n/pollen-business-en_GB.properties 2010-02-25 12:07:51 UTC (rev 2884)
@@ -1 +1,16 @@
+pollen.error.context.close=
+pollen.error.context.getRootContext=
+pollen.error.context.parse=
+pollen.error.context.rollback=
+pollen.error.context.start=
+pollen.error.context.stop=
+pollen.error.servicePoll.addComment=
pollen.error.servicePoll.createPoll=
+pollen.error.servicePoll.delete=
+pollen.error.servicePoll.deleteComment=
+pollen.error.servicePoll.getAllPolls=
+pollen.error.servicePoll.getPoll=
+pollen.error.servicePoll.updatePoll=
+pollen.error.serviceResults.importPoll=
+pollen.error.serviceUser.createDefaultAdmin=
+pollen.exception.load_configuration=
Modified: trunk/pollen-business/src/main/resources/i18n/pollen-business-fr_FR.properties
===================================================================
--- trunk/pollen-business/src/main/resources/i18n/pollen-business-fr_FR.properties 2010-02-24 16:19:22 UTC (rev 2883)
+++ trunk/pollen-business/src/main/resources/i18n/pollen-business-fr_FR.properties 2010-02-25 12:07:51 UTC (rev 2884)
@@ -1,2 +1,17 @@
+pollen.error.context.close=Erreur lors de la fermeture de la transaction
+pollen.error.context.getRootContext=Erreur lors de la r\u00E9cup\u00E9ration du contexte principale
+pollen.error.context.parse=Erreur lors du parse du fichier de configuration %1$s
+pollen.error.context.rollback=Erreur lors de l'annulation de la transaction
+pollen.error.context.start=Erreur lors du d\u00E9marrage de l'application
+pollen.error.context.stop=Erreur lors de l'arr\u00EAt de l'application
+pollen.error.servicePoll.addComment=Impossible d'ajouter un nouveau commentaire cr\u00E9\u00E9 par %1$s pour le sondage %2$s (%3$s)
pollen.error.servicePoll.createPoll=Impossible d'enregistrer le sondage %1$s cr\u00E9\u00E9 par %2$s
+pollen.error.servicePoll.delete=
+pollen.error.servicePoll.deleteComment=
+pollen.error.servicePoll.deletePoll=Impossible de supprimer le sondage ayant pour identifiant ToPIA \: %1$s
+pollen.error.servicePoll.getAllPolls=
+pollen.error.servicePoll.getPoll=
pollen.error.servicePoll.updatePoll=Impossible de mettre \u00E0 jour le sondage %1$s (%2$s)
+pollen.error.serviceResults.importPoll=
+pollen.error.serviceUser.createDefaultAdmin=Impossible de cr\u00E9er l'administrateur par d\u00E9faut \: %1$s (%2$s)
+pollen.exception.load_configuration=La configuration n'a pas \u00E9t\u00E9 charg\u00E9e correctement \! Veuillez v\u00E9rifier le d\u00E9marrage de l'application.
Copied: trunk/pollen-business/src/main/resources/pollen.properties (from rev 2876, trunk/pollen-ui/src/main/resources/pollen.properties)
===================================================================
--- trunk/pollen-business/src/main/resources/pollen.properties (rev 0)
+++ trunk/pollen-business/src/main/resources/pollen.properties 2010-02-25 12:07:51 UTC (rev 2884)
@@ -0,0 +1,52 @@
+## Configuration de la base de donn\u00C3\u00A9es
+#hibernate.hbm2ddl.auto=update
+hibernate.show_sql=false
+hibernate.dialect=org.hibernate.dialect.H2Dialect
+hibernate.connection.username=sa
+hibernate.connection.password=
+hibernate.connection.driver_class=org.h2.Driver
+hibernate.connection.url=jdbc:h2:file:~/.pollen/pollendb
+
+#hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
+#hibernate.connection.username=pollen
+#hibernate.connection.password=pollen
+#hibernate.connection.driver_class=org.postgresql.Driver
+#hibernate.connection.url=jdbc:postgresql://intranet/pollen
+#hibernate.default_schema=public
+
+## Configuration de topia-migration
+topia.service.migration=org.nuiton.topia.migration.TopiaMigrationServiceImpl
+topia.service.migration.callbackhandlers=org.chorem.pollen.business.migration.PollenMigrationCallbackHandler
+topia.service.migration.mappingsdir=oldmappings
+topia.service.migration.modelnames=pollen
+
+## Initialisation de la base de donn\u00C3\u00A9es
+#choiceType=DATE,IMAGE,TEXT
+#pollType=RESTRICTED,FREE,GROUP
+#voteCounting=NORMAL,PERCENTAGE,CONDORCET,NUMBER
+
+## Utilisateur par d\u00C3\u00A9faut
+adminLogin=admin
+adminPassword=pollen
+adminEmail=admin(a)domain.com
+
+## R\u00C3\u00A9pertoire des images transf\u00C3\u00A9r\u00C3\u00A9es
+upImgDir=.pollen/uploadedImages
+
+## Taille maximal des images transf\u00C3\u00A9r\u00C3\u00A9es (en octets)
+upload.filesize-max=1048576
+upload.requestsize-max=10485760
+
+## Configuration de l'envoi d'emails automatiques
+email_host=smtp.free.fr
+email_port=25
+email_from=bot(a)pollen.org
+
+## R\u00C3\u00A9pertoire des flux de syndication (Atom)
+feedDir=.pollen/feeds
+
+## Adresse du site (utilis\u00C3\u00A9e pour les emails de rappel)
+siteUrl=
+
+## Version de l'application
+version=${project.version}
\ No newline at end of file
Property changes on: trunk/pollen-business/src/main/resources/pollen.properties
___________________________________________________________________
Added: svn:mergeinfo
+
Modified: trunk/pollen-business/src/test/java/org/chorem/pollen/business/TestData.java
===================================================================
--- trunk/pollen-business/src/test/java/org/chorem/pollen/business/TestData.java 2010-02-24 16:19:22 UTC (rev 2883)
+++ trunk/pollen-business/src/test/java/org/chorem/pollen/business/TestData.java 2010-02-25 12:07:51 UTC (rev 2884)
@@ -21,7 +21,7 @@
public void execute() throws Exception {
transaction = null;
try {
- transaction = ContextUtil.getInstance().getContext().beginTransaction();
+ transaction = PollenContext.getRootContext().beginTransaction();
test();
Added: trunk/pollen-business/src/test/java/org/chorem/pollen/business/TestManager.java
===================================================================
--- trunk/pollen-business/src/test/java/org/chorem/pollen/business/TestManager.java (rev 0)
+++ trunk/pollen-business/src/test/java/org/chorem/pollen/business/TestManager.java 2010-02-25 12:07:51 UTC (rev 2884)
@@ -0,0 +1,52 @@
+
+package org.chorem.pollen.business;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.junit.Ignore;
+import org.nuiton.util.ApplicationConfig;
+
+/**
+ * TestManager
+ *
+ * Created: 24 févr. 2010
+ *
+ * @author fdesbois
+ * @version $Revision$
+ *
+ * Mise a jour: $Date$
+ * par : $Author$
+ */
+@Ignore
+public class TestManager {
+
+ private static final Log log = LogFactory.getLog(TestManager.class);
+
+ public static void start(String dbname) throws IOException {
+ log.info("## START ## : " + dbname);
+
+ InputStream input = TestManager.class.
+ getResourceAsStream("/pollen.properties");
+
+ Properties options = new Properties();
+ options.load(input);
+
+ ApplicationConfig config = new ApplicationConfig();
+ config.setOptions(options);
+ config.setOption(
+ "hibernate.connection.url",
+ "jdbc:h2:file:target/surefire-data/" + dbname
+ );
+
+ PollenContext.loadConfiguration(config);
+ PollenContext.start();
+ }
+
+ public static void stop() throws IOException {
+ PollenContext.stop();
+ }
+
+}
Property changes on: trunk/pollen-business/src/test/java/org/chorem/pollen/business/TestManager.java
___________________________________________________________________
Added: svn:keywords
+ "Author Date Id Revision HeadURL"
Modified: trunk/pollen-business/src/test/java/org/chorem/pollen/business/services/ServiceAuthImplTest.java
===================================================================
--- trunk/pollen-business/src/test/java/org/chorem/pollen/business/services/ServiceAuthImplTest.java 2010-02-24 16:19:22 UTC (rev 2883)
+++ trunk/pollen-business/src/test/java/org/chorem/pollen/business/services/ServiceAuthImplTest.java 2010-02-25 12:07:51 UTC (rev 2884)
@@ -16,6 +16,8 @@
package org.chorem.pollen.business.services;
+import org.chorem.pollen.business.PollenBusinessException;
+import org.chorem.pollen.business.TestManager;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull;
@@ -40,16 +42,16 @@
@BeforeClass
public static void setUpClass() throws Exception {
- ContextUtil.getInstance().buildContext();
+ TestManager.start("ServiceAuthImplTest");
}
@AfterClass
public static void tearDownClass() throws Exception {
- ContextUtil.getInstance().getContext().clear(false);
+ TestManager.stop();
}
@Before
- public void setUp() {
+ public void setUp() {
instance = new ServiceAuthImpl();
}
@@ -61,7 +63,7 @@
* Test of isLoginRight method, of class ServiceAuthImpl.
*/
@Test
- public void testIsLoginRight() {
+ public void testIsLoginRight() {
String login = "login_isLoginRight";
String password = "password_isLoginRight";
boolean result1 = instance.isLoginRight(login, password);
@@ -79,7 +81,7 @@
* Test of getUser method, of class ServiceAuthImpl.
*/
@Test
- public void testGetUser() {
+ public void testGetUser() {
String login = "login_getUser";
String password = "password_getUser";
UserDTO result1 = instance.getUser(login, password);
Modified: trunk/pollen-business/src/test/java/org/chorem/pollen/business/services/ServiceChoiceImplTest.java
===================================================================
--- trunk/pollen-business/src/test/java/org/chorem/pollen/business/services/ServiceChoiceImplTest.java 2010-02-24 16:19:22 UTC (rev 2883)
+++ trunk/pollen-business/src/test/java/org/chorem/pollen/business/services/ServiceChoiceImplTest.java 2010-02-25 12:07:51 UTC (rev 2884)
@@ -16,6 +16,7 @@
package org.chorem.pollen.business.services;
+import org.chorem.pollen.business.PollenBusinessException;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -23,8 +24,8 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.chorem.pollen.business.TestManager;
import org.chorem.pollen.business.dto.ChoiceDTO;
-import org.chorem.pollen.business.services.ServiceChoiceImpl;
import org.chorem.pollen.business.utils.ContextUtil;
import org.junit.After;
import org.junit.AfterClass;
@@ -50,16 +51,16 @@
@BeforeClass
public static void setUpClass() throws Exception {
- ContextUtil.getInstance().buildContext();
+ TestManager.start("ServiceChoiceImplTest");
}
@AfterClass
public static void tearDownClass() throws Exception {
- ContextUtil.getInstance().getContext().clear(false);
+ TestManager.stop();
}
@Before
- public void setUp() {
+ public void setUp() {
instance = new ServiceChoiceImpl();
}
Modified: trunk/pollen-business/src/test/java/org/chorem/pollen/business/services/ServiceListImplTest.java
===================================================================
--- trunk/pollen-business/src/test/java/org/chorem/pollen/business/services/ServiceListImplTest.java 2010-02-24 16:19:22 UTC (rev 2883)
+++ trunk/pollen-business/src/test/java/org/chorem/pollen/business/services/ServiceListImplTest.java 2010-02-25 12:07:51 UTC (rev 2884)
@@ -16,6 +16,7 @@
package org.chorem.pollen.business.services;
+import org.chorem.pollen.business.PollenBusinessException;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -23,9 +24,9 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.chorem.pollen.business.TestManager;
import org.chorem.pollen.business.dto.PersonListDTO;
import org.chorem.pollen.business.dto.VotingListDTO;
-import org.chorem.pollen.business.services.ServiceListImpl;
import org.chorem.pollen.business.utils.ContextUtil;
import org.junit.After;
import org.junit.AfterClass;
@@ -51,16 +52,16 @@
@BeforeClass
public static void setUpClass() throws Exception {
- ContextUtil.getInstance().buildContext();
+ TestManager.start("ServiceListImplTest");
}
@AfterClass
public static void tearDownClass() throws Exception {
- ContextUtil.getInstance().getContext().clear(false);
+ TestManager.stop();
}
@Before
- public void setUp() {
+ public void setUp() {
instance = new ServiceListImpl();
}
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 16:19:22 UTC (rev 2883)
+++ trunk/pollen-business/src/test/java/org/chorem/pollen/business/services/ServicePollImplTest.java 2010-02-25 12:07:51 UTC (rev 2884)
@@ -15,7 +15,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>. ##%*/
package org.chorem.pollen.business.services;
+import java.io.IOException;
import java.util.ArrayList;
+import org.chorem.pollen.business.PollenBusinessException;
import org.chorem.pollen.business.dto.CommentDTO;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -26,6 +28,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.chorem.pollen.business.TestData;
+import org.chorem.pollen.business.TestManager;
import org.chorem.pollen.business.dto.ChoiceDTO;
import org.chorem.pollen.business.dto.PollAccountDTO;
import org.chorem.pollen.business.dto.PollDTO;
@@ -55,7 +58,7 @@
*/
public class ServicePollImplTest {
- private static ServicePollImpl instance;
+ private ServicePollImpl instance;
/** log. */
private static final Log log = LogFactory.getLog(ServicePollImplTest.class);
@@ -64,13 +67,10 @@
@BeforeClass
public static void setUpClass() throws Exception {
- ContextUtil.getInstance().buildContext();
- instance = new ServicePollImpl();
}
@AfterClass
public static void tearDownClass() throws Exception {
- ContextUtil.getInstance().getContext().clear(false);
}
@Before
@@ -78,7 +78,8 @@
}
@After
- public void tearDown() {
+ public void tearDown() throws IOException {
+ TestManager.stop();
}
/**
@@ -87,7 +88,9 @@
*/
@Test
public void testCreatePoll() throws Exception {
- log.info("## START ##");
+ TestManager.start("testCreatePoll");
+ instance = new ServicePollImpl();
+
PollDTO dto = new PollDTO();
dto.setBeginChoiceDate(new Date());
dto.setBeginDate(new Date());
@@ -117,42 +120,38 @@
dto.setChoiceDTOs(choices);
- String result = instance.createPoll(dto);
+ final String result = instance.createPoll(dto);
if (log.isDebugEnabled()) {
log.debug("result: " + result);
}
Assert.assertNotNull(result);
- TopiaContext transaction = null;
- try {
- transaction = ContextUtil.getInstance().getContext().beginTransaction();
+ TestData test = new TestData() {
- Poll entity = PollenModelDAOHelper.getPollDAO(transaction).findByTopiaId(result);
- Assert.assertNotNull(entity);
+ @Override
+ protected void test() throws Exception {
+ Poll entity = PollenModelDAOHelper.getPollDAO(transaction).
+ findByTopiaId(result);
+ Assert.assertNotNull(entity);
- Assert.assertEquals(3, entity.getChoice().size());
- Assert.assertNotNull(entity.getCreator());
- Assert.assertEquals("erwan", entity.getCreator().getVotingId());
- Assert.assertNotNull(entity.getCreator().getAccountId());
+ Assert.assertEquals(3, entity.getChoice().size());
+ Assert.assertNotNull(entity.getCreator());
+ Assert.assertEquals("erwan", entity.getCreator().getVotingId());
+ Assert.assertNotNull(entity.getCreator().getAccountId());
+ }
+ };
- } catch (Exception eee) {
- if (transaction != null) {
- transaction.rollbackTransaction();
- }
- throw eee;
- } finally {
- if (transaction != null) {
- transaction.closeContext();
- }
- }
+ test.execute();
}
/**
* Test of updatePoll method, of class ServicePollImpl.
*/
@Test
- public void testUpdatePoll() {
- log.info("## START ##");
+ public void testUpdatePoll() throws Exception {
+ TestManager.start("testUpdatePoll");
+ instance = new ServicePollImpl();
+
String pollId = "";
PollDTO dto = new PollDTO();
dto.setDescription("Test_updatePoll");
@@ -173,8 +172,10 @@
* Test of deletePoll method, of class ServicePollImpl.
*/
@Test
- public void testDeletePoll() {
- log.info("## START ##");
+ public void testDeletePoll() throws Exception {
+ TestManager.start("testDeletePoll");
+ instance = new ServicePollImpl();
+
PollDTO dto = new PollDTO();
dto.setDescription("Test_deletePoll");
dto.setCreatorId("erwan");
@@ -191,8 +192,10 @@
* Test of findPollById method, of class ServicePollImpl.
*/
@Test
- public void testFindPollById() {
- log.info("## START ##");
+ public void testFindPollById() throws Exception {
+ TestManager.start("testFindPollById");
+ instance = new ServicePollImpl();
+
String pollId = "";
PollDTO dto = new PollDTO();
dto.setDescription("Test_findPollById");
@@ -210,8 +213,10 @@
* Test of findPollByPollId method, of class ServicePollImpl.
*/
@Test
- public void testFindPollByPollId() {
- log.info("## START ##");
+ public void testFindPollByPollId() throws Exception {
+ TestManager.start("testFindPollByPollId");
+ instance = new ServicePollImpl();
+
String pollId = "";
PollDTO dto = new PollDTO();
dto.setDescription("Test_findPollByPollId");
@@ -233,8 +238,10 @@
* Test of findPollsByName method, of class ServicePollImpl.
*/
@Test
- public void testFindPollsByName() {
- log.info("## START ##");
+ public void testFindPollsByName() throws Exception {
+ TestManager.start("testFindPollsByName");
+ instance = new ServicePollImpl();
+
PollDTO dto = new PollDTO();
dto.setDescription("Test_findPollsByName");
dto.setCreatorId("erwan");
@@ -252,8 +259,10 @@
* Test of findPollsByUser method, of class ServicePollImpl.
*/
@Test
- public void testFindPollsByUser() {
- log.info("## START ##");
+ public void testFindPollsByUser() throws Exception {
+ TestManager.start("testFindPollsByUser");
+ instance = new ServicePollImpl();
+
// création de l'utilisateur
UserDTO user = new UserDTO();
user.setLogin("login_findPollsByUser");
@@ -279,8 +288,10 @@
* Test of findParticipatedPolls method, of class ServicePollImpl.
*/
@Test
- public void testFindParticipatedPolls() {
- log.info("## START ##");
+ public void testFindParticipatedPolls() throws Exception {
+ TestManager.start("testFindParticipatedPolls");
+ instance = new ServicePollImpl();
+
// création de l'utilisateur
UserDTO user = new UserDTO();
user.setLogin("login_findParticipatedPolls");
@@ -316,8 +327,10 @@
* Test of findRunningPolls method, of class ServicePollImpl.
*/
@Test
- public void testFindRunningPolls() {
- log.info("## START ##");
+ public void testFindRunningPolls() throws Exception {
+ TestManager.start("testFindRunningPolls");
+ instance = new ServicePollImpl();
+
Date now = new Date();
// sondage en cours sans date de fin
@@ -365,8 +378,10 @@
* Test of selectPolls method, of class ServicePollImpl.
*/
@Test
- public void testSelectPolls() {
- log.info("## START ##");
+ public void testSelectPolls() throws Exception {
+ TestManager.start("testSelectPolls");
+ instance = new ServicePollImpl();
+
PollDTO dto = new PollDTO();
dto.setDescription("test selectPolls");
dto.setTitle("selectPolls");
@@ -400,7 +415,8 @@
*/
@Test
public void testCreateComment() throws Exception {
- log.info("## START ##");
+ TestManager.start("testCreateComment");
+ instance = new ServicePollImpl();
/** PREPARE DATA **/
PollDTO poll = new PollDTO();
@@ -444,7 +460,8 @@
*/
@Test
public void testDeleteComment() throws Exception {
- log.info("## START ##");
+ TestManager.start("testDeleteComment");
+ instance = new ServicePollImpl();
/** PREPARE DATA **/
PollDTO poll = new PollDTO();
Modified: trunk/pollen-business/src/test/java/org/chorem/pollen/business/services/ServicePreventRuleImplTest.java
===================================================================
--- trunk/pollen-business/src/test/java/org/chorem/pollen/business/services/ServicePreventRuleImplTest.java 2010-02-24 16:19:22 UTC (rev 2883)
+++ trunk/pollen-business/src/test/java/org/chorem/pollen/business/services/ServicePreventRuleImplTest.java 2010-02-25 12:07:51 UTC (rev 2884)
@@ -16,6 +16,8 @@
package org.chorem.pollen.business.services;
+import java.io.IOException;
+import org.chorem.pollen.business.PollenBusinessException;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -23,8 +25,8 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.chorem.pollen.business.TestManager;
import org.chorem.pollen.business.dto.PreventRuleDTO;
-import org.chorem.pollen.business.services.ServicePreventRuleImpl;
import org.chorem.pollen.business.utils.ContextUtil;
import org.junit.After;
import org.junit.AfterClass;
@@ -51,16 +53,16 @@
@BeforeClass
public static void setUpClass() throws Exception {
- ContextUtil.getInstance().buildContext();
+ TestManager.start("ServicePreventRuleImplTest");
}
@AfterClass
public static void tearDownClass() throws Exception {
- ContextUtil.getInstance().getContext().clear(false);
+ TestManager.stop();
}
@Before
- public void setUp() {
+ public void setUp() throws Exception {
instance = new ServicePreventRuleImpl();
}
Modified: trunk/pollen-business/src/test/java/org/chorem/pollen/business/services/ServiceUserImplTest.java
===================================================================
--- trunk/pollen-business/src/test/java/org/chorem/pollen/business/services/ServiceUserImplTest.java 2010-02-24 16:19:22 UTC (rev 2883)
+++ trunk/pollen-business/src/test/java/org/chorem/pollen/business/services/ServiceUserImplTest.java 2010-02-25 12:07:51 UTC (rev 2884)
@@ -16,6 +16,7 @@
package org.chorem.pollen.business.services;
+import org.chorem.pollen.business.PollenBusinessException;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
@@ -23,6 +24,7 @@
import java.util.List;
+import org.chorem.pollen.business.TestManager;
import org.chorem.pollen.business.dto.UserDTO;
import org.chorem.pollen.business.utils.ContextUtil;
import org.junit.After;
@@ -42,16 +44,16 @@
@BeforeClass
public static void setUpClass() throws Exception {
- ContextUtil.getInstance().buildContext();
+ TestManager.start("ServiceUserImplTest");
}
@AfterClass
public static void tearDownClass() throws Exception {
- ContextUtil.getInstance().getContext().clear(false);
+ TestManager.stop();
}
@Before
- public void setUp() {
+ public void setUp() {
instance = new ServiceUserImpl();
}
@@ -134,7 +136,7 @@
* Test of updatePasswordUser method, of class ServiceUserImpl.
*/
@Test
- public void testUpdatePasswordUser() {
+ public void testUpdatePasswordUser() {
UserDTO user = new UserDTO();
user.setLogin("login_UpdatePasswordUser");
user.setId(instance.createUser(user, "password"));
Modified: trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/base/ContextLink.java
===================================================================
--- trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/base/ContextLink.java 2010-02-24 16:19:22 UTC (rev 2883)
+++ trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/base/ContextLink.java 2010-02-25 12:07:51 UTC (rev 2884)
@@ -2,6 +2,7 @@
package org.chorem.pollen.ui.base;
import java.io.File;
+import org.chorem.pollen.business.PollenBusinessException;
/**
* ContextLink
@@ -21,13 +22,15 @@
/**
* ContextPath for the link
* @return a String contextPath
+ * @
*/
- public String getContextPath();
+ public String getContextPath() ;
/**
* Get a file from context with name defined by filename.
* @param filename name of the file to get
* @return a File with absolutePath corresponding to contextPath + filename
+ * @
*/
- public File getFile(String filename);
+ public File getFile(String filename) ;
}
Modified: trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/components/Border.java
===================================================================
--- trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/components/Border.java 2010-02-24 16:19:22 UTC (rev 2883)
+++ trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/components/Border.java 2010-02-25 12:07:51 UTC (rev 2884)
@@ -34,12 +34,13 @@
import org.apache.tapestry5.ioc.annotations.Inject;
import org.apache.tapestry5.services.PersistentLocale;
import org.apache.tapestry5.services.Request;
+import org.chorem.pollen.business.PollenBusinessException;
+import org.chorem.pollen.business.PollenProperty;
import org.chorem.pollen.business.dto.UserDTO;
import org.chorem.pollen.business.services.ServiceAuth;
import org.chorem.pollen.business.utils.MD5;
import org.chorem.pollen.ui.base.ContextLink;
import org.chorem.pollen.ui.data.Lien;
-import org.chorem.pollen.ui.services.Configuration;
/**
* Classe du Layout Component Border.
@@ -154,12 +155,6 @@
@Inject
private Messages messages;
- /**
- * Service contenant la configuration de l'application.
- */
- @Inject
- private Configuration conf;
-
/** Injection des services */
@Inject
private ServiceAuth serviceAuth;
@@ -225,8 +220,8 @@
* Version de l'application.
* @return current application version
*/
- public String getVersion() {
- return conf.getProperty(Configuration.PROP_APP_VERSION);
+ public String getVersion() {
+ return PollenProperty.APP_VERSION.getValue();
}
public int getCurrentYear() {
@@ -234,8 +229,8 @@
return current.get(Calendar.YEAR);
}
- public String getContactEmail() {
- return conf.getProperty(Configuration.PROP_CONTACT_EMAIL);
+ public String getContactEmail() {
+ return PollenProperty.CONTACT_EMAIL.getValue();
}
/**
@@ -249,8 +244,9 @@
* Vérifie que le fichier de flux de syndication existe.
*
* @return vrai si le fichier existe
+ * @
*/
- public boolean isFeedFileExisting() {
+ public boolean isFeedFileExisting() {
if (feedFilename == null) {
return false;
}
Modified: trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/components/FeedContextLink.java
===================================================================
--- trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/components/FeedContextLink.java 2010-02-24 16:19:22 UTC (rev 2883)
+++ trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/components/FeedContextLink.java 2010-02-25 12:07:51 UTC (rev 2884)
@@ -1,12 +1,10 @@
package org.chorem.pollen.ui.components;
-import org.chorem.pollen.ui.base.ContextLink;
import java.io.File;
-import org.chorem.pollen.ui.base.*;
-import org.apache.tapestry5.MarkupWriter;
-import org.apache.tapestry5.ioc.annotations.Inject;
-import org.chorem.pollen.ui.services.Configuration;
+import org.chorem.pollen.business.PollenBusinessException;
+import org.chorem.pollen.ui.base.ContextLink;
+import org.chorem.pollen.business.PollenProperty;
/**
* FeedLink
@@ -21,16 +19,13 @@
*/
public class FeedContextLink implements ContextLink {
- @Inject
- private Configuration conf;
-
@Override
- public String getContextPath() {
- return conf.getProperty(Configuration.FEED_DIR);
+ public String getContextPath() {
+ return PollenProperty.FEED_DIR.getValue();
}
@Override
- public File getFile(String filename) {
+ public File getFile(String filename) {
return new File(getContextPath(), filename + ".xml");
}
}
Modified: trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/components/FileLink.java
===================================================================
--- trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/components/FileLink.java 2010-02-24 16:19:22 UTC (rev 2883)
+++ trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/components/FileLink.java 2010-02-25 12:07:51 UTC (rev 2884)
@@ -16,6 +16,7 @@
package org.chorem.pollen.ui.components;
+import org.chorem.pollen.business.PollenBusinessException;
import org.chorem.pollen.ui.base.ContextLink;
import java.io.File;
import java.io.FileInputStream;
@@ -84,7 +85,7 @@
}
/** Affichage du fichier */
- public StreamResponse onCreateLink(final String filename, String type) {
+ public StreamResponse onCreateLink(final String filename, String type) {
// security : src containing .. are filtered, to not access to full system
if (StringUtils.isEmpty(filename) || filename.contains("..")) {
Modified: trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/components/HeadLink.java
===================================================================
--- trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/components/HeadLink.java 2010-02-24 16:19:22 UTC (rev 2883)
+++ trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/components/HeadLink.java 2010-02-25 12:07:51 UTC (rev 2884)
@@ -31,6 +31,7 @@
import org.apache.tapestry5.annotations.Parameter;
import org.apache.tapestry5.ioc.annotations.Inject;
import org.apache.tapestry5.services.Response;
+import org.chorem.pollen.business.PollenBusinessException;
import org.chorem.pollen.ui.base.ContextLink;
import org.slf4j.Logger;
@@ -82,7 +83,7 @@
}
/** Affichage du fichier */
- public StreamResponse onFileLink(final String href, final String type) {
+ public StreamResponse onFileLink(final String href, final String type) {
// security : src containing .. are filtered, to not access to full system
if (StringUtils.isEmpty(href) || href.contains("..")) {
Modified: trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/components/Image.java
===================================================================
--- trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/components/Image.java 2010-02-24 16:19:22 UTC (rev 2883)
+++ trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/components/Image.java 2010-02-25 12:07:51 UTC (rev 2884)
@@ -31,6 +31,7 @@
import org.apache.tapestry5.annotations.Parameter;
import org.apache.tapestry5.ioc.annotations.Inject;
import org.apache.tapestry5.services.Response;
+import org.chorem.pollen.business.PollenBusinessException;
import org.slf4j.Logger;
/**
@@ -123,7 +124,7 @@
/** Affichage de l'image */
public StreamResponse onImageLink(final String src, final int width,
- final int height, boolean thumb) {
+ final int height, boolean thumb) {
// security : src containing .. are filtered, to not access to full system
if (StringUtils.isEmpty(src) || src.contains("..")) {
Modified: trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/components/ImageContextLink.java
===================================================================
--- trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/components/ImageContextLink.java 2010-02-24 16:19:22 UTC (rev 2883)
+++ trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/components/ImageContextLink.java 2010-02-25 12:07:51 UTC (rev 2884)
@@ -17,10 +17,12 @@
package org.chorem.pollen.ui.components;
import java.io.File;
+import java.util.logging.Level;
+import java.util.logging.Logger;
import org.apache.tapestry5.annotations.Parameter;
-import org.apache.tapestry5.ioc.annotations.Inject;
+import org.chorem.pollen.business.PollenBusinessException;
+import org.chorem.pollen.business.PollenProperty;
import org.chorem.pollen.ui.base.ContextLink;
-import org.chorem.pollen.ui.services.Configuration;
/**
* ImageContextLink
@@ -37,9 +39,6 @@
public static final String THUMB_PREFIX = "thumb_";
- @Inject
- private Configuration config;
-
/**
* Directory for files getting or saving from this context
* (ie. subdirectory where images are uploaded, main directory is defined by contextPath)
@@ -54,16 +53,16 @@
private boolean thumb;
@Override
- public String getContextPath() {
- return config.getProperty(Configuration.IMG_DIR);
+ public String getContextPath() {
+ return PollenProperty.IMG_DIR.getValue();
}
@Override
- public File getFile(String filename) {
+ public File getFile(String filename) {
return getFile(filename, thumb);
}
- public File getFile(String filename, boolean thumb) {
+ public File getFile(String filename, boolean thumb) {
if (thumb) {
filename = THUMB_PREFIX + filename;
}
@@ -73,8 +72,9 @@
/**
* Get the directory where are uploaded the images from the context.
* @return a File corresponding to the image directory
+ * @
*/
- public File getImageDir() {
+ public File getImageDir() {
File result = null;
if (dir != null && !dir.isEmpty()) {
result = new File(getContextPath(), dir);
Modified: trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/pages/admin/UsersAdmin.java
===================================================================
--- trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/pages/admin/UsersAdmin.java 2010-02-24 16:19:22 UTC (rev 2883)
+++ trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/pages/admin/UsersAdmin.java 2010-02-25 12:07:51 UTC (rev 2884)
@@ -31,6 +31,8 @@
import org.apache.tapestry5.annotations.SessionState;
import org.apache.tapestry5.ioc.Messages;
import org.apache.tapestry5.ioc.annotations.Inject;
+import org.chorem.pollen.business.PollenBusinessException;
+import org.chorem.pollen.business.PollenProperty;
import org.chorem.pollen.business.business.PreventRuleManager;
import org.chorem.pollen.business.dto.UserDTO;
import org.chorem.pollen.business.services.ServiceList;
@@ -38,7 +40,6 @@
import org.chorem.pollen.business.utils.MD5;
import org.chorem.pollen.ui.components.FeedBack;
import org.chorem.pollen.ui.data.Lien;
-import org.chorem.pollen.ui.services.Configuration;
import org.chorem.pollen.ui.utils.PasswordGenerator;
/**
@@ -109,12 +110,6 @@
@Inject
private Messages messages;
- /**
- * Service contenant la configuration de l'application.
- */
- @Inject
- private Configuration conf;
-
/** Injection des services */
@Inject
private ServiceUser serviceUser;
@@ -133,7 +128,7 @@
/**
* Méthode appelée lors de la soumission du formulaire.
*/
- public Object onSuccessFromUsersForm() {
+ public Object onSuccessFromUsersForm() {
for (UserDTO usr : accounts) {
if (serviceUser.findUserById(usr.getId()) != null) {
serviceUser.updateUser(usr);
@@ -205,11 +200,11 @@
}
/** Envoi du mail de notification */
- private void sendMailNotification(UserDTO newUser, String password) {
+ private void sendMailNotification(UserDTO newUser, String password) {
Map<String, String> data = new HashMap<String, String>();
- data.put("host", conf.getProperty("email_host"));
- data.put("port", conf.getProperty("email_port"));
- data.put("from", conf.getProperty("email_from"));
+ data.put("host", PollenProperty.EMAIL_HOST.getValue());
+ data.put("port", PollenProperty.EMAIL_PORT.getValue());
+ data.put("from", PollenProperty.EMAIL_FROM.getValue());
data.put("to", newUser.getEmail());
data.put("title", messages.format("registerEmail_subject", newUser
.getLogin()));
Modified: trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/pages/poll/ImageDisplay.java
===================================================================
--- trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/pages/poll/ImageDisplay.java 2010-02-24 16:19:22 UTC (rev 2883)
+++ trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/pages/poll/ImageDisplay.java 2010-02-25 12:07:51 UTC (rev 2884)
@@ -29,7 +29,6 @@
import org.chorem.pollen.business.dto.PollDTO;
import org.chorem.pollen.ui.components.ImageContextLink;
import org.chorem.pollen.ui.data.Lien;
-import org.chorem.pollen.ui.services.Configuration;
/**
* Classe de la page de visualisation d'une image.
@@ -52,12 +51,6 @@
@Inject
private Messages messages;
- /**
- * Service contenant la configuration de l'application.
- */
- @Inject
- private Configuration conf;
-
/** Sondage */
@Persist
private PollDTO poll;
Modified: trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/pages/poll/PollCreation.java
===================================================================
--- trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/pages/poll/PollCreation.java 2010-02-24 16:19:22 UTC (rev 2883)
+++ trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/pages/poll/PollCreation.java 2010-02-25 12:07:51 UTC (rev 2884)
@@ -48,6 +48,8 @@
import org.apache.tapestry5.ioc.services.PropertyAccess;
import org.apache.tapestry5.json.JSONObject;
import org.apache.tapestry5.upload.services.UploadSymbols;
+import org.chorem.pollen.business.PollenBusinessException;
+import org.chorem.pollen.business.PollenProperty;
import org.chorem.pollen.business.business.PreventRuleManager;
import org.chorem.pollen.business.dto.ChoiceDTO;
import org.chorem.pollen.business.dto.PersonListDTO;
@@ -71,7 +73,6 @@
import org.chorem.pollen.ui.data.PollStep;
import org.chorem.pollen.ui.data.uio.DateChoiceUIO;
import org.chorem.pollen.ui.data.uio.ImageChoiceUIO;
-import org.chorem.pollen.ui.services.Configuration;
import org.chorem.pollen.ui.utils.FeedUtil;
import org.chorem.pollen.ui.utils.ImageUtil;
import org.chorem.pollen.ui.utils.UnitConverter;
@@ -338,13 +339,7 @@
@Inject
private Messages messages;
- /**
- * Service contenant la configuration de l'application.
- */
@Inject
- private Configuration conf;
-
- @Inject
private Logger logger;
/** Injection des services */
@@ -411,7 +406,7 @@
/**
* Méthode appelée lorsqu'on souhaite valider la création du sondage.
*/
- Object onSuccessFromChoicesCreationForm() {
+ Object onSuccessFromChoicesCreationForm() {
if (!addChoiceSelected) {
// Préparation et création du sondage
@@ -798,7 +793,7 @@
/**
* Création du sondage.
*/
- private void createPoll() {
+ private void createPoll() {
// Création du sondage
poll.setId(servicePoll.createPoll(poll));
@@ -821,7 +816,7 @@
}
/** Ajout d'une entrée dans le flux de syndication */
- private void addFeedEntry() {
+ private void addFeedEntry() {
PollAccountDTO creator = servicePollAccount.findPollAccountById(poll
.getCreatorId());
String voteURL = siteURL + "poll/VoteFor/" + poll.getPollId();
@@ -836,16 +831,16 @@
}
/** Envoi du mail de notification */
- private void sendMailNotification() {
+ private void sendMailNotification() {
PollAccountDTO creator = servicePollAccount.findPollAccountById(poll
.getCreatorId());
String voteURL = siteURL + "poll/VoteFor/" + poll.getPollId();
String modifURL = siteURL + "poll/Modification/" + poll.getPollId()
+ ":" + creator.getAccountId();
Map<String, String> data = new HashMap<String, String>();
- data.put("host", conf.getProperty("email_host"));
- data.put("port", conf.getProperty("email_port"));
- data.put("from", conf.getProperty("email_from"));
+ data.put("host", PollenProperty.EMAIL_HOST.getValue());
+ data.put("port", PollenProperty.EMAIL_PORT.getValue());
+ data.put("from", PollenProperty.EMAIL_FROM.getValue());
// Mail au créateur
if (poll.getCreatorEmail() != null) {
Modified: trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/pages/poll/PollModification.java
===================================================================
--- trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/pages/poll/PollModification.java 2010-02-24 16:19:22 UTC (rev 2883)
+++ trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/pages/poll/PollModification.java 2010-02-25 12:07:51 UTC (rev 2884)
@@ -38,6 +38,9 @@
import org.apache.tapestry5.ioc.Messages;
import org.apache.tapestry5.ioc.annotations.Inject;
import org.chenillekit.tapestry.core.components.DateTimeField;
+import org.chorem.pollen.business.PollenBusinessException;
+import org.chorem.pollen.business.PollenContext;
+import org.chorem.pollen.business.PollenProperty;
import org.chorem.pollen.business.business.PreventRuleManager;
import org.chorem.pollen.business.dto.ChoiceDTO;
import org.chorem.pollen.business.dto.PollAccountDTO;
@@ -54,7 +57,6 @@
import org.chorem.pollen.ui.data.Lien;
import org.chorem.pollen.ui.data.PollAction;
import org.chorem.pollen.ui.data.PollStep;
-import org.chorem.pollen.ui.services.Configuration;
/**
* Classe de la page de modification d'un sondage.
@@ -193,12 +195,6 @@
@Inject
private Messages messages;
- /**
- * Service contenant la configuration de l'application.
- */
- @Inject
- private Configuration conf;
-
/** Injection des services */
@Inject
private ServicePoll servicePoll;
@@ -211,7 +207,7 @@
* Méthode appelée lorsqu'on souhaite accéder à l'étape suivante de la
* modification de sondage.
*/
- Object onSuccessFromPollCreationForm() {
+ Object onSuccessFromPollCreationForm() {
switch (step) {
case POLL:
step = PollStep.OPTIONS;
@@ -530,12 +526,12 @@
}
/** Envoi du mail de notification */
- private void sendMailNotification(List<PollAccountDTO> modifiedAccounts) {
+ private void sendMailNotification(List<PollAccountDTO> modifiedAccounts) {
String voteURL = siteURL + "poll/VoteFor/" + poll.getPollId();
Map<String, String> data = new HashMap<String, String>();
- data.put("host", conf.getProperty("email_host"));
- data.put("port", conf.getProperty("email_port"));
- data.put("from", conf.getProperty("email_from"));
+ data.put("host", PollenProperty.EMAIL_HOST.getValue());
+ data.put("port", PollenProperty.EMAIL_PORT.getValue());
+ data.put("from", PollenProperty.EMAIL_FROM.getValue());
// Mails aux votants
for (PollAccountDTO account : modifiedAccounts) {
Modified: trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/pages/poll/Results.java
===================================================================
--- trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/pages/poll/Results.java 2010-02-24 16:19:22 UTC (rev 2883)
+++ trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/pages/poll/Results.java 2010-02-25 12:07:51 UTC (rev 2884)
@@ -55,7 +55,6 @@
import org.chorem.pollen.ui.components.FeedBack;
import org.chorem.pollen.ui.components.ImageContextLink;
import org.chorem.pollen.ui.data.Lien;
-import org.chorem.pollen.ui.services.Configuration;
import org.chorem.pollen.votecounting.business.NumberMethod;
import org.chorem.pollen.votecounting.dto.VoteCountingResultDTO;
import org.slf4j.Logger;
@@ -162,12 +161,6 @@
private Locale currentLocale;
/**
- * Service contenant la configuration de l'application.
- */
- @Inject
- private Configuration conf;
-
- /**
* Logs.
*/
@Inject
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 16:19:22 UTC (rev 2883)
+++ trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/pages/poll/VoteForPoll.java 2010-02-25 12:07:51 UTC (rev 2884)
@@ -47,6 +47,8 @@
import org.apache.tapestry5.ioc.annotations.Inject;
import org.apache.tapestry5.upload.services.UploadedFile;
import org.chenillekit.tapestry.core.components.DateTimeField;
+import org.chorem.pollen.business.PollenBusinessException;
+import org.chorem.pollen.business.PollenProperty;
import org.chorem.pollen.business.business.PreventRuleManager;
import org.chorem.pollen.business.dto.ChoiceDTO;
import org.chorem.pollen.business.dto.CommentDTO;
@@ -75,7 +77,6 @@
import org.chorem.pollen.ui.data.PollAction;
import org.chorem.pollen.ui.data.uio.DateChoiceUIO;
import org.chorem.pollen.ui.data.uio.ImageChoiceUIO;
-import org.chorem.pollen.ui.services.Configuration;
import org.chorem.pollen.ui.utils.FeedUtil;
import org.chorem.pollen.ui.utils.ImageUtil;
import org.chorem.pollen.votecounting.business.NumberMethod;
@@ -152,12 +153,6 @@
private Messages messages;
/**
- * Service contenant la configuration de l'application.
- */
- @Inject
- private Configuration conf;
-
- /**
* Sondage pour lequel l'utilisateur vote
*/
@Property
@@ -295,7 +290,7 @@
/** Méthode appelée après la soumission du vote. */
@Log
- Object onSuccessFromVoteForm() {
+ Object onSuccessFromVoteForm() {
if (initPollAccount()) {
List<ChoiceDTO> choiceDTOs = new ArrayList<ChoiceDTO>();
if (poll.getVoteCounting() == VoteCountingType.NORMAL) {
@@ -563,7 +558,7 @@
/** Ajout d'une entrée dans le flux de syndication */
private void addFeedEntry(PollAction pollAction, String titleStr,
- String contentStr) {
+ String contentStr) {
String voteURL = siteURL + "poll/VoteFor/" + poll.getPollId();
File feedFile = getFeedContext().getFile(poll.getPollId());
String title = null;
@@ -596,14 +591,14 @@
}
/** Envoi du mail de notification */
- private void sendMailNotification() {
+ private void sendMailNotification() {
String voteURL = siteURL + "poll/VoteFor/" + poll.getPollId();
String modifURL = siteURL + "poll/Modification/" + poll.getPollId()
+ ":" + MD5.encode(poll.getCreatorId());
Map<String, String> data = new HashMap<String, String>();
- data.put("host", conf.getProperty("email_host"));
- data.put("port", conf.getProperty("email_port"));
- data.put("from", conf.getProperty("email_from"));
+ data.put("host", PollenProperty.EMAIL_HOST.getValue());
+ data.put("port", PollenProperty.EMAIL_PORT.getValue());
+ data.put("from", PollenProperty.EMAIL_FROM.getValue());
// Mail au créateur
data.put("to", poll.getCreatorEmail());
@@ -709,7 +704,7 @@
* @return vrai si le fichier existe
*/
@Log
- public boolean isFeedFileExisting() {
+ public boolean isFeedFileExisting() {
File feedFile = getFeedContext().getFile(poll.getPollId());
if (log.isDebugEnabled()) {
log.debug("feed context path : " + getFeedContext().getContextPath());
@@ -815,7 +810,7 @@
}
/** Méthode appelée lors de l'ajout d'un choix. */
- Object onSuccessFromChoiceForm() {
+ Object onSuccessFromChoiceForm() {
String choiceName = null;
String choiceDesc = null;
if (isTextType()) {
@@ -876,7 +871,7 @@
}
/** Méthode appelée lors de l'ajout d'un commentaire. */
- Object onSuccessFromCommentForm() {
+ Object onSuccessFromCommentForm() {
//newComment.setPollId(poll.getId());
newComment.setPostDate(new Date());
servicePoll.createComment(poll, newComment);
Modified: trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/pages/user/Register.java
===================================================================
--- trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/pages/user/Register.java 2010-02-24 16:19:22 UTC (rev 2883)
+++ trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/pages/user/Register.java 2010-02-25 12:07:51 UTC (rev 2884)
@@ -30,13 +30,14 @@
import org.apache.tapestry5.corelib.components.TextField;
import org.apache.tapestry5.ioc.Messages;
import org.apache.tapestry5.ioc.annotations.Inject;
+import org.chorem.pollen.business.PollenBusinessException;
+import org.chorem.pollen.business.PollenProperty;
import org.chorem.pollen.business.business.PreventRuleManager;
import org.chorem.pollen.business.dto.UserDTO;
import org.chorem.pollen.business.services.ServiceAuth;
import org.chorem.pollen.business.services.ServiceUser;
import org.chorem.pollen.business.utils.MD5;
import org.chorem.pollen.ui.data.Lien;
-import org.chorem.pollen.ui.services.Configuration;
/**
* Classe de la page d'enregistrement d'un utilisateur.
@@ -96,12 +97,6 @@
@Inject
private Messages messages;
- /**
- * Service contenant la configuration de l'application.
- */
- @Inject
- private Configuration conf;
-
@Parameter(defaultPrefix = BindingConstants.MESSAGE, value = "title")
@Property
private String title;
@@ -121,7 +116,7 @@
*
* @return la page d'accueil
*/
- Object onSuccessFromRegisterForm() {
+ Object onSuccessFromRegisterForm() {
// L'utilisateur s'est pas trompé en répétant son mot de passe
if (!password1.equals(password2)) {
@@ -156,11 +151,11 @@
}
/** Envoi du mail de notification */
- private void sendMailNotification() {
+ private void sendMailNotification() {
Map<String, String> data = new HashMap<String, String>();
- data.put("host", conf.getProperty("email_host"));
- data.put("port", conf.getProperty("email_port"));
- data.put("from", conf.getProperty("email_from"));
+ data.put("host", PollenProperty.EMAIL_HOST.getValue());
+ data.put("port", PollenProperty.EMAIL_PORT.getValue());
+ data.put("from", PollenProperty.EMAIL_FROM.getValue());
data.put("to", newUser.getEmail());
data.put("title", messages.format("registerEmail_subject", newUser
.getLogin()));
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 16:19:22 UTC (rev 2883)
+++ trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/services/AppModule.java 2010-02-25 12:07:51 UTC (rev 2884)
@@ -136,17 +136,13 @@
@EagerLoad
public RegistryShutdownListener buildPollenShutdown(
@InjectService("RegistryShutdownHub") RegistryShutdownHub hub) {
- RegistryShutdownListener listener = new PollenShutdown();
+ RegistryShutdownListener listener = new PollenManager();
hub.addRegistryShutdownListener(listener);
return listener;
}
- /**
- * This is the Configuration service definition. It manage the file
- * properties.
- */
- public static Configuration buildConfiguration() {
- return new ConfigurationImpl(CONFIGURATION_FILE);
+ public static void contributeRegistryStartup(OrderedConfiguration<Runnable> configuration) {
+ configuration.add("PollenStartup", new PollenManager());
}
/**
@@ -155,11 +151,11 @@
*/
@EagerLoad
public static BackgroundWorker buildBackgroundWorker(
- ComponentSource componentSource, Configuration configuration,
+ ComponentSource componentSource,
ServicePoll servicePoll) {
Messages messages = componentSource.getPage("LocalMessages")
.getComponentResources().getMessages();
- return new BackgroundWorkerImpl(messages, configuration, servicePoll);
+ return new BackgroundWorkerImpl(messages, servicePoll);
}
/**
Modified: trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/services/BackgroundWorkerImpl.java
===================================================================
--- trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/services/BackgroundWorkerImpl.java 2010-02-24 16:19:22 UTC (rev 2883)
+++ trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/services/BackgroundWorkerImpl.java 2010-02-25 12:07:51 UTC (rev 2884)
@@ -26,6 +26,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.tapestry5.ioc.Messages;
+import org.chorem.pollen.business.PollenProperty;
import org.chorem.pollen.business.business.PreventRuleManager;
import org.chorem.pollen.business.dto.PollAccountDTO;
import org.chorem.pollen.business.dto.PollDTO;
@@ -53,19 +54,15 @@
/** Messages internationalisés **/
private final Messages messages;
- /** Service contenant la configuration de l'application. */
- private Configuration conf;
-
/** Injection du service de gestion de sondages. */
private ServicePoll servicePoll;
/**
* Constructeur exécuté au lancement de l'application.
*/
- public BackgroundWorkerImpl(Messages messages, Configuration conf,
+ public BackgroundWorkerImpl(Messages messages,
ServicePoll servicePoll) {
this.messages = messages;
- this.conf = conf;
this.servicePoll = servicePoll;
timer = new Timer();
@@ -76,9 +73,8 @@
* Lancement des tâches en arrière-plan.
*/
public void executeTasks() {
- if ("".equals(conf.getProperty("siteUrl"))) {
- log
- .warn("No property siteUrl. Reminder emails would not contain it");
+ if (!PollenProperty.SERVER_URL.hasValue()) {
+ log.warn("No property siteUrl. Reminder emails would not contain it");
}
// Exécution de la tâche toutes les 10 min
@@ -129,12 +125,12 @@
* @param poll sondage concerné
*/
private void sendMailNotification(PollDTO poll, Long timeValue) {
- String voteURL = conf.getProperty("siteUrl") + "/poll/VoteFor/"
+ String voteURL = PollenProperty.SERVER_URL.getValue() + "/poll/VoteFor/"
+ poll.getPollId();
Map<String, String> data = new HashMap<String, String>();
- data.put("host", conf.getProperty("email_host"));
- data.put("port", conf.getProperty("email_port"));
- data.put("from", conf.getProperty("email_from"));
+ data.put("host", PollenProperty.EMAIL_HOST.getValue());
+ data.put("port", PollenProperty.EMAIL_PORT.getValue());
+ data.put("from", PollenProperty.EMAIL_FROM.getValue());
// Mails aux votants
for (PreventRuleDTO rule : poll.getPreventRuleDTOs()) {
Deleted: trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/services/Configuration.java
===================================================================
--- trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/services/Configuration.java 2010-02-24 16:19:22 UTC (rev 2883)
+++ trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/services/Configuration.java 2010-02-25 12:07:51 UTC (rev 2884)
@@ -1,64 +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.ui.services;
-
-import java.util.Properties;
-
-/**
- * Service de gestion de la configuration de l'application. Ce service lit la
- * configuration dans un fichier properties.
- *
- * @author rannou
- * @version $Id$
- */
-public interface Configuration {
-
- public static final String FEED_DIR = "feedDir";
- public static final String IMG_DIR = "upImgDir";
- public static final String PROP_APP_VERSION = "version";
- public static final String PROP_CONTACT_EMAIL = "adminEmail";
-
- /**
- * Retourne les propriétés.
- *
- * @return les propriétés.
- */
- public Properties getConf();
-
- /**
- * Change les propriétés.
- *
- * @param conf les propriétés.
- */
- public void setConf(Properties conf);
-
- /**
- * Retourne une propriété.
- *
- * @param key la clé de la propriété.
- * @return la propriété.
- */
- public String getProperty(String key);
-
- /**
- * Change une propriété.
- *
- * @param key la clé de la propriété.
- * @param value la valeur de la propriété.
- */
- public void setProperty(String key, String value);
-}
Deleted: trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/services/ConfigurationImpl.java
===================================================================
--- trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/services/ConfigurationImpl.java 2010-02-24 16:19:22 UTC (rev 2883)
+++ trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/services/ConfigurationImpl.java 2010-02-25 12:07:51 UTC (rev 2884)
@@ -1,62 +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.ui.services;
-
-import java.util.Properties;
-
-import org.chorem.pollen.business.utils.PropertiesLoader;
-
-/**
- * Implémentation du service de gestion de la configuration de l'application. Ce
- * service lit la configuration dans un fichier properties.
- *
- * @author rannou
- * @version $Id$
- */
-public class ConfigurationImpl implements Configuration {
-
- /** Propriétés de l'application. */
- private Properties conf;
-
- public ConfigurationImpl(Properties conf) {
- this.conf = conf;
- }
-
- public ConfigurationImpl(String filename) {
- conf = PropertiesLoader.loadPropertiesFile(filename);
- }
-
- @Override
- public Properties getConf() {
- return conf;
- }
-
- @Override
- public void setConf(Properties conf) {
- this.conf = conf;
- }
-
- @Override
- public String getProperty(String key) {
- return conf.getProperty(key);
- }
-
- @Override
- public void setProperty(String key, String value) {
- conf.setProperty(key, value);
- }
-}
Added: trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/services/PollenManager.java
===================================================================
--- trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/services/PollenManager.java (rev 0)
+++ trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/services/PollenManager.java 2010-02-25 12:07:51 UTC (rev 2884)
@@ -0,0 +1,53 @@
+/* *##% 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.ui.services;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.tapestry5.ioc.services.RegistryShutdownListener;
+import org.chorem.pollen.business.PollenContext;
+import org.nuiton.util.ApplicationConfig;
+import org.nuiton.util.ArgumentsParserException;
+
+/**
+ * Service de gestion de l'arrêt du serveur. Ce service exécute une action à la
+ * fermeture du registre Tapestry.
+ *
+ * @author rannou
+ * @version $Id$
+ */
+public class PollenManager implements RegistryShutdownListener, Runnable {
+
+ private static final Log log = LogFactory.getLog(PollenManager.class);
+
+ @Override
+ public void run() {
+ if (log.isInfoEnabled()) {
+ log.info("Start Pollen");
+ }
+ PollenContext.start();
+ }
+
+ @Override
+ public void registryDidShutdown() {
+ if (log.isInfoEnabled()) {
+ log.info("Stop Pollen");
+ }
+ PollenContext.stop();
+ }
+
+}
Property changes on: trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/services/PollenManager.java
___________________________________________________________________
Added: svn:keywords
+ "Author Date Id Revision HeadURL"
Deleted: trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/services/PollenShutdown.java
===================================================================
--- trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/services/PollenShutdown.java 2010-02-24 16:19:22 UTC (rev 2883)
+++ trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/services/PollenShutdown.java 2010-02-25 12:07:51 UTC (rev 2884)
@@ -1,36 +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.ui.services;
-
-import org.apache.tapestry5.ioc.services.RegistryShutdownListener;
-import org.chorem.pollen.business.utils.ContextUtil;
-
-/**
- * Service de gestion de l'arrêt du serveur. Ce service exécute une action à la
- * fermeture du registre Tapestry.
- *
- * @author rannou
- * @version $Id$
- */
-public class PollenShutdown implements RegistryShutdownListener {
-
- @Override
- public void registryDidShutdown() {
- ContextUtil.getInstance().closeContext();
- }
-
-}
Modified: trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/services/PropertiesFileSymbolProvider.java
===================================================================
--- trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/services/PropertiesFileSymbolProvider.java 2010-02-24 16:19:22 UTC (rev 2883)
+++ trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/services/PropertiesFileSymbolProvider.java 2010-02-25 12:07:51 UTC (rev 2884)
@@ -10,7 +10,7 @@
import org.apache.tapestry5.ioc.services.SymbolProvider;
import org.apache.tapestry5.ioc.util.CaseInsensitiveMap;
-import org.chorem.pollen.business.utils.PropertiesLoader;
+import org.chorem.pollen.business.PollenContext;
import org.slf4j.Logger;
public class PropertiesFileSymbolProvider implements SymbolProvider {
@@ -59,7 +59,7 @@
* @param resourceName the name of the resource to load
*/
public PropertiesFileSymbolProvider(Logger logger, String resourceName) {
- Properties conf = PropertiesLoader.loadPropertiesFile(resourceName);
+ Properties conf = PollenContext.getProperties();
initializeProperties(conf);
}
Deleted: trunk/pollen-ui/src/main/resources/pollen.properties
===================================================================
--- trunk/pollen-ui/src/main/resources/pollen.properties 2010-02-24 16:19:22 UTC (rev 2883)
+++ trunk/pollen-ui/src/main/resources/pollen.properties 2010-02-25 12:07:51 UTC (rev 2884)
@@ -1,52 +0,0 @@
-## Configuration de la base de donn\u00C3\u00A9es
-#hibernate.hbm2ddl.auto=update
-hibernate.show_sql=false
-hibernate.dialect=org.hibernate.dialect.H2Dialect
-hibernate.connection.username=sa
-hibernate.connection.password=
-hibernate.connection.driver_class=org.h2.Driver
-hibernate.connection.url=jdbc:h2:file:~/.pollen/pollendb
-
-#hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
-#hibernate.connection.username=pollen
-#hibernate.connection.password=pollen
-#hibernate.connection.driver_class=org.postgresql.Driver
-#hibernate.connection.url=jdbc:postgresql://intranet/pollen
-#hibernate.default_schema=public
-
-## Configuration de topia-migration
-topia.service.migration=org.nuiton.topia.migration.TopiaMigrationServiceImpl
-topia.service.migration.callbackhandlers=org.chorem.pollen.business.migration.PollenMigrationCallbackHandler
-topia.service.migration.mappingsdir=oldmappings
-topia.service.migration.modelnames=pollen
-
-## Initialisation de la base de donn\u00C3\u00A9es
-choiceType=DATE,IMAGE,TEXT
-pollType=RESTRICTED,FREE,GROUP
-voteCounting=NORMAL,PERCENTAGE,CONDORCET,NUMBER
-
-## Utilisateur par d\u00C3\u00A9faut
-adminLogin=admin
-adminPassword=pollen
-adminEmail=admin(a)domain.com
-
-## R\u00C3\u00A9pertoire des images transf\u00C3\u00A9r\u00C3\u00A9es
-upImgDir=.pollen/uploadedImages
-
-## Taille maximal des images transf\u00C3\u00A9r\u00C3\u00A9es (en octets)
-upload.filesize-max=1048576
-upload.requestsize-max=10485760
-
-## Configuration de l'envoi d'emails automatiques
-email_host=smtp.free.fr
-email_port=25
-email_from=bot(a)pollen.org
-
-## R\u00C3\u00A9pertoire des flux de syndication (Atom)
-feedDir=.pollen/feeds
-
-## Adresse du site (utilis\u00C3\u00A9e pour les emails de rappel)
-siteUrl=
-
-## Version de l'application
-version=${project.version}
\ No newline at end of file
1
0
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" />
1
0
r2882 - in trunk/pollen-business/src/main: java/org/chorem/pollen/business/converters java/org/chorem/pollen/business/dto java/org/chorem/pollen/business/services xmi
by fdesbois@users.chorem.org 24 Feb '10
by fdesbois@users.chorem.org 24 Feb '10
24 Feb '10
Author: fdesbois
Date: 2010-02-24 14:18:29 +0100 (Wed, 24 Feb 2010)
New Revision: 2882
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/DataChoiceConverter.java
trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataCommentConverter.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/DataPreventRuleConverter.java
trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataVoteConverter.java
trunk/pollen-business/src/main/java/org/chorem/pollen/business/dto/ChoiceDTO.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/dto/PreventRuleDTO.java
trunk/pollen-business/src/main/java/org/chorem/pollen/business/dto/VoteDTO.java
trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServicePollImpl.java
trunk/pollen-business/src/main/xmi/pollen.zargo
Log:
- Add some conversions in ConverterHelper + depreciate older methods
- The fucking DTOs are not very well formed for ui module, may be suppress them and refactor UI is needed
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-23 18:49:41 UTC (rev 2881)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/ConverterHelper.java 2010-02-24 13:18:29 UTC (rev 2882)
@@ -4,18 +4,25 @@
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.PollAccountDTO;
import org.chorem.pollen.business.dto.PollDTO;
import org.chorem.pollen.business.dto.PreventRuleDTO;
+import org.chorem.pollen.business.dto.VoteDTO;
import org.chorem.pollen.business.dto.VotingListDTO;
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.persistence.Vote;
+import org.chorem.pollen.business.persistence.VoteToChoice;
import org.chorem.pollen.business.persistence.VotingList;
import org.chorem.pollen.common.ChoiceType;
import org.chorem.pollen.common.PollType;
import org.chorem.pollen.common.VoteCountingType;
+import org.chorem.pollen.votecounting.business.NumberMethod;
import org.nuiton.topia.persistence.TopiaEntity;
import org.nuiton.util.beans.BinderBuilder;
import org.nuiton.util.beans.BinderProvider;
@@ -113,6 +120,25 @@
prepare(PreventRule.class, PreventRuleDTO.class, properties);
}
+ public static void prepareVoteConverters() {
+ String[] properties = new String[] {
+ Vote.WEIGHT,
+ Vote.COMMENT,
+ Vote.ANONYMOUS
+ };
+
+ prepare(Vote.class, VoteDTO.class, properties);
+ }
+
+ public static void prepareCommentConverters() {
+ String[] properties = new String[] {
+ Comment.TEXT,
+ Comment.POST_DATE
+ };
+
+ prepare(Comment.class, CommentDTO.class, properties);
+ }
+
public static Choice convert(ChoiceDTO dto, Choice entity) {
BinderProvider.getBinder(ChoiceDTO.class, Choice.class).copy(dto, entity);
return entity;
@@ -121,6 +147,10 @@
public static ChoiceDTO convert(Choice entity, ChoiceDTO dto) {
BinderProvider.getBinder(Choice.class, ChoiceDTO.class).copy(entity, dto);
dto.setId(entity.getTopiaId());
+ String name = entity.getName();
+ dto.setHidden(name != null
+ && name.startsWith(NumberMethod.HIDDEN_PREFIX));
+ dto.setPollId(entity.getPoll().getTopiaId());
return dto;
}
@@ -139,6 +169,14 @@
dto.setChoiceType(ChoiceType.valueOf(entity.getChoiceType()));
dto.setPollType(PollType.valueOf(entity.getPollType()));
dto.setVoteCounting(VoteCountingType.valueOf(entity.getVoteCounting()));
+
+ PollAccount creator = entity.getCreator();
+ UserAccount user = creator.getUserAccount();
+ dto.setCreatorId(creator.getTopiaId());
+ dto.setCreatorEmail(creator.getEmail());
+ if (creator.getUserAccount() != null) {
+ dto.setUserId(user.getTopiaId());
+ }
return dto;
}
@@ -173,8 +211,70 @@
public static PreventRuleDTO convert(PreventRule entity, PreventRuleDTO dto) {
BinderProvider.getBinder(PreventRule.class, PreventRuleDTO.class).copy(entity, dto);
dto.setId(entity.getTopiaId());
+ Poll poll = entity.getPoll();
+ dto.setPollId(poll.getTopiaId());
return dto;
}
+ public static Vote convert(VoteDTO dto, Vote entity) {
+ BinderProvider.getBinder(VoteDTO.class, Vote.class).copy(dto, entity);
+ return entity;
+ }
+ /**
+ * Convert a Vote entity to a VoteDTO.
+ * Add pollId in the DTO corresponding to the poll topiaId owner of the
+ * vote. Add choices (ChoiceDTO) for vote values.
+ * The user linked with the vote may be a votingList (group voteCounting)
+ * or a pollAccount (other voteCounting type).
+ *
+ * @param entity Vote
+ * @param dto VoteDTO
+ * @return VoteDTO
+ */
+ public static VoteDTO convert(Vote entity, VoteDTO dto) {
+ BinderProvider.getBinder(Vote.class, VoteDTO.class).copy(entity, dto);
+ dto.setId(entity.getTopiaId());
+ Poll poll = entity.getPoll();
+ dto.setPollId(poll.getTopiaId());
+
+ // Set reference only if not anonymous
+ //if (!entity.getAnonymous()) {
+ PollAccount account = entity.getPollAccount();
+ VotingList list = entity.getVotingList();
+ // vote for a list
+ if (list != null) {
+ dto.setVotingListId(list.getTopiaId());
+ // vote for a person (pollAccount)
+ } else if (account != null) {
+ dto.setPollAccountId(account.getTopiaId());
+ }
+ //}
+
+ // Choices for voteValues
+ for (VoteToChoice choice : entity.getChoiceVoteToChoice()) {
+ ChoiceDTO choiceDTO =
+ convert(choice.getChoice(), new ChoiceDTO());
+ choiceDTO.setValue(choice.getVoteValue());
+ dto.addChoice(choiceDTO);
+ }
+ return dto;
+ }
+
+ public static Comment convert(CommentDTO dto, Comment entity) {
+ BinderProvider.getBinder(CommentDTO.class, Comment.class).copy(dto, entity);
+ return entity;
+ }
+
+ 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;
+ }
+
+
}
Modified: trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataChoiceConverter.java
===================================================================
--- trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataChoiceConverter.java 2010-02-23 18:49:41 UTC (rev 2881)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataChoiceConverter.java 2010-02-24 13:18:29 UTC (rev 2882)
@@ -61,7 +61,9 @@
*
* @param eChoice L'entité choix
* @return Le dto choix
+ * @deprecated use {@link ConverterHelper}
*/
+ @Deprecated
public ChoiceDTO createChoiceDTO(Choice eChoice) {
ChoiceDTO choiceDTO = new ChoiceDTO();
choiceDTO.setId(eChoice.getTopiaId());
@@ -84,7 +86,9 @@
*
* @param cChoices Les entités choix
* @return la liste des dtos choix
+ * @deprecated use {@link ConverterHelper}
*/
+ @Deprecated
public List<ChoiceDTO> createChoiceDTOs(Collection<Choice> cChoices) {
List<ChoiceDTO> results = new ArrayList<ChoiceDTO>();
ChoiceDTO dto;
Modified: 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-23 18:49:41 UTC (rev 2881)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataCommentConverter.java 2010-02-24 13:18:29 UTC (rev 2882)
@@ -68,7 +68,9 @@
*
* @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());
@@ -91,7 +93,9 @@
*
* @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;
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-23 18:49:41 UTC (rev 2881)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataPollConverter.java 2010-02-24 13:18:29 UTC (rev 2882)
@@ -27,14 +27,13 @@
import org.chorem.pollen.business.dto.PreventRuleDTO;
import org.chorem.pollen.business.persistence.Choice;
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;
import org.chorem.pollen.business.services.ServicePreventRuleImpl;
-import org.chorem.pollen.common.ChoiceType;
-import org.chorem.pollen.common.PollType;
-import org.chorem.pollen.common.VoteCountingType;
import org.nuiton.topia.TopiaException;
/**
@@ -58,7 +57,9 @@
*
* @param ePoll l'entité sondage
* @return le dto sondage
+ * @deprecated use {@link ConverterHelper}
*/
+ @Deprecated
public PollDTO createPollDTO(Poll ePoll) {
PollDTO pollDTO = ConverterHelper.convert(ePoll, new PollDTO());
@@ -113,7 +114,9 @@
*
* @param lPolls liste de entités sondages
* @return la liste des dtos sondages
+ * @deprecated use {@link ConverterHelper}
*/
+ @Deprecated
public List<PollDTO> createPollDTOs(List<Poll> lPolls) {
ArrayList<PollDTO> results = new ArrayList<PollDTO>();
PollDTO dto;
Modified: trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataPreventRuleConverter.java
===================================================================
--- trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataPreventRuleConverter.java 2010-02-23 18:49:41 UTC (rev 2881)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataPreventRuleConverter.java 2010-02-24 13:18:29 UTC (rev 2882)
@@ -63,8 +63,10 @@
* Création d'un dto à partir d'une entité règle.
*
* @param preventRule l'entité de la règle
- * @return Le dto règle créé
+ * @return Le dto règle créé *
+ * @deprecated use {@link ConverterHelper}
*/
+ @Deprecated
public PreventRuleDTO createPreventRuleDTO(PreventRule preventRule) {
PreventRuleDTO preventRuleDTO = new PreventRuleDTO();
preventRuleDTO.setId(preventRule.getTopiaId());
@@ -87,7 +89,9 @@
*
* @param cPreventRules collection des entités règle
* @return la liste des dtos règle
+ * @deprecated use {@link ConverterHelper}
*/
+ @Deprecated
public List<PreventRuleDTO> createPreventRuleDTOs(
Collection<PreventRule> cPreventRules) {
List<PreventRuleDTO> results = new ArrayList<PreventRuleDTO>();
Modified: trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataVoteConverter.java
===================================================================
--- trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataVoteConverter.java 2010-02-23 18:49:41 UTC (rev 2881)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataVoteConverter.java 2010-02-24 13:18:29 UTC (rev 2882)
@@ -83,7 +83,9 @@
*
* @param eVote L'entité vote
* @return Le dto vote
+ * @deprecated use {@link ConverterHelper}
*/
+ @Deprecated
public VoteDTO createVoteDTO(Vote eVote) {
VoteDTO voteDTO = new VoteDTO();
voteDTO.setId(eVote.getTopiaId());
@@ -122,7 +124,9 @@
*
* @param cVotes collection des entités vote
* @return la liste des dtos vote
+ * @deprecated use {@link ConverterHelper}
*/
+ @Deprecated
public List<VoteDTO> createVoteDTOs(Collection<Vote> cVotes) {
List<VoteDTO> results = new ArrayList<VoteDTO>();
VoteDTO dto;
Modified: trunk/pollen-business/src/main/java/org/chorem/pollen/business/dto/ChoiceDTO.java
===================================================================
--- trunk/pollen-business/src/main/java/org/chorem/pollen/business/dto/ChoiceDTO.java 2010-02-23 18:49:41 UTC (rev 2881)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/dto/ChoiceDTO.java 2010-02-24 13:18:29 UTC (rev 2882)
@@ -31,20 +31,37 @@
private static final long serialVersionUID = 1L;
+ /** main id (topiaId) **/
private String id = "";
+ /** name of the choice **/
private String name = "";
+ /** description of the choice **/
private String description = "";
+ /** ?? **/
+ private Boolean validate = false;
+
+ /**
+ * VOTE context : value of the choice in a vote.
+ * Not fill by servicePoll
+ **/
private Integer value = 0;
- private Boolean validate = false;
-
+ /**
+ * VOTE context : topiaId of the vote where the choice is done
+ * FIXME-FD20100224 Is it really needed ??
+ **/
private String voteId = "";
+ /**
+ * topiaId of the poll owner of this choice
+ * FIXME-FD20100224 Is it really needed ??
+ */
private String pollId = "";
+ /** used for specific choice in Number VoteCounting **/
private Boolean hidden = false;
public ChoiceDTO() {
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-23 18:49:41 UTC (rev 2881)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/dto/CommentDTO.java 2010-02-24 13:18:29 UTC (rev 2882)
@@ -28,14 +28,26 @@
*/
public class CommentDTO implements Serializable {
+ /** main id (topiaId) **/
private String id = "";
+ /** content of the comment **/
private String text = "";
+ /** date where the comment were created **/
private Date postDate = null;
+ /**
+ * topiaId of the poll owner of this comment
+ * FIXME-FD20100224 Is it really needed ??
+ **/
private String pollId = "";
+ /**
+ * 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() {
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-23 18:49:41 UTC (rev 2881)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/dto/PollDTO.java 2010-02-24 13:18:29 UTC (rev 2882)
@@ -72,7 +72,8 @@
private String userId = "";
- // Carefull, not TopiaId but pollAccount.votingId = creator name
+ // Carefull, not TopiaId but pollAccount.votingId = creator name depends
+ // on case : for saving, it's the votingId, for display it's the topiaId
private String creatorId = "";
private String creatorEmail = "";
@@ -317,6 +318,13 @@
this.commentDTOs = commentDTOs;
}
+ public void addComment(CommentDTO comment) {
+ if (commentDTOs == null) {
+ commentDTOs = new ArrayList<CommentDTO>();
+ }
+ commentDTOs.add(comment);
+ }
+
public List<VotingListDTO> getVotingListDTOs() {
return votingListDTOs;
}
@@ -333,6 +341,13 @@
this.voteDTOs = voteDTOs;
}
+ public void addVote(VoteDTO vote) {
+ if (voteDTOs == null) {
+ voteDTOs = new ArrayList<VoteDTO>();
+ }
+ voteDTOs.add(vote);
+ }
+
public List<PreventRuleDTO> getPreventRuleDTOs() {
return preventRuleDTOs;
}
@@ -341,6 +356,13 @@
this.preventRuleDTOs = preventRuleDTOs;
}
+ public void addPreventRule(PreventRuleDTO rule) {
+ if (preventRuleDTOs == null) {
+ preventRuleDTOs = new ArrayList<PreventRuleDTO>();
+ }
+ preventRuleDTOs.add(rule);
+ }
+
public List<ChoiceDTO> getChoiceDTOs() {
return choiceDTOs;
}
@@ -349,6 +371,13 @@
this.choiceDTOs = choiceDTOs;
}
+ public void addChoice(ChoiceDTO choice) {
+ if (choiceDTOs == null) {
+ choiceDTOs = new ArrayList<ChoiceDTO>();
+ }
+ choiceDTOs.add(choice);
+ }
+
public List<ResultDTO> getResultDTOs() {
return resultDTOs;
}
Modified: trunk/pollen-business/src/main/java/org/chorem/pollen/business/dto/PreventRuleDTO.java
===================================================================
--- trunk/pollen-business/src/main/java/org/chorem/pollen/business/dto/PreventRuleDTO.java 2010-02-23 18:49:41 UTC (rev 2881)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/dto/PreventRuleDTO.java 2010-02-24 13:18:29 UTC (rev 2882)
@@ -27,8 +27,13 @@
*/
public class PreventRuleDTO implements Serializable {
+ /** main id (topiaId) **/
private String id = "";
+ /**
+ * topiaId of the poll owner of this preventRule
+ * FIXME-FD20100224 Is it really needed ??
+ **/
private String pollId = "";
private String scope = "";
Modified: trunk/pollen-business/src/main/java/org/chorem/pollen/business/dto/VoteDTO.java
===================================================================
--- trunk/pollen-business/src/main/java/org/chorem/pollen/business/dto/VoteDTO.java 2010-02-23 18:49:41 UTC (rev 2881)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/dto/VoteDTO.java 2010-02-24 13:18:29 UTC (rev 2882)
@@ -29,20 +29,33 @@
*/
public class VoteDTO implements Serializable {
+ /** main id (topiaId) **/
private String id = "";
- private double weight = 0;
+ /** weight of the person who has voted depends on poll context **/
+ private Double weight = 0.;
+ /**
+ * FIXME-FD20100224 comment on the vote. Where is it used in ui ?
+ **/
private String comment = "";
- private boolean anonymous = false;
+ /** the vote is anonymous or not **/
+ private Boolean anonymous = false;
+ /** topiaId of the account who has voted**/
private String pollAccountId = "";
+ /**
+ * topiaId of the poll where the vote is done
+ * FIXME-FD20100224 Is it really needed ??
+ **/
private String pollId = "";
+ /** topiaId of the list corresponding to this vote **/
private String votingListId = "";
+ /** choices made by this vote **/
private List<ChoiceDTO> choiceDTOs = new ArrayList<ChoiceDTO>();
public VoteDTO() {
@@ -66,11 +79,11 @@
this.id = id;
}
- public double getWeight() {
+ public Double getWeight() {
return weight;
}
- public void setWeight(double weight) {
+ public void setWeight(Double weight) {
this.weight = weight;
}
@@ -82,11 +95,15 @@
this.comment = comment;
}
- public boolean isAnonymous() {
+ public Boolean isAnonymous() {
return anonymous;
}
- public void setAnonymous(boolean anonymous) {
+ public Boolean getAnonymous() {
+ return isAnonymous();
+ }
+
+ public void setAnonymous(Boolean anonymous) {
this.anonymous = anonymous;
}
@@ -122,4 +139,11 @@
this.choiceDTOs = choiceDTOs;
}
+ public void addChoice(ChoiceDTO choice) {
+ if (choiceDTOs == null) {
+ choiceDTOs = new ArrayList<ChoiceDTO>();
+ }
+ choiceDTOs.add(choice);
+ }
+
}
\ 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-23 18:49:41 UTC (rev 2881)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServicePollImpl.java 2010-02-24 13:18:29 UTC (rev 2882)
@@ -27,13 +27,18 @@
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;
import org.chorem.pollen.business.dto.PollAccountDTO;
import org.chorem.pollen.business.dto.PollDTO;
import org.chorem.pollen.business.dto.PreventRuleDTO;
+import org.chorem.pollen.business.dto.VoteDTO;
import org.chorem.pollen.business.dto.VotingListDTO;
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.PersonToList;
import org.chorem.pollen.business.persistence.Poll;
import org.chorem.pollen.business.persistence.PollAccount;
@@ -85,10 +90,11 @@
pollDAO = PollenModelDAOHelper.getPollDAO(transaction);
- String pollId = ContextUtil.createPollenUrlId();
- Poll entity = ConverterHelper.convert(pollDTO, pollDAO.create(pollId));
-
- // ** Creator managment
+ // Create with a new pollId generated for links
+ Poll entity = pollDAO.create(ContextUtil.createPollenUrlId());
+ ConverterHelper.convert(pollDTO, entity);
+
+ // ** Manage the poll creator
PollAccount creator = prepareCreator(transaction, pollDTO);
entity.setCreator(creator);
@@ -107,7 +113,8 @@
}
// ** Create new preventRules
- PreventRuleDAO ruleDAO = PollenModelDAOHelper.getPreventRuleDAO(transaction);
+ PreventRuleDAO ruleDAO =
+ PollenModelDAOHelper.getPreventRuleDAO(transaction);
for (PreventRuleDTO ruleDTO : pollDTO.getPreventRuleDTOs()) {
PreventRule rule =
ConverterHelper.convert(ruleDTO, ruleDAO.create());
@@ -167,7 +174,8 @@
}
// Create new account if account properties changed or no user found
if (creator == null) {
- accountProperties.put(PollAccount.ACCOUNT_ID, ContextUtil.createPollenUrlId());
+ accountProperties.put(
+ PollAccount.ACCOUNT_ID, ContextUtil.createPollenUrlId());
creator = accountDAO.create(accountProperties);
}
return creator;
@@ -286,8 +294,17 @@
}
}
+ /**
+ * This method must be deleted after ui refactor in PollCreation page.
+ * Only used for CreationValidation page that not need complete poll data.
+ * Only main and creator params will be load in dto using
+ * {@link ConverterHelper#convert(Poll, PollDTO) }
+ *
+ * @param id topiaId of the poll
+ * @return the PollDTO corresponding
+ */
@Override
- public PollDTO findPollById(String pollId) {
+ public PollDTO findPollById(String id) {
TopiaContext transaction = null;
PollDTO result = null;
try {
@@ -295,13 +312,17 @@
pollDAO = PollenModelDAOHelper.getPollDAO(transaction);
- Poll pollEntity = pollDAO.findByTopiaId(pollId);
+ Poll pollEntity = pollDAO.findByTopiaId(id);
if (pollEntity != null) {
- converter.setTransaction(transaction);
- result = converter.createPollDTO(pollEntity);
+ result = ConverterHelper.convert(pollEntity, new PollDTO());
}
+// if (pollEntity != null) {
+// converter.setTransaction(transaction);
+// result = converter.createPollDTO(pollEntity);
+// }
+
//transaction.commitTransaction();
if (log.isDebugEnabled()) {
@@ -330,8 +351,62 @@
Poll pollEntity = pollDAO.findByPollId(pollId);
if (pollEntity != null) {
- converter.setTransaction(transaction);
- result = converter.createPollDTO(pollEntity);
+// converter.setTransaction(transaction);
+// result = converter.createPollDTO(pollEntity);
+
+ result = ConverterHelper.convert(pollEntity, new PollDTO());
+
+ // Load choices
+ for (Choice choice : pollEntity.getChoice()) {
+ ChoiceDTO dto =
+ ConverterHelper.convert(choice, new ChoiceDTO());
+ result.addChoice(dto);
+ }
+
+ // Load votes
+ for (Vote vote : pollEntity.getVote()) {
+ VoteDTO dto =
+ ConverterHelper.convert(vote, new VoteDTO());
+ result.addVote(dto);
+ }
+
+ // Load comments
+ for (Comment comment : pollEntity.getComment()) {
+ CommentDTO dto =
+ ConverterHelper.convert(comment, new CommentDTO());
+ result.addComment(dto);
+ }
+
+ // Load preventRules
+ for (PreventRule rule : pollEntity.getPreventRule()) {
+ PreventRuleDTO dto =
+ ConverterHelper.convert(rule, new PreventRuleDTO());
+ result.addPreventRule(dto);
+ }
+
+// if (ePoll.getChoice().size() > 0) {
+// pollDTO.setChoiceDTOs(choiceConverter.createChoiceDTOs(ePoll
+// .getChoice()));
+// }
+// if (pollEntity.getVote().size() > 0) {
+// DataVoteConverter voteConverter = new DataVoteConverter();
+// result.setVoteDTOs(voteConverter.createVoteDTOs(pollEntity.getVote()));
+// }
+// if (pollEntity.getComment().size() > 0) {
+// DataCommentConverter commentConverter = new DataCommentConverter();
+// result.setCommentDTOs(commentConverter.createCommentDTOs(pollEntity
+// .getComment()));
+// }
+// if (pollEntity.getPreventRule().size() > 0) {
+// DataPreventRuleConverter preventRuleConverter = new DataPreventRuleConverter();
+// result.setPreventRuleDTOs(preventRuleConverter
+// .createPreventRuleDTOs(pollEntity.getPreventRule()));
+// }
+ if (pollEntity.getVotingList().size() > 0) {
+ DataVotingListConverter votingListConverter = new DataVotingListConverter();
+ result.setVotingListDTOs(votingListConverter
+ .createVotingListDTOs(pollEntity.getVotingList()));
+ }
}
//transaction.commitTransaction();
Modified: trunk/pollen-business/src/main/xmi/pollen.zargo
===================================================================
--- trunk/pollen-business/src/main/xmi/pollen.zargo 2010-02-23 18:49:41 UTC (rev 2881)
+++ trunk/pollen-business/src/main/xmi/pollen.zargo 2010-02-24 13:18:29 UTC (rev 2882)
@@ -1,95 +1,99 @@
-PK�yW<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��
+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��
�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�PK�yW<pollen_DC_Pollen.pgml�]k��6���_�۸�O��!JJffя�E�$;H&��Bm�=���{&sq��d�d��lZf$y�dۖ��ê��b��_�x\N>'��"]��@W��$YM��b5s��������o�y�_w�����&Os~ï���㻟&�W���_�0K6���i�[��_��y��/���-��:~��l��b���v�<�>������o?�x��7���5�w���e^"��y�2������;��D��C��e�y�w^�u㱋o&�k?&o.�n��!].���7o������i�����{���?�K���a���PL_M��a�_O������~��y������6Y'���S��"����>}J�q�k7/�oO�������y���.��O����š8�����%�����t���\|���&�|���ꥻw��/�������~Z/>��d�ӷ�wﭓ�6^͗IeB��)���&�ˏ_�\pl_~���m?����O�b�i��S|�02��^�����5�|��hDW%"�����_[��-�Jل�U��ޔ˓��vh����_R�~��&�2T��d�)@�P1��|O�z���U#.�f��������q��80��qx&�L����!]���e:/�]l��b��"�m����r&��}�f���|��7���b��6Yq�x���_���������O����f��Xro�� �_�" ��@u0��؎%j�!�A��!�5�͞���i����@�"9,���x�ݦ�O�z���>��(܇9�;�<�S�9��8Ffaw�0�њ�8*���y��q��ܦb��=��l��Qc2
-�o�k^?���m*O�0%���b�ra��n;(tI.Gs��8�.Gٻ�?T���̢:�:����rt .�MG[���Su9�"�+�d�T3������a[�e�#?�&�M~�g5��n�wIpGшv���t�n6m;�m;$2����P�N��D���3ų���Q�Q��@�7*Fe"�(��
-M��W�8�@~�="�&V��S�41�+�ı��'�5E'[�*41dQLȪ&V%Nkb��H%��M2741hb���q `�&�ZC�&V&�L��I�5��6��@C�5�,��K�#ȩ0�����8Ffa�Ѡ�:�&V�a:����c��!ۚX�,|��Y���,�����T ��gu�ީb
-��棭���ѪbP�$���pq��4�W-Vf
-1�ɾ�#��O�f�%]*bP�D�C�]�j���z����i���;� ���2n�6k@R��-����v<{\������4]&��sY�?Z�$����9����m
-В1���}DB
-tw �����^MhVK�Q��_���g�/�T>��ъ-Q_�%\��/��Q������Z:C0 �ٌ��Ţ��,e3*f d
-n$3��̠U>�C�e`=��\F�\��2�@�� ��=�����r�n#�m!%/���
-n]�X�a���cd�<iQН����èM�0
-5��SW�b���v3;2�{�#t�'&0$6����8��t���/T�MGK��ߢ�^`){!��`��(�<q�`Za��셈��d�+�D9Ҝ�.
-�/,%.$�1 �":"�!]���x�z�) �R(�PJ�O����t1M��#�c���q�GP�Y�Po�u���9G#�9��j��P4�n&P�y�H?������V�d�����30�<�@s���t��s��jE��+��h�;�sӾ�ͮ���K;�E�Y�J9�{�{�JW_�����69z�ʒ�g�G��C�o���1���h�9�O����I6��m+��KM�3��V�1��߹X=s#?w���E���K�w���/8�~�xP05�����y�m�Z���
-ү;l���x��~���B2D��g@ ��C����s%ލ%s�V2g�ʩ����s_1�� �y�/���"g+�H�b�#Z��2cYL,�G�nK'��#�*�D�X1w��4���T1W1� Sp�b�Hsa Ð��
-tc�\���b��*�@R.�ԁ��s���~\l�{��ݺ�<����#�NE���x�T6'F8�Y��.��.�!}���͂0�"��ӕ�W��Us;B{w�n���M,��E��܍G(�t���̩�-����V�E[3G��9�dz�ZX�z�2ޤK��9�!�ɵ��!Zn�����c�����{n+=���k������,�1,ۀ���qRw��JնSz��1L��*Ej�Z����1ԮS1 ���Z��C��C\�xF=�6�1���J��Z��=�I;�@�w=�C�ޤ�&=��@��1k��1�G����Q��6�p��c�P��l6T�j��c=��@�a�.�a�[�ÀM���@���èr7f���6�1���k7�zL�J@5*�a+��T�2:� ɛM:]� �so�o:f1ίM����C���?T<
-��q[��=w���~NgI�L����d�����2���ȧm^"|8��k��+�K5������|�I��_���w��#7�|y�����*YۛZ�{�7�W}�I���&�XW �
-�Mp�@����v��_����F� �M�o�;p���W�ֻ��z�J��v�9�֧����th��c����(�g2��9@42���IVG�B¯=�a:3O�s�������.S�ͽ
-��7g���UWM��+
-�+Y��n��&twV}��f�X�]"|yI��p����"�fS��w�e�u*ĄV������byHo�Z`^�bO�b;YG�:|�O1��em�N=�&C[�ΘbrK�����b��1�:Ą&�����\9��=��է��0�],_M|��q�j��<�u�E3��e-"�����F�xH6�[��z?�À�~�n1N�0��+��=��ӂaz�ܺ���@��ଞֳ���Ӳ�h�i�[�9��la,�=��M+�03��ݙ�s�V�h]Y�;��--s�X����l���"Ҙ�d�&���� }��lf�oV��m��]�=�s�X��d�\&��U��P_Q+q=�e>���d�̠�̶��k��z3�w����b��b��NkO����ô?���}3p=� �ΐw��p������(Y��x]���C���Ph��yjrGt�vW���f����䮳��\�`�h��һ�D���M4Bg�^Wf�Nc�{�/eF��wW �9�`ZS��p�콛��'�ICM��p1����ur��/��w����4�V.7bwe�Hv�S:���yA��yY��|/&q�<�bN��E��ЊLJmWNr��YH�hO^�Y+P��^�Z-�8]�I%jU3
-�!�u�"�H*R�� �8����Y����,S�jejb(
-�P�����Z|L��Dv��vQ��p�0u(�uUFIkR��H3CQN�0�]!MԷ���4ӡ*�A�x�{���"�Uk{ZE{�#� N�[�iET��g.G�t��U�).���W�G[�I�kr�d� u6��5�Ά Ԥj�
-v����g�)N}k���j5UV��UUUll��ɟ.W�D�\���p�]Տ���v����@X��U��ҿ��Y�l+��rv��XY轚,?����)�$!�����ԓ�8�!S����H�PM%�V�Y��θ�#�|�L���&�����)w\&�}�DS���
-�0Ɓ�q@�n>ʄ9����_� �`�'�H���2!_/fkE�B�A�*�!.�l�f��B\W�E�jC��ӛ��ϸ�.G�4��4ӡ�,*�Ds��D�1���<������q�J(y��<�"a>�ax�����8�x�k�#n��dP
-w�[/s0��\�@=�8ffs����Vq�x�:ȡ�ʃ6V���%@'h!��W������XW�_
-W�0X����RM��-�?���a�+�N�����ju���4� ' o}W�ժ|��4�N��|\��������Z߄Ɂw�0�L��< ��a"�z*X��]Q�Ϫ;x�Y"���g&{�F�.ɞw�+n2�2x�gо�>�##�{h0=�##�k; �����@c�'#{d${m'�6�#��� ��e�LA�P�������S\O�ƕ��fl���,����,a����\����ky����GT�Z�*GV���\�ʺ����Q-����� w��K>�� e�C�L���.��j&����&�cI�%]�C��PI�Tˡ��%]��g��/�K�9��1�y��9{?-��JL�S�� T��6ȝs�'��1�L�-�U�I�8ٺv�yQ��s�sc���[dm���ߤ�.������%]�;�Z�o�t����-��.��j�����m,��L��հ���5]"�j�b��aP'+��_,9�����<Y7#N��C�h�Ӝ#��1V���p~��;���v�YqN�5�c
-i��п��������Vhz�#3˖�(��1�~Jg�S�����q-��㖞ut7E�g;�X&�V0�?뗃�-����l��l�B$C�0��r�_��+�5��2�"w�+�'�^N�����r�q�����KRz��j���SJ�%)��0�s�x����c�t�&�a�ܧ�#}�ҳ�<��39�V��<�J��z�D��t=_�����1�pT����z~�tt��w1
-]�@Eg�-�:�oWG���7d_5t�?���LCW�����<��A�@��e{��%��q��g�~��� ��6k~M#����P#(
-�nC��B����n~�|�84�����v�-,e��$E��?��(�/'a�]D-����}R꽚�w
-�y?��O��d���i�S���.c�[BUP�h��g\�3+��"�ZIJ2ەPX�Dj��<d�]�I��븺�P6GĪ@�(E�8��76J�bU�N�
-jb�J"��9�A�ҊT�]�*�n$ ���\��at�l�HB��H,���vւϠoBUm��P,�}&�dn1��B���P��7��&�U��!��.�o�y��gb��ߐ���!�s>r����.�*���꜏j����Z�'��k��Nˆ嵁T�)�����(�ƫt��1}�x�
-ǿ*��.:aK#8����,S7ҩjN�˪�����Y����
-���tZw�8dj���|�f.��]t��gq���q �m�Ӊ��5"n��K�l��
-��֭[�w�N�0͞y'���'�a��Z�]B3t=���d
-yB�)�j���X>�'^�-���Y�X��%�A�&�d�h�ۇˇ�mڇu�OM�p��cH_�,�k�>��i�^��9���`-@�9ώ�ez�h�U����Y�ɿk�3֙v�,�����4��M�_�:��Q;:^ޚ�UR霗ۃ��Fa��0��@�([�wH����|�]7l����<���dt�#�3:��f�:��������~����3>�s�����Ǽ�|�:���^c�u6�Y!�9D���:�z��z]�ތ.�t�����^M�c���:j��μoJ�����Q�G�W� `r)�)*J������!X��G�������Kq[�W���pВln�{��!4��0h��c���z�ǿ֤�G�}r����_�
-籺�C��9����>�a�Jp�;�!�qx̂[u�T�e��8zU�]�a:T=0��n1���1�۟#w6��l��?G��Mj�!:��r��b��ֳ=JgS�yP:����G��`�C�esb~��Y~4�
-�x@Б5DzG�^z��N��C��>�;���o�>�9ھm��bu��g�~n�g��[�k�g���ǂF��.�rYy����YJ
-��^��t��>�����9G�!G|���3r���9���
-9��NNߜ�ؐc>&��Ʈ'���*�T<��DŽ4]n�;.ðm:G�:���5ܣ�MC
-Y�tʱޱ18�ְ\�YlH�G��X�u::GzI��A�<�OF�H��M���9�K:g9�PH��>�#��s6�M��t�gұ�y�+U�`�����SܲsrE�=��>�VD���~�fa���]�e� 6��6�l����6���|�@:lxs��&t$�-�M���l�T[�kg�Nk���nʁw���At�xj���?`6wc�ʶ���a��i)�n_��G2��d�8�k·�'s�H�Z�o���N2�c���0�Ŀ��fd�c�쒹�r��L�jٜ:9ےαӹ[�5�}:džM�n5�v2:�F:��t�
-���6����96ҹ�ۦsΟR�H�R�)�nu9��(m[���P��ϟ��CE����(�Bޝ.5K�̣ջ�(�����V�u:������~�.�A﹟M�/ �&@Zdƃ^�?c�ߝ#5������6�\�QԔk���aj��Ӷ�v�Ц$t,�Q�b�Y�, �{|��Pܺ�w�NK|�ݓ��s�̪�:�s�\�#l�7�m����=���s�&�օ<w�e���g���}"��Yl�|3��y��g�a�
-��D������˷��?PKN7g����PK�yW<pollen.todo�����Q(K-*���S�UP2�3PRH�K�O��K ����Z()��q�(��;�D�*���+G���*(�8z)%)J
-@% ���,.2���E���9e�)�E�%��� Y,B3PK4�[-m�PK�yW<pollen_profile.profile�����Q(K-*���S�UP2�3PRH�K�O��K ����Z()��qq��e��q��ÙPK7Rp:BPK�yW<
-pollen.xmi�]m��8��>��5�U=S����KW&[����j�JM2��U�p������/��m��H�E�E2�n[��#��9GGG����y;y�Q���Ƀ8&0pB�6�}YO���?�����~�|�g���C��6�����G�Imf��f��3�w����ˇI⧿&�y������5�'�<�'QyR��r�e" ������${��.��O&������A�@V��
-���$-;�6a��}���G���$C���9�o����{,�F����{a&3���I_������@�R>ԩ(M�)�;�!�t��g���$�����u�I�����B�h���]������m>m��~g�Ϗ�wza!Q'�����L�>}8��w���j�tjSQ�NEA��n;��Dz�n�3��� O����W�e��[}
-�[�x����t|�w�ʾ��6��7�aR����^o��s;N"���=���UV[�In����_�v�B�ž�}�xo��^]�%۔<�I�DC���֒%�ǻO�_��I�s3$�T����n�I�cW*�VĂ��9���F�#��z��XBR\�R���f�m-��G* ���Z��]?�?`sڦ�����8��$خ�vbO�M�� D��((���,:r�jη0�ϳ]ާgvF/0�g�l���r`C/u�������ȱ�r���S�Hө,؆+�v>�M�t]GE���r�P���p��B?{��}���ɏ������ΰ?�}+�d:��ђ:
-����֊`X/�ҟ���;MM[U�>��'M0GFQP��`�������0�!�f�>�C>O�ȷ� zL5�b��@SLW:�i�7�i�g��w�O��N�����.�
-�s�o �@�v��mz�D�T�S�ȱ5����l��͞���ߥp�ۣ���ص�4�����E���GT�3+-�9�!�k���M٭&�ݮ��ҳ�q^�Zٖ�d�Y����X�5���Tu��j��^$I� DU7Qz��K���^���K���h�.����e���X��Ӏ�i���р���]״��d�A6C�\to��&x[?5M�^��|p�Ç$���p
-, ��ח셓R�Y�k��e�1�W�w�؍�I��8t�@Gf����'�a�%�Ïj�r���I�f��:����«�����(~�o����d�`�iJ٬�0zu��?C�,��Dps�c
-Si�\˲e�u�g����:��i�b�()���G�n_Ϟ�2�b6%��w J�
-;p�,Uj�hqW"��i�Ł��1S�$�5�.��S=����)�R�y�'���Tʄ�6�>�Pm�g
-��DmH���i�?���cY��d��
-��7���}Y��ܗ��Lqqs�s͜��������I�*p���>�=Z\�n��w���sxt.���ɗ�G�0��"i{d@7_�g�3��]�͘&��MOrmSAIZt�!�^g�f��<��]$\���+z��!P�A�[��.�7��4-�z�
-U1M�ѐ\1�5N��Kotx��Zj��M^�R��ҹϫT�C��D�,M/D�ɋ^��]����)��x�*&OA$W�~���*�{����;���A{� �wa�'���)�#�E�8� ��D�ՇA�X���f_l!1���;r��7�*%[+h������I���a��U�p��wq#��.���J�
-)i�=91s=�[��A��L��Y��x�jgu��H��k4�,���q�}�7FQ�e�l�I�䨮+gc:��k�/��C��~�1��r2�)F�s�T��
-`q�RI0�]'K���x�D@"Rk�m���!��� �a � #w�$����_ ��[I1��.9P�}�!��YcI~͵�a�Cr����MeÔ$��S����)D��z��R�W�t�ucl�2�;N+�6w�3#e�)�����]�ud�bV�?���+$��cF��t"g�k`�]��'�� ����VU�FL�Sl�7��dA*T"w8�*�6et�46�s�����D:�60L�|X��
-ٍg�E�m�QRܲd��"��t;F#a��9���KĂqB{�ܑT�p˹��^�X.j!��a���(�'IR�!M��շ�ƿ��r��IyD��<���t���H������ߥ��;��>|
-O�� �X\��'����F_��Gq����:|~~L�ܑ\�p�$и�%�
-�|��~x��7��*�&�^X0�i��^d����'��'�8�!�^l���VD��tN���W�][�2�}�ߛ.l�`�u���a���8�*ܤ&о7 �b��l��2{9 >�C��h����LbO.*�Ig� 㴥��1���x��D����k��T(w-��ʧ J���ǿոnt`|~
-�Xi_9���Q��MҀL�R��g��&���K��̅S����_Q��q����w ��$�eq�S�,�OCPtU� Ȳ�i�-�:�Q;OEaݸ� ;�j������YS�Cn= ȷ�*����{���V����O|�A��~�7�S�=:��
-T:Z~r����֜�Ԙ�$���~�b����$�|R����т0����$��\��8#�JV�?���� ����|0�٦�с� 7�"�ޡ؆$�y�ѱ�]����$b��q�.H���Jn��Dz�BcL�M4N�B20�#N*U�T�>
-���0�_�{�=!��xzAk����ȹ�Z3A7]�Iqж0���$���O�0�r#_�c��$_�*U`͉HUޫum�rv�#_{�u�$��h\wڥ��lÔ�H����N�
-��]3@c���OH�
-�Fʚ� Ϛ\�p�иyɅ���l|s�+�{����T�h�|�(�,�Y,�`@�)��>��j�e�q����[�;�'� n]C���x�כ[�DF��khaE-�F$5f��Y��nF= ��ٱI1�٥
-�
-��,�0p9�Hu�D٤y��R�����:�7W������Ѿ_. ��Ew�|����p��N�Cj̏�l�����I$:V���y~�R�
-<#ɗ<o pr`��m�3��f|�D�)��=@JP�pC\p�[���gd�c�U=(5ۙ� ��~
-x��@,�!#�A�(�R�����H��2_'�9�
-r�bqq`�ʸe]Sd��fV%�5��"g�jz��:����/����P�C�!DN�
-7D%W��
-�Yw�tWS4�Y���0K��O�RB�C�H�ï$`�K �
-7GyM���J�YI5F��=���1��+"oF3 �I���W�
-7W��L��xeb����r(U��
- Dݡ1�8ۚ���=g�%��!�Dy�q�½s@c��!����T�6&�#�KXc���Xfe��1�
-��0�Ï�q�,$�i��h!Ò�q���4)_f��jBq�����T6dG����@�#����Y0�2|���O�NE�O��ɵ��MIr��?DC�����]� �N��2a�t��6�Ar�c�kG��$��kت��@�Liz��i��1N�{�T����#��P���:dZ�<�C�?�.|�����)�0�ē$�Q+�bE��*�H5��=gN��~��«��D.��_9W�h����Ɉ2Wۢ=:,ra����>��6���&���=�0h��F���e9�`ț�/cd$�fK�Z�$��AB���y�Z ��C��;��{�%���zu�)�Y!n��i��Q��&�Pɔs Ƣʀ\R)S��TJ���Hr!,*~炆�R�V�^�����Q�O;c\'|N�s?a�v�#^\�͌���hӓ\�D�ՆLB
-RE����������D��FD�-��F{�`FI�f�1O�j
-�]*��Vш�٠LA�v�U�L���(?1{�a��D�Ȟ�T�ˈ�0�{4�q Oo�6�v!����w����rj
-��~���wL9�vin�x�[���#�*�L����9Sss�{�UYp�)�o\q#
-�Hq#
-d��ۿ��:X�ĩ�$���9�5����*S�}ilhۙkl������:�LE�^�}X�dUAg�CR.@��qV�kjU�@��<��v�l1��+xW<��\���Z.�����r
-�zѫ#CιJ�CL�%�!g���Y�m�J���N= �*��:�
-v�j>(��BȜt\'�.4袒\���K�\7�Z7�׆�ݼn6Gƫ�Ŋ�Zs��Bx���)"Lr.��i�Ic�}�u�k�X���9���A�0�d�6\A<t�l���"]Ԓ���pj�ݼ��@���
-�[�*VC�-�vT��;Ŭ�2~C�� ҄#��;�~2���I~hUɖ�nT�%2��/Qtγß�� �����-d.��z�,1ҁ[�"W����W��1�5t�4͜kdCM;���Z7������[��M��=��7X�+�����X�5˺��%K��o�G�s�'K�����1��ˮ-��]E�JZdƕ��o��S
-²�OOT�t�����(��uL���,|�W�n[;|�1U��p�,;��}=��ܡ�'���6o.��i�g�"�Q�'�
-.��6zW)m/)tg/4�A�j���3��g��,��V�����̙࿀�=?���rP��N
-��YL���T���J�/0���74@�K��n��ݶ�` U�Yk���m� �%k�kDZ��z��M� J�u�W��an|���o�^��������'�lӦ%}w)םJ�-��R�b�[���>ȅ�pj��ޭD���d��} ��\4+���ޑ@��Dտ ܐ39�Dک�o%+j�Q�RreM��>�wD���l���h����媯�Z����-�`�
-L��`��ok�Cij��Yh�r��>dgP ;)����d���N�Az�(ԑ�w��]���G��SG����Ԩ��:�����$�e�^�.�� \��F��r���0/[J�ׇ��������,*�gѢ��/�� ���b��-}��(���˔vhߜc���ߒ��gѠ�,k��GE�V���d[È�+�]�ɂ�\�B~2�s�J�B|������ƽL���"
-�[��7��p���X_��(�.+�G�նf�j[S�7��V.�^���(�v���1Ǘ�U�����h�?K`��b�Tt?���'�T�Obs��D7Kd�p�D�Kd��gI�[�*>|��Ī�Ԓ�L�A1v`9r*&�r���!���.O���O�BwVк�ӇBÒ��\�?J�gR!>�����B��@��6����0=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�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+�
+�}
+�˪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*?�
+�YA�~�/
-nSK��6�S|*S��芥�Q�9k��]4*�Oc��bа^n���[��`u��I��ϼ쵢T|T,x���&��d4�ŚS1x��9
-a��=�nL��.���(]J�G��e�h����b�m�����TXV��%��%���%3��
-�E�R�u9��Bq��3/�[Q!��������="#3 �N�2�0�Ӥ.ԈRUQ���%��%6nJ�>|y�(q�����C���@�6���D�kJ2�fu_tk�Q�Q���f����e�.JB-pa�h����0Lؽw�b`��:5%1�iM��>�xp1P� [�ci%۸���I�ŀζL��(�&T6� ��iB�d��N��ifyr����+��ࠠ�o���XT���/c
-��k�r��ѫ�:z{�Y�QP����D�_2
-J<R������ᠠ*xqd8(��#��_$��w}���ˮk�@sRȞl��胼�.�\��<ے@�RK&y���1 �.,H�?�bd�KF#y��Q�$�� k�|j��ZC����H�?v�K�#�L���٩_����i���H�Ϟ�ѩ����c{�H0w�� y��iI0w�������d�vA���� k#�f5���CS�Md#�2��^62�i#�y>@�@OUStm�f��4�pQ�� wohb�(ߓ�@:�LE�ޓ(i��ɪb�6�B�'Y9��~�'j��1wz�"����w������ �����_���_PK �;���PK�yW<ptB�pollen.argoPK�yW<N7g����Gpollen_DC_Pollen.pgmlPK�yW<4�[-m�4pollen.todoPK�yW<7Rp:B�pollen_profile.profilePK�yW< �;���
-Xpollen.xmiPK1;5
\ No newline at end of file
+[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
1
0
r2881 - trunk/pollen-business/src/main/java/org/chorem/pollen/business/services
by fdesbois@users.chorem.org 23 Feb '10
by fdesbois@users.chorem.org 23 Feb '10
23 Feb '10
Author: fdesbois
Date: 2010-02-23 19:49:41 +0100 (Tue, 23 Feb 2010)
New Revision: 2881
Modified:
trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServicePollImpl.java
Log:
missing test correction :P
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-23 18:47:57 UTC (rev 2880)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServicePollImpl.java 2010-02-23 18:49:41 UTC (rev 2881)
@@ -86,7 +86,7 @@
pollDAO = PollenModelDAOHelper.getPollDAO(transaction);
String pollId = ContextUtil.createPollenUrlId();
- Poll entity = ConverterHelper.convert(pollDTO, pollDAO.create());
+ Poll entity = ConverterHelper.convert(pollDTO, pollDAO.create(pollId));
// ** Creator managment
PollAccount creator = prepareCreator(transaction, pollDTO);
1
0
r2880 - in trunk: . pollen-business pollen-business/src/main/java/org/chorem/pollen/business/services pollen-business/src/main/java/org/chorem/pollen/business/utils pollen-business/src/main/resources pollen-business/src/main/resources/i18n
by fdesbois@users.chorem.org 23 Feb '10
by fdesbois@users.chorem.org 23 Feb '10
23 Feb '10
Author: fdesbois
Date: 2010-02-23 19:47:57 +0100 (Tue, 23 Feb 2010)
New Revision: 2880
Added:
trunk/pollen-business/src/main/resources/i18n/
trunk/pollen-business/src/main/resources/i18n/pollen-business-en_GB.properties
trunk/pollen-business/src/main/resources/i18n/pollen-business-fr_FR.properties
Modified:
trunk/pollen-business/pom.xml
trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServicePollImpl.java
trunk/pollen-business/src/main/java/org/chorem/pollen/business/utils/ContextUtil.java
trunk/pom.xml
Log:
Add error messages with i18n
Modified: trunk/pollen-business/pom.xml
===================================================================
--- trunk/pollen-business/pom.xml 2010-02-23 18:20:55 UTC (rev 2879)
+++ trunk/pollen-business/pom.xml 2010-02-23 18:47:57 UTC (rev 2880)
@@ -119,6 +119,31 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.nuiton.i18n</groupId>
+ <artifactId>maven-i18n-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>parserJava</goal>
+ <goal>gen</goal>
+ </goals>
+ <!-- restrict parsing beacause this is expensive -->
+ <!-- if you want to parse more, add your package in includes -->
+ <configuration>
+ <treateDefaultEntry>false</treateDefaultEntry>
+ <entries>
+ <entry>
+ <basedir>${maven.src.dir}/main/java</basedir>
+ <includes>
+ <include>org/nuiton/topia/framework/*.java</include>
+ </includes>
+ </entry>
+ </entries>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
<!--<plugin>
<groupId>org.nuiton.eugene</groupId>
<artifactId>maven-eugene-plugin</artifactId>
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-23 18:20:55 UTC (rev 2879)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServicePollImpl.java 2010-02-23 18:47:57 UTC (rev 2880)
@@ -51,6 +51,7 @@
import org.chorem.pollen.business.utils.ContextUtil;
import org.nuiton.topia.TopiaContext;
import org.nuiton.topia.TopiaException;
+import static org.nuiton.i18n.I18n._;
/**
* Implémentation du service de gestion des sondages.
@@ -78,13 +79,14 @@
@Override
public String createPoll(PollDTO pollDTO) {
TopiaContext transaction = null;
+ String result = null;
try {
transaction = rootContext.beginTransaction();
pollDAO = PollenModelDAOHelper.getPollDAO(transaction);
String pollId = ContextUtil.createPollenUrlId();
- Poll entity = ConverterHelper.convert(pollDTO, pollDAO.create(pollId));
+ Poll entity = ConverterHelper.convert(pollDTO, pollDAO.create());
// ** Creator managment
PollAccount creator = prepareCreator(transaction, pollDTO);
@@ -118,13 +120,15 @@
log.debug("Entity created: " + entity);
}
- return entity.getTopiaId();
- } catch (Exception e) {
- ContextUtil.doCatch(e, transaction);
- return "";
+ result = entity.getTopiaId();
+ } catch (Exception eee) {
+ ContextUtil.doCatch(eee, transaction,
+ _("pollen.error.servicePoll.createPoll",
+ pollDTO.getTitle(), pollDTO.getCreatorId()));
} finally {
ContextUtil.doFinally(transaction);
}
+ return result;
}
@@ -247,7 +251,9 @@
return true;
} catch (Exception e) {
- ContextUtil.doCatch(e, transaction);
+ ContextUtil.doCatch(e, transaction,
+ _("pollen.error.servicePoll.updatePoll",
+ pollDTO.getTitle(), pollDTO.getPollId()));
return false;
} finally {
ContextUtil.doFinally(transaction);
Modified: trunk/pollen-business/src/main/java/org/chorem/pollen/business/utils/ContextUtil.java
===================================================================
--- trunk/pollen-business/src/main/java/org/chorem/pollen/business/utils/ContextUtil.java 2010-02-23 18:20:55 UTC (rev 2879)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/utils/ContextUtil.java 2010-02-23 18:47:57 UTC (rev 2880)
@@ -30,6 +30,7 @@
import org.chorem.pollen.business.persistence.UserAccount;
import org.chorem.pollen.business.persistence.UserAccountDAO;
import org.hibernate.exception.SQLGrammarException;
+import org.nuiton.i18n.I18n;
import org.nuiton.topia.TopiaContext;
import org.nuiton.topia.TopiaContextFactory;
import org.nuiton.topia.TopiaException;
@@ -181,6 +182,8 @@
conf.setProperty("topia.service.migration.version", PollenModelDAOHelper
.getModelVersion());
+ I18n.init();
+
// Construction du contexte global
buildContext();
Added: trunk/pollen-business/src/main/resources/i18n/pollen-business-en_GB.properties
===================================================================
--- trunk/pollen-business/src/main/resources/i18n/pollen-business-en_GB.properties (rev 0)
+++ trunk/pollen-business/src/main/resources/i18n/pollen-business-en_GB.properties 2010-02-23 18:47:57 UTC (rev 2880)
@@ -0,0 +1 @@
+pollen.error.servicePoll.createPoll=
Added: trunk/pollen-business/src/main/resources/i18n/pollen-business-fr_FR.properties
===================================================================
--- trunk/pollen-business/src/main/resources/i18n/pollen-business-fr_FR.properties (rev 0)
+++ trunk/pollen-business/src/main/resources/i18n/pollen-business-fr_FR.properties 2010-02-23 18:47:57 UTC (rev 2880)
@@ -0,0 +1,2 @@
+pollen.error.servicePoll.createPoll=Impossible d'enregistrer le sondage %1$s cr\u00E9\u00E9 par %2$s
+pollen.error.servicePoll.updatePoll=Impossible de mettre \u00E0 jour le sondage %1$s (%2$s)
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-02-23 18:20:55 UTC (rev 2879)
+++ trunk/pom.xml 2010-02-23 18:47:57 UTC (rev 2880)
@@ -301,6 +301,7 @@
<!--javadoc.version>2.4</javadoc.version-->
<topia.version>2.3.0-beta-9-SNAPSHOT</topia.version>
<eugene.version>2.0.0-beta-4</eugene.version>
+ <i18n.version>1.0.1</i18n.version>
<tapestry.version>5.1.0.5</tapestry.version>
<nuiton-utils.version>1.1.5-SNAPSHOT</nuiton-utils.version>
<!-- <chorem-commons.version>1.0.0-alpha-2-SNAPSHOT</chorem-commons.version>-->
@@ -351,6 +352,11 @@
</dependency>
</dependencies>
</plugin>
+ <plugin>
+ <groupId>org.nuiton.i18n</groupId>
+ <artifactId>maven-i18n-plugin</artifactId>
+ <version>${i18n.version}</version>
+ </plugin>
</plugins>
</pluginManagement>
1
0
23 Feb '10
Author: fdesbois
Date: 2010-02-23 19:20:55 +0100 (Tue, 23 Feb 2010)
New Revision: 2879
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/DataPollAccountConverter.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/ServicePollAccountImpl.java
trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServicePollImpl.java
trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServiceVoteImpl.java
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/PollImpl.hbm.xml
trunk/pollen-business/src/main/xmi/pollen.properties
trunk/pollen-business/src/test/java/org/chorem/pollen/business/services/ServicePollImplTest.java
trunk/pom.xml
Log:
- Use naturalId for pollId and accountId (last topia snapshot needed)
- improve saves
- resolve issue on migration 1.3 for h2
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-23 15:12:23 UTC (rev 2878)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/ConverterHelper.java 2010-02-23 18:20:55 UTC (rev 2879)
@@ -54,7 +54,6 @@
public static void preparePollConverters() {
String[] properties = new String[] {
- Poll.POLL_ID,
Poll.TITLE,
Poll.DESCRIPTION,
Poll.BEGIN_CHOICE_DATE,
@@ -94,7 +93,6 @@
public static void preparePollAccountConverters() {
String[] properties = new String[] {
- PollAccount.ACCOUNT_ID,
PollAccount.VOTING_ID,
PollAccount.EMAIL
};
@@ -137,6 +135,7 @@
public static PollDTO convert(Poll entity, PollDTO dto) {
BinderProvider.getBinder(Poll.class, PollDTO.class).copy(entity, dto);
dto.setId(entity.getTopiaId());
+ dto.setPollId(entity.getPollId());
dto.setChoiceType(ChoiceType.valueOf(entity.getChoiceType()));
dto.setPollType(PollType.valueOf(entity.getPollType()));
dto.setVoteCounting(VoteCountingType.valueOf(entity.getVoteCounting()));
@@ -162,6 +161,7 @@
public static PollAccountDTO convert(PollAccount entity, PollAccountDTO dto) {
BinderProvider.getBinder(PollAccount.class, PollAccountDTO.class).copy(entity, dto);
dto.setId(entity.getTopiaId());
+ dto.setAccountId(entity.getAccountId());
return dto;
}
Modified: trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataPollAccountConverter.java
===================================================================
--- trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataPollAccountConverter.java 2010-02-23 15:12:23 UTC (rev 2878)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataPollAccountConverter.java 2010-02-23 18:20:55 UTC (rev 2879)
@@ -47,7 +47,7 @@
*/
public void populatePollAccountEntity(PollAccountDTO pollAccountDTO,
PollAccount ePollAccount) throws TopiaException {
- ePollAccount.setAccountId(pollAccountDTO.getAccountId());
+ //ePollAccount.setAccountId(pollAccountDTO.getAccountId());
ePollAccount.setEmail(pollAccountDTO.getEmail());
ePollAccount.setVotingId(pollAccountDTO.getVotingId());
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-23 15:12:23 UTC (rev 2878)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/migration/PollenMigrationCallbackHandler.java 2010-02-23 18:20:55 UTC (rev 2879)
@@ -197,25 +197,25 @@
// VoteCounting becomes a String field instead of a table
"alter table poll add votecounting1 varchar;",
"update poll as p set votecounting1 = (select v.name from votecounting v where v.topiaId = p.votecounting);",
- "alter table poll drop column votecounting;",
- "alter table poll alter column rename votecounting1 to votecounting;",
"alter table result add votecounting1 varchar;",
"update result as r set votecounting1 = (select v.name from votecounting v where v.topiaId = r.votecounting);",
+ "drop table votecounting;",
+ "alter table poll drop column votecounting;",
+ "alter table poll alter column votecounting1 rename to votecounting;",
"alter table result drop column votecounting;",
- "alter table result alter column rename votecounting1 to votecounting;",
- "drop table votecounting;",
+ "alter table result alter column votecounting1 rename to votecounting;",
// PollType becomes a String field instead of a table
"alter table poll add polltype1 varchar;",
"update poll as p set polltype1 = (select t.name from polltype t where t.topiaId = p.polltype);",
+ "drop table polltype;",
"alter table poll drop column polltype;",
- "alter table poll alter column rename polltype1 to polltype;",
- "drop table polltype;",
+ "alter table poll alter column polltype1 rename to polltype;",
// ChoiceType becomes a String field instead of a table
"alter table poll add choicetype1 varchar;",
"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 rename choicetype1 to choicetype;",
- "drop table choicetype;"
+ "alter table poll alter column choicetype1 rename to choicetype;"
};
} else {
if (log.isErrorEnabled()) {
Modified: trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServicePollAccountImpl.java
===================================================================
--- trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServicePollAccountImpl.java 2010-02-23 15:12:23 UTC (rev 2878)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServicePollAccountImpl.java 2010-02-23 18:20:55 UTC (rev 2879)
@@ -61,11 +61,10 @@
pollAccountDAO = PollenModelDAOHelper
.getPollAccountDAO(transaction);
- PollAccount pollAccountEntity = pollAccountDAO.create();
// Identifiant du compte
- String id = UUID.randomUUID().toString();
- pollAccountDTO.setAccountId(id.replaceAll("-", ""));
+ String id = ContextUtil.createPollenUrlId();
+ PollAccount pollAccountEntity = pollAccountDAO.create(id);
converter.setTransaction(transaction);
converter.populatePollAccountEntity(pollAccountDTO,
@@ -97,11 +96,10 @@
pollAccountDAO = PollenModelDAOHelper
.getPollAccountDAO(transaction);
- pollAccountEntity = pollAccountDAO.create();
// Identifiant du compte
- String id = UUID.randomUUID().toString();
- pollAccountEntity.setAccountId(id.replaceAll("-", ""));
+ String id = ContextUtil.createPollenUrlId();
+ pollAccountEntity = pollAccountDAO.create(PollAccount.ACCOUNT_ID, id);
converter.setTransaction(transaction);
converter.populatePollAccountEntity(votingId, email, userId,
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-23 15:12:23 UTC (rev 2878)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServicePollImpl.java 2010-02-23 18:20:55 UTC (rev 2879)
@@ -25,7 +25,6 @@
import java.util.Set;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.chorem.pollen.business.PollenException;
import org.chorem.pollen.business.converters.ConverterHelper;
import org.chorem.pollen.business.converters.DataPollConverter;
import org.chorem.pollen.business.dto.ChoiceDTO;
@@ -35,7 +34,6 @@
import org.chorem.pollen.business.dto.VotingListDTO;
import org.chorem.pollen.business.persistence.Choice;
import org.chorem.pollen.business.persistence.ChoiceDAO;
-import org.chorem.pollen.business.persistence.ChoiceImpl;
import org.chorem.pollen.business.persistence.PersonToList;
import org.chorem.pollen.business.persistence.Poll;
import org.chorem.pollen.business.persistence.PollAccount;
@@ -43,13 +41,13 @@
import org.chorem.pollen.business.persistence.PollDAO;
import org.chorem.pollen.business.persistence.PollenModelDAOHelper;
import org.chorem.pollen.business.persistence.PreventRule;
-import org.chorem.pollen.business.persistence.PreventRuleImpl;
+import org.chorem.pollen.business.persistence.PreventRuleDAO;
import org.chorem.pollen.business.persistence.UserAccount;
import org.chorem.pollen.business.persistence.UserAccountDAO;
import org.chorem.pollen.business.persistence.Vote;
import org.chorem.pollen.business.persistence.VoteDAO;
import org.chorem.pollen.business.persistence.VotingList;
-import org.chorem.pollen.business.persistence.VotingListImpl;
+import org.chorem.pollen.business.persistence.VotingListDAO;
import org.chorem.pollen.business.utils.ContextUtil;
import org.nuiton.topia.TopiaContext;
import org.nuiton.topia.TopiaException;
@@ -85,20 +83,18 @@
pollDAO = PollenModelDAOHelper.getPollDAO(transaction);
- Poll entity = ConverterHelper.convert(pollDTO, pollDAO.create());
- // ** Create new poll ID for urls
- entity.setPollId(ContextUtil.createPollenUrlId());
+ String pollId = ContextUtil.createPollenUrlId();
+ Poll entity = ConverterHelper.convert(pollDTO, pollDAO.create(pollId));
// ** Creator managment
PollAccount creator = prepareCreator(transaction, pollDTO);
entity.setCreator(creator);
// ** Create new choices
+ ChoiceDAO choiceDAO = PollenModelDAOHelper.getChoiceDAO(transaction);
for (ChoiceDTO choiceDTO : pollDTO.getChoiceDTOs()) {
- // Use new instance of Choice, the creation will be done by
- // the poll entity
Choice choice =
- ConverterHelper.convert(choiceDTO, new ChoiceImpl());
+ ConverterHelper.convert(choiceDTO, choiceDAO.create());
choice.setPoll(entity);
}
@@ -109,11 +105,10 @@
}
// ** Create new preventRules
+ PreventRuleDAO ruleDAO = PollenModelDAOHelper.getPreventRuleDAO(transaction);
for (PreventRuleDTO ruleDTO : pollDTO.getPreventRuleDTOs()) {
- // Use new instance of PreventRule, the creation will be done by
- // the poll entity
PreventRule rule =
- ConverterHelper.convert(ruleDTO, new PreventRuleImpl());
+ ConverterHelper.convert(ruleDTO, ruleDAO.create());
rule.setPoll(entity);
}
@@ -168,6 +163,7 @@
}
// Create new account if account properties changed or no user found
if (creator == null) {
+ accountProperties.put(PollAccount.ACCOUNT_ID, ContextUtil.createPollenUrlId());
creator = accountDAO.create(accountProperties);
}
return creator;
@@ -187,10 +183,9 @@
private static final VotingList createVotingList(TopiaContext transaction,
VotingListDTO listDTO) throws TopiaException {
- // Use new instance of VotingList, the creation will be done by
- // the poll entity
+ VotingListDAO dao = PollenModelDAOHelper.getVotingListDAO(transaction);
VotingList votingList =
- ConverterHelper.convert(listDTO, new VotingListImpl());
+ ConverterHelper.convert(listDTO, dao.create());
PollAccountDAO pollAccountDAO =
PollenModelDAOHelper.getPollAccountDAO(transaction);
@@ -202,8 +197,9 @@
// Create a new PollAccount if not already exists
if (account == null) {
- account =
- ConverterHelper.convert(accountDTO, pollAccountDAO.create());
+ String accountId = ContextUtil.createPollenUrlId();
+ account = pollAccountDAO.create(accountId);
+ ConverterHelper.convert(accountDTO, account);
}
// Create association between VotingList and PollAccount
Modified: trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServiceVoteImpl.java
===================================================================
--- trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServiceVoteImpl.java 2010-02-23 15:12:23 UTC (rev 2878)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServiceVoteImpl.java 2010-02-23 18:20:55 UTC (rev 2879)
@@ -71,7 +71,7 @@
// .getId());
if (pollAccountEntity == null) {
log.debug("Nouveau compte associé au vote");
- pollAccountEntity = pollAccountDAO.create();
+ pollAccountEntity = pollAccountDAO.create(ContextUtil.createPollenUrlId());
// EVO #108 : Migration to ToPIA 2.3, the entity must be
// commited because an other findBy is called in the
// converter (wtf ?! :/). This behavior doesn't work
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-23 15:12:23 UTC (rev 2878)
+++ trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/PollAccountImpl.hbm.xml 2010-02-23 18:20:55 UTC (rev 2879)
@@ -3,9 +3,11 @@
<hibernate-mapping default-access="field" auto-import="true" package="org.chorem.pollen.business.persistence">
<class name="org.chorem.pollen.business.persistence.PollAccountImpl" table="pollAccount" node="org.chorem.pollen.business.persistence.PollAccountImpl" abstract="false" proxy="org.chorem.pollen.business.persistence.PollAccount" >
<id name="topiaId" type="string" length="255" node="@topiaId"/>
+ <natural-id>
+ <property name="accountId" type="text" access="field" column="accountId" node="accountId"/>
+ </natural-id>
<version name="topiaVersion" type="long" node="@topiaVersion"/>
<property name="topiaCreateDate" type="timestamp" node="@topiaCreateDate"/>
- <property name="accountId" type="text" access="field" column="accountId" node="accountId"/>
<property name="votingId" type="text" access="field" column="votingId" node="votingId"/>
<property name="email" type="text" access="field" column="email" node="email"/>
<bag name="votingListPersonToList" inverse="true" lazy="true" cascade="all,delete-orphan" node="votingListPersonToList" embed-xml="false">
Modified: trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/PollImpl.hbm.xml
===================================================================
--- trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/PollImpl.hbm.xml 2010-02-23 15:12:23 UTC (rev 2878)
+++ trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/PollImpl.hbm.xml 2010-02-23 18:20:55 UTC (rev 2879)
@@ -3,9 +3,11 @@
<hibernate-mapping default-access="field" auto-import="true" package="org.chorem.pollen.business.persistence">
<class name="org.chorem.pollen.business.persistence.PollImpl" table="poll" node="org.chorem.pollen.business.persistence.PollImpl" abstract="false" proxy="org.chorem.pollen.business.persistence.Poll" >
<id name="topiaId" type="string" length="255" node="@topiaId"/>
+ <natural-id>
+ <property name="pollId" type="text" access="field" column="pollId" node="pollId"/>
+ </natural-id>
<version name="topiaVersion" type="long" node="@topiaVersion"/>
<property name="topiaCreateDate" type="timestamp" node="@topiaCreateDate"/>
- <property name="pollId" type="text" access="field" column="pollId" node="pollId"/>
<property name="title" type="text" access="field" column="title" node="title"/>
<property name="description" type="text" access="field" column="description" node="description"/>
<property name="beginChoiceDate" type="java.util.Date" access="field" column="beginChoiceDate" node="beginChoiceDate"/>
Modified: trunk/pollen-business/src/main/xmi/pollen.properties
===================================================================
--- trunk/pollen-business/src/main/xmi/pollen.properties 2010-02-23 15:12:23 UTC (rev 2878)
+++ trunk/pollen-business/src/main/xmi/pollen.properties 2010-02-23 18:20:55 UTC (rev 2879)
@@ -1,4 +1,6 @@
# Pr\u00E9cise l'ent\u00EAte de l'ensemble des fichiers g\u00E9n\u00E9r\u00E9s
model.tagvalue.copyright=/* *##%\n Copyright (C) 2009 Pollen\n *##%*/
#model.tagvalue.dbSchema=Pollen
-model.tagvalue.java.lang.String=text
\ No newline at end of file
+model.tagvalue.java.lang.String=text
+org.chorem.pollen.business.persistence.PollAccount.attribute.accountId.tagvalue.naturalId=true
+org.chorem.pollen.business.persistence.Poll.attribute.pollId.tagvalue.naturalId=true
\ 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-23 15:12:23 UTC (rev 2878)
+++ trunk/pollen-business/src/test/java/org/chorem/pollen/business/services/ServicePollImplTest.java 2010-02-23 18:20:55 UTC (rev 2879)
@@ -16,6 +16,7 @@
package org.chorem.pollen.business.services;
+import java.util.ArrayList;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -24,10 +25,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.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.Poll;
+import org.chorem.pollen.business.persistence.PollenModelDAOHelper;
import org.chorem.pollen.business.utils.ContextUtil;
import org.chorem.pollen.common.ChoiceType;
import org.chorem.pollen.common.PollType;
@@ -40,7 +44,6 @@
import org.junit.Test;
import org.nuiton.topia.TopiaContext;
import org.nuiton.topia.TopiaException;
-import org.nuiton.topia.persistence.TopiaEntity;
/**
* Tests du service de gestion des sondages.
@@ -78,9 +81,10 @@
/**
* Test of createPoll method, of class ServicePollImpl.
+ * @throws Exception
*/
@Test
- public void testCreatePoll() throws TopiaException {
+ public void testCreatePoll() throws Exception {
log.info("### START ###");
PollDTO dto = new PollDTO();
dto.setBeginChoiceDate(new Date());
@@ -97,6 +101,20 @@
dto.setPollType(PollType.RESTRICTED);
dto.setVoteCounting(VoteCountingType.NORMAL);
dto.setTitle("Test_createPoll");
+
+ List<ChoiceDTO> choices = new ArrayList<ChoiceDTO>();
+ ChoiceDTO choice1 = new ChoiceDTO();
+ choice1.setName("choice1");
+ choices.add(choice1);
+ ChoiceDTO choice2 = new ChoiceDTO();
+ choice2.setName("choice2");
+ choices.add(choice2);
+ ChoiceDTO choice3 = new ChoiceDTO();
+ choice3.setName("choice3");
+ choices.add(choice3);
+
+ dto.setChoiceDTOs(choices);
+
String result = instance.createPoll(dto);
if (log.isDebugEnabled()) {
log.debug("result: " + result);
@@ -107,12 +125,20 @@
try {
transaction = ContextUtil.getInstance().getContext().beginTransaction();
- TopiaEntity entity = transaction.findByTopiaId(result);
+ Poll entity = PollenModelDAOHelper.
+ getPollDAO(transaction).findByTopiaId(result);
Assert.assertNotNull(entity);
- } catch (TopiaException eee) {
+
+ Assert.assertEquals(3, entity.getChoice().size());
+ Assert.assertNotNull(entity.getCreator());
+ Assert.assertEquals("erwan", entity.getCreator().getVotingId());
+ Assert.assertNotNull(entity.getCreator().getAccountId());
+
+ } catch (Exception eee) {
if (transaction != null) {
transaction.rollbackTransaction();
}
+ throw eee;
} finally {
if (transaction != null) {
transaction.closeContext();
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-02-23 15:12:23 UTC (rev 2878)
+++ trunk/pom.xml 2010-02-23 18:20:55 UTC (rev 2879)
@@ -299,7 +299,7 @@
<!-- customized versions -->
<!--javadoc.version>2.4</javadoc.version-->
- <topia.version>2.3.0-beta-8</topia.version>
+ <topia.version>2.3.0-beta-9-SNAPSHOT</topia.version>
<eugene.version>2.0.0-beta-4</eugene.version>
<tapestry.version>5.1.0.5</tapestry.version>
<nuiton-utils.version>1.1.5-SNAPSHOT</nuiton-utils.version>
1
0
Author: fdesbois
Date: 2010-02-23 16:12:23 +0100 (Tue, 23 Feb 2010)
New Revision: 2878
Added:
trunk/pollen-business/src/main/java/org/chorem/pollen/business/PollenException.java
trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/
trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/
trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/
trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/
trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/
trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/
trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/ChoiceImpl.hbm.xml
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/PersonListImpl.hbm.xml
trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/PersonToListImpl.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/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/PollImpl.hbm.xml
trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/PreventRuleImpl.hbm.xml
trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/ResultImpl.hbm.xml
trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/UserAccountImpl.hbm.xml
trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/VoteImpl.hbm.xml
trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/VoteToChoiceImpl.hbm.xml
trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/VotingListImpl.hbm.xml
Removed:
trunk/pollen-business/src/main/java/org/chorem/pollen/business/PollenBusinessException.java
trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/EnumController.java
trunk/pollen-business/src/test/java/org/chorem/pollen/business/converters/EnumControllerTest.java
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/DataPollConverter.java
trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataResultConverter.java
trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataVoteCountingConverter.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/ServicePollImpl.java
trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServiceResultsImpl.java
trunk/pollen-business/src/main/java/org/chorem/pollen/business/utils/ContextUtil.java
trunk/pollen-business/src/main/xmi/pollen.zargo
trunk/pollen-business/src/test/java/org/chorem/pollen/business/services/ServicePollImplTest.java
trunk/pollen-votecounting/src/main/java/org/chorem/pollen/common/PollType.java
Log:
- Refactor entities used as enum in code (PollType, ChoiceType, VoteCounting) -> model migration to 1.3
- Refactor updatePoll method
Deleted: trunk/pollen-business/src/main/java/org/chorem/pollen/business/PollenBusinessException.java
===================================================================
--- trunk/pollen-business/src/main/java/org/chorem/pollen/business/PollenBusinessException.java 2010-02-23 09:39:10 UTC (rev 2877)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/PollenBusinessException.java 2010-02-23 15:12:23 UTC (rev 2878)
@@ -1,23 +0,0 @@
-
-package org.chorem.pollen.business;
-
-/**
- * PollenBusinessException
- *
- * Created: 22 févr. 2010
- *
- * @author fdesbois
- * @version $Revision$
- *
- * Mise a jour: $Date$
- * par : $Author$
- */
-public class PollenBusinessException extends Exception {
-
- private static final long serialVersionUID = 1L;
-
- public PollenBusinessException(String message) {
- super(message);
- }
-
-}
Added: trunk/pollen-business/src/main/java/org/chorem/pollen/business/PollenException.java
===================================================================
--- trunk/pollen-business/src/main/java/org/chorem/pollen/business/PollenException.java (rev 0)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/PollenException.java 2010-02-23 15:12:23 UTC (rev 2878)
@@ -0,0 +1,23 @@
+
+package org.chorem.pollen.business;
+
+/**
+ * PollenException
+ *
+ * Created: 23 févr. 2010
+ *
+ * @author fdesbois
+ * @version $Revision$
+ *
+ * Mise a jour: $Date$
+ * par : $Author$
+ */
+public class PollenException extends RuntimeException {
+
+ private static final long serialVersionUID = 1L;
+
+ public PollenException(String message, Throwable eee) {
+ super(message, eee);
+ }
+
+}
Property changes on: trunk/pollen-business/src/main/java/org/chorem/pollen/business/PollenException.java
___________________________________________________________________
Added: svn:keywords
+ "Author Date Id Revision HeadURL"
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-23 09:39:10 UTC (rev 2877)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/ConverterHelper.java 2010-02-23 15:12:23 UTC (rev 2878)
@@ -1,6 +1,8 @@
package org.chorem.pollen.business.converters;
+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.PollAccountDTO;
import org.chorem.pollen.business.dto.PollDTO;
@@ -11,6 +13,9 @@
import org.chorem.pollen.business.persistence.PollAccount;
import org.chorem.pollen.business.persistence.PreventRule;
import org.chorem.pollen.business.persistence.VotingList;
+import org.chorem.pollen.common.ChoiceType;
+import org.chorem.pollen.common.PollType;
+import org.chorem.pollen.common.VoteCountingType;
import org.nuiton.topia.persistence.TopiaEntity;
import org.nuiton.util.beans.BinderBuilder;
import org.nuiton.util.beans.BinderProvider;
@@ -28,6 +33,8 @@
*/
public class ConverterHelper {
+ private static final Log log = LogFactory.getLog(ConverterHelper.class);
+
private static BinderBuilder builder = new BinderBuilder();
private static final void prepare(Class<? extends TopiaEntity> entityClass, Class<?> dtoClass, String... properties) {
@@ -121,12 +128,18 @@
public static Poll convert(PollDTO dto, Poll entity) {
BinderProvider.getBinder(PollDTO.class, Poll.class).copy(dto, entity);
+ entity.setChoiceType(dto.getChoiceType().name());
+ entity.setPollType(dto.getPollType().name());
+ entity.setVoteCounting(dto.getVoteCounting().name());
return entity;
}
public static PollDTO convert(Poll entity, PollDTO dto) {
BinderProvider.getBinder(Poll.class, PollDTO.class).copy(entity, dto);
dto.setId(entity.getTopiaId());
+ dto.setChoiceType(ChoiceType.valueOf(entity.getChoiceType()));
+ dto.setPollType(PollType.valueOf(entity.getPollType()));
+ dto.setVoteCounting(VoteCountingType.valueOf(entity.getVoteCounting()));
return dto;
}
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-23 09:39:10 UTC (rev 2877)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataPollConverter.java 2010-02-23 15:12:23 UTC (rev 2878)
@@ -26,15 +26,15 @@
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.ChoiceType;
-import org.chorem.pollen.business.persistence.ChoiceTypeDAO;
import org.chorem.pollen.business.persistence.Poll;
-import org.chorem.pollen.business.persistence.PollenModelDAOHelper;
import org.chorem.pollen.business.persistence.PreventRule;
import org.chorem.pollen.business.services.ServiceChoice;
import org.chorem.pollen.business.services.ServiceChoiceImpl;
import org.chorem.pollen.business.services.ServicePreventRule;
import org.chorem.pollen.business.services.ServicePreventRuleImpl;
+import org.chorem.pollen.common.ChoiceType;
+import org.chorem.pollen.common.PollType;
+import org.chorem.pollen.common.VoteCountingType;
import org.nuiton.topia.TopiaException;
/**
@@ -54,63 +54,14 @@
private static final Log log = LogFactory.getLog(DataPollConverter.class);
/**
- * Création d'un sondage à partir d'un dto sondage.
- *
- * @param pollDTO le dto sondage
- * @param ePoll l'entité sondage
- * @deprecated use
- */
- @Deprecated
- public void populatePollEntity(PollDTO pollDTO, Poll ePoll) {
-
- //Binder bind;
-
- ConverterHelper.convert(pollDTO, ePoll);
-
- EnumController enumCtrl = new EnumController(super.transaction);
- enumCtrl.setChoiceType(pollDTO.getChoiceType(), ePoll);
- enumCtrl.setPollType(pollDTO.getPollType(), ePoll);
- enumCtrl.setVoteCounting(pollDTO.getVoteCounting(), ePoll);
-
-// ePoll.setPollId(pollDTO.getPollId());
-// ePoll.setTitle(pollDTO.getTitle());
-// ePoll.setDescription(pollDTO.getDescription());
-// ePoll.setBeginChoiceDate(pollDTO.getBeginChoiceDate());
-// ePoll.setEndChoiceDate(pollDTO.getEndChoiceDate());
-// ePoll.setBeginDate(pollDTO.getBeginDate());
-// ePoll.setEndDate(pollDTO.getEndDate());
-// ePoll.setClosed(pollDTO.isClosed());
-// ePoll.setAnonymous(pollDTO.isAnonymous());
-// ePoll.setAnonymousVoteAllowed(pollDTO.isAnonymousVoteAllowed());
-// ePoll.setPublicResults(pollDTO.isPublicResults());
-// ePoll.setContinuousResults(pollDTO.isContinuousResults());
-// ePoll.setChoiceAddAllowed(pollDTO.isChoiceAddAllowed());
-// ePoll.setMaxChoiceNb(pollDTO.getMaxChoiceNb());
-
-// EnumController enumCtrl = new EnumController(transaction);
-// enumCtrl.setChoiceType(pollDTO.getChoiceType(), entity);
-// enumCtrl.setPollType(pollDTO.getPollType(), entity);
-// enumCtrl.setVoteCounting(pollDTO.getVoteCounting(), entity);
-
- /*if (pollDTO.getCreatorId().length() > 0) {
- PollAccountDAO pollAccountDAO = PollenModelDAOHelper.getPollAccountDAO(super.transaction);
- PollAccount PollAccountEntity = pollAccountDAO.findByTopiaId(pollDTO.getCreatorId());
- ePoll.setCreator(PollAccountEntity);
- }*/
- }
-
- /**
* Création d'un dto sondage à partir d'une entité.
*
* @param ePoll l'entité sondage
* @return le dto sondage
*/
public PollDTO createPollDTO(Poll ePoll) {
- PollDTO pollDTO = new PollDTO();
+ PollDTO pollDTO = ConverterHelper.convert(ePoll, new PollDTO());
- ConverterHelper.convert(ePoll, pollDTO);
- //pollDTO.setId(ePoll.getTopiaId());
-
// pollDTO.setId(ePoll.getTopiaId());
// pollDTO.setPollId(ePoll.getPollId());
// pollDTO.setTitle(ePoll.getTitle());
@@ -178,7 +129,9 @@
*
* @param pollDTO le dto sondage
* @param ePoll l'entité sondage
+ * @deprecated use dao managment instead
*/
+ @Deprecated
public void persistChoices(PollDTO pollDTO, Poll ePoll)
throws TopiaException {
Modified: trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataResultConverter.java
===================================================================
--- trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataResultConverter.java 2010-02-23 09:39:10 UTC (rev 2877)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataResultConverter.java 2010-02-23 15:12:23 UTC (rev 2878)
@@ -27,6 +27,8 @@
import org.chorem.pollen.business.persistence.PollenModelDAOHelper;
import org.chorem.pollen.business.persistence.Result;
import org.chorem.pollen.business.persistence.ResultDAO;
+import org.chorem.pollen.common.ChoiceType;
+import org.chorem.pollen.common.VoteCountingType;
import org.chorem.pollen.votecounting.business.NumberMethod;
import org.chorem.pollen.votecounting.dto.ChoiceDTO;
import org.chorem.pollen.votecounting.dto.VoteCountingResultDTO;
@@ -70,8 +72,9 @@
eResult.setPoll(ePoll);
eResult.setResultValue(String.valueOf(choice.getValue()));
- EnumController enumCtrl = new EnumController(transaction);
- enumCtrl.setVoteCounting(dto.getTypeVoteCounting(), eResult);
+// EnumController enumCtrl = new EnumController(transaction);
+// enumCtrl.setVoteCounting(dto.getTypeVoteCounting(), eResult);
+ eResult.setVoteCounting(dto.getTypeVoteCounting().name());
//}
}
}
@@ -94,8 +97,8 @@
resName.startsWith(NumberMethod.HIDDEN_PREFIX));
dto.setValue(res.getResultValue());
dto.setByGroup(res.getByGroup());
- dto.setChoiceType(EnumController.getChoiceType(ePoll));
- dto.setVoteCounting(EnumController.getVoteCountingType(ePoll));
+ dto.setChoiceType(ChoiceType.valueOf(ePoll.getChoiceType()));
+ dto.setVoteCounting(VoteCountingType.valueOf(ePoll.getVoteCounting()));
results.add(dto);
}
return results;
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-23 09:39:10 UTC (rev 2877)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataVoteCountingConverter.java 2010-02-23 15:12:23 UTC (rev 2878)
@@ -26,6 +26,9 @@
import org.chorem.pollen.business.persistence.VotingList;
import org.chorem.pollen.business.services.ServicePollAccount;
import org.chorem.pollen.business.services.ServicePollAccountImpl;
+import org.chorem.pollen.common.ChoiceType;
+import org.chorem.pollen.common.PollType;
+import org.chorem.pollen.common.VoteCountingType;
import org.chorem.pollen.votecounting.business.NumberMethod;
import org.chorem.pollen.votecounting.dto.CommentDTO;
import org.chorem.pollen.votecounting.dto.PollChoiceDTO;
@@ -66,9 +69,9 @@
pollDTO.setCreatorId(ePoll.getCreator().getVotingId());
pollDTO.setCreatorEmail(ePoll.getCreator().getEmail());
pollDTO.setMaxChoiceNb(ePoll.getMaxChoiceNb());
- pollDTO.setPollType(EnumController.getPollType(ePoll));
- pollDTO.setChoiceType(EnumController.getChoiceType(ePoll));
- pollDTO.setVoteCounting(EnumController.getVoteCountingType(ePoll));
+ pollDTO.setPollType(PollType.valueOf(ePoll.getPollType()));
+ pollDTO.setChoiceType(ChoiceType.valueOf(ePoll.getChoiceType()));
+ pollDTO.setVoteCounting(VoteCountingType.valueOf(ePoll.getVoteCounting()));
for (Comment comment : ePoll.getComment()) {
pollDTO.getComments().add(createPollCommentDTO(comment));
Deleted: trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/EnumController.java
===================================================================
--- trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/EnumController.java 2010-02-23 09:39:10 UTC (rev 2877)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/EnumController.java 2010-02-23 15:12:23 UTC (rev 2878)
@@ -1,147 +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 org.chorem.pollen.business.persistence.ChoiceTypeDAO;
-import org.chorem.pollen.business.persistence.Poll;
-import org.chorem.pollen.business.persistence.PollTypeDAO;
-import org.chorem.pollen.business.persistence.PollenModelDAOHelper;
-import org.chorem.pollen.business.persistence.Result;
-import org.chorem.pollen.business.persistence.VoteCountingDAO;
-import org.chorem.pollen.business.utils.ContextUtil;
-import org.chorem.pollen.common.ChoiceType;
-import org.chorem.pollen.common.PollType;
-import org.chorem.pollen.common.VoteCountingType;
-import org.nuiton.topia.TopiaContext;
-import org.nuiton.topia.TopiaException;
-
-/**
- * Classe de gestion des énumérations.
- *
- * @author fdesbois
- * @version $Id$
- */
-public class EnumController extends DataConverter {
-
- public EnumController(TopiaContext transaction) {
- super(transaction);
- }
-
- /**
- *
- * @param type
- * @param ePoll
- * @deprecated use directly daos when needed
- */
- @Deprecated
- public void setChoiceType(ChoiceType type, Poll ePoll) {
- try {
- if (type != null) {
- ChoiceTypeDAO dao = PollenModelDAOHelper
- .getChoiceTypeDAO(transaction);
- ePoll.setChoiceType(dao.findByName(type.name()));
- }
- } catch (TopiaException e) {
- ContextUtil.doCatch(e, transaction);
- }
- }
-
-
- @Deprecated
- public void setPollType(PollType type, Poll ePoll) {
- try {
- if (type != null) {
- PollTypeDAO dao = PollenModelDAOHelper
- .getPollTypeDAO(transaction);
- ePoll.setPollType(dao.findByName(type.name()));
- }
- } catch (TopiaException e) {
- ContextUtil.doCatch(e, transaction);
- }
- }
-
-
- @Deprecated
- public void setVoteCounting(VoteCountingType type, Poll ePoll) {
- try {
- if (type != null) {
- VoteCountingDAO dao = PollenModelDAOHelper
- .getVoteCountingDAO(transaction);
- ePoll.setVoteCounting(dao.findByName(type.name()));
- }
- } catch (TopiaException e) {
- ContextUtil.doCatch(e, transaction);
- }
- }
-
- public void setVoteCounting(VoteCountingType type, Result eResult) {
- try {
- if (type != null) {
- VoteCountingDAO dao = PollenModelDAOHelper
- .getVoteCountingDAO(transaction);
- eResult.setVoteCounting(dao.findByName(type.name()));
- }
- } catch (TopiaException e) {
- ContextUtil.doCatch(e, transaction);
- }
- }
-
- public static ChoiceType getChoiceType(String type) {
- return ChoiceType.valueOf(type);
- }
-
- public static ChoiceType getChoiceType(Poll poll) {
- if (poll.getChoiceType() == null) {
- return null;
- }
- return getChoiceType(poll.getChoiceType().getName());
- }
-
- public static VoteCountingType getVoteCountingType(String type) {
- return VoteCountingType.valueOf(type);
- }
-
- public static VoteCountingType getVoteCountingType(Poll poll) {
- if (poll.getVoteCounting() == null) {
- return null;
- }
- return getVoteCountingType(poll.getVoteCounting().getName());
- }
-
- public static VoteCountingType getVoteCountingType(Result result) {
- if (result.getVoteCounting() == null) {
- return null;
- }
- return getVoteCountingType(result.getVoteCounting().getName());
- }
-
- public static PollType getPollType(String type) {
- return PollType.valueOf(type);
- }
-
- public static PollType getPollType(Poll poll) {
- if (poll.getPollType() == null) {
- return null;
- }
- return getPollType(poll.getPollType().getName());
- }
-
- public static boolean isGroupType(Poll poll) {
- return "GROUP".equals(poll.getPollType().getName());
- }
-
-}
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-23 09:39:10 UTC (rev 2877)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/migration/PollenMigrationCallbackHandler.java 2010-02-23 15:12:23 UTC (rev 2878)
@@ -68,6 +68,10 @@
VersionUtil.valueOf("1.2"))) {
migrate1_1To1_2(conn, dialect);
}
+ if (VersionUtil.valueOf(dbVersion).before(
+ VersionUtil.valueOf("1.3"))) {
+ migrate1_2To1_3(conn, dialect);
+ }
conn.commit();
result = MigrationChoice.CUSTOM_MIGRATION;
} catch (Exception eee) {
@@ -155,4 +159,78 @@
log.info("done " + sql);
}
}
+
+ /** Migration de la version 1.2 à 1.3 */
+ private void migrate1_2To1_3(Connection conn, Dialect dialect)
+ throws SQLException {
+ log.info("Migrate version 1_1 to version 1_2");
+ String[] sqls = null;
+
+ // Script de migration
+ if (dialect instanceof PostgreSQLDialect) {
+ sqls = new String[] {
+ // VoteCounting becomes a String field instead of a table
+ "alter table poll add votecounting1 varchar;",
+ "update poll as p set votecounting1 = (select v.name from votecounting v where v.topiaId = p.votecounting);",
+ "alter table poll drop column votecounting;",
+ "alter table poll rename votecounting1 to votecounting;",
+ "alter table result add votecounting1 varchar;",
+ "update result as r set votecounting1 = (select v.name from votecounting v where v.topiaId = r.votecounting);",
+ "alter table result drop column votecounting;",
+ "alter table result rename votecounting1 to votecounting;",
+ "drop table votecounting;",
+ // PollType becomes a String field instead of a table
+ "alter table poll add polltype1 varchar;",
+ "update poll as p set polltype1 = (select t.name from polltype t where t.topiaId = p.polltype);",
+ "alter table poll drop column polltype;",
+ "alter table poll rename polltype1 to polltype;",
+ "drop table polltype;",
+ // ChoiceType becomes a String field instead of a table
+ "alter table poll add choicetype1 varchar;",
+ "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;"
+ };
+ } else if (dialect instanceof H2Dialect) {
+ sqls = new String[] {
+ // VoteCounting becomes a String field instead of a table
+ "alter table poll add votecounting1 varchar;",
+ "update poll as p set votecounting1 = (select v.name from votecounting v where v.topiaId = p.votecounting);",
+ "alter table poll drop column votecounting;",
+ "alter table poll alter column rename votecounting1 to votecounting;",
+ "alter table result add votecounting1 varchar;",
+ "update result as r set votecounting1 = (select v.name from votecounting v where v.topiaId = r.votecounting);",
+ "alter table result drop column votecounting;",
+ "alter table result alter column rename votecounting1 to votecounting;",
+ "drop table votecounting;",
+ // PollType becomes a String field instead of a table
+ "alter table poll add polltype1 varchar;",
+ "update poll as p set polltype1 = (select t.name from polltype t where t.topiaId = p.polltype);",
+ "alter table poll drop column polltype;",
+ "alter table poll alter column rename polltype1 to polltype;",
+ "drop table polltype;",
+ // ChoiceType becomes a String field instead of a table
+ "alter table poll add choicetype1 varchar;",
+ "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 alter column rename choicetype1 to choicetype;",
+ "drop table choicetype;"
+ };
+ } else {
+ if (log.isErrorEnabled()) {
+ log
+ .error("Migration non prise en charge pour ce type de dialect : "
+ + dialect);
+ }
+ }
+
+ // Exécution de la migration
+ for (String sql : sqls) {
+ log.info("try " + sql);
+ PreparedStatement sta = conn.prepareStatement(sql);
+ sta.executeUpdate();
+ log.info("done " + sql);
+ }
+ }
}
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-23 09:39:10 UTC (rev 2877)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServicePollImpl.java 2010-02-23 15:12:23 UTC (rev 2878)
@@ -25,6 +25,7 @@
import java.util.Set;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.chorem.pollen.business.PollenException;
import org.chorem.pollen.business.converters.ConverterHelper;
import org.chorem.pollen.business.converters.DataPollConverter;
import org.chorem.pollen.business.dto.ChoiceDTO;
@@ -33,25 +34,19 @@
import org.chorem.pollen.business.dto.PreventRuleDTO;
import org.chorem.pollen.business.dto.VotingListDTO;
import org.chorem.pollen.business.persistence.Choice;
+import org.chorem.pollen.business.persistence.ChoiceDAO;
import org.chorem.pollen.business.persistence.ChoiceImpl;
-import org.chorem.pollen.business.persistence.ChoiceType;
-import org.chorem.pollen.business.persistence.ChoiceTypeDAO;
import org.chorem.pollen.business.persistence.PersonToList;
-import org.chorem.pollen.business.persistence.PersonToListDAO;
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.PollType;
-import org.chorem.pollen.business.persistence.PollTypeDAO;
import org.chorem.pollen.business.persistence.PollenModelDAOHelper;
import org.chorem.pollen.business.persistence.PreventRule;
import org.chorem.pollen.business.persistence.PreventRuleImpl;
import org.chorem.pollen.business.persistence.UserAccount;
import org.chorem.pollen.business.persistence.UserAccountDAO;
import org.chorem.pollen.business.persistence.Vote;
-import org.chorem.pollen.business.persistence.VoteCounting;
-import org.chorem.pollen.business.persistence.VoteCountingDAO;
import org.chorem.pollen.business.persistence.VoteDAO;
import org.chorem.pollen.business.persistence.VotingList;
import org.chorem.pollen.business.persistence.VotingListImpl;
@@ -85,21 +80,7 @@
@Override
public String createPoll(PollDTO pollDTO) {
TopiaContext transaction = null;
- String topiaId = "";
- try {
- if (pollDTO.getPollType() == null) {
- throw new NullPointerException(
- "PollType can't be null to create a Poll");
- }
- if (pollDTO.getChoiceType() == null) {
- throw new NullPointerException(
- "ChoiceType can't be null to create a Poll");
- }
- if (pollDTO.getVoteCounting() == null) {
- throw new NullPointerException(
- "VoteCounting can't be null to create a Poll");
- }
-
+ try {
transaction = rootContext.beginTransaction();
pollDAO = PollenModelDAOHelper.getPollDAO(transaction);
@@ -108,25 +89,6 @@
// ** Create new poll ID for urls
entity.setPollId(ContextUtil.createPollenUrlId());
- // FIXME-FD20100222 Change model to put name values directly in Poll
- // entity
- ChoiceTypeDAO choiceTypeDAO =
- PollenModelDAOHelper.getChoiceTypeDAO(transaction);
- ChoiceType choiceType =
- choiceTypeDAO.findByName(pollDTO.getChoiceType().name());
- PollTypeDAO pollTypeDAO =
- PollenModelDAOHelper.getPollTypeDAO(transaction);
- PollType pollType =
- pollTypeDAO.findByName(pollDTO.getPollType().name());
- VoteCountingDAO voteCountingDAO =
- PollenModelDAOHelper.getVoteCountingDAO(transaction);
- VoteCounting voteCounting =
- voteCountingDAO.findByName(pollDTO.getVoteCounting().name());
-
- entity.setChoiceType(choiceType);
- entity.setPollType(pollType);
- entity.setVoteCounting(voteCounting);
-
// ** Creator managment
PollAccount creator = prepareCreator(transaction, pollDTO);
entity.setCreator(creator);
@@ -158,11 +120,8 @@
transaction.commitTransaction();
if (log.isDebugEnabled()) {
- log.debug("creator after creation: " + entity.getCreator());
+ log.debug("Entity created: " + entity);
}
- if (log.isDebugEnabled()) {
- log.debug("Entity created: " + topiaId);
- }
return entity.getTopiaId();
} catch (Exception e) {
@@ -267,10 +226,19 @@
Poll pollEntity = pollDAO.findByTopiaId(pollDTO.getId());
- converter.setTransaction(transaction);
- converter.populatePollEntity(pollDTO, pollEntity);
+ ConverterHelper.convert(pollDTO, pollEntity);
- converter.persistChoices(pollDTO, pollEntity);
+ ChoiceDAO choiceDAO = PollenModelDAOHelper.getChoiceDAO(transaction);
+
+ // ** Update choices (no add, no remove)
+ for (ChoiceDTO choiceDTO : pollDTO.getChoiceDTOs()) {
+ Choice choice = choiceDAO.findByTopiaId(choiceDTO.getId());
+ ConverterHelper.convert(choiceDTO, choice);
+ choice.update();
+ }
+
+ // Les règles de notifications restent mystérieuses
+ // Y a t-il un besoin de suppression ?
converter.persistPreventRules(pollDTO, pollEntity);
pollDAO.update(pollEntity);
Modified: trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServiceResultsImpl.java
===================================================================
--- trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServiceResultsImpl.java 2010-02-23 09:39:10 UTC (rev 2877)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServiceResultsImpl.java 2010-02-23 15:12:23 UTC (rev 2878)
@@ -25,7 +25,6 @@
import org.apache.commons.logging.LogFactory;
import org.chorem.pollen.business.converters.DataResultConverter;
import org.chorem.pollen.business.converters.DataVoteCountingConverter;
-import org.chorem.pollen.business.converters.EnumController;
import org.chorem.pollen.business.dto.ResultDTO;
import org.chorem.pollen.business.dto.ResultListDTO;
import org.chorem.pollen.business.dto.UserDTO;
@@ -34,6 +33,7 @@
import org.chorem.pollen.business.persistence.PollenModelDAOHelper;
import org.chorem.pollen.business.persistence.Result;
import org.chorem.pollen.business.utils.ContextUtil;
+import org.chorem.pollen.common.PollType;
import org.chorem.pollen.common.VoteCountingType;
import org.chorem.pollen.votecounting.dto.PollDTO;
import org.chorem.pollen.votecounting.dto.PollExportDTO;
@@ -120,7 +120,7 @@
ServiceVoteCounting service = new ServiceVoteCountingImpl();
VoteCountingResultDTO result = service.executeVoteCounting(dto);
converter.populateResultEntities(result);
- if (EnumController.isGroupType(ePoll)) {
+ if (PollType.isGroupType(ePoll.getPollType())) {
result = service.executeGroupCounting(dto);
converter.populateResultEntities(result);
}
@@ -132,8 +132,8 @@
// Conversion et trie des résultats
List<ResultDTO> list = converter.createResultDTOs(ePoll);
- VoteCountingType voteCountingType = EnumController
- .getVoteCountingType(ePoll);
+ VoteCountingType voteCountingType =
+ VoteCountingType.valueOf(ePoll.getVoteCounting());
Iterator<ResultDTO> it = list.iterator();
while (it.hasNext()) {
@@ -196,7 +196,7 @@
}
for (Result curr : results) {
- if (EnumController.getVoteCountingType(curr) == type) {
+ if (VoteCountingType.valueOf(curr.getVoteCounting()) == type) {
return true;
}
}
@@ -226,7 +226,7 @@
converter.populateResultEntities(result);
results.add(result);
- if (EnumController.isGroupType(ePoll)) {
+ if (PollType.isGroupType(ePoll.getPollType())) {
VoteCountingResultDTO groupResult = service
.executeGroupCounting(dto);
converter.populateResultEntities(groupResult);
Modified: trunk/pollen-business/src/main/java/org/chorem/pollen/business/utils/ContextUtil.java
===================================================================
--- trunk/pollen-business/src/main/java/org/chorem/pollen/business/utils/ContextUtil.java 2010-02-23 09:39:10 UTC (rev 2877)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/utils/ContextUtil.java 2010-02-23 15:12:23 UTC (rev 2878)
@@ -25,13 +25,10 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.chorem.pollen.business.converters.ConverterHelper;
-import org.chorem.pollen.business.persistence.ChoiceTypeDAO;
-import org.chorem.pollen.business.persistence.PollTypeDAO;
+import org.chorem.pollen.business.PollenException;
import org.chorem.pollen.business.persistence.PollenModelDAOHelper;
import org.chorem.pollen.business.persistence.UserAccount;
import org.chorem.pollen.business.persistence.UserAccountDAO;
-import org.chorem.pollen.business.persistence.VoteCountingDAO;
import org.hibernate.exception.SQLGrammarException;
import org.nuiton.topia.TopiaContext;
import org.nuiton.topia.TopiaContextFactory;
@@ -216,22 +213,22 @@
transaction = context.beginTransaction();
// Chargement des types de choix dans la table choiceType
- ChoiceTypeDAO choiceTypeDAO = PollenModelDAOHelper
- .getChoiceTypeDAO(transaction);
- loadDB("choiceType", choiceTypeDAO);
- transaction.commitTransaction();
+// ChoiceTypeDAO choiceTypeDAO = PollenModelDAOHelper
+// .getChoiceTypeDAO(transaction);
+// loadDB("choiceType", choiceTypeDAO);
+// transaction.commitTransaction();
// Chargement des types de sondage dans la table pollType
- PollTypeDAO pollTypeDAO = PollenModelDAOHelper
- .getPollTypeDAO(transaction);
- loadDB("pollType", pollTypeDAO);
- transaction.commitTransaction();
+// PollTypeDAO pollTypeDAO = PollenModelDAOHelper
+// .getPollTypeDAO(transaction);
+// loadDB("pollType", pollTypeDAO);
+// transaction.commitTransaction();
// Chargement des types de dépouillement dans la table voteCounting
- VoteCountingDAO voteCountingDAO = PollenModelDAOHelper
- .getVoteCountingDAO(transaction);
- loadDB("voteCounting", voteCountingDAO);
- transaction.commitTransaction();
+// VoteCountingDAO voteCountingDAO = PollenModelDAOHelper
+// .getVoteCountingDAO(transaction);
+// loadDB("voteCounting", voteCountingDAO);
+// transaction.commitTransaction();
// Chargement de l'utilisateur par défaut
UserAccountDAO userAccountDAO = PollenModelDAOHelper
@@ -291,7 +288,7 @@
}
}
- public static void doCatch(Exception e, TopiaContext transaction) {
+ public static void doCatch(Exception e, TopiaContext transaction) throws PollenException {
doCatch(e, transaction, "Échec lors du déroulement de la transaction");
}
@@ -301,8 +298,9 @@
* @param eee
* @param message
* @param transaction la transaction courante
+ * @throws PollenException
*/
- public static void doCatch(Exception eee, TopiaContext transaction, String message) {
+ public static void doCatch(Exception eee, TopiaContext transaction, String message) throws PollenException {
if (log.isErrorEnabled()) {
log.error(message, eee);
}
@@ -317,6 +315,10 @@
}
}
}
+ // PollenBusinessException must be managed (catch and throw) when needed
+// if (! (eee instanceof PollenBusinessException)) {
+ throw new PollenException(message, eee);
+// }
}
/**
Added: trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/ChoiceImpl.hbm.xml
===================================================================
--- trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/ChoiceImpl.hbm.xml (rev 0)
+++ trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/ChoiceImpl.hbm.xml 2010-02-23 15:12:23 UTC (rev 2878)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping default-access="field" auto-import="true" package="org.chorem.pollen.business.persistence">
+ <class name="org.chorem.pollen.business.persistence.ChoiceImpl" table="choice" node="org.chorem.pollen.business.persistence.ChoiceImpl" abstract="false" proxy="org.chorem.pollen.business.persistence.Choice" >
+ <id name="topiaId" type="string" length="255" node="@topiaId"/>
+ <version name="topiaVersion" type="long" node="@topiaVersion"/>
+ <property name="topiaCreateDate" type="timestamp" node="@topiaCreateDate"/>
+ <property name="name" type="text" access="field" column="name" node="name"/>
+ <property name="description" type="text" access="field" column="description" node="description"/>
+ <property name="validate" type="java.lang.Boolean" access="field" column="validate" node="validate"/>
+ <bag name="voteVoteToChoice" inverse="true" lazy="true" cascade="all,delete-orphan" node="voteVoteToChoice" embed-xml="false">
+ <key column="choice"/>
+ <one-to-many class="org.chorem.pollen.business.persistence.VoteToChoiceImpl" node="topiaId" embed-xml="false"/>
+ </bag>
+ <many-to-one name="poll" class="org.chorem.pollen.business.persistence.PollImpl" column="poll" node="poll/@topiaId" embed-xml="false"/>
+ </class>
+</hibernate-mapping>
Added: 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 (rev 0)
+++ trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/CommentImpl.hbm.xml 2010-02-23 15:12:23 UTC (rev 2878)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping default-access="field" auto-import="true" package="org.chorem.pollen.business.persistence">
+ <class name="org.chorem.pollen.business.persistence.CommentImpl" table="comment" node="org.chorem.pollen.business.persistence.CommentImpl" abstract="false" proxy="org.chorem.pollen.business.persistence.Comment" >
+ <id name="topiaId" type="string" length="255" node="@topiaId"/>
+ <version name="topiaVersion" type="long" node="@topiaVersion"/>
+ <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"/>
+ <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>
Added: trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/PersonListImpl.hbm.xml
===================================================================
--- trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/PersonListImpl.hbm.xml (rev 0)
+++ trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/PersonListImpl.hbm.xml 2010-02-23 15:12:23 UTC (rev 2878)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping default-access="field" auto-import="true" package="org.chorem.pollen.business.persistence">
+ <class name="org.chorem.pollen.business.persistence.PersonListImpl" table="personList" node="org.chorem.pollen.business.persistence.PersonListImpl" abstract="false" proxy="org.chorem.pollen.business.persistence.PersonList" >
+ <id name="topiaId" type="string" length="255" node="@topiaId"/>
+ <version name="topiaVersion" type="long" node="@topiaVersion"/>
+ <property name="topiaCreateDate" type="timestamp" node="@topiaCreateDate"/>
+ <property name="name" type="text" access="field" column="name" node="name"/>
+ <many-to-one name="owner" class="org.chorem.pollen.business.persistence.UserAccountImpl" column="owner" node="owner/@topiaId" embed-xml="false"/>
+ <bag name="pollAccount" inverse="true" lazy="true" node="pollAccount" embed-xml="false">
+ <key column="personList"/>
+ <one-to-many class="org.chorem.pollen.business.persistence.PollAccountImpl" node="topiaId" embed-xml="false"/>
+ </bag>
+ </class>
+</hibernate-mapping>
Added: trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/PersonToListImpl.hbm.xml
===================================================================
--- trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/PersonToListImpl.hbm.xml (rev 0)
+++ trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/PersonToListImpl.hbm.xml 2010-02-23 15:12:23 UTC (rev 2878)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping default-access="field" auto-import="true" package="org.chorem.pollen.business.persistence">
+ <class name="org.chorem.pollen.business.persistence.PersonToListImpl" table="personToList" node="org.chorem.pollen.business.persistence.PersonToListImpl" abstract="false" proxy="org.chorem.pollen.business.persistence.PersonToList" >
+ <id name="topiaId" type="string" length="255" node="@topiaId"/>
+ <version name="topiaVersion" type="long" node="@topiaVersion"/>
+ <property name="topiaCreateDate" type="timestamp" node="@topiaCreateDate"/>
+ <property name="weight" type="java.lang.Double" access="field" column="weight" node="weight"/>
+ <property name="hasVoted" type="java.lang.Boolean" access="field" column="hasVoted" node="hasVoted"/>
+ <many-to-one name="votingList" class="org.chorem.pollen.business.persistence.VotingListImpl" column="votingList" node="votingList/@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>
Added: 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 (rev 0)
+++ trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/PollAccountImpl.hbm.xml 2010-02-23 15:12:23 UTC (rev 2878)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping default-access="field" auto-import="true" package="org.chorem.pollen.business.persistence">
+ <class name="org.chorem.pollen.business.persistence.PollAccountImpl" table="pollAccount" node="org.chorem.pollen.business.persistence.PollAccountImpl" abstract="false" proxy="org.chorem.pollen.business.persistence.PollAccount" >
+ <id name="topiaId" type="string" length="255" node="@topiaId"/>
+ <version name="topiaVersion" type="long" node="@topiaVersion"/>
+ <property name="topiaCreateDate" type="timestamp" node="@topiaCreateDate"/>
+ <property name="accountId" type="text" access="field" column="accountId" node="accountId"/>
+ <property name="votingId" type="text" access="field" column="votingId" node="votingId"/>
+ <property name="email" type="text" access="field" column="email" node="email"/>
+ <bag name="votingListPersonToList" inverse="true" lazy="true" cascade="all,delete-orphan" node="votingListPersonToList" embed-xml="false">
+ <key column="pollAccount"/>
+ <one-to-many class="org.chorem.pollen.business.persistence.PersonToListImpl" node="topiaId" embed-xml="false"/>
+ </bag>
+ <bag name="pollsCreated" inverse="true" lazy="true" node="pollsCreated" embed-xml="false">
+ <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"/>
+ </bag>
+ <many-to-one name="personList" class="org.chorem.pollen.business.persistence.PersonListImpl" column="personList" node="personList/@topiaId" embed-xml="false"/>
+ <many-to-one name="userAccount" class="org.chorem.pollen.business.persistence.UserAccountImpl" column="userAccount" node="userAccount/@topiaId" embed-xml="false"/>
+ </class>
+</hibernate-mapping>
Added: trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/PollImpl.hbm.xml
===================================================================
--- trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/PollImpl.hbm.xml (rev 0)
+++ trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/PollImpl.hbm.xml 2010-02-23 15:12:23 UTC (rev 2878)
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping default-access="field" auto-import="true" package="org.chorem.pollen.business.persistence">
+ <class name="org.chorem.pollen.business.persistence.PollImpl" table="poll" node="org.chorem.pollen.business.persistence.PollImpl" abstract="false" proxy="org.chorem.pollen.business.persistence.Poll" >
+ <id name="topiaId" type="string" length="255" node="@topiaId"/>
+ <version name="topiaVersion" type="long" node="@topiaVersion"/>
+ <property name="topiaCreateDate" type="timestamp" node="@topiaCreateDate"/>
+ <property name="pollId" type="text" access="field" column="pollId" node="pollId"/>
+ <property name="title" type="text" access="field" column="title" node="title"/>
+ <property name="description" type="text" access="field" column="description" node="description"/>
+ <property name="beginChoiceDate" type="java.util.Date" access="field" column="beginChoiceDate" node="beginChoiceDate"/>
+ <property name="beginDate" type="java.util.Date" access="field" column="beginDate" node="beginDate"/>
+ <property name="endDate" type="java.util.Date" access="field" column="endDate" node="endDate"/>
+ <property name="maxChoiceNb" type="java.lang.Integer" access="field" column="maxChoiceNb" node="maxChoiceNb"/>
+ <property name="closed" type="java.lang.Boolean" access="field" column="closed" node="closed"/>
+ <property name="choiceAddAllowed" type="java.lang.Boolean" access="field" column="choiceAddAllowed" node="choiceAddAllowed"/>
+ <property name="anonymousVoteAllowed" type="java.lang.Boolean" access="field" column="anonymousVoteAllowed" node="anonymousVoteAllowed"/>
+ <property name="anonymous" type="java.lang.Boolean" access="field" column="anonymous" node="anonymous"/>
+ <property name="publicResults" type="java.lang.Boolean" access="field" column="publicResults" node="publicResults"/>
+ <property name="continuousResults" type="java.lang.Boolean" access="field" column="continuousResults" node="continuousResults"/>
+ <property name="endChoiceDate" type="java.util.Date" access="field" column="endChoiceDate" node="endChoiceDate"/>
+ <property name="voteCounting" type="text" access="field" column="voteCounting" node="voteCounting"/>
+ <property name="pollType" type="text" access="field" column="pollType" node="pollType"/>
+ <property name="choiceType" type="text" access="field" column="choiceType" node="choiceType"/>
+ <bag name="vote" inverse="true" lazy="true" cascade="all,delete-orphan" node="vote" embed-xml="false">
+ <key column="poll"/>
+ <one-to-many class="org.chorem.pollen.business.persistence.VoteImpl" node="topiaId" embed-xml="false"/>
+ </bag>
+ <bag name="choice" inverse="true" lazy="true" cascade="all,delete-orphan" node="choice" embed-xml="false">
+ <key column="poll"/>
+ <one-to-many class="org.chorem.pollen.business.persistence.ChoiceImpl" node="topiaId" embed-xml="false"/>
+ </bag>
+ <bag name="result" inverse="true" lazy="true" cascade="all,delete-orphan" node="result" embed-xml="false">
+ <key column="poll"/>
+ <one-to-many class="org.chorem.pollen.business.persistence.ResultImpl" node="topiaId" embed-xml="false"/>
+ </bag>
+ <many-to-one name="creator" class="org.chorem.pollen.business.persistence.PollAccountImpl" column="creator" node="creator/@topiaId" embed-xml="false"/>
+ <bag name="comment" inverse="true" lazy="true" cascade="all,delete-orphan" node="comment" embed-xml="false">
+ <key column="poll"/>
+ <one-to-many class="org.chorem.pollen.business.persistence.CommentImpl" node="topiaId" embed-xml="false"/>
+ </bag>
+ <bag name="preventRule" inverse="true" lazy="true" cascade="all,delete-orphan" node="preventRule" embed-xml="false">
+ <key column="poll"/>
+ <one-to-many class="org.chorem.pollen.business.persistence.PreventRuleImpl" node="topiaId" embed-xml="false"/>
+ </bag>
+ <bag name="votingList" inverse="true" lazy="true" cascade="all,delete-orphan" node="votingList" embed-xml="false">
+ <key column="poll"/>
+ <one-to-many class="org.chorem.pollen.business.persistence.VotingListImpl" node="topiaId" embed-xml="false"/>
+ </bag>
+ </class>
+</hibernate-mapping>
Added: trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/PreventRuleImpl.hbm.xml
===================================================================
--- trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/PreventRuleImpl.hbm.xml (rev 0)
+++ trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/PreventRuleImpl.hbm.xml 2010-02-23 15:12:23 UTC (rev 2878)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping default-access="field" auto-import="true" package="org.chorem.pollen.business.persistence">
+ <class name="org.chorem.pollen.business.persistence.PreventRuleImpl" table="preventRule" node="org.chorem.pollen.business.persistence.PreventRuleImpl" abstract="false" proxy="org.chorem.pollen.business.persistence.PreventRule" >
+ <id name="topiaId" type="string" length="255" node="@topiaId"/>
+ <version name="topiaVersion" type="long" node="@topiaVersion"/>
+ <property name="topiaCreateDate" type="timestamp" node="@topiaCreateDate"/>
+ <property name="scope" type="text" access="field" column="scope" node="scope"/>
+ <property name="sensibility" type="java.lang.Integer" access="field" column="sensibility" node="sensibility"/>
+ <property name="repeated" type="java.lang.Boolean" access="field" column="repeated" node="repeated"/>
+ <property name="active" type="java.lang.Boolean" access="field" column="active" node="active"/>
+ <property name="oneTime" type="java.lang.Boolean" access="field" column="oneTime" node="oneTime"/>
+ <property name="method" type="text" access="field" column="method" node="method"/>
+ <many-to-one name="poll" class="org.chorem.pollen.business.persistence.PollImpl" column="poll" node="poll/@topiaId" embed-xml="false"/>
+ </class>
+</hibernate-mapping>
Added: trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/ResultImpl.hbm.xml
===================================================================
--- trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/ResultImpl.hbm.xml (rev 0)
+++ trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/ResultImpl.hbm.xml 2010-02-23 15:12:23 UTC (rev 2878)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping default-access="field" auto-import="true" package="org.chorem.pollen.business.persistence">
+ <class name="org.chorem.pollen.business.persistence.ResultImpl" table="result" node="org.chorem.pollen.business.persistence.ResultImpl" abstract="false" proxy="org.chorem.pollen.business.persistence.Result" >
+ <id name="topiaId" type="string" length="255" node="@topiaId"/>
+ <version name="topiaVersion" type="long" node="@topiaVersion"/>
+ <property name="topiaCreateDate" type="timestamp" node="@topiaCreateDate"/>
+ <property name="name" type="text" access="field" column="name" node="name"/>
+ <property name="ResultValue" type="text" access="field" column="resultValue" node="ResultValue"/>
+ <property name="byGroup" type="java.lang.Boolean" access="field" column="byGroup" node="byGroup"/>
+ <property name="voteCounting" type="text" access="field" column="voteCounting" node="voteCounting"/>
+ <many-to-one name="poll" class="org.chorem.pollen.business.persistence.PollImpl" column="poll" node="poll/@topiaId" embed-xml="false"/>
+ </class>
+</hibernate-mapping>
Added: trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/UserAccountImpl.hbm.xml
===================================================================
--- trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/UserAccountImpl.hbm.xml (rev 0)
+++ trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/UserAccountImpl.hbm.xml 2010-02-23 15:12:23 UTC (rev 2878)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping default-access="field" auto-import="true" package="org.chorem.pollen.business.persistence">
+ <class name="org.chorem.pollen.business.persistence.UserAccountImpl" table="userAccount" node="org.chorem.pollen.business.persistence.UserAccountImpl" abstract="false" proxy="org.chorem.pollen.business.persistence.UserAccount" >
+ <id name="topiaId" type="string" length="255" node="@topiaId"/>
+ <version name="topiaVersion" type="long" node="@topiaVersion"/>
+ <property name="topiaCreateDate" type="timestamp" node="@topiaCreateDate"/>
+ <property name="login" type="text" access="field" column="login" node="login"/>
+ <property name="password" type="text" access="field" column="password" node="password"/>
+ <property name="firstName" type="text" access="field" column="firstName" node="firstName"/>
+ <property name="lastName" type="text" access="field" column="lastName" node="lastName"/>
+ <property name="administrator" type="java.lang.Boolean" access="field" column="administrator" node="administrator"/>
+ <property name="language" type="text" access="field" column="language" node="language"/>
+ <property name="email" type="text" access="field" column="email" node="email"/>
+ <bag name="favoriteList" inverse="true" lazy="true" node="favoriteList" embed-xml="false">
+ <key column="owner"/>
+ <one-to-many class="org.chorem.pollen.business.persistence.PersonListImpl" node="topiaId" embed-xml="false"/>
+ </bag>
+ <bag name="pollAccount" inverse="true" lazy="true" node="pollAccount" embed-xml="false">
+ <key column="userAccount"/>
+ <one-to-many class="org.chorem.pollen.business.persistence.PollAccountImpl" node="topiaId" embed-xml="false"/>
+ </bag>
+ </class>
+</hibernate-mapping>
Added: trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/VoteImpl.hbm.xml
===================================================================
--- trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/VoteImpl.hbm.xml (rev 0)
+++ trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/VoteImpl.hbm.xml 2010-02-23 15:12:23 UTC (rev 2878)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping default-access="field" auto-import="true" package="org.chorem.pollen.business.persistence">
+ <class name="org.chorem.pollen.business.persistence.VoteImpl" table="vote" node="org.chorem.pollen.business.persistence.VoteImpl" abstract="false" proxy="org.chorem.pollen.business.persistence.Vote" >
+ <id name="topiaId" type="string" length="255" node="@topiaId"/>
+ <version name="topiaVersion" type="long" node="@topiaVersion"/>
+ <property name="topiaCreateDate" type="timestamp" node="@topiaCreateDate"/>
+ <property name="weight" type="java.lang.Double" access="field" column="weight" node="weight"/>
+ <property name="comment" type="text" access="field" column="comment" node="comment"/>
+ <property name="anonymous" type="java.lang.Boolean" access="field" column="anonymous" node="anonymous"/>
+ <bag name="choiceVoteToChoice" inverse="true" lazy="true" cascade="all,delete-orphan" node="choiceVoteToChoice" embed-xml="false">
+ <key column="vote"/>
+ <one-to-many class="org.chorem.pollen.business.persistence.VoteToChoiceImpl" node="topiaId" embed-xml="false"/>
+ </bag>
+ <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"/>
+ <many-to-one name="votingList" class="org.chorem.pollen.business.persistence.VotingListImpl" column="votingList" node="votingList/@topiaId" embed-xml="false"/>
+ </class>
+</hibernate-mapping>
Added: trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/VoteToChoiceImpl.hbm.xml
===================================================================
--- trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/VoteToChoiceImpl.hbm.xml (rev 0)
+++ trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/VoteToChoiceImpl.hbm.xml 2010-02-23 15:12:23 UTC (rev 2878)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping default-access="field" auto-import="true" package="org.chorem.pollen.business.persistence">
+ <class name="org.chorem.pollen.business.persistence.VoteToChoiceImpl" table="voteToChoice" node="org.chorem.pollen.business.persistence.VoteToChoiceImpl" abstract="false" proxy="org.chorem.pollen.business.persistence.VoteToChoice" >
+ <id name="topiaId" type="string" length="255" node="@topiaId"/>
+ <version name="topiaVersion" type="long" node="@topiaVersion"/>
+ <property name="topiaCreateDate" type="timestamp" node="@topiaCreateDate"/>
+ <property name="voteValue" type="java.lang.Integer" access="field" column="voteValue" node="voteValue"/>
+ <many-to-one name="vote" class="org.chorem.pollen.business.persistence.VoteImpl" column="vote" node="vote/@topiaId" embed-xml="false" />
+ <many-to-one name="choice" class="org.chorem.pollen.business.persistence.ChoiceImpl" column="choice" node="choice/@topiaId" embed-xml="false" />
+ </class>
+</hibernate-mapping>
Added: trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/VotingListImpl.hbm.xml
===================================================================
--- trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/VotingListImpl.hbm.xml (rev 0)
+++ trunk/pollen-business/src/main/resources/oldmappings/pollen/1.3/org/chorem/pollen/business/persistence/VotingListImpl.hbm.xml 2010-02-23 15:12:23 UTC (rev 2878)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping default-access="field" auto-import="true" package="org.chorem.pollen.business.persistence">
+ <class name="org.chorem.pollen.business.persistence.VotingListImpl" table="votingList" node="org.chorem.pollen.business.persistence.VotingListImpl" abstract="false" proxy="org.chorem.pollen.business.persistence.VotingList" >
+ <id name="topiaId" type="string" length="255" node="@topiaId"/>
+ <version name="topiaVersion" type="long" node="@topiaVersion"/>
+ <property name="topiaCreateDate" type="timestamp" node="@topiaCreateDate"/>
+ <property name="name" type="text" access="field" column="name" node="name"/>
+ <property name="weight" type="java.lang.Double" access="field" column="weight" node="weight"/>
+ <bag name="pollAccountPersonToList" inverse="true" lazy="true" cascade="all,delete-orphan" node="pollAccountPersonToList" embed-xml="false">
+ <key column="votingList"/>
+ <one-to-many class="org.chorem.pollen.business.persistence.PersonToListImpl" node="topiaId" embed-xml="false"/>
+ </bag>
+ <many-to-one name="poll" class="org.chorem.pollen.business.persistence.PollImpl" column="poll" node="poll/@topiaId" embed-xml="false"/>
+ <many-to-one name="vote" class="org.chorem.pollen.business.persistence.VoteImpl" column="vote" node="vote/@topiaId" embed-xml="false"/>
+ </class>
+</hibernate-mapping>
Modified: trunk/pollen-business/src/main/xmi/pollen.zargo
===================================================================
--- trunk/pollen-business/src/main/xmi/pollen.zargo 2010-02-23 09:39:10 UTC (rev 2877)
+++ trunk/pollen-business/src/main/xmi/pollen.zargo 2010-02-23 15:12:23 UTC (rev 2878)
@@ -1,109 +1,95 @@
-PK�V<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��
+PK�yW<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�PK�V<pollen_DC_Pollen.pgml�]mo�F���_�k\�(�pH����,
-�ݠM,��,ю�ʢ!�Isq�R29�9�9!�E��M��3g��y�������|�7�e�~s�^z�x=O������?�����^~��������?>��<��~��o��<�H�x��-.���v�Y>�wK6�/g���_���X��7�����l���{��<�wO�������?�t��m�o���ߔ��4�ȟN���n��^!ߑ ��݅����y�<�u����&�k={��\�����d����]����$O����_�{�W���w���"��� �B�/���q����r��]�o�f�m��vo�d��1�cy���<ƛY�k���w���v����..;�{?m�7��tsM�w�[�V|�K_ϓU�ys���r�?����'/��p��j6�O����ǯ7�ϳ]|���җ��m��n��_��̗�O��8��_~}s��}���r���/����|����v�=�;HOV�`��啿!?�d���Yd#zY bhH{��-����ҷTM(������\]tͲC_������+p0�*#@�(� �d�9�����~f����8��0���]�9����>�x����L�c2I�~�'wɚ��?������l�����|[���d�P����v��)�����<mw˻�|��07�o��_�e��!��w����{������{=;�l7�����Lh`�3����%�XCH�8(Ck�L?����i�+��x8r���{��v�<<�6���n�G���a�)7�)�;��#un�cd��p�ps)�)?����ǻ7l�m����s1��&ٜ�LF��2���C�9�%�2H�Q���Y-���F������\����q[�*'�ꖣ���?�-Gk�����-�w���@�\�M�\�q����uQM_5��y�
-���S|���r�'?.&�&�qdz�y7��;������Ɏ#�lZv��v�T�1���l��.p�3�q�R1J_�N���
-Cx�yKmC#�ń!�=��r�;��{�)MI���5qlek�bM��α����I&dUI�Ӛ41"x��)@���&�M��9�9�O�Qk��!I+;�b%��I�5�߷��@C�5������#�)7������8Ffn�(���:�&&.������c��!ۚX�,|��Y��9U�����@j����t�S�*6]�M7]��*�UL��`�i��Z��4b2�R��Y���P?ζ�/��PC�"&��bD{���r�����4����x�q���լ)ڬmH!�ވv��l�\/�ߛ~�sȯ�d�ֵ�5�����$�����쾁��5hS��ǀ��H
-hX���h���bB�\
-��_s7��xp������
-�D}ٖp�?�G�lKgg`k�ɀ�F3ދ�E��X�ff d
-n3�̠"��C�e`d��0�22�5�\�eH�$�C�#�{(#M���0��F��B�=�6�1�ӝ[[z*Vb�s��ֹu��}�a��AZ�
-5�S���8���F0�d"��XM���6��P�D��/�
-G�L��}�_Tm�t9n��-��V��9*�(ɤ��G�L3L�������~�3D�9�]*_X \(@c@�E���!-xRs�}=��u��C2�o�����S���o�G8�<��Zęq@CE"�M��X1�h�:�:^/�ꁆ���c ��?�N�[����]|oj���30�<�@3��d/c��iE�3��h�{�3ӾZ,�V��K3�e�Y�
-9G�{
-�l���>$O�?�]|���%���_�� ���%c�����3��n���o�V�F�돚J�gc�n����������돜,�l8r2�e��8kS\p)��FVB{.��<=�%�J��<��E�f��E�V�R�GT�%J�$d�Ee[:{����"����蛩�%J��`�!�$�v��B��0���P�u���qM�)e�H���\Վ��.dQ~Zn����n�K��|B�`�<\[Qw�����Cd��D�vН�-˥�
-�jT�#ѧW�b��B�f�� E�u�P����$�P�@�h���ʼnۭg9.U�-]��ۭ|�6Dž(9.�5��r�q�^�k�:�d�(r��/2�E�(�|ɞ=Uc�'�s�1����8C������� /c��]=FȲtJ��=�)ڞ�T��R��jW��&}�j��ch�u���:�ch�À�#�z�Q����1T��0��p$}�c>ěm���c���Ϊs��k�Hk���f�K=�E�IW��(Fz+o1�c���V
-{���1(:rp�
-D�a�5GUۍ���Z=��
-Q'��cjU�Q �;ٵ�ޡ�K�n��21��T�{���)�q~m���͎��r�r��;�G����ǿ�K���=�ӻ����
-H�J�&_��l��/���������R
-��������8�q�o���{��#7��x^�vɗu�����+�I����9��ww�x?`Jp�5�M+�@���n��?����Z� �M�o�;0� ���n��Z��]كu����W�X�M�}����q�Ž#ӯ_D#�5�(_�t$$��G=Lg��;���������rS�ͽr��7S>�r���SA��ʼn@��
-�o��܋ �ϖNO߬�����x���C���E$Z,�>d�n
-��T �I������b�$?-0�l�g�1���Jƣ �؎��v�tH�����Җc@L�:'5��\u�C@�C@Lj:'��d�.���}�.��lw�{1�1>�5�i�պ_kK�f@ǹ�G�;t~�v����-�C~}X���8?*�~��vsiaOp�i�0w��j���K�+�ӂNwZς>;-]��;�|�6�À>s�-�)����2��\fhb���l�s��gh5W�;���C�d~�o��W�U���L&����������Ǟ�hfS&�6۱L\�d�X&��+��Q+q=�e����l�̠�̦�����z3�w��
-؎b��b6���מ+��;�ii��f�z覞u��p��Ԓ��(~Y��x]��C����6���ё��]��0��:K�Z��։F�,����֯�m�:���2�w<�>E��kH�]%x]��4��+�*�{���>��j��4��yϐ܅��;�}e�M�]�Ve��dP�܈��"
-�]F�d��O�i3,�M#�ZL�jz�`N��E���PA&���9�&���F�R�Zd-AM1 {)j%��t�Z����f d
-n$�EJ�"=��x��z��ijQ)MMv%Anծ��j�V��f��t����$<x9L�rm��DJ��(�̐���Y��D��o)k�e���*�U��+�c����Z;Њ(:l8
-r��yk*����qpFj���Y�Z�K���+ߣM^���5�{*τ:1�J�����@��V!���s�>ͲYMS�js��RN��Cu{YU�F��>��Bp�$*���5'�%�(��`':}y���
-�܀}�*�_�&�6R�Ys����{1 X6�u��MIH�hFpf�q�fx6�L�=+ܯS"!B%��C*�����q��"dM%�M����qK�L�*z�dS���
-�0{$=��0c��?ʄ����/ꄒ3 � 3�3�L�ϋ�YQ�r�J���);�8�)���ŵ%Y��ָ���
-�8�a�]���,J� -G�d!��-�!�ԪF��q^p�q:���;NV ��A-��ץH�=�0v�WY�Z��<��G\c*���!k��F5��D4�̌a�c��;��C/ʃ6N�-��@gh!��3���[�jz�b]j~!\��`���nԦj"�lr�)]d�[]�u��K����'��l�<0(NB�zU�լ|��4�.�����f�h���{�ar�]M������r&®���X��+R��(�����
-��1�+
-��${�qd/��l����=��������@�����^�E�N��H��3<�##�k���q��!T��
-��J-ď���^��Dm\)]o�&mΨfi����l
-'s���=.��n%u�GT�R�*GV������ڮ�D�fT�d��S\p�S���LJ2GR���L����&�cJ�)]�!Ւ+��!ժ+�{JׇM�����J;�YS�9�у��W�i�ɵ�b�N���\ �n�9�.?Q��T��:�t9�RL���֥[̓�,ϩ��C�a�E��>�����tI��A�g�~��L��ݜ���.G��V�E�ҥ�V�T=v�O_��9?��tQ5�KF�@
-PF��P�k~�_�8�����}��G�����XӜ!��qVYg����:���{�g���sŜk�����п�����ˇFhz�#���=�t܇x�)Y����鸴��kAm1��Y'wS�~Z��R�`�9��_fz��#�Et;cs~�#aһ����\�����.���f����u.7#,M�9���[��e�����u)�W��R{ղ�4�RJ�)���P�q�����J�~IJ��HQ�^�F�.���y>&�39�V����J�z�x��t=_��e��1�pT����z~�tt��w����Δ[�ut߮���kސ����+{��6�Z�4�ʽ�5�k^�^�X�������QH_��9g�c�z�a]�^#�K���]�Aa(v��悭rh����qh����D�X�\O,%H�Di>�"Q���M������}R꽘�w
-�Y?��O��d��i�s���*|�[BUP�hi�3.��r�3���e�=�PX�d���<f�]�E����u,����X(b�Hz �����X�A����X%��H�����!�UZ�*�+Reލ����>[�n��E��� ��3��:M��&T��AZ��óϔJv�s�*�+T������~��*e�!��.���n�[�Ī���*}T�7d<�#�����r���^��|dP=���zc�V��|�i�0�6P�=�}�S�E��:Y}H��GNU���"�
-�E�0��Z�/���F:��*�L��$��E�;R�\!t��N��,�U�;���K�l���Y�~�m\Bg[�b�ok���%t�sN�_��-��?'
-���yg���'�a��R�]@3t=���b
-Y@�U4 �X��r���M��?����E���)<��LM"��(�ˇ�'۴�h_5���M����Y�}�˪���91r���:�~�ώ�ez�h�U����Y�ɿ��3֙v�,�k����.Ʀ�/r��Ѩ�/oL�ЅE:�e���BJ�0=p[Xx���,P�Ho��i�aW�fݰ��+:w��*���9�x��\C��e�t�c�c:g#�)j���\3�
-Z�[�s��9��[�z�=��<�$Bfs��c��iج�x�],������^L�}��4猰�Zt43��i�J0*�����h��+�yA� �T������T��8z��{H���j=��@v�F�C�R�I�����v�u��8��&e?��V�H��~�����*8�v�s�3����qŻ����"Z��R|����D��Az��]Zy=��`���t�q�G�n����۷���
-q�)]:�
-��6�v����z�U����p�ͮ3$q�Iݮ�jCL�O�4��ϐ&5H�ݮ�Hp���S��(�����n�@�� n�f��#�8��4ċ����NwA��Nr�DͩAԴ�ϛQ/���M��Ȃ�:lz�A�|���o;��?��uYp�1jj����)v=jJՃnJ��((�JɁ=6jn�BP���0�M��o�&؞��m0C���1F�4���w�VH��C�E�;]�s��|�a۽�0��,YNM<�v=�I�x���P6� g5�I����<��l�$�hfم ����B��L���$O\i�����43���A�ܺqo��W�Д�S�A��>n�c�+�����Q\���-��Lb9��m5
-x�)�Ly�����[�o�̪�F*[�Un5b��-��́���b1�SŬ�r����\�!���,i,'eY&�MQ�<�%
-P�(��q�'[*����
-P��@a;�T1��*@kU�"��[�Ph�*��I�!ԣ~T��T�
-0e��C��
-�'~�~G� �3h��`W�[kZ� @�[ȹ���~P�C��ը<�9+�-�=�&�C���4�B��V�&hfVm5���zM f��@�:E�M��\��@�Ql;��wt�ϳ��[���yH!�K�Y/��>ž֍���������<fa����>�^�}���I<[ާ���O��[���{��i90G��~ާ���O������]����R��Mi��~S~��7�����=m��]u�,ѣ�~���fn�
-��]u�.�
-��]��KM@G^�Gh�� 6��]" `�m@�:��%����,�������v�箋��E>G��s���ٞ��
-N���\0l6w
-���@���#�k��u2�����'s�H��o���&��qEo�0��?�r32w�Lbd�X�6��Z6W�mH�ܝG|~:wcpf�O��G��gۍ���F��B��g���霻��1��x�}:����M��t�����YJa:��gu���Ҧs��%������*ju,������G���$xrP���L��ZJ٭��-��Zv�Z/���L��j���Zϧc��٪�"M����j=�V��z�j�B{׆CW\[kDQm�G�ȵ����h(�z�j4, *�b^���V�ɀ�Z]�G�[�j��KW��V+ߢ�Ջjk��p��;C�^���;�(�^�)��v4�_��]E��%�Q8\����j��`��R��w�?�P��p��1˪��"��kozs�I�����J6Yb�)O�9���w�j��O�����pq~�}��^�k�π�}ڰ�N~g�б�F!���Y���l
-Ń[��9��%>�z��YU�u>:��H��1��ua�͡��9���N�!��L�q�3PA�>�C}'r6����<�"fU9���D����)��iN�h���4X�E<��+�����6�!H��9@5�ѹ��yz�����U����G�z4D�h�;��&=�z�5�N�z4L�h�;��&=�z�5�M��ѡ�̫(�#�����x��PճѼN�+���eSg�v?:���!#͋:�@�H���u�GF�u�q����5\�4�|�4/��k@����h^�9y�yW���h�q}�p�����]u��#ͻ�"NKG��p
-��<:Ҽ�."�t�y
-��6ͣ�&����V,J�܌�Y�|t�Ei��i�&���Uf�5%z}�day����^�f
-���^O� �q
-���B:���h�}���yHg\�D���H�)[�3�(� z��iw-
-��ߺX]~��PK�[��PK �V<pollen.todo�����Q(K-*���S�UP2�3PRH�K�O��K ����Z()��q�(��;�D�*���+G���*(�8z)%)J
-@% ���,.2���E���9e�)�E�%��� Y,B3PK4�[-m�PK �V<pollen_profile.profile�����Q(K-*���S�UP2�3PRH�K�O��K ����Z()��qq��e��q��ÙPK7Rp:BPK �V<
-pollen.xmi�]��6���(�����1h��-{Q� �&�ݯ�D9��Y�&��J��cY�,r� %��mb���!�;�s��?�=�g�0:�a0�u� .������]���_�s�a���?����;=��Bs�!�l���{�I���n�6�<�ɗ��O���C��C�-�g�4�GU{��z�e& ������,���W\���^���� 1��V�o�C�I�e�SZ~:�!|��
-Ap����_�'M.�M��/�
-�Q��������������,��������@�}.�sQ� �c�������O�A������{����?f�_� ���W��f4=�����������������Gq������M/,�9�A����I�����n:3sM��
-c.��(Hs]�mG���(BO�M�y����Q�~V���¾���U����<����t|�w�A��{`��7�a\��w��^^���1��s��2c��l�0��"�t����4���
-bܦ�]�%۔<�Q�DC��1j����gՃ|�薈�bp&4�P������%��C��kz~�g���A�|�����]���ERJ�_��]�I�F��%��t_����'����T��]��#Ρ' �k$��SmSq<�eu=��BNQ��F�iq����N���C��ɞr`�/,�;��v�7�ȥ�z�G�:O�"��`� ���6e�u��7��C�ݯ�Y
-�t� &������駇����m��FlI?tb��9uaBa�%����_.�?_7��r����&k*]O�`8���,��
-��R��Iz�Ä�0Zxħ���eG�}�ћ`� �P3��b���d���t\�x�_��N�i�� �;� ��M���+v��<�`��&�����9r����$<��w���>� ���Q��Es���4��!j���j���G���.Q�?���DoJ_�0;��K+�B�;�A�[#���dV����t�FM����tm5ы$I5���&J/Uc�fTՀ*��]aw��Wu�߅G'����0���5�0`q��0:�d�5m�9�j�
-�P<�t����OL��kx,]��x�!�?8�V=���{��U��,ƭZB���x�W��؍��X���g�dF[�*�|��1����ǘ��ј����@�ڛ\�x�-�������<��T��&БJ�ȅы�>�3tQ�v��.o F��
-�J�-2�==[5E�ց�-O��EqY��0zvs���� rs*Q�Q�t8�[�d�S���=�X��:I�C�GOH��8RT��������J"S�L�TOV�� m}�@�R)���>��ԦF�h��e��B���7�w_ t� ���H��/#�L�ps�-���9Z+ͷ�Wp�+�U�K��D��Cڣ��`L��[o�Ë`qi��H��<r�g��#
-��Z-]npFwe7E�4O4=ɵM�i�WCL$wx�t��4��y��H��88Vt�}������^�BҴ�u�+T�4UGCbŲW�8�/�����h�Y,:7yqxJ��K�>�B�M^a��
-�2�}T��TO?&@WSL�"�L�Hޔ�t75�V�=��#Ev��)h��9��!<��89E`A�cĹH��䰕��0@��>���-$�B��W�4~��Բ��F�++�����HG��WM���v�ōHF�@�+i#R�HWR0s=�]��A��L��Y��x�jgUyQ$A��YZFh�8�)��Q�V)Z}�"9��ʩ�X�0�
-��F�y��p�!)_�,8BJ#�9R�0�bX��
-L���Ql�&NHXj
-�٘>�;"80�5dd�[� ���")O�Lq$���uɑ�R$��IRg�%�W�E�
-,�s-�um.�$�^V�L4M rַ�����|O�87�&R��k���)COqT'[��*�c ������s���Q}3�9�H'b�px����}�:�@�jݑ��R�5bڝb��a���8D�p(t`Md��4��9�S
-`�"����I �+t��xC�(ۢ-:JB�,���Ƞ#�.�A|
-O��1cL@hN$w$:��Rׇ�U�!ğG�p6��I�RjH�"��}��'[?)��������$�̘��C��h��kx,]QȈ����<�ݝ����=?:�'�@�����c�ɅS��|��7�yJ��*Od)t'4>X0�e�.^d����'��8�>�^ج�
-J=ȍ�@��L���W�][�2�}�߫.�N`�u�n�A���q(t�&�|5 �b�l6b~�Y���>�K��h�wq�LbO�J�I9f���L�cc����f{�;�k��T(w��]����b���o՞���B��V�O�,~rT�0JЀ)]�V�l��$T1tIґ�pr���+
-O�8���.}#�wY����cf�I��~��sb��q���Uj�ƛe��@���e7&�a
-j��*���)ZOWb3��j�D��#� E�R*\�>,�A�p9�ҟή %A�p<x�r�as�@t�lB�MED�:ې$4���<$�� '$�u�;]p�4�mY���m��[��E�������]�ޜF�P���}\a��S>s&��pzAcY��c�[��t!pl'�[��
-� e�'I�-y��!7�:䅻����n
-Xs"RU�f[��^��Ϟh={"�\1jϝ�|�09:P�����B�dE�P[/5�c�p�I�@�R�ȫ�:Lj�\xt"���oXl�=w���#��۳F�x�䦱H���h:�����>��e�����w�n�@�� (�b���77&}�?�:`7"��n�
-Dx0����}V�%��W�-t�h��VDž�˱���}�%���-t�L֑��r���-���t����݅�ѹ���1�
-0tt:���.���S�K'��P�1����:�(���N�6���t���.����ǂ���xK�m�KJP�0",��[����H�ǎ�zP*ҙk� .�.�WpO�y�g�1�<ʠ�aD�@$*��d~�ۘ��]A@�*��A�H��k��lfU�]*.R*����%�8���:��B�� �$r8(t\I�*���A�]M�l$͢T{���A��D) ��
-D���$�@~�P�0:0H��"P
-���f%�[�ltBsm�+�o�<�f@��>�^�+^:�W@S�e���/ɫ0:�����_��B
-kc�U{O+�t����ڜ@~Gk�k�+��q.�#Y���"���/�ܞ#�:|J�Z�E>�s-�r-�rS�\/��4E���M���os>�A��!*�b�
-�B�G�����!���@�LUC���?9���7��u����i�K�S�:,����ϛ�
-�C�x�5Ir��,qǒ�X�$ˊ#Rͺ�� �:������&p[�K�9O��$Z�G���R��Զ�>��\��.ms
-���!g`������ j��+w`���f��_LI5ǜI��@' ��0���J�a�P=�Î�<��CR�.6�0 ���h>�͢M�+(�s,�8T�KJm*u�R��:�]�%�sCoR��V㈆��jo+4į� �>%����yAgWvS#*���$�6���Z�i��D�Hٜ?\{����h�߈@��:h4�f�4l��F}c"�%O[E#�g�"�ڙVr2]���~��w�}oDA^u]��������x�p D6+�6mT�����sg�r���#�RB"�%u �
-$��+c���#�J�L���Ǐ��ܜnvU�oJ3�W�HÂ)R�ȇ����~��^mC�8�E������|tkl%5-�
-m;s��^�[�>�C�TT�%h�y�'�
-�����r��7���V�
-�-l�jj�D���+���A�Nܝ�Ny��櫦��:3o��i��H�2C!-ȺOiɥOy�5���G�QIHMȆ���렳k#�y}\~ A0 dļg1����D¢2��\��K28.*�,K���lǶUS�PF�(�o���]ߜ@^���a���nf�|β�I/�Б������ ��0p¦!�y��]�d=_C*iZ�:�|
-�����
-w�e�>�N�y�6��vpQ*Zz�����|��͖��1��͖�<�ګe�UX[W���I̥6�1h�x�N�Bi-6,�R��7��,؆+�g�ΔM�uP��V2���Ne!��+h+d)N����j1j�'��j�b6QŬ�RT#R̈6a�&��Y��UȰ����U%[�l�ɨdkd?�hg����@��0����d���z�(aЎ����(1Ye�&�9�T&�|
-�{��Jr����.�G!c�s�����o�/t�QȨ���=�4��$j��H��$kt�.͇N_��8�q�KNlIdR��6�.pbÃ[�J�(A{� ��?C�q��Ӡb"�]]vm�F��ٔWƚ����e-�O�-^��i��\���r�����X�(\��*F�n�#��x�]���G�jeS�3%^.<�[<���ꉉDjk����o8�����ƑD<�.R�������^��
-�-��PJ4N-P.���lj��8��z�zُ{���2��^�p���Y>��7;p}^a� �i h��t����R��(d����&�W,x�W����yR�����Dt���4��}I{mwn� 8��3��d��F�]�0O�H��M"�����̀68�s*K��y:
-��F/��'eh��67��v����ը[�M�sSX04ہ*���z�A��F���5Pz���m�������qo�ӄ��Ma�������&ӂhy��^0�Z5�Y3Q����3�u�߃�.F^y�����3�&��¥�m�71��:9/Va�� h=�����o�|o�#�9џ㨋k�fH���Vx��'Đrd�5C~b���i�r��,����ɕޤS��'�H��e��������z�Et��U]��(�x��7WE�*���^\
-��n`{��[��v�;���H�U�gv�;����n�i�{�T���*3D3t ��~>����:�h�M����;�R�߱���D;���y�����G�è�^vv8T�w�-���BK����п�,*�gѢ���
-�����bs��W]Hl*ʎu;4�oɦ�X_�:�}kFW�E�沮�����gme�UU��W,�7���r�
-�Ɍʎ�N�Vw/��½L?��"
-�۲�7o�p��S��ʾ.N7�@��`VۖU�mK�E[m��:���S��;��_�9<�����G�Y�^K�b���.?Q�����i0�,�Q��iP^,�Q��% T�o�*�h�Z�>SK�.0
-�����)�BxH�c]h�
-��t_�R�?�
-�YA�~���##K���Ϥ�}�##�-�
-��r�mJ+�Qaz(��]ܦ�r�mJ'�T*D��艥�Q�9k��]4*�Oc��b�p^n���[��`5�ä��g��ZQ�>*<LV�^���k2�b-�ؼKV70Sk�������岼�K)��p�,�T�VT���!��cߊ
-�cŪձ��[�f�[��B�M�,*�ʭ�5p(e������oC�N�'��#� {D�x$4��AD�+Mj�@��T%�A�U���*pi�Ħ�-�ׅ/�J��5����pi�D��%��B�[J*�Vu�u[�Q�QP��"K�v�u��K%��dwh�K%a�dw܍K�Xת)AH���V���JbB1�V�8�ƥ���m\���I��]m�z�Q &T6ńJ���(���[�,ON%.l�bp���o�Oxw�8TP�Cxw�p�@oޡr�0(W�ؽ*�����
-J���h�Aơ��6�zw�g8TP�Cxwqd8TPG�Cxw�<8T���z>/��i�IH�d�0�E_�-�)sI~`iKBr�Z2���������|XA@��&�����Q�$$w �����kL�Ԧ�F��CW�$�y��)��3[�ˑ�>{ZF��8��gO�h��F��C{�Hhn��A��C� $��ͼ�߿�gP�3����8���dm`ݬ��zk
-��l�U�1��3m�2�g�S��)��Ĕf��4�pQ�� �ohb0�U�W�@:�LE�ޣ(i��ɪb��D�՛,�����lO�qj4���[������ݿ?��p� �A������/PK'w_)�r2PK�V<ptB�pollen.argoPK�V<�[��Gpollen_DC_Pollen.pgmlPK �V<4�[-m��pollen.todoPK �V<7Rp:B� pollen_profile.profilePK �V<'w_)�r2
- !pollen.xmiPK1�9
\ No newline at end of file
+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�PK�yW<pollen_DC_Pollen.pgml�]k��6���_�۸�O��!JJffя�E�$;H&��Bm�=���{&sq��d�d��lZf$y�dۖ��ê��b��_�x\N>'��"]��@W��$YM��b5s��������o�y�_w�����&Os~ï���㻟&�W���_�0K6���i�[��_��y��/���-��:~��l��b���v�<�>������o?�x��7���5�w���e^"��y�2������;��D��C��e�y�w^�u㱋o&�k?&o.�n��!].���7o������i�����{���?�K���a���PL_M��a�_O������~��y������6Y'���S��"����>}J�q�k7/�oO�������y���.��O����š8�����%�����t���\|���&�|���ꥻw��/�������~Z/>��d�ӷ�wﭓ�6^͗IeB��)���&�ˏ_�\pl_~���m?����O�b�i��S|�02��^�����5�|��hDW%"�����_[��-�Jل�U��ޔ˓��vh����_R�~��&�2T��d�)@�P1��|O�z���U#.�f��������q��80��qx&�L����!]���e:/�]l��b��"�m����r&��}�f���|��7���b��6Yq�x���_���������O����f��Xro�� �_�" ��@u0��؎%j�!�A��!�5�͞���i����@�"9,���x�ݦ�O�z���>��(܇9�;�<�S�9��8Ffaw�0�њ�8*���y��q��ܦb��=��l��Qc2
+�o�k^?���m*O�0%���b�ra��n;(tI.Gs��8�.Gٻ�?T���̢:�:����rt .�MG[���Su9�"�+�d�T3������a[�e�#?�&�M~�g5��n�wIpGшv���t�n6m;�m;$2����P�N��D���3ų���Q�Q��@�7*Fe"�(��
+M��W�8�@~�="�&V��S�41�+�ı��'�5E'[�*41dQLȪ&V%Nkb��H%��M2741hb���q `�&�ZC�&V&�L��I�5��6��@C�5�,��K�#ȩ0�����8Ffa�Ѡ�:�&V�a:����c��!ۚX�,|��Y���,�����T ��gu�ީb
+��棭���ѪbP�$���pq��4�W-Vf
+1�ɾ�#��O�f�%]*bP�D�C�]�j���z����i���;� ���2n�6k@R��-����v<{\������4]&��sY�?Z�$����9����m
+В1���}DB
+tw �����^MhVK�Q��_���g�/�T>��ъ-Q_�%\��/��Q������Z:C0 �ٌ��Ţ��,e3*f d
+n$3��̠U>�C�e`=��\F�\��2�@�� ��=�����r�n#�m!%/���
+n]�X�a���cd�<iQН����èM�0
+5��SW�b���v3;2�{�#t�'&0$6����8��t���/T�MGK��ߢ�^`){!��`��(�<q�`Za��셈��d�+�D9Ҝ�.
+�/,%.$�1 �":"�!]���x�z�) �R(�PJ�O����t1M��#�c���q�GP�Y�Po�u���9G#�9��j��P4�n&P�y�H?������V�d�����30�<�@s���t��s��jE��+��h�;�sӾ�ͮ���K;�E�Y�J9�{�{�JW_�����69z�ʒ�g�G��C�o���1���h�9�O����I6��m+��KM�3��V�1��߹X=s#?w���E���K�w���/8�~�xP05�����y�m�Z���
+ү;l���x��~���B2D��g@ ��C����s%ލ%s�V2g�ʩ����s_1�� �y�/���"g+�H�b�#Z��2cYL,�G�nK'��#�*�D�X1w��4���T1W1� Sp�b�Hsa Ð��
+tc�\���b��*�@R.�ԁ��s���~\l�{��ݺ�<����#�NE���x�T6'F8�Y��.��.�!}���͂0�"��ӕ�W��Us;B{w�n���M,��E��܍G(�t���̩�-����V�E[3G��9�dz�ZX�z�2ޤK��9�!�ɵ��!Zn�����c�����{n+=���k������,�1,ۀ���qRw��JնSz��1L��*Ej�Z����1ԮS1 ���Z��C��C\�xF=�6�1���J��Z��=�I;�@�w=�C�ޤ�&=��@��1k��1�G����Q��6�p��c�P��l6T�j��c=��@�a�.�a�[�ÀM���@���èr7f���6�1���k7�zL�J@5*�a+��T�2:� ɛM:]� �so�o:f1ίM����C���?T<
+��q[��=w���~NgI�L����d�����2���ȧm^"|8��k��+�K5������|�I��_���w��#7�|y�����*YۛZ�{�7�W}�I���&�XW �
+�Mp�@����v��_����F� �M�o�;p���W�ֻ��z�J��v�9�֧����th��c����(�g2��9@42���IVG�B¯=�a:3O�s�������.S�ͽ
+��7g���UWM��+
+�+Y��n��&twV}��f�X�]"|yI��p����"�fS��w�e�u*ĄV������byHo�Z`^�bO�b;YG�:|�O1��em�N=�&C[�ΘbrK�����b��1�:Ą&�����\9��=��է��0�],_M|��q�j��<�u�E3��e-"�����F�xH6�[��z?�À�~�n1N�0��+��=��ӂaz�ܺ���@��ଞֳ���Ӳ�h�i�[�9��la,�=��M+�03��ݙ�s�V�h]Y�;��--s�X����l���"Ҙ�d�&���� }��lf�oV��m��]�=�s�X��d�\&��U��P_Q+q=�e>���d�̠�̶��k��z3�w����b��b��NkO����ô?���}3p=� �ΐw��p������(Y��x]���C���Ph��yjrGt�vW���f����䮳��\�`�h��һ�D���M4Bg�^Wf�Nc�{�/eF��wW �9�`ZS��p�콛��'�ICM��p1����ur��/��w����4�V.7bwe�Hv�S:���yA��yY��|/&q�<�bN��E��ЊLJmWNr��YH�hO^�Y+P��^�Z-�8]�I%jU3
+�!�u�"�H*R�� �8����Y����,S�jejb(
+�P�����Z|L��Dv��vQ��p�0u(�uUFIkR��H3CQN�0�]!MԷ���4ӡ*�A�x�{���"�Uk{ZE{�#� N�[�iET��g.G�t��U�).���W�G[�I�kr�d� u6��5�Ά Ԥj�
+v����g�)N}k���j5UV��UUUll��ɟ.W�D�\���p�]Տ���v����@X��U��ҿ��Y�l+��rv��XY轚,?����)�$!�����ԓ�8�!S����H�PM%�V�Y��θ�#�|�L���&�����)w\&�}�DS���
+�0Ɓ�q@�n>ʄ9����_� �`�'�H���2!_/fkE�B�A�*�!.�l�f��B\W�E�jC��ӛ��ϸ�.G�4��4ӡ�,*�Ds��D�1���<������q�J(y��<�"a>�ax�����8�x�k�#n��dP
+w�[/s0��\�@=�8ffs����Vq�x�:ȡ�ʃ6V���%@'h!��W������XW�_
+W�0X����RM��-�?���a�+�N�����ju���4� ' o}W�ժ|��4�N��|\��������Z߄Ɂw�0�L��< ��a"�z*X��]Q�Ϫ;x�Y"���g&{�F�.ɞw�+n2�2x�gо�>�##�{h0=�##�k; �����@c�'#{d${m'�6�#��� ��e�LA�P�������S\O�ƕ��fl���,����,a����\����ky����GT�Z�*GV���\�ʺ����Q-����� w��K>�� e�C�L���.��j&����&�cI�%]�C��PI�Tˡ��%]��g��/�K�9��1�y��9{?-��JL�S�� T��6ȝs�'��1�L�-�U�I�8ٺv�yQ��s�sc���[dm���ߤ�.������%]�;�Z�o�t����-��.��j�����m,��L��հ���5]"�j�b��aP'+��_,9�����<Y7#N��C�h�Ӝ#��1V���p~��;���v�YqN�5�c
+i��п��������Vhz�#3˖�(��1�~Jg�S�����q-��㖞ut7E�g;�X&�V0�?뗃�-����l��l�B$C�0��r�_��+�5��2�"w�+�'�^N�����r�q�����KRz��j���SJ�%)��0�s�x����c�t�&�a�ܧ�#}�ҳ�<��39�V��<�J��z�D��t=_�����1�pT����z~�tt��w1
+]�@Eg�-�:�oWG���7d_5t�?���LCW�����<��A�@��e{��%��q��g�~��� ��6k~M#����P#(
+�nC��B����n~�|�84�����v�-,e��$E��?��(�/'a�]D-����}R꽚�w
+�y?��O��d���i�S���.c�[BUP�h��g\�3+��"�ZIJ2ەPX�Dj��<d�]�I��븺�P6GĪ@�(E�8��76J�bU�N�
+jb�J"��9�A�ҊT�]�*�n$ ���\��at�l�HB��H,���vւϠoBUm��P,�}&�dn1��B���P��7��&�U��!��.�o�y��gb��ߐ���!�s>r����.�*���꜏j����Z�'��k��Nˆ嵁T�)�����(�ƫt��1}�x�
+ǿ*��.:aK#8����,S7ҩjN�˪�����Y����
+���tZw�8dj���|�f.��]t��gq���q �m�Ӊ��5"n��K�l��
+��֭[�w�N�0͞y'���'�a��Z�]B3t=���d
+yB�)�j���X>�'^�-���Y�X��%�A�&�d�h�ۇˇ�mڇu�OM�p��cH_�,�k�>��i�^��9���`-@�9ώ�ez�h�U����Y�ɿk�3֙v�,�����4��M�_�:��Q;:^ޚ�UR霗ۃ��Fa��0��@�([�wH����|�]7l����<���dt�#�3:��f�:��������~����3>�s�����Ǽ�|�:���^c�u6�Y!�9D���:�z��z]�ތ.�t�����^M�c���:j��μoJ�����Q�G�W� `r)�)*J������!X��G�������Kq[�W���pВln�{��!4��0h��c���z�ǿ֤�G�}r����_�
+籺�C��9����>�a�Jp�;�!�qx̂[u�T�e��8zU�]�a:T=0��n1���1�۟#w6��l��?G��Mj�!:��r��b��ֳ=JgS�yP:����G��`�C�esb~��Y~4�
+�x@Б5DzG�^z��N��C��>�;���o�>�9ھm��bu��g�~n�g��[�k�g���ǂF��.�rYy����YJ
+��^��t��>�����9G�!G|���3r���9���
+9��NNߜ�ؐc>&��Ʈ'���*�T<��DŽ4]n�;.ðm:G�:���5ܣ�MC
+Y�tʱޱ18�ְ\�YlH�G��X�u::GzI��A�<�OF�H��M���9�K:g9�PH��>�#��s6�M��t�gұ�y�+U�`�����SܲsrE�=��>�VD���~�fa���]�e� 6��6�l����6���|�@:lxs��&t$�-�M���l�T[�kg�Nk���nʁw���At�xj���?`6wc�ʶ���a��i)�n_��G2��d�8�k·�'s�H�Z�o���N2�c���0�Ŀ��fd�c�쒹�r��L�jٜ:9ےαӹ[�5�}:džM�n5�v2:�F:��t�
+���6����96ҹ�ۦsΟR�H�R�)�nu9��(m[���P��ϟ��CE����(�Bޝ.5K�̣ջ�(�����V�u:������~�.�A﹟M�/ �&@Zdƃ^�?c�ߝ#5������6�\�QԔk���aj��Ӷ�v�Ц$t,�Q�b�Y�, �{|��Pܺ�w�NK|�ݓ��s�̪�:�s�\�#l�7�m����=���s�&�օ<w�e���g���}"��Yl�|3��y��g�a�
+��D������˷��?PKN7g����PK�yW<pollen.todo�����Q(K-*���S�UP2�3PRH�K�O��K ����Z()��q�(��;�D�*���+G���*(�8z)%)J
+@% ���,.2���E���9e�)�E�%��� Y,B3PK4�[-m�PK�yW<pollen_profile.profile�����Q(K-*���S�UP2�3PRH�K�O��K ����Z()��qq��e��q��ÙPK7Rp:BPK�yW<
+pollen.xmi�]m��8��>��5�U=S����KW&[����j�JM2��U�p������/��m��H�E�E2�n[��#��9GGG����y;y�Q���Ƀ8&0pB�6�}YO���?�����~�|�g���C��6�����G�Imf��f��3�w����ˇI⧿&�y������5�'�<�'QyR��r�e" ������${��.��O&������A�@V��
+���$-;�6a��}���G���$C���9�o����{,�F����{a&3���I_������@�R>ԩ(M�)�;�!�t��g���$�����u�I�����B�h���]������m>m��~g�Ϗ�wza!Q'�����L�>}8��w���j�tjSQ�NEA��n;��Dz�n�3��� O����W�e��[}
+�[�x����t|�w�ʾ��6��7�aR����^o��s;N"���=���UV[�In����_�v�B�ž�}�xo��^]�%۔<�I�DC���֒%�ǻO�_��I�s3$�T����n�I�cW*�VĂ��9���F�#��z��XBR\�R���f�m-��G* ���Z��]?�?`sڦ�����8��$خ�vbO�M�� D��((���,:r�jη0�ϳ]ާgvF/0�g�l���r`C/u�������ȱ�r���S�Hө,؆+�v>�M�t]GE���r�P���p��B?{��}���ɏ������ΰ?�}+�d:��ђ:
+����֊`X/�ҟ���;MM[U�>��'M0GFQP��`�������0�!�f�>�C>O�ȷ� zL5�b��@SLW:�i�7�i�g��w�O��N�����.�
+�s�o �@�v��mz�D�T�S�ȱ5����l��͞���ߥp�ۣ���ص�4�����E���GT�3+-�9�!�k���M٭&�ݮ��ҳ�q^�Zٖ�d�Y����X�5���Tu��j��^$I� DU7Qz��K���^���K���h�.����e���X��Ӏ�i���р���]״��d�A6C�\to��&x[?5M�^��|p�Ç$���p
+, ��ח셓R�Y�k��e�1�W�w�؍�I��8t�@Gf����'�a�%�Ïj�r���I�f��:����«�����(~�o����d�`�iJ٬�0zu��?C�,��Dps�c
+Si�\˲e�u�g����:��i�b�()���G�n_Ϟ�2�b6%��w J�
+;p�,Uj�hqW"��i�Ł��1S�$�5�.��S=����)�R�y�'���Tʄ�6�>�Pm�g
+��DmH���i�?���cY��d��
+��7���}Y��ܗ��Lqqs�s͜��������I�*p���>�=Z\�n��w���sxt.���ɗ�G�0��"i{d@7_�g�3��]�͘&��MOrmSAIZt�!�^g�f��<��]$\���+z��!P�A�[��.�7��4-�z�
+U1M�ѐ\1�5N��Kotx��Zj��M^�R��ҹϫT�C��D�,M/D�ɋ^��]����)��x�*&OA$W�~���*�{����;���A{� �wa�'���)�#�E�8� ��D�ՇA�X���f_l!1���;r��7�*%[+h������I���a��U�p��wq#��.���J�
+)i�=91s=�[��A��L��Y��x�jgu��H��k4�,���q�}�7FQ�e�l�I�䨮+gc:��k�/��C��~�1��r2�)F�s�T��
+`q�RI0�]'K���x�D@"Rk�m���!��� �a � #w�$����_ ��[I1��.9P�}�!��YcI~͵�a�Cr����MeÔ$��S����)D��z��R�W�t�ucl�2�;N+�6w�3#e�)�����]�ud�bV�?���+$��cF��t"g�k`�]��'�� ����VU�FL�Sl�7��dA*T"w8�*�6et�46�s�����D:�60L�|X��
+ٍg�E�m�QRܲd��"��t;F#a��9���KĂqB{�ܑT�p˹��^�X.j!��a���(�'IR�!M��շ�ƿ��r��IyD��<���t���H������ߥ��;��>|
+O�� �X\��'����F_��Gq����:|~~L�ܑ\�p�$и�%�
+�|��~x��7��*�&�^X0�i��^d����'��'�8�!�^l���VD��tN���W�][�2�}�ߛ.l�`�u���a���8�*ܤ&о7 �b��l��2{9 >�C��h����LbO.*�Ig� 㴥��1���x��D����k��T(w-��ʧ J���ǿոnt`|~
+�Xi_9���Q��MҀL�R��g��&���K��̅S����_Q��q����w ��$�eq�S�,�OCPtU� Ȳ�i�-�:�Q;OEaݸ� ;�j������YS�Cn= ȷ�*����{���V����O|�A��~�7�S�=:��
+T:Z~r����֜�Ԙ�$���~�b����$�|R����т0����$��\��8#�JV�?���� ����|0�٦�с� 7�"�ޡ؆$�y�ѱ�]����$b��q�.H���Jn��Dz�BcL�M4N�B20�#N*U�T�>
+���0�_�{�=!��xzAk����ȹ�Z3A7]�Iqж0���$���O�0�r#_�c��$_�*U`͉HUޫum�rv�#_{�u�$��h\wڥ��lÔ�H����N�
+��]3@c���OH�
+�Fʚ� Ϛ\�p�иyɅ���l|s�+�{����T�h�|�(�,�Y,�`@�)��>��j�e�q����[�;�'� n]C���x�כ[�DF��khaE-�F$5f��Y��nF= ��ٱI1�٥
+�
+��,�0p9�Hu�D٤y��R�����:�7W������Ѿ_. ��Ew�|����p��N�Cj̏�l�����I$:V���y~�R�
+<#ɗ<o pr`��m�3��f|�D�)��=@JP�pC\p�[���gd�c�U=(5ۙ� ��~
+x��@,�!#�A�(�R�����H��2_'�9�
+r�bqq`�ʸe]Sd��fV%�5��"g�jz��:����/����P�C�!DN�
+7D%W��
+�Yw�tWS4�Y���0K��O�RB�C�H�ï$`�K �
+7GyM���J�YI5F��=���1��+"oF3 �I���W�
+7W��L��xeb����r(U��
+ Dݡ1�8ۚ���=g�%��!�Dy�q�½s@c��!����T�6&�#�KXc���Xfe��1�
+��0�Ï�q�,$�i��h!Ò�q���4)_f��jBq�����T6dG����@�#����Y0�2|���O�NE�O��ɵ��MIr��?DC�����]� �N��2a�t��6�Ar�c�kG��$��kت��@�Liz��i��1N�{�T����#��P���:dZ�<�C�?�.|�����)�0�ē$�Q+�bE��*�H5��=gN��~��«��D.��_9W�h����Ɉ2Wۢ=:,ra����>��6���&���=�0h��F���e9�`ț�/cd$�fK�Z�$��AB���y�Z ��C��;��{�%���zu�)�Y!n��i��Q��&�Pɔs Ƣʀ\R)S��TJ���Hr!,*~炆�R�V�^�����Q�O;c\'|N�s?a�v�#^\�͌���hӓ\�D�ՆLB
+RE����������D��FD�-��F{�`FI�f�1O�j
+�]*��Vш�٠LA�v�U�L���(?1{�a��D�Ȟ�T�ˈ�0�{4�q Oo�6�v!����w����rj
+��~���wL9�vin�x�[���#�*�L����9Sss�{�UYp�)�o\q#
+�Hq#
+d��ۿ��:X�ĩ�$���9�5����*S�}ilhۙkl������:�LE�^�}X�dUAg�CR.@��qV�kjU�@��<��v�l1��+xW<��\���Z.�����r
+�zѫ#CιJ�CL�%�!g���Y�m�J���N= �*��:�
+v�j>(��BȜt\'�.4袒\���K�\7�Z7�׆�ݼn6Gƫ�Ŋ�Zs��Bx���)"Lr.��i�Ic�}�u�k�X���9���A�0�d�6\A<t�l���"]Ԓ���pj�ݼ��@���
+�[�*VC�-�vT��;Ŭ�2~C�� ҄#��;�~2���I~hUɖ�nT�%2��/Qtγß�� �����-d.��z�,1ҁ[�"W����W��1�5t�4͜kdCM;���Z7������[��M��=��7X�+�����X�5˺��%K��o�G�s�'K�����1��ˮ-��]E�JZdƕ��o��S
+²�OOT�t�����(��uL���,|�W�n[;|�1U��p�,;��}=��ܡ�'���6o.��i�g�"�Q�'�
+.��6zW)m/)tg/4�A�j���3��g��,��V�����̙࿀�=?���rP��N
+��YL���T���J�/0���74@�K��n��ݶ�` U�Yk���m� �%k�kDZ��z��M� J�u�W��an|���o�^��������'�lӦ%}w)םJ�-��R�b�[���>ȅ�pj��ޭD���d��} ��\4+���ޑ@��Dտ ܐ39�Dک�o%+j�Q�RreM��>�wD���l���h����媯�Z����-�`�
+L��`��ok�Cij��Yh�r��>dgP ;)����d���N�Az�(ԑ�w��]���G��SG����Ԩ��:�����$�e�^�.�� \��F��r���0/[J�ׇ��������,*�gѢ��/�� ���b��-}��(���˔vhߜc���ߒ��gѠ�,k��GE�V���d[È�+�]�ɂ�\�B~2�s�J�B|������ƽL���"
+�[��7��p���X_��(�.+�G�նf�j[S�7��V.�^���(�v���1Ǘ�U�����h�?K`��b�Tt?���'�T�Obs��D7Kd�p�D�Kd��gI�[�*>|��Ī�Ԓ�L�A1v`9r*&�r���!���.O���O�BwVк�ӇBÒ��\�?J�gR!>�����B��@��6����0=V�.
+
+nSK��6�S|*S��芥�Q�9k��]4*�Oc��bа^n���[��`u��I��ϼ쵢T|T,x���&��d4�ŚS1x��9
+a��=�nL��.���(]J�G��e�h����b�m�����TXV��%��%���%3��
+�E�R�u9��Bq��3/�[Q!��������="#3 �N�2�0�Ӥ.ԈRUQ���%��%6nJ�>|y�(q�����C���@�6���D�kJ2�fu_tk�Q�Q���f����e�.JB-pa�h����0Lؽw�b`��:5%1�iM��>�xp1P� [�ci%۸���I�ŀζL��(�&T6� ��iB�d��N��ifyr����+��ࠠ�o���XT���/c
+��k�r��ѫ�:z{�Y�QP����D�_2
+J<R������ᠠ*xqd8(��#��_$��w}���ˮk�@sRȞl��胼�.�\��<ے@�RK&y���1 �.,H�?�bd�KF#y��Q�$�� k�|j��ZC����H�?v�K�#�L���٩_����i���H�Ϟ�ѩ����c{�H0w�� y��iI0w�������d�vA���� k#�f5���CS�Md#�2��^62�i#�y>@�@OUStm�f��4�pQ�� wohb�(ߓ�@:�LE�ޓ(i��ɪb�6�B�'Y9��~�'j��1wz�"����w������ �����_���_PK �;���PK�yW<ptB�pollen.argoPK�yW<N7g����Gpollen_DC_Pollen.pgmlPK�yW<4�[-m�4pollen.todoPK�yW<7Rp:B�pollen_profile.profilePK�yW< �;���
+Xpollen.xmiPK1;5
\ No newline at end of file
Deleted: trunk/pollen-business/src/test/java/org/chorem/pollen/business/converters/EnumControllerTest.java
===================================================================
--- trunk/pollen-business/src/test/java/org/chorem/pollen/business/converters/EnumControllerTest.java 2010-02-23 09:39:10 UTC (rev 2877)
+++ trunk/pollen-business/src/test/java/org/chorem/pollen/business/converters/EnumControllerTest.java 2010-02-23 15:12:23 UTC (rev 2878)
@@ -1,120 +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 static org.junit.Assert.assertEquals;
-
-import org.chorem.pollen.business.persistence.Poll;
-import org.chorem.pollen.business.persistence.PollDAO;
-import org.chorem.pollen.business.persistence.PollenModelDAOHelper;
-import org.chorem.pollen.business.utils.ContextUtil;
-import org.chorem.pollen.common.ChoiceType;
-import org.chorem.pollen.common.PollType;
-import org.chorem.pollen.common.VoteCountingType;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.nuiton.topia.TopiaContext;
-import org.nuiton.topia.TopiaException;
-
-/**
- * Tests de la gestion des énumérations.
- *
- * @author fdesbois
- * @version $Id$
- */
-public class EnumControllerTest {
-
- @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() {
- }
-
- @After
- public void tearDown() {
- }
-
- /**
- * Test of setChoiceType method, of class EnumController.
- */
- @Test
- public void testSetChoiceType() {
- try {
- TopiaContext transaction = ContextUtil.getInstance().getContext()
- .beginTransaction();
-
- ChoiceType choice = ChoiceType.DATE;
- PollDAO pollDAO = PollenModelDAOHelper.getPollDAO(transaction);
- Poll ePoll = pollDAO.create();
- EnumController enumCtrl = new EnumController(transaction);
- enumCtrl.setChoiceType(choice, ePoll);
- if (ePoll.getChoiceType() != null) {
- assertEquals(ePoll.getChoiceType().getName(), choice.name());
- }
-
- transaction.commitTransaction();
- transaction.closeContext();
- } catch (TopiaException e) {
- e.printStackTrace();
- }
- }
-
- /**
- * Test of getChoiceType method, of class EnumController.
- */
- @Test
- public void testGetChoiceType_String() {
- String type = "DATE";
- ChoiceType expResult = ChoiceType.DATE;
- ChoiceType result = EnumController.getChoiceType(type);
- assertEquals(expResult, result);
- }
-
- /**
- * Test of getVoteCountingType method, of class EnumController.
- */
- @Test
- public void testGetVoteCountingType_String() {
- String type = "NORMAL";
- VoteCountingType expResult = VoteCountingType.NORMAL;
- VoteCountingType result = EnumController.getVoteCountingType(type);
- assertEquals(expResult, result);
- }
-
- /**
- * Test of getPollType method, of class EnumController.
- */
- @Test
- public void testGetPollType_String() {
- String type = "RESTRICTED";
- PollType expResult = PollType.RESTRICTED;
- PollType result = EnumController.getPollType(type);
- assertEquals(expResult, result);
- }
-
-}
\ 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-23 09:39:10 UTC (rev 2877)
+++ trunk/pollen-business/src/test/java/org/chorem/pollen/business/services/ServicePollImplTest.java 2010-02-23 15:12:23 UTC (rev 2878)
@@ -49,7 +49,7 @@
* @version $Id$
*/
public class ServicePollImplTest {
- private ServicePollImpl instance = new ServicePollImpl();
+ private static ServicePollImpl instance;
/** log. */
private static final Log log = LogFactory.getLog(ServicePollImplTest.class);
@@ -60,6 +60,7 @@
@BeforeClass
public static void setUpClass() throws Exception {
ContextUtil.getInstance().buildContext();
+ instance = new ServicePollImpl();
}
@AfterClass
@@ -198,6 +199,7 @@
PollDTO result = instance.findPollByPollId(pollUID);
log.debug("title : " + result.getTitle());
assertEquals(pollId, result.getId());
+ assertEquals(VoteCountingType.NORMAL, result.getVoteCounting());
}
/**
Modified: trunk/pollen-votecounting/src/main/java/org/chorem/pollen/common/PollType.java
===================================================================
--- trunk/pollen-votecounting/src/main/java/org/chorem/pollen/common/PollType.java 2010-02-23 09:39:10 UTC (rev 2877)
+++ trunk/pollen-votecounting/src/main/java/org/chorem/pollen/common/PollType.java 2010-02-23 15:12:23 UTC (rev 2878)
@@ -18,4 +18,8 @@
public enum PollType {
FREE, RESTRICTED, GROUP;
+
+ public static boolean isGroupType(String value) {
+ return GROUP.name().equals(value);
+ }
}
1
0
Author: fdesbois
Date: 2010-02-23 10:39:10 +0100 (Tue, 23 Feb 2010)
New Revision: 2877
Modified:
trunk/pom.xml
Log:
missing pom for nuiton-utils version (sux...)
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2010-02-22 21:16:44 UTC (rev 2876)
+++ trunk/pom.xml 2010-02-23 09:39:10 UTC (rev 2877)
@@ -41,6 +41,11 @@
<artifactId>commons-email</artifactId>
<version>1.2</version>
</dependency>
+<!-- <dependency>
+ <groupId>org.chorem</groupId>
+ <artifactId>chorem-commons</artifactId>
+ <version>${chorem-commons.version}</version>
+ </dependency>-->
<dependency>
<groupId>org.nuiton</groupId>
<artifactId>nuiton-utils</artifactId>
@@ -297,7 +302,8 @@
<topia.version>2.3.0-beta-8</topia.version>
<eugene.version>2.0.0-beta-4</eugene.version>
<tapestry.version>5.1.0.5</tapestry.version>
- <nuiton-utils.version>1.1.3</nuiton-utils.version>
+ <nuiton-utils.version>1.1.5-SNAPSHOT</nuiton-utils.version>
+<!-- <chorem-commons.version>1.0.0-alpha-2-SNAPSHOT</chorem-commons.version>-->
<!--Multilanguage maven-site -->
<siteLocales>en,fr</siteLocales>
1
0
Author: fdesbois
Date: 2010-02-22 22:16:44 +0100 (Mon, 22 Feb 2010)
New Revision: 2876
Added:
trunk/pollen-business/src/main/java/org/chorem/pollen/business/PollenBusinessException.java
trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/ConverterHelper.java
Modified:
trunk/pollen-business/pom.xml
trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataPollConverter.java
trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/EnumController.java
trunk/pollen-business/src/main/java/org/chorem/pollen/business/dto/ChoiceDTO.java
trunk/pollen-business/src/main/java/org/chorem/pollen/business/dto/PollAccountDTO.java
trunk/pollen-business/src/main/java/org/chorem/pollen/business/dto/PollDTO.java
trunk/pollen-business/src/main/java/org/chorem/pollen/business/dto/PreventRuleDTO.java
trunk/pollen-business/src/main/java/org/chorem/pollen/business/dto/VotingListDTO.java
trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServiceList.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/ServicePollAccount.java
trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServicePollImpl.java
trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServicePreventRule.java
trunk/pollen-business/src/main/java/org/chorem/pollen/business/utils/ContextUtil.java
trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/ChoiceImpl.hbm.xml
trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/ChoiceTypeImpl.hbm.xml
trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/CommentImpl.hbm.xml
trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/PersonListImpl.hbm.xml
trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/PersonToListImpl.hbm.xml
trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/PollAccountImpl.hbm.xml
trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/PollImpl.hbm.xml
trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/PollTypeImpl.hbm.xml
trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/PreventRuleImpl.hbm.xml
trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/ResultImpl.hbm.xml
trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/UserAccountImpl.hbm.xml
trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/VoteCountingImpl.hbm.xml
trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/VoteImpl.hbm.xml
trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/VoteToChoiceImpl.hbm.xml
trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/VotingListImpl.hbm.xml
trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/ChoiceImpl.hbm.xml
trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/ChoiceTypeImpl.hbm.xml
trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/CommentImpl.hbm.xml
trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/PersonListImpl.hbm.xml
trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/PersonToListImpl.hbm.xml
trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/PollAccountImpl.hbm.xml
trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/PollImpl.hbm.xml
trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/PollTypeImpl.hbm.xml
trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/PreventRuleImpl.hbm.xml
trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/ResultImpl.hbm.xml
trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/UserAccountImpl.hbm.xml
trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/VoteCountingImpl.hbm.xml
trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/VoteImpl.hbm.xml
trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/VoteToChoiceImpl.hbm.xml
trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/VotingListImpl.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/PollModification.java
Log:
- Refactor createPoll method (no ui test done yet)
- use Binder api for convertions (change primitive type by object type in DTO + add getter for boolean properties)
- deprecate unused methods (only for tests or old methods or ??)
Modified: trunk/pollen-business/pom.xml
===================================================================
--- trunk/pollen-business/pom.xml 2010-02-21 10:31:16 UTC (rev 2875)
+++ trunk/pollen-business/pom.xml 2010-02-22 21:16:44 UTC (rev 2876)
@@ -27,6 +27,22 @@
<artifactId>commons-logging</artifactId>
</dependency>
<dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-email</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.nuiton</groupId>
+ <artifactId>nuiton-utils</artifactId>
+ </dependency>
+<!-- <dependency>
+ <groupId>org.chorem</groupId>
+ <artifactId>chorem-commons</artifactId>
+ </dependency>-->
+ <dependency>
<groupId>org.nuiton.topia</groupId>
<artifactId>topia-persistence</artifactId>
</dependency>
@@ -35,14 +51,6 @@
<artifactId>topia-service-migration</artifactId>
</dependency>
<dependency>
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-email</artifactId>
- </dependency>
- <dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>
@@ -70,7 +78,7 @@
<name>Pollen :: Business</name>
<description>Partie métier de Pollen</description>
-
+
<!-- ************************************************************* -->
<!-- *** Build Settings ****************************************** -->
<!-- ************************************************************* -->
@@ -80,7 +88,7 @@
<build>
<plugins>
-
+
<!-- Plug in Topia -->
<plugin>
<groupId>org.nuiton.eugene</groupId>
@@ -151,3 +159,4 @@
</build>
</project>
+
Added: trunk/pollen-business/src/main/java/org/chorem/pollen/business/PollenBusinessException.java
===================================================================
--- trunk/pollen-business/src/main/java/org/chorem/pollen/business/PollenBusinessException.java (rev 0)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/PollenBusinessException.java 2010-02-22 21:16:44 UTC (rev 2876)
@@ -0,0 +1,23 @@
+
+package org.chorem.pollen.business;
+
+/**
+ * PollenBusinessException
+ *
+ * Created: 22 févr. 2010
+ *
+ * @author fdesbois
+ * @version $Revision$
+ *
+ * Mise a jour: $Date$
+ * par : $Author$
+ */
+public class PollenBusinessException extends Exception {
+
+ private static final long serialVersionUID = 1L;
+
+ public PollenBusinessException(String message) {
+ super(message);
+ }
+
+}
Property changes on: trunk/pollen-business/src/main/java/org/chorem/pollen/business/PollenBusinessException.java
___________________________________________________________________
Added: svn:keywords
+ "Author Date Id Revision HeadURL"
Added: 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 (rev 0)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/ConverterHelper.java 2010-02-22 21:16:44 UTC (rev 2876)
@@ -0,0 +1,167 @@
+
+package org.chorem.pollen.business.converters;
+
+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.PreventRuleDTO;
+import org.chorem.pollen.business.dto.VotingListDTO;
+import org.chorem.pollen.business.persistence.Choice;
+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.VotingList;
+import org.nuiton.topia.persistence.TopiaEntity;
+import org.nuiton.util.beans.BinderBuilder;
+import org.nuiton.util.beans.BinderProvider;
+
+/**
+ * ConverterFactory
+ *
+ * Created: 22 févr. 2010
+ *
+ * @author fdesbois
+ * @version $Revision$
+ *
+ * Mise a jour: $Date$
+ * par : $Author$
+ */
+public class ConverterHelper {
+
+ private static BinderBuilder builder = new BinderBuilder();
+
+ private static final void prepare(Class<? extends TopiaEntity> entityClass, Class<?> dtoClass, String... properties) {
+ // Binder DTO -> Entity
+ builder.createBinderModel(dtoClass, entityClass).
+ addSimpleProperties(properties);
+
+ BinderProvider.registerBinder(builder);
+
+ // Binder Entity -> DTO
+ builder.createBinderModel(entityClass, dtoClass).
+ addSimpleProperties(properties);
+ //builder.addProperty(TopiaEntity.TOPIA_ID, "id");
+
+ BinderProvider.registerBinder(builder);
+ }
+
+ public static void preparePollConverters() {
+ String[] properties = new String[] {
+ Poll.POLL_ID,
+ Poll.TITLE,
+ Poll.DESCRIPTION,
+ Poll.BEGIN_CHOICE_DATE,
+ Poll.END_CHOICE_DATE,
+ Poll.BEGIN_DATE,
+ Poll.END_DATE,
+ Poll.CLOSED,
+ Poll.ANONYMOUS,
+ Poll.ANONYMOUS_VOTE_ALLOWED,
+ Poll.PUBLIC_RESULTS,
+ Poll.CONTINUOUS_RESULTS,
+ Poll.CHOICE_ADD_ALLOWED,
+ Poll.MAX_CHOICE_NB
+ };
+
+ prepare(Poll.class, PollDTO.class, properties);
+ }
+
+ public static void prepareChoiceConverters() {
+ String[] properties = new String[] {
+ Choice.NAME,
+ Choice.DESCRIPTION,
+ Choice.VALIDATE
+ };
+
+ prepare(Choice.class, ChoiceDTO.class, properties);
+ }
+
+ public static void prepareVotingListConverters() {
+ String[] properties = new String[] {
+ VotingList.NAME,
+ VotingList.WEIGHT
+ };
+
+ prepare(VotingList.class, VotingListDTO.class, properties);
+ }
+
+ public static void preparePollAccountConverters() {
+ String[] properties = new String[] {
+ PollAccount.ACCOUNT_ID,
+ PollAccount.VOTING_ID,
+ PollAccount.EMAIL
+ };
+
+ prepare(PollAccount.class, PollAccountDTO.class, properties);
+ }
+
+ public static void preparePreventRuleConverters() {
+ String[] properties = new String[] {
+ PreventRule.ACTIVE,
+ PreventRule.METHOD,
+ PreventRule.ONE_TIME,
+ PreventRule.REPEATED,
+ PreventRule.SCOPE,
+ PreventRule.SENSIBILITY
+ };
+
+ prepare(PreventRule.class, PreventRuleDTO.class, properties);
+ }
+
+ public static Choice convert(ChoiceDTO dto, Choice entity) {
+ BinderProvider.getBinder(ChoiceDTO.class, Choice.class).copy(dto, entity);
+ return entity;
+ }
+
+ public static ChoiceDTO convert(Choice entity, ChoiceDTO dto) {
+ BinderProvider.getBinder(Choice.class, ChoiceDTO.class).copy(entity, dto);
+ dto.setId(entity.getTopiaId());
+ return dto;
+ }
+
+ public static Poll convert(PollDTO dto, Poll entity) {
+ BinderProvider.getBinder(PollDTO.class, Poll.class).copy(dto, entity);
+ return entity;
+ }
+
+ public static PollDTO convert(Poll entity, PollDTO dto) {
+ BinderProvider.getBinder(Poll.class, PollDTO.class).copy(entity, dto);
+ dto.setId(entity.getTopiaId());
+ return dto;
+ }
+
+ public static VotingList convert(VotingListDTO dto, VotingList entity) {
+ BinderProvider.getBinder(VotingListDTO.class, VotingList.class).copy(dto, entity);
+ return entity;
+ }
+
+ public static VotingListDTO convert(VotingList entity, VotingListDTO dto) {
+ BinderProvider.getBinder(VotingList.class, VotingListDTO.class).copy(entity, dto);
+ dto.setId(entity.getTopiaId());
+ return dto;
+ }
+
+ public static PollAccount convert(PollAccountDTO dto, PollAccount entity) {
+ BinderProvider.getBinder(PollAccountDTO.class, PollAccount.class).copy(dto, entity);
+ return entity;
+ }
+
+ public static PollAccountDTO convert(PollAccount entity, PollAccountDTO dto) {
+ BinderProvider.getBinder(PollAccount.class, PollAccountDTO.class).copy(entity, dto);
+ dto.setId(entity.getTopiaId());
+ return dto;
+ }
+
+ public static PreventRule convert(PreventRuleDTO dto, PreventRule entity) {
+ BinderProvider.getBinder(PreventRuleDTO.class, PreventRule.class).copy(dto, entity);
+ return entity;
+ }
+
+ public static PreventRuleDTO convert(PreventRule entity, PreventRuleDTO dto) {
+ BinderProvider.getBinder(PreventRule.class, PreventRuleDTO.class).copy(entity, dto);
+ dto.setId(entity.getTopiaId());
+ return dto;
+ }
+
+
+}
Property changes on: trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/ConverterHelper.java
___________________________________________________________________
Added: svn:keywords
+ "Author Date Id Revision HeadURL"
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-21 10:31:16 UTC (rev 2875)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/DataPollConverter.java 2010-02-22 21:16:44 UTC (rev 2876)
@@ -26,7 +26,10 @@
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.ChoiceType;
+import org.chorem.pollen.business.persistence.ChoiceTypeDAO;
import org.chorem.pollen.business.persistence.Poll;
+import org.chorem.pollen.business.persistence.PollenModelDAOHelper;
import org.chorem.pollen.business.persistence.PreventRule;
import org.chorem.pollen.business.services.ServiceChoice;
import org.chorem.pollen.business.services.ServiceChoiceImpl;
@@ -55,29 +58,40 @@
*
* @param pollDTO le dto sondage
* @param ePoll l'entité sondage
+ * @deprecated use
*/
- public void populatePollEntity(PollDTO pollDTO, Poll ePoll)
- throws TopiaException {
- ePoll.setPollId(pollDTO.getPollId());
- ePoll.setTitle(pollDTO.getTitle());
- ePoll.setDescription(pollDTO.getDescription());
- ePoll.setBeginChoiceDate(pollDTO.getBeginChoiceDate());
- ePoll.setEndChoiceDate(pollDTO.getEndChoiceDate());
- ePoll.setBeginDate(pollDTO.getBeginDate());
- ePoll.setEndDate(pollDTO.getEndDate());
- ePoll.setClosed(pollDTO.isClosed());
- ePoll.setAnonymous(pollDTO.isAnonymous());
- ePoll.setAnonymousVoteAllowed(pollDTO.isAnonymousVoteAllowed());
- ePoll.setPublicResults(pollDTO.isPublicResults());
- ePoll.setContinuousResults(pollDTO.isContinuousResults());
- ePoll.setChoiceAddAllowed(pollDTO.isChoiceAddAllowed());
- ePoll.setMaxChoiceNb(pollDTO.getMaxChoiceNb());
+ @Deprecated
+ public void populatePollEntity(PollDTO pollDTO, Poll ePoll) {
+ //Binder bind;
+
+ ConverterHelper.convert(pollDTO, ePoll);
+
EnumController enumCtrl = new EnumController(super.transaction);
enumCtrl.setChoiceType(pollDTO.getChoiceType(), ePoll);
enumCtrl.setPollType(pollDTO.getPollType(), ePoll);
enumCtrl.setVoteCounting(pollDTO.getVoteCounting(), ePoll);
+
+// ePoll.setPollId(pollDTO.getPollId());
+// ePoll.setTitle(pollDTO.getTitle());
+// ePoll.setDescription(pollDTO.getDescription());
+// ePoll.setBeginChoiceDate(pollDTO.getBeginChoiceDate());
+// ePoll.setEndChoiceDate(pollDTO.getEndChoiceDate());
+// ePoll.setBeginDate(pollDTO.getBeginDate());
+// ePoll.setEndDate(pollDTO.getEndDate());
+// ePoll.setClosed(pollDTO.isClosed());
+// ePoll.setAnonymous(pollDTO.isAnonymous());
+// ePoll.setAnonymousVoteAllowed(pollDTO.isAnonymousVoteAllowed());
+// ePoll.setPublicResults(pollDTO.isPublicResults());
+// ePoll.setContinuousResults(pollDTO.isContinuousResults());
+// ePoll.setChoiceAddAllowed(pollDTO.isChoiceAddAllowed());
+// ePoll.setMaxChoiceNb(pollDTO.getMaxChoiceNb());
+// EnumController enumCtrl = new EnumController(transaction);
+// enumCtrl.setChoiceType(pollDTO.getChoiceType(), entity);
+// enumCtrl.setPollType(pollDTO.getPollType(), entity);
+// enumCtrl.setVoteCounting(pollDTO.getVoteCounting(), entity);
+
/*if (pollDTO.getCreatorId().length() > 0) {
PollAccountDAO pollAccountDAO = PollenModelDAOHelper.getPollAccountDAO(super.transaction);
PollAccount PollAccountEntity = pollAccountDAO.findByTopiaId(pollDTO.getCreatorId());
@@ -93,25 +107,29 @@
*/
public PollDTO createPollDTO(Poll ePoll) {
PollDTO pollDTO = new PollDTO();
- pollDTO.setId(ePoll.getTopiaId());
- pollDTO.setPollId(ePoll.getPollId());
- pollDTO.setTitle(ePoll.getTitle());
- pollDTO.setDescription(ePoll.getDescription());
- pollDTO.setBeginChoiceDate(ePoll.getBeginChoiceDate());
- pollDTO.setEndChoiceDate(ePoll.getEndChoiceDate());
- pollDTO.setBeginDate(ePoll.getBeginDate());
- pollDTO.setEndDate(ePoll.getEndDate());
- pollDTO.setAnonymous(ePoll.getAnonymous());
- pollDTO.setAnonymousVoteAllowed(ePoll.getAnonymousVoteAllowed());
- pollDTO.setPublicResults(ePoll.getPublicResults());
- pollDTO.setContinuousResults(ePoll.getContinuousResults());
- pollDTO.setChoiceAddAllowed(ePoll.getChoiceAddAllowed());
- pollDTO.setClosed(ePoll.getClosed());
- pollDTO.setMaxChoiceNb(ePoll.getMaxChoiceNb());
- pollDTO.setChoiceType(EnumController.getChoiceType(ePoll));
- pollDTO.setPollType(EnumController.getPollType(ePoll));
- pollDTO.setVoteCounting(EnumController.getVoteCountingType(ePoll));
+ ConverterHelper.convert(ePoll, pollDTO);
+ //pollDTO.setId(ePoll.getTopiaId());
+
+// pollDTO.setId(ePoll.getTopiaId());
+// pollDTO.setPollId(ePoll.getPollId());
+// pollDTO.setTitle(ePoll.getTitle());
+// pollDTO.setDescription(ePoll.getDescription());
+// pollDTO.setBeginChoiceDate(ePoll.getBeginChoiceDate());
+// pollDTO.setEndChoiceDate(ePoll.getEndChoiceDate());
+// pollDTO.setBeginDate(ePoll.getBeginDate());
+// pollDTO.setEndDate(ePoll.getEndDate());
+// pollDTO.setAnonymous(ePoll.getAnonymous());
+// pollDTO.setAnonymousVoteAllowed(ePoll.getAnonymousVoteAllowed());
+// pollDTO.setPublicResults(ePoll.getPublicResults());
+// pollDTO.setContinuousResults(ePoll.getContinuousResults());
+// pollDTO.setChoiceAddAllowed(ePoll.getChoiceAddAllowed());
+// pollDTO.setClosed(ePoll.getClosed());
+// pollDTO.setMaxChoiceNb(ePoll.getMaxChoiceNb());
+// pollDTO.setChoiceType(EnumController.getChoiceType(ePoll));
+// pollDTO.setPollType(EnumController.getPollType(ePoll));
+// pollDTO.setVoteCounting(EnumController.getVoteCountingType(ePoll));
+
if (ePoll.getCreator() != null) {
pollDTO.setCreatorId(ePoll.getCreator().getTopiaId());
pollDTO.setCreatorEmail(ePoll.getCreator().getEmail());
Modified: trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/EnumController.java
===================================================================
--- trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/EnumController.java 2010-02-21 10:31:16 UTC (rev 2875)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/converters/EnumController.java 2010-02-22 21:16:44 UTC (rev 2876)
@@ -41,6 +41,13 @@
super(transaction);
}
+ /**
+ *
+ * @param type
+ * @param ePoll
+ * @deprecated use directly daos when needed
+ */
+ @Deprecated
public void setChoiceType(ChoiceType type, Poll ePoll) {
try {
if (type != null) {
@@ -53,6 +60,8 @@
}
}
+
+ @Deprecated
public void setPollType(PollType type, Poll ePoll) {
try {
if (type != null) {
@@ -65,6 +74,8 @@
}
}
+
+ @Deprecated
public void setVoteCounting(VoteCountingType type, Poll ePoll) {
try {
if (type != null) {
Modified: trunk/pollen-business/src/main/java/org/chorem/pollen/business/dto/ChoiceDTO.java
===================================================================
--- trunk/pollen-business/src/main/java/org/chorem/pollen/business/dto/ChoiceDTO.java 2010-02-21 10:31:16 UTC (rev 2875)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/dto/ChoiceDTO.java 2010-02-22 21:16:44 UTC (rev 2876)
@@ -37,15 +37,15 @@
private String description = "";
- private int value = 0;
+ private Integer value = 0;
- private boolean validate = false;
+ private Boolean validate = false;
private String voteId = "";
private String pollId = "";
- private boolean hidden = false;
+ private Boolean hidden = false;
public ChoiceDTO() {
@@ -85,19 +85,23 @@
this.description = description;
}
- public int getValue() {
+ public Integer getValue() {
return value;
}
- public void setValue(int value) {
+ public void setValue(Integer value) {
this.value = value;
}
- public boolean isValidate() {
+ public Boolean isValidate() {
return validate;
}
- public void setValidate(boolean validate) {
+ public Boolean getValidate() {
+ return isValidate();
+ }
+
+ public void setValidate(Boolean validate) {
this.validate = validate;
}
@@ -117,11 +121,15 @@
this.pollId = pollId;
}
- public boolean isHidden() {
+ public Boolean isHidden() {
return hidden;
}
- public void setHidden(boolean hidden) {
+ public Boolean getHidden() {
+ return isHidden();
+ }
+
+ public void setHidden(Boolean hidden) {
this.hidden = hidden;
}
}
\ No newline at end of file
Modified: trunk/pollen-business/src/main/java/org/chorem/pollen/business/dto/PollAccountDTO.java
===================================================================
--- trunk/pollen-business/src/main/java/org/chorem/pollen/business/dto/PollAccountDTO.java 2010-02-21 10:31:16 UTC (rev 2875)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/dto/PollAccountDTO.java 2010-02-22 21:16:44 UTC (rev 2876)
@@ -39,9 +39,9 @@
private String email = "";
- private double weight = 1;
+ private Double weight = 1.;
- private boolean hasVoted = false;
+ private Boolean hasVoted = false;
private String votingListId = "";
@@ -107,19 +107,23 @@
this.email = email;
}
- public double getWeight() {
+ public Double getWeight() {
return weight;
}
- public void setWeight(double weight) {
+ public void setWeight(Double weight) {
this.weight = weight;
}
- public boolean isHasVoted() {
+ public Boolean isHasVoted() {
return hasVoted;
}
- public void setHasVoted(boolean hasVoted) {
+ public Boolean getHasVoted() {
+ return isHasVoted();
+ }
+
+ public void setHasVoted(Boolean hasVoted) {
this.hasVoted = hasVoted;
}
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-21 10:31:16 UTC (rev 2875)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/dto/PollDTO.java 2010-02-22 21:16:44 UTC (rev 2876)
@@ -50,19 +50,19 @@
private Date endChoiceDate = null;
- private int maxChoiceNb = 0;
+ private Integer maxChoiceNb = 0;
- private boolean closed = false;
+ private Boolean closed = false;
- private boolean choiceAddAllowed = false;
+ private Boolean choiceAddAllowed = false;
- private boolean anonymousVoteAllowed = false;
+ private Boolean anonymousVoteAllowed = false;
- private boolean anonymous = false;
+ private Boolean anonymous = false;
- private boolean publicResults = false;
+ private Boolean publicResults = false;
- private boolean continuousResults = false;
+ private Boolean continuousResults = false;
private PollType pollType = null;
@@ -72,6 +72,7 @@
private String userId = "";
+ // Carefull, not TopiaId but pollAccount.votingId = creator name
private String creatorId = "";
private String creatorEmail = "";
@@ -180,59 +181,83 @@
this.beginChoiceDate = beginChoiceDate;
}
- public int getMaxChoiceNb() {
+ public Integer getMaxChoiceNb() {
return maxChoiceNb;
}
- public void setMaxChoiceNb(int maxChoiceNb) {
+ public void setMaxChoiceNb(Integer maxChoiceNb) {
this.maxChoiceNb = maxChoiceNb;
}
- public boolean isClosed() {
+ public Boolean isClosed() {
return closed;
}
- public void setClosed(boolean closed) {
+ public Boolean getClosed() {
+ return isClosed();
+ }
+
+ public void setClosed(Boolean closed) {
this.closed = closed;
}
- public boolean isChoiceAddAllowed() {
+ public Boolean isChoiceAddAllowed() {
return choiceAddAllowed;
}
- public void setChoiceAddAllowed(boolean choiceAddAllowed) {
+ public Boolean getChoiceAddAllowed() {
+ return isChoiceAddAllowed();
+ }
+
+ public void setChoiceAddAllowed(Boolean choiceAddAllowed) {
this.choiceAddAllowed = choiceAddAllowed;
}
- public boolean isAnonymousVoteAllowed() {
+ public Boolean isAnonymousVoteAllowed() {
return anonymousVoteAllowed;
}
- public void setAnonymousVoteAllowed(boolean anonymousVoteAllowed) {
+ public Boolean getAnonymousVoteAllowed() {
+ return isAnonymousVoteAllowed();
+ }
+
+ public void setAnonymousVoteAllowed(Boolean anonymousVoteAllowed) {
this.anonymousVoteAllowed = anonymousVoteAllowed;
}
- public boolean isAnonymous() {
+ public Boolean isAnonymous() {
return anonymous;
}
- public void setAnonymous(boolean anonymous) {
+ public Boolean getAnonymous() {
+ return isAnonymous();
+ }
+
+ public void setAnonymous(Boolean anonymous) {
this.anonymous = anonymous;
}
- public boolean isPublicResults() {
+ public Boolean isPublicResults() {
return publicResults;
}
- public void setPublicResults(boolean publicResults) {
+ public Boolean getPublicResults() {
+ return isPublicResults();
+ }
+
+ public void setPublicResults(Boolean publicResults) {
this.publicResults = publicResults;
}
- public boolean isContinuousResults() {
+ public Boolean isContinuousResults() {
return continuousResults;
}
- public void setContinuousResults(boolean continuousResults) {
+ public Boolean getContinuousResults() {
+ return isContinuousResults();
+ }
+
+ public void setContinuousResults(Boolean continuousResults) {
this.continuousResults = continuousResults;
}
Modified: trunk/pollen-business/src/main/java/org/chorem/pollen/business/dto/PreventRuleDTO.java
===================================================================
--- trunk/pollen-business/src/main/java/org/chorem/pollen/business/dto/PreventRuleDTO.java 2010-02-21 10:31:16 UTC (rev 2875)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/dto/PreventRuleDTO.java 2010-02-22 21:16:44 UTC (rev 2876)
@@ -33,13 +33,13 @@
private String scope = "";
- private int sensibility = 0;
+ private Integer sensibility = 0;
- private boolean active = true;
+ private Boolean active = true;
- private boolean oneTime = false;
+ private Boolean oneTime = false;
- private boolean repeated = false;
+ private Boolean repeated = false;
private String method = "";
@@ -93,35 +93,47 @@
this.scope = scope;
}
- public int getSensibility() {
+ public Integer getSensibility() {
return sensibility;
}
- public void setSensibility(int sensibility) {
+ public void setSensibility(Integer sensibility) {
this.sensibility = sensibility;
}
- public boolean isActive() {
+ public Boolean isActive() {
return active;
}
- public void setActive(boolean active) {
+ public Boolean getActive() {
+ return isActive();
+ }
+
+ public void setActive(Boolean active) {
this.active = active;
}
- public boolean isOneTime() {
+ public Boolean isOneTime() {
return oneTime;
}
- public void setOneTime(boolean oneTime) {
+ public Boolean getOneTime() {
+ return isOneTime();
+ }
+
+ public void setOneTime(Boolean oneTime) {
this.oneTime = oneTime;
}
- public boolean isRepeated() {
+ public Boolean isRepeated() {
return repeated;
}
- public void setRepeated(boolean repeated) {
+ public Boolean getRepeated() {
+ return isRepeated();
+ }
+
+ public void setRepeated(Boolean repeated) {
this.repeated = repeated;
}
Modified: trunk/pollen-business/src/main/java/org/chorem/pollen/business/dto/VotingListDTO.java
===================================================================
--- trunk/pollen-business/src/main/java/org/chorem/pollen/business/dto/VotingListDTO.java 2010-02-21 10:31:16 UTC (rev 2875)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/dto/VotingListDTO.java 2010-02-22 21:16:44 UTC (rev 2876)
@@ -33,7 +33,7 @@
private String name = "";
- private double weight = 1;
+ private Double weight = 1.;
private String pollId = "";
@@ -71,11 +71,11 @@
this.name = name;
}
- public double getWeight() {
+ public Double getWeight() {
return weight;
}
- public void setWeight(double weight) {
+ public void setWeight(Double weight) {
this.weight = weight;
}
Modified: trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServiceList.java
===================================================================
--- trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServiceList.java 2010-02-21 10:31:16 UTC (rev 2875)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServiceList.java 2010-02-22 21:16:44 UTC (rev 2876)
@@ -38,7 +38,9 @@
*
* @param votingList la liste
* @return identifiant de la liste créée
+ * @deprecated useless method : used only in tests
*/
+ @Deprecated
public String createVotingList(VotingListDTO votingList);
/**
@@ -48,7 +50,9 @@
* @param pollId l'identifiant du sondage
* @param transaction la transaction du sondage
* @return les groupes créés
+ * @deprecated useless method : used nowhere
*/
+ @Deprecated
public List<VotingList> createVotingLists(List<VotingListDTO> votingLists,
String pollId, TopiaContext transaction);
@@ -65,7 +69,9 @@
*
* @param votingListId l'identifiant de la liste
* @return true si la liste a été mise à jours
+ * @deprecated useless method : used only in tests
*/
+ @Deprecated
public boolean deleteVotingList(String votingListId);
/**
@@ -73,7 +79,9 @@
*
* @param votingListId l'identifiant de la liste
* @return la liste
+ * @deprecated useless method : used only in tests
*/
+ @Deprecated
public VotingListDTO findVotingListById(String votingListId);
/**
@@ -81,7 +89,9 @@
*
* @param name le nom de la liste
* @return les listes
+ * @deprecated useless method : used only in tests
*/
+ @Deprecated
public List<VotingListDTO> findVotingListByName(String name);
/**
@@ -89,7 +99,9 @@
*
* @param properties filtre sur les champs de la table VotingList
* @return les listes de votants
+ * @deprecated useless method : used only in tests
*/
+ @Deprecated
public List<VotingListDTO> selectVotingList(Map<String, Object> properties);
/**
@@ -107,7 +119,9 @@
* @param userId l'identifiant de l'utilisateur
* @param transaction la transaction du sondage
* @return true si toutes les listes ont été créés
+ * @deprecated useless method : used nowhere
*/
+ @Deprecated
public boolean createPersonLists(List<PersonListDTO> lists, String userId,
TopiaContext transaction);
@@ -148,7 +162,9 @@
*
* @param name le nom de la liste
* @return les listes
+ * @deprecated useless method : used only in tests
*/
+ @Deprecated
public List<PersonListDTO> findPersonListByName(String name);
/**
@@ -164,6 +180,8 @@
*
* @param properties filtre sur les champs de la table personList
* @return les listes de votants
+ * @deprecated useless method : used only in tests
*/
+ @Deprecated
public List<PersonListDTO> selectPersonList(Map<String, Object> properties);
}
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-21 10:31:16 UTC (rev 2875)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServicePoll.java 2010-02-22 21:16:44 UTC (rev 2876)
@@ -74,7 +74,9 @@
*
* @param pollName nom du sondage
* @return liste de sondages
+ * @deprecated useless method : only used in tests
*/
+ @Deprecated
public List<PollDTO> findPollsByName(String pollName);
/**
@@ -124,6 +126,8 @@
* @param pollId identifiant topia du sondage
* @param voteId l'identiiant topiaId du vote
* @return true si le vote a été ajouté
+ * @deprecated useless method : used nowhere
*/
+ @Deprecated
public boolean addVoteToPoll(String pollId, String voteId);
}
\ No newline at end of file
Modified: trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServicePollAccount.java
===================================================================
--- trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServicePollAccount.java 2010-02-21 10:31:16 UTC (rev 2875)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServicePollAccount.java 2010-02-22 21:16:44 UTC (rev 2876)
@@ -36,7 +36,9 @@
*
* @param pollAccount le compte à creer
* @return le topiaId du compte créé
+ * @deprecated useless method : not used in UI
*/
+ @Deprecated
public String createPollAccount(PollAccountDTO pollAccount);
/**
@@ -46,7 +48,9 @@
* @param email l'email du votant
* @param userId l'identifiant de l'utilisateur
* @return le topiaId du compte créé
+ * @deprecated useless method : not used in UI
*/
+ @Deprecated
public PollAccount createPollAccount(String votingId, String email,
String userId);
@@ -56,7 +60,9 @@
* @param pollAccounts les comptes à creer
* @param transaction la transaction
* @return les comptes créés
+ * @deprecated useless method : not used in UI
*/
+ @Deprecated
public List<PollAccount> createPollAccounts(
List<PollAccountDTO> pollAccounts, TopiaContext transaction);
@@ -97,7 +103,9 @@
*
* @param userId l'identifiant de l'utilisateur
* @return la liste des comptes de l'utilisateur
+ * @deprecated useless method : used nowhere
*/
+ @Deprecated
public List<PollAccountDTO> findPollAccountsByUser(String userId);
/**
@@ -105,7 +113,9 @@
*
* @param properties filtre sur les champs de la table pollAccount
* @return les comptes
+ * @deprecated useless method : used nowhere
*/
+ @Deprecated
public List<PollAccountDTO> selectPollAccounts(
Map<String, Object> properties);
}
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-21 10:31:16 UTC (rev 2875)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServicePollImpl.java 2010-02-22 21:16:44 UTC (rev 2876)
@@ -17,28 +17,47 @@
package org.chorem.pollen.business.services;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
+
import java.util.Set;
-import java.util.UUID;
-
import org.apache.commons.logging.Log;
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.dto.ChoiceDTO;
+import org.chorem.pollen.business.dto.PollAccountDTO;
import org.chorem.pollen.business.dto.PollDTO;
+import org.chorem.pollen.business.dto.PreventRuleDTO;
+import org.chorem.pollen.business.dto.VotingListDTO;
+import org.chorem.pollen.business.persistence.Choice;
+import org.chorem.pollen.business.persistence.ChoiceImpl;
+import org.chorem.pollen.business.persistence.ChoiceType;
+import org.chorem.pollen.business.persistence.ChoiceTypeDAO;
import org.chorem.pollen.business.persistence.PersonToList;
+import org.chorem.pollen.business.persistence.PersonToListDAO;
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.PollType;
+import org.chorem.pollen.business.persistence.PollTypeDAO;
import org.chorem.pollen.business.persistence.PollenModelDAOHelper;
+import org.chorem.pollen.business.persistence.PreventRule;
+import org.chorem.pollen.business.persistence.PreventRuleImpl;
import org.chorem.pollen.business.persistence.UserAccount;
import org.chorem.pollen.business.persistence.UserAccountDAO;
import org.chorem.pollen.business.persistence.Vote;
+import org.chorem.pollen.business.persistence.VoteCounting;
+import org.chorem.pollen.business.persistence.VoteCountingDAO;
import org.chorem.pollen.business.persistence.VoteDAO;
import org.chorem.pollen.business.persistence.VotingList;
+import org.chorem.pollen.business.persistence.VotingListImpl;
import org.chorem.pollen.business.utils.ContextUtil;
import org.nuiton.topia.TopiaContext;
+import org.nuiton.topia.TopiaException;
/**
* Implémentation du service de gestion des sondages.
@@ -56,6 +75,11 @@
private static final Log log = LogFactory.getLog(ServicePollImpl.class);
public ServicePollImpl() {
+ ConverterHelper.preparePollConverters();
+ ConverterHelper.prepareChoiceConverters();
+ ConverterHelper.prepareVotingListConverters();
+ ConverterHelper.preparePollAccountConverters();
+ ConverterHelper.preparePreventRuleConverters();
}
@Override
@@ -63,69 +87,84 @@
TopiaContext transaction = null;
String topiaId = "";
try {
+ if (pollDTO.getPollType() == null) {
+ throw new NullPointerException(
+ "PollType can't be null to create a Poll");
+ }
+ if (pollDTO.getChoiceType() == null) {
+ throw new NullPointerException(
+ "ChoiceType can't be null to create a Poll");
+ }
+ if (pollDTO.getVoteCounting() == null) {
+ throw new NullPointerException(
+ "VoteCounting can't be null to create a Poll");
+ }
+
transaction = rootContext.beginTransaction();
pollDAO = PollenModelDAOHelper.getPollDAO(transaction);
- Poll pollEntity = pollDAO.create();
+ Poll entity = ConverterHelper.convert(pollDTO, pollDAO.create());
+ // ** Create new poll ID for urls
+ entity.setPollId(ContextUtil.createPollenUrlId());
- // Identifiant du sondage
- String id = UUID.randomUUID().toString();
- pollDTO.setPollId(id.replaceAll("-", ""));
+ // FIXME-FD20100222 Change model to put name values directly in Poll
+ // entity
+ ChoiceTypeDAO choiceTypeDAO =
+ PollenModelDAOHelper.getChoiceTypeDAO(transaction);
+ ChoiceType choiceType =
+ choiceTypeDAO.findByName(pollDTO.getChoiceType().name());
+ PollTypeDAO pollTypeDAO =
+ PollenModelDAOHelper.getPollTypeDAO(transaction);
+ PollType pollType =
+ pollTypeDAO.findByName(pollDTO.getPollType().name());
+ VoteCountingDAO voteCountingDAO =
+ PollenModelDAOHelper.getVoteCountingDAO(transaction);
+ VoteCounting voteCounting =
+ voteCountingDAO.findByName(pollDTO.getVoteCounting().name());
- converter.setTransaction(transaction);
- converter.populatePollEntity(pollDTO, pollEntity);
+ entity.setChoiceType(choiceType);
+ entity.setPollType(pollType);
+ entity.setVoteCounting(voteCounting);
- // Création du pollAccount associé au sondage
- // FIXME do not call a Service from an other one
- ServicePollAccount spa = new ServicePollAccountImpl();
- PollAccount pollAccountEntity = spa.createPollAccount(pollDTO
- .getCreatorId(), pollDTO.getCreatorEmail(), pollDTO
- .getUserId());
- pollEntity.setCreator(pollAccountEntity);
+ // ** Creator managment
+ PollAccount creator = prepareCreator(transaction, pollDTO);
+ entity.setCreator(creator);
- if (log.isDebugEnabled()) {
- log.debug("userId: " + pollDTO.getUserId()
- + ", pollAccountEntity created: "
- + (pollAccountEntity != null));
+ // ** Create new choices
+ for (ChoiceDTO choiceDTO : pollDTO.getChoiceDTOs()) {
+ // Use new instance of Choice, the creation will be done by
+ // the poll entity
+ Choice choice =
+ ConverterHelper.convert(choiceDTO, new ChoiceImpl());
+ choice.setPoll(entity);
}
- topiaId = pollEntity.getTopiaId();
+ // ** Create new votingLists
+ for (VotingListDTO listDTO : pollDTO.getVotingListDTOs()) {
+ VotingList votingList = createVotingList(transaction, listDTO);
+ votingList.setPoll(entity);
+ }
- // Création des choix du sondage
- // FIXME do not call a Service from an other one
- ServiceChoice sChoice = new ServiceChoiceImpl();
- pollEntity.setChoice(sChoice.createChoices(pollDTO.getChoiceDTOs(),
- topiaId, transaction));
+ // ** Create new preventRules
+ for (PreventRuleDTO ruleDTO : pollDTO.getPreventRuleDTOs()) {
+ // Use new instance of PreventRule, the creation will be done by
+ // the poll entity
+ PreventRule rule =
+ ConverterHelper.convert(ruleDTO, new PreventRuleImpl());
+ rule.setPoll(entity);
+ }
- // Création des commentaires du sondage
- // FIXME do not call a Service from an other one
- ServiceComment sComment = new ServiceCommentImpl();
- pollEntity.setComment(sComment.createComments(pollDTO
- .getCommentDTOs(), topiaId, transaction));
-
- // Création des listes de votants du sondage
- // FIXME do not call a Service from an other one
- ServiceList sList = new ServiceListImpl();
- pollEntity.setVotingList(sList.createVotingLists(pollDTO
- .getVotingListDTOs(), topiaId, transaction));
-
- // Création des règle de notification pour le sondage
- // FIXME do not call a Service from an other one
- ServicePreventRule sPreventRule = new ServicePreventRuleImpl();
- pollEntity.setPreventRule(sPreventRule.createPreventRules(pollDTO
- .getPreventRuleDTOs(), topiaId, transaction));
-
transaction.commitTransaction();
if (log.isDebugEnabled()) {
- log.debug("creator after creation: " + pollEntity.getCreator());
+ log.debug("creator after creation: " + entity.getCreator());
}
if (log.isDebugEnabled()) {
log.debug("Entity created: " + topiaId);
}
- return topiaId;
+ return entity.getTopiaId();
} catch (Exception e) {
ContextUtil.doCatch(e, transaction);
return "";
@@ -133,7 +172,91 @@
ContextUtil.doFinally(transaction);
}
}
+
+ /**
+ * Prepare pollAccount as creator for {@code poll} save. If userId is
+ * defined, the pollAccount will be searched in database testing all fields
+ * (user, creatorId as votingId and email). If no result is found or no
+ * userId, a new pollAccount is created.
+ *
+ * @param transaction current TopiaContext
+ * @param poll PollDTO which contains creator data (userId, creatorId,
+ * creatorEmail)
+ * @return the PollAccount used as creator for this poll
+ * @throws TopiaException
+ */
+ private static final PollAccount prepareCreator(TopiaContext transaction,
+ PollDTO poll) throws TopiaException {
+
+ // Search user from database
+ UserAccount user = PollenModelDAOHelper.getUserAccountDAO(transaction).
+ findByTopiaId(poll.getUserId());
+
+ // Prepare properties for find or create
+ Map<String, Object> accountProperties = new HashMap<String, Object>();
+ accountProperties.put(PollAccount.USER_ACCOUNT, user);
+ accountProperties.put(PollAccount.VOTING_ID, poll.getCreatorId());
+ accountProperties.put(PollAccount.EMAIL, poll.getCreatorEmail());
+
+ PollAccountDAO accountDAO =
+ PollenModelDAOHelper.getPollAccountDAO(transaction);
+
+ PollAccount creator = null;
+ // Get existing account (profile) for user
+ if (user != null) {
+ creator = accountDAO.findByProperties(accountProperties);
+ }
+ // Create new account if account properties changed or no user found
+ if (creator == null) {
+ creator = accountDAO.create(accountProperties);
+ }
+ return creator;
+ }
+
+ /**
+ * Create a new votingList from a VotingListDTO. Used when poll is created.
+ * Each pollAccount of the list will be created unless it already exists
+ * in database (Don't know if needed because pollAccounts can't be loaded
+ * in a new poll creation).
+ *
+ * @param transaction current TopiaContext
+ * @param listDTO VotingListDTO source
+ * @return VotingList entity created
+ * @throws TopiaException
+ */
+ private static final VotingList createVotingList(TopiaContext transaction,
+ VotingListDTO listDTO) throws TopiaException {
+
+ // Use new instance of VotingList, the creation will be done by
+ // the poll entity
+ VotingList votingList =
+ ConverterHelper.convert(listDTO, new VotingListImpl());
+
+ PollAccountDAO pollAccountDAO =
+ PollenModelDAOHelper.getPollAccountDAO(transaction);
+
+ for (PollAccountDTO accountDTO : listDTO.getPollAccountDTOs()) {
+ double weight = accountDTO.getWeight();
+ PollAccount account =
+ pollAccountDAO.findByTopiaId(accountDTO.getId());
+
+ // Create a new PollAccount if not already exists
+ if (account == null) {
+ account =
+ ConverterHelper.convert(accountDTO, pollAccountDAO.create());
+ }
+
+ // Create association between VotingList and PollAccount
+ PollenModelDAOHelper.getPersonToListDAO(transaction).create(
+ PersonToList.POLL_ACCOUNT, account,
+ PersonToList.VOTING_LIST, votingList,
+ PersonToList.WEIGHT, weight);
+ }
+
+ return votingList;
+ }
+
@Override
public boolean updatePoll(PollDTO pollDTO) {
TopiaContext transaction = null;
@@ -209,7 +332,7 @@
result = converter.createPollDTO(pollEntity);
}
- transaction.commitTransaction();
+ //transaction.commitTransaction();
if (log.isDebugEnabled()) {
log.debug("Entity found: "
@@ -241,7 +364,7 @@
result = converter.createPollDTO(pollEntity);
}
- transaction.commitTransaction();
+ //transaction.commitTransaction();
if (log.isDebugEnabled()) {
log.debug("Entity found: "
Modified: trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServicePreventRule.java
===================================================================
--- trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServicePreventRule.java 2010-02-21 10:31:16 UTC (rev 2875)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/services/ServicePreventRule.java 2010-02-22 21:16:44 UTC (rev 2876)
@@ -72,7 +72,9 @@
*
* @param preventRuleId l'identifiant de la règle
* @return la règle
+ * @deprecated useless method : used only in tests
*/
+ @Deprecated
public PreventRuleDTO findPreventRuleById(String preventRuleId);
/**
@@ -80,7 +82,9 @@
*
* @param properties filtre sur les champs de la table preventRule
* @return les règles
+ * @deprecated useless method : used only in tests
*/
+ @Deprecated
public List<PreventRuleDTO> selectPreventRules(
Map<String, Object> properties);
}
Modified: trunk/pollen-business/src/main/java/org/chorem/pollen/business/utils/ContextUtil.java
===================================================================
--- trunk/pollen-business/src/main/java/org/chorem/pollen/business/utils/ContextUtil.java 2010-02-21 10:31:16 UTC (rev 2875)
+++ trunk/pollen-business/src/main/java/org/chorem/pollen/business/utils/ContextUtil.java 2010-02-22 21:16:44 UTC (rev 2876)
@@ -18,12 +18,14 @@
import java.util.Properties;
+import java.util.UUID;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.chorem.pollen.business.converters.ConverterHelper;
import org.chorem.pollen.business.persistence.ChoiceTypeDAO;
import org.chorem.pollen.business.persistence.PollTypeDAO;
import org.chorem.pollen.business.persistence.PollenModelDAOHelper;
@@ -333,4 +335,8 @@
}
}
}
+
+ public static String createPollenUrlId() {
+ return UUID.randomUUID().toString().replaceAll("-", "");
+ }
}
\ No newline at end of file
Modified: trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/ChoiceImpl.hbm.xml
===================================================================
--- trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/ChoiceImpl.hbm.xml 2010-02-21 10:31:16 UTC (rev 2875)
+++ trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/ChoiceImpl.hbm.xml 2010-02-22 21:16:44 UTC (rev 2876)
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping default-access="field" auto-import="true" package="org.chorem.pollen.business.persistence">
- <class name="org.chorem.pollen.business.persistence.ChoiceImpl" table="choice" node="org.chorem.pollen.business.persistence.ChoiceImpl" abstract="false" proxy="org.chorem.pollen.business.persistence.Choice" >
- <id name="topiaId" type="string" length="255" node="@topiaId"/>
- <version name="topiaVersion" type="long" node="@topiaVersion"/>
- <property name="topiaCreateDate" type="date" node="@topiaCreateDate"/>
- <property name="name" type="text" access="field" column="name" node="name"/>
- <property name="description" type="text" access="field" column="description" node="description"/>
- <property name="validate" type="java.lang.Boolean" access="field" column="validate" node="validate"/>
- <bag name="voteVoteToChoice" inverse="true" lazy="true" cascade="all,delete-orphan" node="voteVoteToChoice" embed-xml="false">
- <key column="choice"/>
- <one-to-many class="org.chorem.pollen.business.persistence.VoteToChoiceImpl" node="topiaId" embed-xml="false"/>
- </bag>
- <many-to-one name="poll" class="org.chorem.pollen.business.persistence.PollImpl" column="poll" node="poll/@topiaId" embed-xml="false"/>
- </class>
+<hibernate-mapping auto-import="true" default-access="field" package="org.chorem.pollen.business.persistence">
+ <class abstract="false" name="org.chorem.pollen.business.persistence.ChoiceImpl" node="org.chorem.pollen.business.persistence.ChoiceImpl" proxy="org.chorem.pollen.business.persistence.Choice" table="choice">
+ <id length="255" name="topiaId" node="@topiaId" type="string"/>
+ <version name="topiaVersion" node="@topiaVersion" type="long"/>
+ <property name="topiaCreateDate" node="@topiaCreateDate" type="date"/>
+ <property access="field" column="name" name="name" node="name" type="text"/>
+ <property access="field" column="description" name="description" node="description" type="text"/>
+ <property access="field" column="validate" name="validate" node="validate" type="java.lang.Boolean"/>
+ <bag cascade="all,delete-orphan" embed-xml="false" inverse="true" lazy="true" name="voteVoteToChoice" node="voteVoteToChoice">
+ <key column="choice"/>
+ <one-to-many class="org.chorem.pollen.business.persistence.VoteToChoiceImpl" embed-xml="false" node="topiaId"/>
+ </bag>
+ <many-to-one class="org.chorem.pollen.business.persistence.PollImpl" column="poll" embed-xml="false" name="poll" node="poll/@topiaId"/>
+ </class>
</hibernate-mapping>
Modified: trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/ChoiceTypeImpl.hbm.xml
===================================================================
--- trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/ChoiceTypeImpl.hbm.xml 2010-02-21 10:31:16 UTC (rev 2875)
+++ trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/ChoiceTypeImpl.hbm.xml 2010-02-22 21:16:44 UTC (rev 2876)
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping default-access="field" auto-import="true" package="org.chorem.pollen.business.persistence">
- <class name="org.chorem.pollen.business.persistence.ChoiceTypeImpl" table="choiceType" node="org.chorem.pollen.business.persistence.ChoiceTypeImpl" abstract="false" proxy="org.chorem.pollen.business.persistence.ChoiceType" >
- <id name="topiaId" type="string" length="255" node="@topiaId"/>
- <version name="topiaVersion" type="long" node="@topiaVersion"/>
- <property name="topiaCreateDate" type="date" node="@topiaCreateDate"/>
- <property name="name" type="text" access="field" column="name" node="name"/>
- </class>
+<hibernate-mapping auto-import="true" default-access="field" package="org.chorem.pollen.business.persistence">
+ <class abstract="false" name="org.chorem.pollen.business.persistence.ChoiceTypeImpl" node="org.chorem.pollen.business.persistence.ChoiceTypeImpl" proxy="org.chorem.pollen.business.persistence.ChoiceType" table="choiceType">
+ <id length="255" name="topiaId" node="@topiaId" type="string"/>
+ <version name="topiaVersion" node="@topiaVersion" type="long"/>
+ <property name="topiaCreateDate" node="@topiaCreateDate" type="date"/>
+ <property access="field" column="name" name="name" node="name" type="text"/>
+ </class>
</hibernate-mapping>
Modified: trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/CommentImpl.hbm.xml
===================================================================
--- trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/CommentImpl.hbm.xml 2010-02-21 10:31:16 UTC (rev 2875)
+++ trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/CommentImpl.hbm.xml 2010-02-22 21:16:44 UTC (rev 2876)
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping default-access="field" auto-import="true" package="org.chorem.pollen.business.persistence">
- <class name="org.chorem.pollen.business.persistence.CommentImpl" table="comment" node="org.chorem.pollen.business.persistence.CommentImpl" abstract="false" proxy="org.chorem.pollen.business.persistence.Comment" >
- <id name="topiaId" type="string" length="255" node="@topiaId"/>
- <version name="topiaVersion" type="long" node="@topiaVersion"/>
- <property name="topiaCreateDate" type="date" 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"/>
- <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 auto-import="true" default-access="field" package="org.chorem.pollen.business.persistence">
+ <class abstract="false" name="org.chorem.pollen.business.persistence.CommentImpl" node="org.chorem.pollen.business.persistence.CommentImpl" proxy="org.chorem.pollen.business.persistence.Comment" table="comment">
+ <id length="255" name="topiaId" node="@topiaId" type="string"/>
+ <version name="topiaVersion" node="@topiaVersion" type="long"/>
+ <property name="topiaCreateDate" node="@topiaCreateDate" type="date"/>
+ <property access="field" column="text" name="text" node="text" type="text"/>
+ <property access="field" column="postDate" name="postDate" node="postDate" type="java.util.Date"/>
+ <many-to-one class="org.chorem.pollen.business.persistence.PollImpl" column="poll" embed-xml="false" name="poll" node="poll/@topiaId"/>
+ <many-to-one class="org.chorem.pollen.business.persistence.PollAccountImpl" column="pollAccount" embed-xml="false" name="pollAccount" node="pollAccount/@topiaId"/>
+ </class>
</hibernate-mapping>
Modified: trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/PersonListImpl.hbm.xml
===================================================================
--- trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/PersonListImpl.hbm.xml 2010-02-21 10:31:16 UTC (rev 2875)
+++ trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/PersonListImpl.hbm.xml 2010-02-22 21:16:44 UTC (rev 2876)
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping default-access="field" auto-import="true" package="org.chorem.pollen.business.persistence">
- <class name="org.chorem.pollen.business.persistence.PersonListImpl" table="personList" node="org.chorem.pollen.business.persistence.PersonListImpl" abstract="false" proxy="org.chorem.pollen.business.persistence.PersonList" >
- <id name="topiaId" type="string" length="255" node="@topiaId"/>
- <version name="topiaVersion" type="long" node="@topiaVersion"/>
- <property name="topiaCreateDate" type="date" node="@topiaCreateDate"/>
- <property name="name" type="text" access="field" column="name" node="name"/>
- <many-to-one name="owner" class="org.chorem.pollen.business.persistence.UserAccountImpl" column="owner" node="owner/@topiaId" embed-xml="false"/>
- <bag name="pollAccount" inverse="true" lazy="true" cascade="all,delete-orphan" node="pollAccount" embed-xml="false">
- <key column="personList"/>
- <one-to-many class="org.chorem.pollen.business.persistence.PollAccountImpl" node="topiaId" embed-xml="false"/>
- </bag>
- </class>
+<hibernate-mapping auto-import="true" default-access="field" package="org.chorem.pollen.business.persistence">
+ <class abstract="false" name="org.chorem.pollen.business.persistence.PersonListImpl" node="org.chorem.pollen.business.persistence.PersonListImpl" proxy="org.chorem.pollen.business.persistence.PersonList" table="personList">
+ <id length="255" name="topiaId" node="@topiaId" type="string"/>
+ <version name="topiaVersion" node="@topiaVersion" type="long"/>
+ <property name="topiaCreateDate" node="@topiaCreateDate" type="date"/>
+ <property access="field" column="name" name="name" node="name" type="text"/>
+ <many-to-one class="org.chorem.pollen.business.persistence.UserAccountImpl" column="owner" embed-xml="false" name="owner" node="owner/@topiaId"/>
+ <bag cascade="all,delete-orphan" embed-xml="false" inverse="true" lazy="true" name="pollAccount" node="pollAccount">
+ <key column="personList"/>
+ <one-to-many class="org.chorem.pollen.business.persistence.PollAccountImpl" embed-xml="false" node="topiaId"/>
+ </bag>
+ </class>
</hibernate-mapping>
Modified: trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/PersonToListImpl.hbm.xml
===================================================================
--- trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/PersonToListImpl.hbm.xml 2010-02-21 10:31:16 UTC (rev 2875)
+++ trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/PersonToListImpl.hbm.xml 2010-02-22 21:16:44 UTC (rev 2876)
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping default-access="field" auto-import="true" package="org.chorem.pollen.business.persistence">
- <class name="org.chorem.pollen.business.persistence.PersonToListImpl" table="personToList" node="org.chorem.pollen.business.persistence.PersonToListImpl" abstract="false" proxy="org.chorem.pollen.business.persistence.PersonToList" >
- <id name="topiaId" type="string" length="255" node="@topiaId"/>
- <version name="topiaVersion" type="long" node="@topiaVersion"/>
- <property name="topiaCreateDate" type="date" node="@topiaCreateDate"/>
- <property name="weight" type="double" access="field" column="weight" node="weight"/>
- <property name="hasVoted" type="text" access="field" column="hasVoted" node="hasVoted"/>
- <many-to-one name="votingList" class="org.chorem.pollen.business.persistence.VotingListImpl" column="votingList" node="votingList/@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 auto-import="true" default-access="field" package="org.chorem.pollen.business.persistence">
+ <class abstract="false" name="org.chorem.pollen.business.persistence.PersonToListImpl" node="org.chorem.pollen.business.persistence.PersonToListImpl" proxy="org.chorem.pollen.business.persistence.PersonToList" table="personToList">
+ <id length="255" name="topiaId" node="@topiaId" type="string"/>
+ <version name="topiaVersion" node="@topiaVersion" type="long"/>
+ <property name="topiaCreateDate" node="@topiaCreateDate" type="date"/>
+ <property access="field" column="weight" name="weight" node="weight" type="double"/>
+ <property access="field" column="hasVoted" name="hasVoted" node="hasVoted" type="text"/>
+ <many-to-one class="org.chorem.pollen.business.persistence.VotingListImpl" column="votingList" embed-xml="false" name="votingList" node="votingList/@topiaId"/>
+ <many-to-one class="org.chorem.pollen.business.persistence.PollAccountImpl" column="pollAccount" embed-xml="false" name="pollAccount" node="pollAccount/@topiaId"/>
+ </class>
</hibernate-mapping>
Modified: trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/PollAccountImpl.hbm.xml
===================================================================
--- trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/PollAccountImpl.hbm.xml 2010-02-21 10:31:16 UTC (rev 2875)
+++ trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/PollAccountImpl.hbm.xml 2010-02-22 21:16:44 UTC (rev 2876)
@@ -1,29 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping default-access="field" auto-import="true" package="org.chorem.pollen.business.persistence">
- <class name="org.chorem.pollen.business.persistence.PollAccountImpl" table="pollAccount" node="org.chorem.pollen.business.persistence.PollAccountImpl" abstract="false" proxy="org.chorem.pollen.business.persistence.PollAccount" >
- <id name="topiaId" type="string" length="255" node="@topiaId"/>
- <version name="topiaVersion" type="long" node="@topiaVersion"/>
- <property name="topiaCreateDate" type="date" node="@topiaCreateDate"/>
- <property name="votingId" type="text" access="field" column="votingId" node="votingId"/>
- <property name="email" type="text" access="field" column="email" node="email"/>
- <bag name="votingListPersonToList" inverse="true" lazy="true" cascade="all,delete-orphan" node="votingListPersonToList" embed-xml="false">
- <key column="pollAccount"/>
- <one-to-many class="org.chorem.pollen.business.persistence.PersonToListImpl" node="topiaId" embed-xml="false"/>
- </bag>
- <bag name="pollsCreated" inverse="true" lazy="true" node="pollsCreated" embed-xml="false">
- <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"/>
- </bag>
- <many-to-one name="personList" class="org.chorem.pollen.business.persistence.PersonListImpl" column="personList" node="personList/@topiaId" embed-xml="false"/>
- <many-to-one name="userAccount" class="org.chorem.pollen.business.persistence.UserAccountImpl" column="userAccount" node="userAccount/@topiaId" embed-xml="false"/>
- </class>
+<hibernate-mapping auto-import="true" default-access="field" package="org.chorem.pollen.business.persistence">
+ <class abstract="false" name="org.chorem.pollen.business.persistence.PollAccountImpl" node="org.chorem.pollen.business.persistence.PollAccountImpl" proxy="org.chorem.pollen.business.persistence.PollAccount" table="pollAccount">
+ <id length="255" name="topiaId" node="@topiaId" type="string"/>
+ <version name="topiaVersion" node="@topiaVersion" type="long"/>
+ <property name="topiaCreateDate" node="@topiaCreateDate" type="date"/>
+ <property access="field" column="votingId" name="votingId" node="votingId" type="text"/>
+ <property access="field" column="email" name="email" node="email" type="text"/>
+ <bag cascade="all,delete-orphan" embed-xml="false" inverse="true" lazy="true" name="votingListPersonToList" node="votingListPersonToList">
+ <key column="pollAccount"/>
+ <one-to-many class="org.chorem.pollen.business.persistence.PersonToListImpl" embed-xml="false" node="topiaId"/>
+ </bag>
+ <bag embed-xml="false" inverse="true" lazy="true" name="pollsCreated" node="pollsCreated">
+ <key column="creator"/>
+ <one-to-many class="org.chorem.pollen.business.persistence.PollImpl" embed-xml="false" node="topiaId"/>
+ </bag>
+ <bag embed-xml="false" inverse="true" lazy="true" name="comment" node="comment">
+ <key column="pollAccount"/>
+ <one-to-many class="org.chorem.pollen.business.persistence.CommentImpl" embed-xml="false" node="topiaId"/>
+ </bag>
+ <bag embed-xml="false" inverse="true" lazy="true" name="vote" node="vote">
+ <key column="pollAccount"/>
+ <one-to-many class="org.chorem.pollen.business.persistence.VoteImpl" embed-xml="false" node="topiaId"/>
+ </bag>
+ <many-to-one class="org.chorem.pollen.business.persistence.PersonListImpl" column="personList" embed-xml="false" name="personList" node="personList/@topiaId"/>
+ <many-to-one class="org.chorem.pollen.business.persistence.UserAccountImpl" column="userAccount" embed-xml="false" name="userAccount" node="userAccount/@topiaId"/>
+ </class>
</hibernate-mapping>
Modified: trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/PollImpl.hbm.xml
===================================================================
--- trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/PollImpl.hbm.xml 2010-02-21 10:31:16 UTC (rev 2875)
+++ trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/PollImpl.hbm.xml 2010-02-22 21:16:44 UTC (rev 2876)
@@ -1,50 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping default-access="field" auto-import="true" package="org.chorem.pollen.business.persistence">
- <class name="org.chorem.pollen.business.persistence.PollImpl" table="poll" node="org.chorem.pollen.business.persistence.PollImpl" abstract="false" proxy="org.chorem.pollen.business.persistence.Poll" >
- <id name="topiaId" type="string" length="255" node="@topiaId"/>
- <version name="topiaVersion" type="long" node="@topiaVersion"/>
- <property name="topiaCreateDate" type="date" node="@topiaCreateDate"/>
- <property name="pollId" type="text" access="field" column="pollId" node="pollId"/>
- <property name="title" type="text" access="field" column="title" node="title"/>
- <property name="description" type="text" access="field" column="description" node="description"/>
- <property name="beginChoiceDate" type="java.util.Date" access="field" column="beginChoiceDate" node="beginChoiceDate"/>
- <property name="beginDate" type="java.util.Date" access="field" column="beginDate" node="beginDate"/>
- <property name="endDate" type="java.util.Date" access="field" column="endDate" node="endDate"/>
- <property name="maxChoiceNb" type="int" access="field" column="maxChoiceNb" node="maxChoiceNb"/>
- <property name="closed" type="java.lang.Boolean" access="field" column="closed" node="closed"/>
- <property name="choiceAddAllowed" type="java.lang.Boolean" access="field" column="choiceAddAllowed" node="choiceAddAllowed"/>
- <property name="anonymousVoteAllowed" type="java.lang.Boolean" access="field" column="anonymousVoteAllowed" node="anonymousVoteAllowed"/>
- <property name="anonymous" type="java.lang.Boolean" access="field" column="anonymous" node="anonymous"/>
- <property name="publicResults" type="java.lang.Boolean" access="field" column="publicResults" node="publicResults"/>
- <property name="continuousResults" type="java.lang.Boolean" access="field" column="continuousResults" node="continuousResults"/>
- <bag name="vote" inverse="true" lazy="true" cascade="all,delete-orphan" node="vote" embed-xml="false">
- <key column="poll"/>
- <one-to-many class="org.chorem.pollen.business.persistence.VoteImpl" node="topiaId" embed-xml="false"/>
- </bag>
- <bag name="choice" inverse="true" lazy="true" cascade="all,delete-orphan" node="choice" embed-xml="false">
- <key column="poll"/>
- <one-to-many class="org.chorem.pollen.business.persistence.ChoiceImpl" node="topiaId" embed-xml="false"/>
- </bag>
- <bag name="result" inverse="true" lazy="true" cascade="all,delete-orphan" node="result" embed-xml="false">
- <key column="poll"/>
- <one-to-many class="org.chorem.pollen.business.persistence.ResultImpl" node="topiaId" embed-xml="false"/>
- </bag>
- <many-to-one name="creator" class="org.chorem.pollen.business.persistence.PollAccountImpl" column="creator" node="creator/@topiaId" embed-xml="false"/>
- <bag name="comment" inverse="true" lazy="true" node="comment" embed-xml="false">
- <key column="poll"/>
- <one-to-many class="org.chorem.pollen.business.persistence.CommentImpl" node="topiaId" embed-xml="false"/>
- </bag>
- <bag name="preventRule" inverse="true" lazy="true" node="preventRule" embed-xml="false">
- <key column="poll"/>
- <one-to-many class="org.chorem.pollen.business.persistence.PreventRuleImpl" node="topiaId" embed-xml="false"/>
- </bag>
- <bag name="votingList" inverse="true" lazy="true" cascade="all,delete-orphan" node="votingList" embed-xml="false">
- <key column="poll"/>
- <one-to-many class="org.chorem.pollen.business.persistence.VotingListImpl" node="topiaId" embed-xml="false"/>
- </bag>
- <many-to-one name="pollType" class="org.chorem.pollen.business.persistence.PollTypeImpl" column="pollType" node="pollType/@topiaId" embed-xml="false"/>
- <many-to-one name="choiceType" class="org.chorem.pollen.business.persistence.ChoiceTypeImpl" column="choiceType" node="choiceType/@topiaId" embed-xml="false"/>
- <many-to-one name="voteCounting" class="org.chorem.pollen.business.persistence.VoteCountingImpl" column="voteCounting" node="voteCounting/@topiaId" embed-xml="false"/>
- </class>
+<hibernate-mapping auto-import="true" default-access="field" package="org.chorem.pollen.business.persistence">
+ <class abstract="false" name="org.chorem.pollen.business.persistence.PollImpl" node="org.chorem.pollen.business.persistence.PollImpl" proxy="org.chorem.pollen.business.persistence.Poll" table="poll">
+ <id length="255" name="topiaId" node="@topiaId" type="string"/>
+ <version name="topiaVersion" node="@topiaVersion" type="long"/>
+ <property name="topiaCreateDate" node="@topiaCreateDate" type="date"/>
+ <property access="field" column="pollId" name="pollId" node="pollId" type="text"/>
+ <property access="field" column="title" name="title" node="title" type="text"/>
+ <property access="field" column="description" name="description" node="description" type="text"/>
+ <property access="field" column="beginChoiceDate" name="beginChoiceDate" node="beginChoiceDate" type="java.util.Date"/>
+ <property access="field" column="beginDate" name="beginDate" node="beginDate" type="java.util.Date"/>
+ <property access="field" column="endDate" name="endDate" node="endDate" type="java.util.Date"/>
+ <property access="field" column="maxChoiceNb" name="maxChoiceNb" node="maxChoiceNb" type="int"/>
+ <property access="field" column="closed" name="closed" node="closed" type="java.lang.Boolean"/>
+ <property access="field" column="choiceAddAllowed" name="choiceAddAllowed" node="choiceAddAllowed" type="java.lang.Boolean"/>
+ <property access="field" column="anonymousVoteAllowed" name="anonymousVoteAllowed" node="anonymousVoteAllowed" type="java.lang.Boolean"/>
+ <property access="field" column="anonymous" name="anonymous" node="anonymous" type="java.lang.Boolean"/>
+ <property access="field" column="publicResults" name="publicResults" node="publicResults" type="java.lang.Boolean"/>
+ <property access="field" column="continuousResults" name="continuousResults" node="continuousResults" type="java.lang.Boolean"/>
+ <bag cascade="all,delete-orphan" embed-xml="false" inverse="true" lazy="true" name="vote" node="vote">
+ <key column="poll"/>
+ <one-to-many class="org.chorem.pollen.business.persistence.VoteImpl" embed-xml="false" node="topiaId"/>
+ </bag>
+ <bag cascade="all,delete-orphan" embed-xml="false" inverse="true" lazy="true" name="choice" node="choice">
+ <key column="poll"/>
+ <one-to-many class="org.chorem.pollen.business.persistence.ChoiceImpl" embed-xml="false" node="topiaId"/>
+ </bag>
+ <bag cascade="all,delete-orphan" embed-xml="false" inverse="true" lazy="true" name="result" node="result">
+ <key column="poll"/>
+ <one-to-many class="org.chorem.pollen.business.persistence.ResultImpl" embed-xml="false" node="topiaId"/>
+ </bag>
+ <many-to-one class="org.chorem.pollen.business.persistence.PollAccountImpl" column="creator" embed-xml="false" name="creator" node="creator/@topiaId"/>
+ <bag embed-xml="false" inverse="true" lazy="true" name="comment" node="comment">
+ <key column="poll"/>
+ <one-to-many class="org.chorem.pollen.business.persistence.CommentImpl" embed-xml="false" node="topiaId"/>
+ </bag>
+ <bag embed-xml="false" inverse="true" lazy="true" name="preventRule" node="preventRule">
+ <key column="poll"/>
+ <one-to-many class="org.chorem.pollen.business.persistence.PreventRuleImpl" embed-xml="false" node="topiaId"/>
+ </bag>
+ <bag cascade="all,delete-orphan" embed-xml="false" inverse="true" lazy="true" name="votingList" node="votingList">
+ <key column="poll"/>
+ <one-to-many class="org.chorem.pollen.business.persistence.VotingListImpl" embed-xml="false" node="topiaId"/>
+ </bag>
+ <many-to-one class="org.chorem.pollen.business.persistence.PollTypeImpl" column="pollType" embed-xml="false" name="pollType" node="pollType/@topiaId"/>
+ <many-to-one class="org.chorem.pollen.business.persistence.ChoiceTypeImpl" column="choiceType" embed-xml="false" name="choiceType" node="choiceType/@topiaId"/>
+ <many-to-one class="org.chorem.pollen.business.persistence.VoteCountingImpl" column="voteCounting" embed-xml="false" name="voteCounting" node="voteCounting/@topiaId"/>
+ </class>
</hibernate-mapping>
Modified: trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/PollTypeImpl.hbm.xml
===================================================================
--- trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/PollTypeImpl.hbm.xml 2010-02-21 10:31:16 UTC (rev 2875)
+++ trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/PollTypeImpl.hbm.xml 2010-02-22 21:16:44 UTC (rev 2876)
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping default-access="field" auto-import="true" package="org.chorem.pollen.business.persistence">
- <class name="org.chorem.pollen.business.persistence.PollTypeImpl" table="pollType" node="org.chorem.pollen.business.persistence.PollTypeImpl" abstract="false" proxy="org.chorem.pollen.business.persistence.PollType" >
- <id name="topiaId" type="string" length="255" node="@topiaId"/>
- <version name="topiaVersion" type="long" node="@topiaVersion"/>
- <property name="topiaCreateDate" type="date" node="@topiaCreateDate"/>
- <property name="name" type="text" access="field" column="name" node="name"/>
- </class>
+<hibernate-mapping auto-import="true" default-access="field" package="org.chorem.pollen.business.persistence">
+ <class abstract="false" name="org.chorem.pollen.business.persistence.PollTypeImpl" node="org.chorem.pollen.business.persistence.PollTypeImpl" proxy="org.chorem.pollen.business.persistence.PollType" table="pollType">
+ <id length="255" name="topiaId" node="@topiaId" type="string"/>
+ <version name="topiaVersion" node="@topiaVersion" type="long"/>
+ <property name="topiaCreateDate" node="@topiaCreateDate" type="date"/>
+ <property access="field" column="name" name="name" node="name" type="text"/>
+ </class>
</hibernate-mapping>
Modified: trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/PreventRuleImpl.hbm.xml
===================================================================
--- trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/PreventRuleImpl.hbm.xml 2010-02-21 10:31:16 UTC (rev 2875)
+++ trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/PreventRuleImpl.hbm.xml 2010-02-22 21:16:44 UTC (rev 2876)
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping default-access="field" auto-import="true" package="org.chorem.pollen.business.persistence">
- <class name="org.chorem.pollen.business.persistence.PreventRuleImpl" table="preventRule" node="org.chorem.pollen.business.persistence.PreventRuleImpl" abstract="false" proxy="org.chorem.pollen.business.persistence.PreventRule" >
- <id name="topiaId" type="string" length="255" node="@topiaId"/>
- <version name="topiaVersion" type="long" node="@topiaVersion"/>
- <property name="topiaCreateDate" type="date" node="@topiaCreateDate"/>
- <property name="scope" type="text" access="field" column="scope" node="scope"/>
- <property name="sensibility" type="int" access="field" column="sensibility" node="sensibility"/>
- <property name="repeated" type="java.lang.Boolean" access="field" column="repeated" node="repeated"/>
- <property name="method" type="text" access="field" column="method" node="method"/>
- <many-to-one name="poll" class="org.chorem.pollen.business.persistence.PollImpl" column="poll" node="poll/@topiaId" embed-xml="false"/>
- </class>
+<hibernate-mapping auto-import="true" default-access="field" package="org.chorem.pollen.business.persistence">
+ <class abstract="false" name="org.chorem.pollen.business.persistence.PreventRuleImpl" node="org.chorem.pollen.business.persistence.PreventRuleImpl" proxy="org.chorem.pollen.business.persistence.PreventRule" table="preventRule">
+ <id length="255" name="topiaId" node="@topiaId" type="string"/>
+ <version name="topiaVersion" node="@topiaVersion" type="long"/>
+ <property name="topiaCreateDate" node="@topiaCreateDate" type="date"/>
+ <property access="field" column="scope" name="scope" node="scope" type="text"/>
+ <property access="field" column="sensibility" name="sensibility" node="sensibility" type="int"/>
+ <property access="field" column="repeated" name="repeated" node="repeated" type="java.lang.Boolean"/>
+ <property access="field" column="method" name="method" node="method" type="text"/>
+ <many-to-one class="org.chorem.pollen.business.persistence.PollImpl" column="poll" embed-xml="false" name="poll" node="poll/@topiaId"/>
+ </class>
</hibernate-mapping>
Modified: trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/ResultImpl.hbm.xml
===================================================================
--- trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/ResultImpl.hbm.xml 2010-02-21 10:31:16 UTC (rev 2875)
+++ trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/ResultImpl.hbm.xml 2010-02-22 21:16:44 UTC (rev 2876)
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping default-access="field" auto-import="true" package="org.chorem.pollen.business.persistence">
- <class name="org.chorem.pollen.business.persistence.ResultImpl" table="result" node="org.chorem.pollen.business.persistence.ResultImpl" abstract="false" proxy="org.chorem.pollen.business.persistence.Result" >
- <id name="topiaId" type="string" length="255" node="@topiaId"/>
- <version name="topiaVersion" type="long" node="@topiaVersion"/>
- <property name="topiaCreateDate" type="date" node="@topiaCreateDate"/>
- <property name="name" type="text" access="field" column="name" node="name"/>
- <property name="ResultValue" type="text" access="field" column="resultValue" node="ResultValue"/>
- <property name="byGroup" type="java.lang.Boolean" access="field" column="byGroup" node="byGroup"/>
- <many-to-one name="poll" class="org.chorem.pollen.business.persistence.PollImpl" column="poll" node="poll/@topiaId" embed-xml="false"/>
- <many-to-one name="voteCounting" class="org.chorem.pollen.business.persistence.VoteCountingImpl" column="voteCounting" node="voteCounting/@topiaId" embed-xml="false"/>
- </class>
+<hibernate-mapping auto-import="true" default-access="field" package="org.chorem.pollen.business.persistence">
+ <class abstract="false" name="org.chorem.pollen.business.persistence.ResultImpl" node="org.chorem.pollen.business.persistence.ResultImpl" proxy="org.chorem.pollen.business.persistence.Result" table="result">
+ <id length="255" name="topiaId" node="@topiaId" type="string"/>
+ <version name="topiaVersion" node="@topiaVersion" type="long"/>
+ <property name="topiaCreateDate" node="@topiaCreateDate" type="date"/>
+ <property access="field" column="name" name="name" node="name" type="text"/>
+ <property access="field" column="resultValue" name="ResultValue" node="ResultValue" type="text"/>
+ <property access="field" column="byGroup" name="byGroup" node="byGroup" type="java.lang.Boolean"/>
+ <many-to-one class="org.chorem.pollen.business.persistence.PollImpl" column="poll" embed-xml="false" name="poll" node="poll/@topiaId"/>
+ <many-to-one class="org.chorem.pollen.business.persistence.VoteCountingImpl" column="voteCounting" embed-xml="false" name="voteCounting" node="voteCounting/@topiaId"/>
+ </class>
</hibernate-mapping>
Modified: trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/UserAccountImpl.hbm.xml
===================================================================
--- trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/UserAccountImpl.hbm.xml 2010-02-21 10:31:16 UTC (rev 2875)
+++ trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/UserAccountImpl.hbm.xml 2010-02-22 21:16:44 UTC (rev 2876)
@@ -1,24 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping default-access="field" auto-import="true" package="org.chorem.pollen.business.persistence">
- <class name="org.chorem.pollen.business.persistence.UserAccountImpl" table="userAccount" node="org.chorem.pollen.business.persistence.UserAccountImpl" abstract="false" proxy="org.chorem.pollen.business.persistence.UserAccount" >
- <id name="topiaId" type="string" length="255" node="@topiaId"/>
- <version name="topiaVersion" type="long" node="@topiaVersion"/>
- <property name="topiaCreateDate" type="date" node="@topiaCreateDate"/>
- <property name="login" type="text" access="field" column="login" node="login"/>
- <property name="password" type="text" access="field" column="password" node="password"/>
- <property name="firstName" type="text" access="field" column="firstName" node="firstName"/>
- <property name="lastName" type="text" access="field" column="lastName" node="lastName"/>
- <property name="administrator" type="java.lang.Boolean" access="field" column="administrator" node="administrator"/>
- <property name="langage" type="text" access="field" column="langage" node="langage"/>
- <property name="email" type="text" access="field" column="email" node="email"/>
- <bag name="favoriteList" inverse="true" lazy="true" node="favoriteList" embed-xml="false">
- <key column="owner"/>
- <one-to-many class="org.chorem.pollen.business.persistence.PersonListImpl" node="topiaId" embed-xml="false"/>
- </bag>
- <bag name="pollAccount" inverse="true" lazy="true" node="pollAccount" embed-xml="false">
- <key column="userAccount"/>
- <one-to-many class="org.chorem.pollen.business.persistence.PollAccountImpl" node="topiaId" embed-xml="false"/>
- </bag>
- </class>
+<hibernate-mapping auto-import="true" default-access="field" package="org.chorem.pollen.business.persistence">
+ <class abstract="false" name="org.chorem.pollen.business.persistence.UserAccountImpl" node="org.chorem.pollen.business.persistence.UserAccountImpl" proxy="org.chorem.pollen.business.persistence.UserAccount" table="userAccount">
+ <id length="255" name="topiaId" node="@topiaId" type="string"/>
+ <version name="topiaVersion" node="@topiaVersion" type="long"/>
+ <property name="topiaCreateDate" node="@topiaCreateDate" type="date"/>
+ <property access="field" column="login" name="login" node="login" type="text"/>
+ <property access="field" column="password" name="password" node="password" type="text"/>
+ <property access="field" column="firstName" name="firstName" node="firstName" type="text"/>
+ <property access="field" column="lastName" name="lastName" node="lastName" type="text"/>
+ <property access="field" column="administrator" name="administrator" node="administrator" type="java.lang.Boolean"/>
+ <property access="field" column="langage" name="langage" node="langage" type="text"/>
+ <property access="field" column="email" name="email" node="email" type="text"/>
+ <bag embed-xml="false" inverse="true" lazy="true" name="favoriteList" node="favoriteList">
+ <key column="owner"/>
+ <one-to-many class="org.chorem.pollen.business.persistence.PersonListImpl" embed-xml="false" node="topiaId"/>
+ </bag>
+ <bag embed-xml="false" inverse="true" lazy="true" name="pollAccount" node="pollAccount">
+ <key column="userAccount"/>
+ <one-to-many class="org.chorem.pollen.business.persistence.PollAccountImpl" embed-xml="false" node="topiaId"/>
+ </bag>
+ </class>
</hibernate-mapping>
Modified: trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/VoteCountingImpl.hbm.xml
===================================================================
--- trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/VoteCountingImpl.hbm.xml 2010-02-21 10:31:16 UTC (rev 2875)
+++ trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/VoteCountingImpl.hbm.xml 2010-02-22 21:16:44 UTC (rev 2876)
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping default-access="field" auto-import="true" package="org.chorem.pollen.business.persistence">
- <class name="org.chorem.pollen.business.persistence.VoteCountingImpl" table="voteCounting" node="org.chorem.pollen.business.persistence.VoteCountingImpl" abstract="false" proxy="org.chorem.pollen.business.persistence.VoteCounting" >
- <id name="topiaId" type="string" length="255" node="@topiaId"/>
- <version name="topiaVersion" type="long" node="@topiaVersion"/>
- <property name="topiaCreateDate" type="date" node="@topiaCreateDate"/>
- <property name="name" type="text" access="field" column="name" node="name"/>
- </class>
+<hibernate-mapping auto-import="true" default-access="field" package="org.chorem.pollen.business.persistence">
+ <class abstract="false" name="org.chorem.pollen.business.persistence.VoteCountingImpl" node="org.chorem.pollen.business.persistence.VoteCountingImpl" proxy="org.chorem.pollen.business.persistence.VoteCounting" table="voteCounting">
+ <id length="255" name="topiaId" node="@topiaId" type="string"/>
+ <version name="topiaVersion" node="@topiaVersion" type="long"/>
+ <property name="topiaCreateDate" node="@topiaCreateDate" type="date"/>
+ <property access="field" column="name" name="name" node="name" type="text"/>
+ </class>
</hibernate-mapping>
Modified: trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/VoteImpl.hbm.xml
===================================================================
--- trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/VoteImpl.hbm.xml 2010-02-21 10:31:16 UTC (rev 2875)
+++ trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/VoteImpl.hbm.xml 2010-02-22 21:16:44 UTC (rev 2876)
@@ -1,18 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping default-access="field" auto-import="true" package="org.chorem.pollen.business.persistence">
- <class name="org.chorem.pollen.business.persistence.VoteImpl" table="vote" node="org.chorem.pollen.business.persistence.VoteImpl" abstract="false" proxy="org.chorem.pollen.business.persistence.Vote" >
- <id name="topiaId" type="string" length="255" node="@topiaId"/>
- <version name="topiaVersion" type="long" node="@topiaVersion"/>
- <property name="topiaCreateDate" type="date" node="@topiaCreateDate"/>
- <property name="weight" type="double" access="field" column="weight" node="weight"/>
- <property name="comment" type="text" access="field" column="comment" node="comment"/>
- <bag name="choiceVoteToChoice" inverse="true" lazy="true" cascade="all,delete-orphan" node="choiceVoteToChoice" embed-xml="false">
- <key column="vote"/>
- <one-to-many class="org.chorem.pollen.business.persistence.VoteToChoiceImpl" node="topiaId" embed-xml="false"/>
- </bag>
- <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"/>
- <many-to-one name="votingList" class="org.chorem.pollen.business.persistence.VotingListImpl" column="votingList" node="votingList/@topiaId" embed-xml="false"/>
- </class>
+<hibernate-mapping auto-import="true" default-access="field" package="org.chorem.pollen.business.persistence">
+ <class abstract="false" name="org.chorem.pollen.business.persistence.VoteImpl" node="org.chorem.pollen.business.persistence.VoteImpl" proxy="org.chorem.pollen.business.persistence.Vote" table="vote">
+ <id length="255" name="topiaId" node="@topiaId" type="string"/>
+ <version name="topiaVersion" node="@topiaVersion" type="long"/>
+ <property name="topiaCreateDate" node="@topiaCreateDate" type="date"/>
+ <property access="field" column="weight" name="weight" node="weight" type="double"/>
+ <property access="field" column="comment" name="comment" node="comment" type="text"/>
+ <bag cascade="all,delete-orphan" embed-xml="false" inverse="true" lazy="true" name="choiceVoteToChoice" node="choiceVoteToChoice">
+ <key column="vote"/>
+ <one-to-many class="org.chorem.pollen.business.persistence.VoteToChoiceImpl" embed-xml="false" node="topiaId"/>
+ </bag>
+ <many-to-one class="org.chorem.pollen.business.persistence.PollImpl" column="poll" embed-xml="false" name="poll" node="poll/@topiaId"/>
+ <many-to-one class="org.chorem.pollen.business.persistence.PollAccountImpl" column="pollAccount" embed-xml="false" name="pollAccount" node="pollAccount/@topiaId"/>
+ <many-to-one class="org.chorem.pollen.business.persistence.VotingListImpl" column="votingList" embed-xml="false" name="votingList" node="votingList/@topiaId"/>
+ </class>
</hibernate-mapping>
Modified: trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/VoteToChoiceImpl.hbm.xml
===================================================================
--- trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/VoteToChoiceImpl.hbm.xml 2010-02-21 10:31:16 UTC (rev 2875)
+++ trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/VoteToChoiceImpl.hbm.xml 2010-02-22 21:16:44 UTC (rev 2876)
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping default-access="field" auto-import="true" package="org.chorem.pollen.business.persistence">
- <class name="org.chorem.pollen.business.persistence.VoteToChoiceImpl" table="voteToChoice" node="org.chorem.pollen.business.persistence.VoteToChoiceImpl" abstract="false" proxy="org.chorem.pollen.business.persistence.VoteToChoice" >
- <id name="topiaId" type="string" length="255" node="@topiaId"/>
- <version name="topiaVersion" type="long" node="@topiaVersion"/>
- <property name="topiaCreateDate" type="date" node="@topiaCreateDate"/>
- <property name="voteValue" type="int" access="field" column="voteValue" node="voteValue"/>
- <many-to-one name="vote" class="org.chorem.pollen.business.persistence.VoteImpl" column="vote" node="vote/@topiaId" embed-xml="false" />
- <many-to-one name="choice" class="org.chorem.pollen.business.persistence.ChoiceImpl" column="choice" node="choice/@topiaId" embed-xml="false" />
- </class>
+<hibernate-mapping auto-import="true" default-access="field" package="org.chorem.pollen.business.persistence">
+ <class abstract="false" name="org.chorem.pollen.business.persistence.VoteToChoiceImpl" node="org.chorem.pollen.business.persistence.VoteToChoiceImpl" proxy="org.chorem.pollen.business.persistence.VoteToChoice" table="voteToChoice">
+ <id length="255" name="topiaId" node="@topiaId" type="string"/>
+ <version name="topiaVersion" node="@topiaVersion" type="long"/>
+ <property name="topiaCreateDate" node="@topiaCreateDate" type="date"/>
+ <property access="field" column="voteValue" name="voteValue" node="voteValue" type="int"/>
+ <many-to-one class="org.chorem.pollen.business.persistence.VoteImpl" column="vote" embed-xml="false" name="vote" node="vote/@topiaId"/>
+ <many-to-one class="org.chorem.pollen.business.persistence.ChoiceImpl" column="choice" embed-xml="false" name="choice" node="choice/@topiaId"/>
+ </class>
</hibernate-mapping>
Modified: trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/VotingListImpl.hbm.xml
===================================================================
--- trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/VotingListImpl.hbm.xml 2010-02-21 10:31:16 UTC (rev 2875)
+++ trunk/pollen-business/src/main/resources/oldmappings/pollen/0/org/chorem/pollen/business/persistence/VotingListImpl.hbm.xml 2010-02-22 21:16:44 UTC (rev 2876)
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping default-access="field" auto-import="true" package="org.chorem.pollen.business.persistence">
- <class name="org.chorem.pollen.business.persistence.VotingListImpl" table="votingList" node="org.chorem.pollen.business.persistence.VotingListImpl" abstract="false" proxy="org.chorem.pollen.business.persistence.VotingList" >
- <id name="topiaId" type="string" length="255" node="@topiaId"/>
- <version name="topiaVersion" type="long" node="@topiaVersion"/>
- <property name="topiaCreateDate" type="date" node="@topiaCreateDate"/>
- <property name="name" type="text" access="field" column="name" node="name"/>
- <property name="weight" type="double" access="field" column="weight" node="weight"/>
- <bag name="pollAccountPersonToList" inverse="true" lazy="true" cascade="all,delete-orphan" node="pollAccountPersonToList" embed-xml="false">
- <key column="votingList"/>
- <one-to-many class="org.chorem.pollen.business.persistence.PersonToListImpl" node="topiaId" embed-xml="false"/>
- </bag>
- <many-to-one name="poll" class="org.chorem.pollen.business.persistence.PollImpl" column="poll" node="poll/@topiaId" embed-xml="false"/>
- <many-to-one name="vote" class="org.chorem.pollen.business.persistence.VoteImpl" column="vote" node="vote/@topiaId" embed-xml="false"/>
- </class>
+<hibernate-mapping auto-import="true" default-access="field" package="org.chorem.pollen.business.persistence">
+ <class abstract="false" name="org.chorem.pollen.business.persistence.VotingListImpl" node="org.chorem.pollen.business.persistence.VotingListImpl" proxy="org.chorem.pollen.business.persistence.VotingList" table="votingList">
+ <id length="255" name="topiaId" node="@topiaId" type="string"/>
+ <version name="topiaVersion" node="@topiaVersion" type="long"/>
+ <property name="topiaCreateDate" node="@topiaCreateDate" type="date"/>
+ <property access="field" column="name" name="name" node="name" type="text"/>
+ <property access="field" column="weight" name="weight" node="weight" type="double"/>
+ <bag cascade="all,delete-orphan" embed-xml="false" inverse="true" lazy="true" name="pollAccountPersonToList" node="pollAccountPersonToList">
+ <key column="votingList"/>
+ <one-to-many class="org.chorem.pollen.business.persistence.PersonToListImpl" embed-xml="false" node="topiaId"/>
+ </bag>
+ <many-to-one class="org.chorem.pollen.business.persistence.PollImpl" column="poll" embed-xml="false" name="poll" node="poll/@topiaId"/>
+ <many-to-one class="org.chorem.pollen.business.persistence.VoteImpl" column="vote" embed-xml="false" name="vote" node="vote/@topiaId"/>
+ </class>
</hibernate-mapping>
Modified: trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/ChoiceImpl.hbm.xml
===================================================================
--- trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/ChoiceImpl.hbm.xml 2010-02-21 10:31:16 UTC (rev 2875)
+++ trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/ChoiceImpl.hbm.xml 2010-02-22 21:16:44 UTC (rev 2876)
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping default-access="field" auto-import="true" package="org.chorem.pollen.business.persistence">
- <class name="org.chorem.pollen.business.persistence.ChoiceImpl" table="choice" node="org.chorem.pollen.business.persistence.ChoiceImpl" abstract="false" proxy="org.chorem.pollen.business.persistence.Choice" >
- <id name="topiaId" type="string" length="255" node="@topiaId"/>
- <version name="topiaVersion" type="long" node="@topiaVersion"/>
- <property name="topiaCreateDate" type="date" node="@topiaCreateDate"/>
- <property name="name" type="text" access="field" column="name" node="name"/>
- <property name="description" type="text" access="field" column="description" node="description"/>
- <property name="validate" type="java.lang.Boolean" access="field" column="validate" node="validate"/>
- <bag name="voteVoteToChoice" inverse="true" lazy="true" cascade="all,delete-orphan" node="voteVoteToChoice" embed-xml="false">
- <key column="choice"/>
- <one-to-many class="org.chorem.pollen.business.persistence.VoteToChoiceImpl" node="topiaId" embed-xml="false"/>
- </bag>
- <many-to-one name="poll" class="org.chorem.pollen.business.persistence.PollImpl" column="poll" node="poll/@topiaId" embed-xml="false"/>
- </class>
+<hibernate-mapping auto-import="true" default-access="field" package="org.chorem.pollen.business.persistence">
+ <class abstract="false" name="org.chorem.pollen.business.persistence.ChoiceImpl" node="org.chorem.pollen.business.persistence.ChoiceImpl" proxy="org.chorem.pollen.business.persistence.Choice" table="choice">
+ <id length="255" name="topiaId" node="@topiaId" type="string"/>
+ <version name="topiaVersion" node="@topiaVersion" type="long"/>
+ <property name="topiaCreateDate" node="@topiaCreateDate" type="date"/>
+ <property access="field" column="name" name="name" node="name" type="text"/>
+ <property access="field" column="description" name="description" node="description" type="text"/>
+ <property access="field" column="validate" name="validate" node="validate" type="java.lang.Boolean"/>
+ <bag cascade="all,delete-orphan" embed-xml="false" inverse="true" lazy="true" name="voteVoteToChoice" node="voteVoteToChoice">
+ <key column="choice"/>
+ <one-to-many class="org.chorem.pollen.business.persistence.VoteToChoiceImpl" embed-xml="false" node="topiaId"/>
+ </bag>
+ <many-to-one class="org.chorem.pollen.business.persistence.PollImpl" column="poll" embed-xml="false" name="poll" node="poll/@topiaId"/>
+ </class>
</hibernate-mapping>
Modified: trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/ChoiceTypeImpl.hbm.xml
===================================================================
--- trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/ChoiceTypeImpl.hbm.xml 2010-02-21 10:31:16 UTC (rev 2875)
+++ trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/ChoiceTypeImpl.hbm.xml 2010-02-22 21:16:44 UTC (rev 2876)
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping default-access="field" auto-import="true" package="org.chorem.pollen.business.persistence">
- <class name="org.chorem.pollen.business.persistence.ChoiceTypeImpl" table="choiceType" node="org.chorem.pollen.business.persistence.ChoiceTypeImpl" abstract="false" proxy="org.chorem.pollen.business.persistence.ChoiceType" >
- <id name="topiaId" type="string" length="255" node="@topiaId"/>
- <version name="topiaVersion" type="long" node="@topiaVersion"/>
- <property name="topiaCreateDate" type="date" node="@topiaCreateDate"/>
- <property name="name" type="text" access="field" column="name" node="name"/>
- </class>
+<hibernate-mapping auto-import="true" default-access="field" package="org.chorem.pollen.business.persistence">
+ <class abstract="false" name="org.chorem.pollen.business.persistence.ChoiceTypeImpl" node="org.chorem.pollen.business.persistence.ChoiceTypeImpl" proxy="org.chorem.pollen.business.persistence.ChoiceType" table="choiceType">
+ <id length="255" name="topiaId" node="@topiaId" type="string"/>
+ <version name="topiaVersion" node="@topiaVersion" type="long"/>
+ <property name="topiaCreateDate" node="@topiaCreateDate" type="date"/>
+ <property access="field" column="name" name="name" node="name" type="text"/>
+ </class>
</hibernate-mapping>
Modified: trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/CommentImpl.hbm.xml
===================================================================
--- trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/CommentImpl.hbm.xml 2010-02-21 10:31:16 UTC (rev 2875)
+++ trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/CommentImpl.hbm.xml 2010-02-22 21:16:44 UTC (rev 2876)
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping default-access="field" auto-import="true" package="org.chorem.pollen.business.persistence">
- <class name="org.chorem.pollen.business.persistence.CommentImpl" table="comment" node="org.chorem.pollen.business.persistence.CommentImpl" abstract="false" proxy="org.chorem.pollen.business.persistence.Comment" >
- <id name="topiaId" type="string" length="255" node="@topiaId"/>
- <version name="topiaVersion" type="long" node="@topiaVersion"/>
- <property name="topiaCreateDate" type="date" 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"/>
- <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 auto-import="true" default-access="field" package="org.chorem.pollen.business.persistence">
+ <class abstract="false" name="org.chorem.pollen.business.persistence.CommentImpl" node="org.chorem.pollen.business.persistence.CommentImpl" proxy="org.chorem.pollen.business.persistence.Comment" table="comment">
+ <id length="255" name="topiaId" node="@topiaId" type="string"/>
+ <version name="topiaVersion" node="@topiaVersion" type="long"/>
+ <property name="topiaCreateDate" node="@topiaCreateDate" type="date"/>
+ <property access="field" column="text" name="text" node="text" type="text"/>
+ <property access="field" column="postDate" name="postDate" node="postDate" type="java.util.Date"/>
+ <many-to-one class="org.chorem.pollen.business.persistence.PollImpl" column="poll" embed-xml="false" name="poll" node="poll/@topiaId"/>
+ <many-to-one class="org.chorem.pollen.business.persistence.PollAccountImpl" column="pollAccount" embed-xml="false" name="pollAccount" node="pollAccount/@topiaId"/>
+ </class>
</hibernate-mapping>
Modified: trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/PersonListImpl.hbm.xml
===================================================================
--- trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/PersonListImpl.hbm.xml 2010-02-21 10:31:16 UTC (rev 2875)
+++ trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/PersonListImpl.hbm.xml 2010-02-22 21:16:44 UTC (rev 2876)
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping default-access="field" auto-import="true" package="org.chorem.pollen.business.persistence">
- <class name="org.chorem.pollen.business.persistence.PersonListImpl" table="personList" node="org.chorem.pollen.business.persistence.PersonListImpl" abstract="false" proxy="org.chorem.pollen.business.persistence.PersonList" >
- <id name="topiaId" type="string" length="255" node="@topiaId"/>
- <version name="topiaVersion" type="long" node="@topiaVersion"/>
- <property name="topiaCreateDate" type="date" node="@topiaCreateDate"/>
- <property name="name" type="text" access="field" column="name" node="name"/>
- <many-to-one name="owner" class="org.chorem.pollen.business.persistence.UserAccountImpl" column="owner" node="owner/@topiaId" embed-xml="false"/>
- <bag name="pollAccount" inverse="true" lazy="true" node="pollAccount" embed-xml="false">
- <key column="personList"/>
- <one-to-many class="org.chorem.pollen.business.persistence.PollAccountImpl" node="topiaId" embed-xml="false"/>
- </bag>
- </class>
+<hibernate-mapping auto-import="true" default-access="field" package="org.chorem.pollen.business.persistence">
+ <class abstract="false" name="org.chorem.pollen.business.persistence.PersonListImpl" node="org.chorem.pollen.business.persistence.PersonListImpl" proxy="org.chorem.pollen.business.persistence.PersonList" table="personList">
+ <id length="255" name="topiaId" node="@topiaId" type="string"/>
+ <version name="topiaVersion" node="@topiaVersion" type="long"/>
+ <property name="topiaCreateDate" node="@topiaCreateDate" type="date"/>
+ <property access="field" column="name" name="name" node="name" type="text"/>
+ <many-to-one class="org.chorem.pollen.business.persistence.UserAccountImpl" column="owner" embed-xml="false" name="owner" node="owner/@topiaId"/>
+ <bag embed-xml="false" inverse="true" lazy="true" name="pollAccount" node="pollAccount">
+ <key column="personList"/>
+ <one-to-many class="org.chorem.pollen.business.persistence.PollAccountImpl" embed-xml="false" node="topiaId"/>
+ </bag>
+ </class>
</hibernate-mapping>
Modified: trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/PersonToListImpl.hbm.xml
===================================================================
--- trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/PersonToListImpl.hbm.xml 2010-02-21 10:31:16 UTC (rev 2875)
+++ trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/PersonToListImpl.hbm.xml 2010-02-22 21:16:44 UTC (rev 2876)
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping default-access="field" auto-import="true" package="org.chorem.pollen.business.persistence">
- <class name="org.chorem.pollen.business.persistence.PersonToListImpl" table="personToList" node="org.chorem.pollen.business.persistence.PersonToListImpl" abstract="false" proxy="org.chorem.pollen.business.persistence.PersonToList" >
- <id name="topiaId" type="string" length="255" node="@topiaId"/>
- <version name="topiaVersion" type="long" node="@topiaVersion"/>
- <property name="topiaCreateDate" type="date" node="@topiaCreateDate"/>
- <property name="weight" type="java.lang.Double" access="field" column="weight" node="weight"/>
- <property name="hasVoted" type="java.lang.Boolean" access="field" column="hasVoted" node="hasVoted"/>
- <many-to-one name="votingList" class="org.chorem.pollen.business.persistence.VotingListImpl" column="votingList" node="votingList/@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 auto-import="true" default-access="field" package="org.chorem.pollen.business.persistence">
+ <class abstract="false" name="org.chorem.pollen.business.persistence.PersonToListImpl" node="org.chorem.pollen.business.persistence.PersonToListImpl" proxy="org.chorem.pollen.business.persistence.PersonToList" table="personToList">
+ <id length="255" name="topiaId" node="@topiaId" type="string"/>
+ <version name="topiaVersion" node="@topiaVersion" type="long"/>
+ <property name="topiaCreateDate" node="@topiaCreateDate" type="date"/>
+ <property access="field" column="weight" name="weight" node="weight" type="java.lang.Double"/>
+ <property access="field" column="hasVoted" name="hasVoted" node="hasVoted" type="java.lang.Boolean"/>
+ <many-to-one class="org.chorem.pollen.business.persistence.VotingListImpl" column="votingList" embed-xml="false" name="votingList" node="votingList/@topiaId"/>
+ <many-to-one class="org.chorem.pollen.business.persistence.PollAccountImpl" column="pollAccount" embed-xml="false" name="pollAccount" node="pollAccount/@topiaId"/>
+ </class>
</hibernate-mapping>
Modified: trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/PollAccountImpl.hbm.xml
===================================================================
--- trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/PollAccountImpl.hbm.xml 2010-02-21 10:31:16 UTC (rev 2875)
+++ trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/PollAccountImpl.hbm.xml 2010-02-22 21:16:44 UTC (rev 2876)
@@ -1,30 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping default-access="field" auto-import="true" package="org.chorem.pollen.business.persistence">
- <class name="org.chorem.pollen.business.persistence.PollAccountImpl" table="pollAccount" node="org.chorem.pollen.business.persistence.PollAccountImpl" abstract="false" proxy="org.chorem.pollen.business.persistence.PollAccount" >
- <id name="topiaId" type="string" length="255" node="@topiaId"/>
- <version name="topiaVersion" type="long" node="@topiaVersion"/>
- <property name="topiaCreateDate" type="date" node="@topiaCreateDate"/>
- <property name="accountId" type="text" access="field" column="accountId" node="accountId"/>
- <property name="votingId" type="text" access="field" column="votingId" node="votingId"/>
- <property name="email" type="text" access="field" column="email" node="email"/>
- <bag name="votingListPersonToList" inverse="true" lazy="true" cascade="all,delete-orphan" node="votingListPersonToList" embed-xml="false">
- <key column="pollAccount"/>
- <one-to-many class="org.chorem.pollen.business.persistence.PersonToListImpl" node="topiaId" embed-xml="false"/>
- </bag>
- <bag name="pollsCreated" inverse="true" lazy="true" node="pollsCreated" embed-xml="false">
- <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"/>
- </bag>
- <many-to-one name="personList" class="org.chorem.pollen.business.persistence.PersonListImpl" column="personList" node="personList/@topiaId" embed-xml="false"/>
- <many-to-one name="userAccount" class="org.chorem.pollen.business.persistence.UserAccountImpl" column="userAccount" node="userAccount/@topiaId" embed-xml="false"/>
- </class>
+<hibernate-mapping auto-import="true" default-access="field" package="org.chorem.pollen.business.persistence">
+ <class abstract="false" name="org.chorem.pollen.business.persistence.PollAccountImpl" node="org.chorem.pollen.business.persistence.PollAccountImpl" proxy="org.chorem.pollen.business.persistence.PollAccount" table="pollAccount">
+ <id length="255" name="topiaId" node="@topiaId" type="string"/>
+ <version name="topiaVersion" node="@topiaVersion" type="long"/>
+ <property name="topiaCreateDate" node="@topiaCreateDate" type="date"/>
+ <property access="field" column="accountId" name="accountId" node="accountId" type="text"/>
+ <property access="field" column="votingId" name="votingId" node="votingId" type="text"/>
+ <property access="field" column="email" name="email" node="email" type="text"/>
+ <bag cascade="all,delete-orphan" embed-xml="false" inverse="true" lazy="true" name="votingListPersonToList" node="votingListPersonToList">
+ <key column="pollAccount"/>
+ <one-to-many class="org.chorem.pollen.business.persistence.PersonToListImpl" embed-xml="false" node="topiaId"/>
+ </bag>
+ <bag embed-xml="false" inverse="true" lazy="true" name="pollsCreated" node="pollsCreated">
+ <key column="creator"/>
+ <one-to-many class="org.chorem.pollen.business.persistence.PollImpl" embed-xml="false" node="topiaId"/>
+ </bag>
+ <bag embed-xml="false" inverse="true" lazy="true" name="comment" node="comment">
+ <key column="pollAccount"/>
+ <one-to-many class="org.chorem.pollen.business.persistence.CommentImpl" embed-xml="false" node="topiaId"/>
+ </bag>
+ <bag embed-xml="false" inverse="true" lazy="true" name="vote" node="vote">
+ <key column="pollAccount"/>
+ <one-to-many class="org.chorem.pollen.business.persistence.VoteImpl" embed-xml="false" node="topiaId"/>
+ </bag>
+ <many-to-one class="org.chorem.pollen.business.persistence.PersonListImpl" column="personList" embed-xml="false" name="personList" node="personList/@topiaId"/>
+ <many-to-one class="org.chorem.pollen.business.persistence.UserAccountImpl" column="userAccount" embed-xml="false" name="userAccount" node="userAccount/@topiaId"/>
+ </class>
</hibernate-mapping>
Modified: trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/PollImpl.hbm.xml
===================================================================
--- trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/PollImpl.hbm.xml 2010-02-21 10:31:16 UTC (rev 2875)
+++ trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/PollImpl.hbm.xml 2010-02-22 21:16:44 UTC (rev 2876)
@@ -1,50 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping default-access="field" auto-import="true" package="org.chorem.pollen.business.persistence">
- <class name="org.chorem.pollen.business.persistence.PollImpl" table="poll" node="org.chorem.pollen.business.persistence.PollImpl" abstract="false" proxy="org.chorem.pollen.business.persistence.Poll" >
- <id name="topiaId" type="string" length="255" node="@topiaId"/>
- <version name="topiaVersion" type="long" node="@topiaVersion"/>
- <property name="topiaCreateDate" type="date" node="@topiaCreateDate"/>
- <property name="pollId" type="text" access="field" column="pollId" node="pollId"/>
- <property name="title" type="text" access="field" column="title" node="title"/>
- <property name="description" type="text" access="field" column="description" node="description"/>
- <property name="beginChoiceDate" type="java.util.Date" access="field" column="beginChoiceDate" node="beginChoiceDate"/>
- <property name="beginDate" type="java.util.Date" access="field" column="beginDate" node="beginDate"/>
- <property name="endDate" type="java.util.Date" access="field" column="endDate" node="endDate"/>
- <property name="maxChoiceNb" type="java.lang.Integer" access="field" column="maxChoiceNb" node="maxChoiceNb"/>
- <property name="closed" type="java.lang.Boolean" access="field" column="closed" node="closed"/>
- <property name="choiceAddAllowed" type="java.lang.Boolean" access="field" column="choiceAddAllowed" node="choiceAddAllowed"/>
- <property name="anonymousVoteAllowed" type="java.lang.Boolean" access="field" column="anonymousVoteAllowed" node="anonymousVoteAllowed"/>
- <property name="anonymous" type="java.lang.Boolean" access="field" column="anonymous" node="anonymous"/>
- <property name="publicResults" type="java.lang.Boolean" access="field" column="publicResults" node="publicResults"/>
- <property name="continuousResults" type="java.lang.Boolean" access="field" column="continuousResults" node="continuousResults"/>
- <bag name="vote" inverse="true" lazy="true" cascade="all,delete-orphan" node="vote" embed-xml="false">
- <key column="poll"/>
- <one-to-many class="org.chorem.pollen.business.persistence.VoteImpl" node="topiaId" embed-xml="false"/>
- </bag>
- <bag name="choice" inverse="true" lazy="true" cascade="all,delete-orphan" node="choice" embed-xml="false">
- <key column="poll"/>
- <one-to-many class="org.chorem.pollen.business.persistence.ChoiceImpl" node="topiaId" embed-xml="false"/>
- </bag>
- <bag name="result" inverse="true" lazy="true" cascade="all,delete-orphan" node="result" embed-xml="false">
- <key column="poll"/>
- <one-to-many class="org.chorem.pollen.business.persistence.ResultImpl" node="topiaId" embed-xml="false"/>
- </bag>
- <many-to-one name="creator" class="org.chorem.pollen.business.persistence.PollAccountImpl" column="creator" node="creator/@topiaId" embed-xml="false"/>
- <bag name="comment" inverse="true" lazy="true" cascade="all,delete-orphan" node="comment" embed-xml="false">
- <key column="poll"/>
- <one-to-many class="org.chorem.pollen.business.persistence.CommentImpl" node="topiaId" embed-xml="false"/>
- </bag>
- <bag name="preventRule" inverse="true" lazy="true" cascade="all,delete-orphan" node="preventRule" embed-xml="false">
- <key column="poll"/>
- <one-to-many class="org.chorem.pollen.business.persistence.PreventRuleImpl" node="topiaId" embed-xml="false"/>
- </bag>
- <bag name="votingList" inverse="true" lazy="true" cascade="all,delete-orphan" node="votingList" embed-xml="false">
- <key column="poll"/>
- <one-to-many class="org.chorem.pollen.business.persistence.VotingListImpl" node="topiaId" embed-xml="false"/>
- </bag>
- <many-to-one name="pollType" class="org.chorem.pollen.business.persistence.PollTypeImpl" column="pollType" node="pollType/@topiaId" embed-xml="false"/>
- <many-to-one name="choiceType" class="org.chorem.pollen.business.persistence.ChoiceTypeImpl" column="choiceType" node="choiceType/@topiaId" embed-xml="false"/>
- <many-to-one name="voteCounting" class="org.chorem.pollen.business.persistence.VoteCountingImpl" column="voteCounting" node="voteCounting/@topiaId" embed-xml="false"/>
- </class>
+<hibernate-mapping auto-import="true" default-access="field" package="org.chorem.pollen.business.persistence">
+ <class abstract="false" name="org.chorem.pollen.business.persistence.PollImpl" node="org.chorem.pollen.business.persistence.PollImpl" proxy="org.chorem.pollen.business.persistence.Poll" table="poll">
+ <id length="255" name="topiaId" node="@topiaId" type="string"/>
+ <version name="topiaVersion" node="@topiaVersion" type="long"/>
+ <property name="topiaCreateDate" node="@topiaCreateDate" type="date"/>
+ <property access="field" column="pollId" name="pollId" node="pollId" type="text"/>
+ <property access="field" column="title" name="title" node="title" type="text"/>
+ <property access="field" column="description" name="description" node="description" type="text"/>
+ <property access="field" column="beginChoiceDate" name="beginChoiceDate" node="beginChoiceDate" type="java.util.Date"/>
+ <property access="field" column="beginDate" name="beginDate" node="beginDate" type="java.util.Date"/>
+ <property access="field" column="endDate" name="endDate" node="endDate" type="java.util.Date"/>
+ <property access="field" column="maxChoiceNb" name="maxChoiceNb" node="maxChoiceNb" type="java.lang.Integer"/>
+ <property access="field" column="closed" name="closed" node="closed" type="java.lang.Boolean"/>
+ <property access="field" column="choiceAddAllowed" name="choiceAddAllowed" node="choiceAddAllowed" type="java.lang.Boolean"/>
+ <property access="field" column="anonymousVoteAllowed" name="anonymousVoteAllowed" node="anonymousVoteAllowed" type="java.lang.Boolean"/>
+ <property access="field" column="anonymous" name="anonymous" node="anonymous" type="java.lang.Boolean"/>
+ <property access="field" column="publicResults" name="publicResults" node="publicResults" type="java.lang.Boolean"/>
+ <property access="field" column="continuousResults" name="continuousResults" node="continuousResults" type="java.lang.Boolean"/>
+ <bag cascade="all,delete-orphan" embed-xml="false" inverse="true" lazy="true" name="vote" node="vote">
+ <key column="poll"/>
+ <one-to-many class="org.chorem.pollen.business.persistence.VoteImpl" embed-xml="false" node="topiaId"/>
+ </bag>
+ <bag cascade="all,delete-orphan" embed-xml="false" inverse="true" lazy="true" name="choice" node="choice">
+ <key column="poll"/>
+ <one-to-many class="org.chorem.pollen.business.persistence.ChoiceImpl" embed-xml="false" node="topiaId"/>
+ </bag>
+ <bag cascade="all,delete-orphan" embed-xml="false" inverse="true" lazy="true" name="result" node="result">
+ <key column="poll"/>
+ <one-to-many class="org.chorem.pollen.business.persistence.ResultImpl" embed-xml="false" node="topiaId"/>
+ </bag>
+ <many-to-one class="org.chorem.pollen.business.persistence.PollAccountImpl" column="creator" embed-xml="false" name="creator" node="creator/@topiaId"/>
+ <bag cascade="all,delete-orphan" embed-xml="false" inverse="true" lazy="true" name="comment" node="comment">
+ <key column="poll"/>
+ <one-to-many class="org.chorem.pollen.business.persistence.CommentImpl" embed-xml="false" node="topiaId"/>
+ </bag>
+ <bag cascade="all,delete-orphan" embed-xml="false" inverse="true" lazy="true" name="preventRule" node="preventRule">
+ <key column="poll"/>
+ <one-to-many class="org.chorem.pollen.business.persistence.PreventRuleImpl" embed-xml="false" node="topiaId"/>
+ </bag>
+ <bag cascade="all,delete-orphan" embed-xml="false" inverse="true" lazy="true" name="votingList" node="votingList">
+ <key column="poll"/>
+ <one-to-many class="org.chorem.pollen.business.persistence.VotingListImpl" embed-xml="false" node="topiaId"/>
+ </bag>
+ <many-to-one class="org.chorem.pollen.business.persistence.PollTypeImpl" column="pollType" embed-xml="false" name="pollType" node="pollType/@topiaId"/>
+ <many-to-one class="org.chorem.pollen.business.persistence.ChoiceTypeImpl" column="choiceType" embed-xml="false" name="choiceType" node="choiceType/@topiaId"/>
+ <many-to-one class="org.chorem.pollen.business.persistence.VoteCountingImpl" column="voteCounting" embed-xml="false" name="voteCounting" node="voteCounting/@topiaId"/>
+ </class>
</hibernate-mapping>
Modified: trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/PollTypeImpl.hbm.xml
===================================================================
--- trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/PollTypeImpl.hbm.xml 2010-02-21 10:31:16 UTC (rev 2875)
+++ trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/PollTypeImpl.hbm.xml 2010-02-22 21:16:44 UTC (rev 2876)
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping default-access="field" auto-import="true" package="org.chorem.pollen.business.persistence">
- <class name="org.chorem.pollen.business.persistence.PollTypeImpl" table="pollType" node="org.chorem.pollen.business.persistence.PollTypeImpl" abstract="false" proxy="org.chorem.pollen.business.persistence.PollType" >
- <id name="topiaId" type="string" length="255" node="@topiaId"/>
- <version name="topiaVersion" type="long" node="@topiaVersion"/>
- <property name="topiaCreateDate" type="date" node="@topiaCreateDate"/>
- <property name="name" type="text" access="field" column="name" node="name"/>
- </class>
+<hibernate-mapping auto-import="true" default-access="field" package="org.chorem.pollen.business.persistence">
+ <class abstract="false" name="org.chorem.pollen.business.persistence.PollTypeImpl" node="org.chorem.pollen.business.persistence.PollTypeImpl" proxy="org.chorem.pollen.business.persistence.PollType" table="pollType">
+ <id length="255" name="topiaId" node="@topiaId" type="string"/>
+ <version name="topiaVersion" node="@topiaVersion" type="long"/>
+ <property name="topiaCreateDate" node="@topiaCreateDate" type="date"/>
+ <property access="field" column="name" name="name" node="name" type="text"/>
+ </class>
</hibernate-mapping>
Modified: trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/PreventRuleImpl.hbm.xml
===================================================================
--- trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/PreventRuleImpl.hbm.xml 2010-02-21 10:31:16 UTC (rev 2875)
+++ trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/PreventRuleImpl.hbm.xml 2010-02-22 21:16:44 UTC (rev 2876)
@@ -1,16 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping default-access="field" auto-import="true" package="org.chorem.pollen.business.persistence">
- <class name="org.chorem.pollen.business.persistence.PreventRuleImpl" table="preventRule" node="org.chorem.pollen.business.persistence.PreventRuleImpl" abstract="false" proxy="org.chorem.pollen.business.persistence.PreventRule" >
- <id name="topiaId" type="string" length="255" node="@topiaId"/>
- <version name="topiaVersion" type="long" node="@topiaVersion"/>
- <property name="topiaCreateDate" type="date" node="@topiaCreateDate"/>
- <property name="scope" type="text" access="field" column="scope" node="scope"/>
- <property name="sensibility" type="java.lang.Integer" access="field" column="sensibility" node="sensibility"/>
- <property name="repeated" type="java.lang.Boolean" access="field" column="repeated" node="repeated"/>
- <property name="active" type="java.lang.Boolean" access="field" column="active" node="active"/>
- <property name="oneTime" type="java.lang.Boolean" access="field" column="oneTime" node="oneTime"/>
- <property name="method" type="text" access="field" column="method" node="method"/>
- <many-to-one name="poll" class="org.chorem.pollen.business.persistence.PollImpl" column="poll" node="poll/@topiaId" embed-xml="false"/>
- </class>
+<hibernate-mapping auto-import="true" default-access="field" package="org.chorem.pollen.business.persistence">
+ <class abstract="false" name="org.chorem.pollen.business.persistence.PreventRuleImpl" node="org.chorem.pollen.business.persistence.PreventRuleImpl" proxy="org.chorem.pollen.business.persistence.PreventRule" table="preventRule">
+ <id length="255" name="topiaId" node="@topiaId" type="string"/>
+ <version name="topiaVersion" node="@topiaVersion" type="long"/>
+ <property name="topiaCreateDate" node="@topiaCreateDate" type="date"/>
+ <property access="field" column="scope" name="scope" node="scope" type="text"/>
+ <property access="field" column="sensibility" name="sensibility" node="sensibility" type="java.lang.Integer"/>
+ <property access="field" column="repeated" name="repeated" node="repeated" type="java.lang.Boolean"/>
+ <property access="field" column="active" name="active" node="active" type="java.lang.Boolean"/>
+ <property access="field" column="oneTime" name="oneTime" node="oneTime" type="java.lang.Boolean"/>
+ <property access="field" column="method" name="method" node="method" type="text"/>
+ <many-to-one class="org.chorem.pollen.business.persistence.PollImpl" column="poll" embed-xml="false" name="poll" node="poll/@topiaId"/>
+ </class>
</hibernate-mapping>
Modified: trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/ResultImpl.hbm.xml
===================================================================
--- trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/ResultImpl.hbm.xml 2010-02-21 10:31:16 UTC (rev 2875)
+++ trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/ResultImpl.hbm.xml 2010-02-22 21:16:44 UTC (rev 2876)
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping default-access="field" auto-import="true" package="org.chorem.pollen.business.persistence">
- <class name="org.chorem.pollen.business.persistence.ResultImpl" table="result" node="org.chorem.pollen.business.persistence.ResultImpl" abstract="false" proxy="org.chorem.pollen.business.persistence.Result" >
- <id name="topiaId" type="string" length="255" node="@topiaId"/>
- <version name="topiaVersion" type="long" node="@topiaVersion"/>
- <property name="topiaCreateDate" type="date" node="@topiaCreateDate"/>
- <property name="name" type="text" access="field" column="name" node="name"/>
- <property name="ResultValue" type="text" access="field" column="resultValue" node="ResultValue"/>
- <property name="byGroup" type="java.lang.Boolean" access="field" column="byGroup" node="byGroup"/>
- <many-to-one name="poll" class="org.chorem.pollen.business.persistence.PollImpl" column="poll" node="poll/@topiaId" embed-xml="false"/>
- <many-to-one name="voteCounting" class="org.chorem.pollen.business.persistence.VoteCountingImpl" column="voteCounting" node="voteCounting/@topiaId" embed-xml="false"/>
- </class>
+<hibernate-mapping auto-import="true" default-access="field" package="org.chorem.pollen.business.persistence">
+ <class abstract="false" name="org.chorem.pollen.business.persistence.ResultImpl" node="org.chorem.pollen.business.persistence.ResultImpl" proxy="org.chorem.pollen.business.persistence.Result" table="result">
+ <id length="255" name="topiaId" node="@topiaId" type="string"/>
+ <version name="topiaVersion" node="@topiaVersion" type="long"/>
+ <property name="topiaCreateDate" node="@topiaCreateDate" type="date"/>
+ <property access="field" column="name" name="name" node="name" type="text"/>
+ <property access="field" column="resultValue" name="ResultValue" node="ResultValue" type="text"/>
+ <property access="field" column="byGroup" name="byGroup" node="byGroup" type="java.lang.Boolean"/>
+ <many-to-one class="org.chorem.pollen.business.persistence.PollImpl" column="poll" embed-xml="false" name="poll" node="poll/@topiaId"/>
+ <many-to-one class="org.chorem.pollen.business.persistence.VoteCountingImpl" column="voteCounting" embed-xml="false" name="voteCounting" node="voteCounting/@topiaId"/>
+ </class>
</hibernate-mapping>
Modified: trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/UserAccountImpl.hbm.xml
===================================================================
--- trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/UserAccountImpl.hbm.xml 2010-02-21 10:31:16 UTC (rev 2875)
+++ trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/UserAccountImpl.hbm.xml 2010-02-22 21:16:44 UTC (rev 2876)
@@ -1,24 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping default-access="field" auto-import="true" package="org.chorem.pollen.business.persistence">
- <class name="org.chorem.pollen.business.persistence.UserAccountImpl" table="userAccount" node="org.chorem.pollen.business.persistence.UserAccountImpl" abstract="false" proxy="org.chorem.pollen.business.persistence.UserAccount" >
- <id name="topiaId" type="string" length="255" node="@topiaId"/>
- <version name="topiaVersion" type="long" node="@topiaVersion"/>
- <property name="topiaCreateDate" type="date" node="@topiaCreateDate"/>
- <property name="login" type="text" access="field" column="login" node="login"/>
- <property name="password" type="text" access="field" column="password" node="password"/>
- <property name="firstName" type="text" access="field" column="firstName" node="firstName"/>
- <property name="lastName" type="text" access="field" column="lastName" node="lastName"/>
- <property name="administrator" type="java.lang.Boolean" access="field" column="administrator" node="administrator"/>
- <property name="language" type="text" access="field" column="language" node="language"/>
- <property name="email" type="text" access="field" column="email" node="email"/>
- <bag name="favoriteList" inverse="true" lazy="true" node="favoriteList" embed-xml="false">
- <key column="owner"/>
- <one-to-many class="org.chorem.pollen.business.persistence.PersonListImpl" node="topiaId" embed-xml="false"/>
- </bag>
- <bag name="pollAccount" inverse="true" lazy="true" node="pollAccount" embed-xml="false">
- <key column="userAccount"/>
- <one-to-many class="org.chorem.pollen.business.persistence.PollAccountImpl" node="topiaId" embed-xml="false"/>
- </bag>
- </class>
+<hibernate-mapping auto-import="true" default-access="field" package="org.chorem.pollen.business.persistence">
+ <class abstract="false" name="org.chorem.pollen.business.persistence.UserAccountImpl" node="org.chorem.pollen.business.persistence.UserAccountImpl" proxy="org.chorem.pollen.business.persistence.UserAccount" table="userAccount">
+ <id length="255" name="topiaId" node="@topiaId" type="string"/>
+ <version name="topiaVersion" node="@topiaVersion" type="long"/>
+ <property name="topiaCreateDate" node="@topiaCreateDate" type="date"/>
+ <property access="field" column="login" name="login" node="login" type="text"/>
+ <property access="field" column="password" name="password" node="password" type="text"/>
+ <property access="field" column="firstName" name="firstName" node="firstName" type="text"/>
+ <property access="field" column="lastName" name="lastName" node="lastName" type="text"/>
+ <property access="field" column="administrator" name="administrator" node="administrator" type="java.lang.Boolean"/>
+ <property access="field" column="language" name="language" node="language" type="text"/>
+ <property access="field" column="email" name="email" node="email" type="text"/>
+ <bag embed-xml="false" inverse="true" lazy="true" name="favoriteList" node="favoriteList">
+ <key column="owner"/>
+ <one-to-many class="org.chorem.pollen.business.persistence.PersonListImpl" embed-xml="false" node="topiaId"/>
+ </bag>
+ <bag embed-xml="false" inverse="true" lazy="true" name="pollAccount" node="pollAccount">
+ <key column="userAccount"/>
+ <one-to-many class="org.chorem.pollen.business.persistence.PollAccountImpl" embed-xml="false" node="topiaId"/>
+ </bag>
+ </class>
</hibernate-mapping>
Modified: trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/VoteCountingImpl.hbm.xml
===================================================================
--- trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/VoteCountingImpl.hbm.xml 2010-02-21 10:31:16 UTC (rev 2875)
+++ trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/VoteCountingImpl.hbm.xml 2010-02-22 21:16:44 UTC (rev 2876)
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping default-access="field" auto-import="true" package="org.chorem.pollen.business.persistence">
- <class name="org.chorem.pollen.business.persistence.VoteCountingImpl" table="voteCounting" node="org.chorem.pollen.business.persistence.VoteCountingImpl" abstract="false" proxy="org.chorem.pollen.business.persistence.VoteCounting" >
- <id name="topiaId" type="string" length="255" node="@topiaId"/>
- <version name="topiaVersion" type="long" node="@topiaVersion"/>
- <property name="topiaCreateDate" type="date" node="@topiaCreateDate"/>
- <property name="name" type="text" access="field" column="name" node="name"/>
- </class>
+<hibernate-mapping auto-import="true" default-access="field" package="org.chorem.pollen.business.persistence">
+ <class abstract="false" name="org.chorem.pollen.business.persistence.VoteCountingImpl" node="org.chorem.pollen.business.persistence.VoteCountingImpl" proxy="org.chorem.pollen.business.persistence.VoteCounting" table="voteCounting">
+ <id length="255" name="topiaId" node="@topiaId" type="string"/>
+ <version name="topiaVersion" node="@topiaVersion" type="long"/>
+ <property name="topiaCreateDate" node="@topiaCreateDate" type="date"/>
+ <property access="field" column="name" name="name" node="name" type="text"/>
+ </class>
</hibernate-mapping>
Modified: trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/VoteImpl.hbm.xml
===================================================================
--- trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/VoteImpl.hbm.xml 2010-02-21 10:31:16 UTC (rev 2875)
+++ trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/VoteImpl.hbm.xml 2010-02-22 21:16:44 UTC (rev 2876)
@@ -1,19 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping default-access="field" auto-import="true" package="org.chorem.pollen.business.persistence">
- <class name="org.chorem.pollen.business.persistence.VoteImpl" table="vote" node="org.chorem.pollen.business.persistence.VoteImpl" abstract="false" proxy="org.chorem.pollen.business.persistence.Vote" >
- <id name="topiaId" type="string" length="255" node="@topiaId"/>
- <version name="topiaVersion" type="long" node="@topiaVersion"/>
- <property name="topiaCreateDate" type="date" node="@topiaCreateDate"/>
- <property name="weight" type="java.lang.Double" access="field" column="weight" node="weight"/>
- <property name="comment" type="text" access="field" column="comment" node="comment"/>
- <property name="anonymous" type="java.lang.Boolean" access="field" column="anonymous" node="anonymous"/>
- <bag name="choiceVoteToChoice" inverse="true" lazy="true" cascade="all,delete-orphan" node="choiceVoteToChoice" embed-xml="false">
- <key column="vote"/>
- <one-to-many class="org.chorem.pollen.business.persistence.VoteToChoiceImpl" node="topiaId" embed-xml="false"/>
- </bag>
- <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"/>
- <many-to-one name="votingList" class="org.chorem.pollen.business.persistence.VotingListImpl" column="votingList" node="votingList/@topiaId" embed-xml="false"/>
- </class>
+<hibernate-mapping auto-import="true" default-access="field" package="org.chorem.pollen.business.persistence">
+ <class abstract="false" name="org.chorem.pollen.business.persistence.VoteImpl" node="org.chorem.pollen.business.persistence.VoteImpl" proxy="org.chorem.pollen.business.persistence.Vote" table="vote">
+ <id length="255" name="topiaId" node="@topiaId" type="string"/>
+ <version name="topiaVersion" node="@topiaVersion" type="long"/>
+ <property name="topiaCreateDate" node="@topiaCreateDate" type="date"/>
+ <property access="field" column="weight" name="weight" node="weight" type="java.lang.Double"/>
+ <property access="field" column="comment" name="comment" node="comment" type="text"/>
+ <property access="field" column="anonymous" name="anonymous" node="anonymous" type="java.lang.Boolean"/>
+ <bag cascade="all,delete-orphan" embed-xml="false" inverse="true" lazy="true" name="choiceVoteToChoice" node="choiceVoteToChoice">
+ <key column="vote"/>
+ <one-to-many class="org.chorem.pollen.business.persistence.VoteToChoiceImpl" embed-xml="false" node="topiaId"/>
+ </bag>
+ <many-to-one class="org.chorem.pollen.business.persistence.PollImpl" column="poll" embed-xml="false" name="poll" node="poll/@topiaId"/>
+ <many-to-one class="org.chorem.pollen.business.persistence.PollAccountImpl" column="pollAccount" embed-xml="false" name="pollAccount" node="pollAccount/@topiaId"/>
+ <many-to-one class="org.chorem.pollen.business.persistence.VotingListImpl" column="votingList" embed-xml="false" name="votingList" node="votingList/@topiaId"/>
+ </class>
</hibernate-mapping>
Modified: trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/VoteToChoiceImpl.hbm.xml
===================================================================
--- trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/VoteToChoiceImpl.hbm.xml 2010-02-21 10:31:16 UTC (rev 2875)
+++ trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/VoteToChoiceImpl.hbm.xml 2010-02-22 21:16:44 UTC (rev 2876)
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping default-access="field" auto-import="true" package="org.chorem.pollen.business.persistence">
- <class name="org.chorem.pollen.business.persistence.VoteToChoiceImpl" table="voteToChoice" node="org.chorem.pollen.business.persistence.VoteToChoiceImpl" abstract="false" proxy="org.chorem.pollen.business.persistence.VoteToChoice" >
- <id name="topiaId" type="string" length="255" node="@topiaId"/>
- <version name="topiaVersion" type="long" node="@topiaVersion"/>
- <property name="topiaCreateDate" type="date" node="@topiaCreateDate"/>
- <property name="voteValue" type="java.lang.Integer" access="field" column="voteValue" node="voteValue"/>
- <many-to-one name="vote" class="org.chorem.pollen.business.persistence.VoteImpl" column="vote" node="vote/@topiaId" embed-xml="false" />
- <many-to-one name="choice" class="org.chorem.pollen.business.persistence.ChoiceImpl" column="choice" node="choice/@topiaId" embed-xml="false" />
- </class>
+<hibernate-mapping auto-import="true" default-access="field" package="org.chorem.pollen.business.persistence">
+ <class abstract="false" name="org.chorem.pollen.business.persistence.VoteToChoiceImpl" node="org.chorem.pollen.business.persistence.VoteToChoiceImpl" proxy="org.chorem.pollen.business.persistence.VoteToChoice" table="voteToChoice">
+ <id length="255" name="topiaId" node="@topiaId" type="string"/>
+ <version name="topiaVersion" node="@topiaVersion" type="long"/>
+ <property name="topiaCreateDate" node="@topiaCreateDate" type="date"/>
+ <property access="field" column="voteValue" name="voteValue" node="voteValue" type="java.lang.Integer"/>
+ <many-to-one class="org.chorem.pollen.business.persistence.VoteImpl" column="vote" embed-xml="false" name="vote" node="vote/@topiaId"/>
+ <many-to-one class="org.chorem.pollen.business.persistence.ChoiceImpl" column="choice" embed-xml="false" name="choice" node="choice/@topiaId"/>
+ </class>
</hibernate-mapping>
Modified: trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/VotingListImpl.hbm.xml
===================================================================
--- trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/VotingListImpl.hbm.xml 2010-02-21 10:31:16 UTC (rev 2875)
+++ trunk/pollen-business/src/main/resources/oldmappings/pollen/1.1/org/chorem/pollen/business/persistence/VotingListImpl.hbm.xml 2010-02-22 21:16:44 UTC (rev 2876)
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping default-access="field" auto-import="true" package="org.chorem.pollen.business.persistence">
- <class name="org.chorem.pollen.business.persistence.VotingListImpl" table="votingList" node="org.chorem.pollen.business.persistence.VotingListImpl" abstract="false" proxy="org.chorem.pollen.business.persistence.VotingList" >
- <id name="topiaId" type="string" length="255" node="@topiaId"/>
- <version name="topiaVersion" type="long" node="@topiaVersion"/>
- <property name="topiaCreateDate" type="date" node="@topiaCreateDate"/>
- <property name="name" type="text" access="field" column="name" node="name"/>
- <property name="weight" type="java.lang.Double" access="field" column="weight" node="weight"/>
- <bag name="pollAccountPersonToList" inverse="true" lazy="true" cascade="all,delete-orphan" node="pollAccountPersonToList" embed-xml="false">
- <key column="votingList"/>
- <one-to-many class="org.chorem.pollen.business.persistence.PersonToListImpl" node="topiaId" embed-xml="false"/>
- </bag>
- <many-to-one name="poll" class="org.chorem.pollen.business.persistence.PollImpl" column="poll" node="poll/@topiaId" embed-xml="false"/>
- <many-to-one name="vote" class="org.chorem.pollen.business.persistence.VoteImpl" column="vote" node="vote/@topiaId" embed-xml="false"/>
- </class>
+<hibernate-mapping auto-import="true" default-access="field" package="org.chorem.pollen.business.persistence">
+ <class abstract="false" name="org.chorem.pollen.business.persistence.VotingListImpl" node="org.chorem.pollen.business.persistence.VotingListImpl" proxy="org.chorem.pollen.business.persistence.VotingList" table="votingList">
+ <id length="255" name="topiaId" node="@topiaId" type="string"/>
+ <version name="topiaVersion" node="@topiaVersion" type="long"/>
+ <property name="topiaCreateDate" node="@topiaCreateDate" type="date"/>
+ <property access="field" column="name" name="name" node="name" type="text"/>
+ <property access="field" column="weight" name="weight" node="weight" type="java.lang.Double"/>
+ <bag cascade="all,delete-orphan" embed-xml="false" inverse="true" lazy="true" name="pollAccountPersonToList" node="pollAccountPersonToList">
+ <key column="votingList"/>
+ <one-to-many class="org.chorem.pollen.business.persistence.PersonToListImpl" embed-xml="false" node="topiaId"/>
+ </bag>
+ <many-to-one class="org.chorem.pollen.business.persistence.PollImpl" column="poll" embed-xml="false" name="poll" node="poll/@topiaId"/>
+ <many-to-one class="org.chorem.pollen.business.persistence.VoteImpl" column="vote" embed-xml="false" name="vote" node="vote/@topiaId"/>
+ </class>
</hibernate-mapping>
Modified: trunk/pollen-business/src/main/xmi/pollen.zargo
===================================================================
--- trunk/pollen-business/src/main/xmi/pollen.zargo 2010-02-21 10:31:16 UTC (rev 2875)
+++ trunk/pollen-business/src/main/xmi/pollen.zargo 2010-02-22 21:16:44 UTC (rev 2876)
@@ -1,97 +1,109 @@
-PKZ�P;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��
+PK�V<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�PKZ�P;pollen_DC_Pollen.pgml�]mo�F���_�k\�(�pH����,
-�ݠM,��,ю�ʒ!�Isq�R29�9�!9!�E��Dʞg�9|漾�����x�[n�o.�K�b���r}��������䯗߽��������&���������w?O.�^.��~E��"�ͷ��}�m������~��/J�Y,g������~�_����o����m��i�����Y�v���k�o��t�S�O�����s�f���H����W���W������w����=�o.�����f����]�^�o7O����/��O������?�ً ���y!����8��c�[ޮ�7w��.�a����f��1�cy���y������/���0���ۧ}\|;�{?m�7��tsM�o�[�V|�?�7����ŗO�}�}����O,^zx�x��j6�O��e�������l�����m<�����Xؐ�ٖ�����ǯo.8��?}Y.���^��Χxy�i�ܓ}�����=��+�!/k2���Y�^�
-�An~�da���+U
-�%|��-W7]���Ɨcty�����E�LP.� Ȣ � A�����5K.[q&|1���}qH^G �����u�g��3Y�d����'w�5�+�}^m��w���j9s�ڶ����j���|�n�� �8��v���r>;(�M��J����_V���������?��O��ٰ��x�A�?�E�1����g_`ۖ�c
-!
-��a�A�2y6^�盧���b��i�����f��8���o?�9�G3�}�̜��ה�#Uf�cdf�p�!7s �)�C�m5��݂6�6�p�w�\�S��l�Z���̮y����7�6Hۑ���Y-���F������L��r�4��ʈ��r�����CU9Z�,�}ԩ�ߩ�с�\�uU�x��rE�/q�@@T�WB�h�u�p���������Ï�ɫ�o���E�M*�"�hD;E��f��6�;Re;D*�
-��a�\�H��c&N[^���*�Q��� 3�|�m��~1a�s�'�#���r�p�'�$���4qlei�"MQc������DȪOL$N���#�%+�$n���#DZG�x*�>��>1$�Ċ�$߉rc�w���xk�C�}b���g3G�Sf��:|b�����9�����>1q��(=����c���K���?3<T�S�b2���0H-ԓb�J�;�X��%�QW��h�b��)�Z� b�n���k3
-b2�Ru�,D��g�ݗ���#����v����w��n�G�n_w�A�MG��W��h�
-�!�F��g���z�����!��lV�l]�yP�9�$��OR _�?��kHxX�6U%|h�>#�����t{�����^Lh�K�Q��+b��3��w*����� Kԗe ���gY�e��p�ΐ�j4�xXt:���h� � @��F0+�*��tj,#�t�1��"��e�B,C2$��I�CIz�.����0R�b�ٶY�a�o���b%�!�?k�[�1ܷFa��(�bꥷG0��ƁLD�Q��D�oI����&"5~*�2��-~Q�p�v�T��-��V��8^��%��.9g0�0�J�BF�G��+�1CD�Sޕ��+�h�v��HO�,�9o
-�u�hCR�o������f9���G8�<��Jęq�#0��D��`�b��u
-u�^�:�
-�� T�>@�f��/�����>�Vig`�y����W�]�0�}�����Hg�t�NE�j��Z�6_��.;�%ء�s��'��֛�ׇ����>>z�ɒ�g�G�/B_o���1@��(�)ޏO����wO�}-��GM%ೱD7�|��r�ą���GNA�9��HC���r큳2�R\ld%������3\�0|1�4�̓��P�l��[�h�.)d�pDEY��$KB6`f9QT���3\��Y�,f��E�L�.Q2\1��"1���d��a$-C��ax�3\R�5.���"��r���g���vD�i�����y.��� =Z8���pmE݉��"[8���Il�Awҷ,��.H�Qt�D�^z�q����r apT7��hO��$�P�@�H��y��Lu�Y�K��%�QS݊�hs\���J�J/���u�6.�#J�����~�P/:Ċ�/��o��kn-)�cl������?K��� /e��]��e�?�j�1L�� I%�,�o�䏡v�1�٤ObZ���Z鏁:Z��E�ch�?�G��ƣ?&E\㏡S*�C�ẇx�۬��1��YGg�s��k�H+�1|�f�K�?&ٍ���-���C�ǰ��h��V�a@ё��6+�9*S7f^sD+�1̰�h�~�RL���j�������֡�I��6�e
-bv��6�:��s�����v�l���[��5�ŏ�y�����f{�'w�d����G�^%��7�o�}��K@��_�Ľr�T���?�����'6���o6�N��}�"��˿n�eo�m��J5�ۛ��c�_qw���SX�:д� �~Z헏ܐ�_���TO�o|܁q8N�.�w���z��-XW{@�o�{Չ-hQ��W�lw�Q�;��=@42���ҒNG�A�/<�a:s�����+�#���f���m����b&�
-�.�O���~��^L�a�tr�f�
-���O�Ļ
-�M�/"�b1�!�{w��^�ALj='�����^ �i�yE�m<�,v�+�&t�f;b@۹�!�z@N.�J[:�1���t�Rr1ԭ�1��hB�������G�U8����u�����hר�V�v�-_4:�,�����5�a�+ַ���q3ʆw0����b�a���%�=�Qӂaj��j���@�Ҵ�SM�YЧDӒͨ�i�[�1���daL�=?�M�0C���g�k�>c@��"�T���b$�3��š���g2�]<\��h/��?��F3�2����؎e��X&��2�x��A�|VD��;�Y,��U^�E2��E2����v�q̠�qL�;`;��/�Y��[�T3�w�� Rs����&�M=�����e�%x�Q�2'���4ri�ܽ�M�mr畓;�#w����G���Β��,nuƂu�:K�:���;`�h��2�����F��OeF�RwW ^�o���F��J��-��'c����Lcx���]�:�C�Wߤ�%hYvH�ˍ�]�(R�ݥ�N�x�D^�4�b^�42��$��� ��TzZTHOK�$��fA� )ʻ����YKPS�^�Z��8��))j�Ȃ��Ij�����A�u���٨Ǐ�LS�
-ij�) 2�(7%}OT;�*���jV�MW;X9J£���!+�VM�$�)V� �Y9��y{�4Q�R֊� mGY*
-*k�W��8k-���v�QtT8
-R��5�VD@�88#5�R�z��V�p�v�U��=��HI^S-���L���Ӫ4�
-A�I�h>��S�i��j*��T�Sr����˪�ղu��7�\�r.{�8�.�쮣�����s�AX������¿��I�l-�0k��Vz/&Kg��.���) ��NE=���f���g��u�I�P�K�!�Y��θ�#��n�Y��"T����-w�M�*zAdQ���
-7a�$�I�����n�r����/� %c�fc�w7!?/&gE����h�E�������ÚB�L\[.��
-B�V!�;,�K��+�Ea��(qY�Ds����cj�Gx�8/8j��E�o������yPa@�t����y������8�
-yPI�����0Ө�2������hX��~�������Ћ�A����9@
-����˭�����X���;�d�`�ڳ6jS5v69��.�����j�����jv���4� ����^��w5+�b3M��`�0��-
-u�^�E�xW�;��M�\����8�4�2��T}&:����q�U���bm�=�4���d��d�dϠ}�}�GF��>�`��##٫� �����@#���=2����`����^Bu�!+!{��B���}�\O�ƕ��fl��j�d��A�N�p2W+?���,�VRWqD5+$�rde74V�TYە��ތjY��U~��zJ�:��Ii� @��HJ�:��I��~`�$yL�:!��8�Z2%�2�Z5%}O����?�}Zi� �c�S# z4r�
-?-��RL�)ղ����:#�e�'�ݘjVR��lGY�IT2ٺp�yR��9թ�1��-�V��m雒�%��j� }��L��ݜ�2}K����oѧt���UyU������n���9]T�钑&P������+9�?r�vo��zġ�q4�4��o�E�����p�z��?c���|��\2'ƚ鱆|�h�_��ެ�ˇZhz�#@��=�z��x�i����鸴��k��b:n�YgwS�~R��g�����_fr��#�Et;cs~�#aһ����\u��w��[���#(jL��4I�yw�o͝.�N?o�]w���+��^�(��t���+����s�8���Ṯt��J��H^�^nF��JO�|�T���HZ����Pr�p�s�µ���?�l�8:f�J��U���7?:��;ێ���Δ[���]?�A!��CWt��6t�g>�R]���W�k+�}�<@�r�$��Ϝ3�1[=Ű_��G�|6w-�rA����<l��C��/���C��/��('��R�zb)A�%J���%����$�[ETsN�6�R��'�SN���-�}bƸ$����O�ȟ3�o�Un{�rTG-�|�y�Y���"��-CaQh�wT�U�U�}���;��YE���X,8TE�gU�8�(E�:��76
-�Ϊr��*(8�$S)?TS2g��I�uR�֍�hݪ>[�n���Q%[7�gȺu����QU�i;J�>S*ف[�U�]G�A�Pt�7��&;�}C@C]H��n��gΪR}C��>J�
-��Hq�zy�*����W�9)�D5��ޘ��b=?tZ6L�
-�dOl���4D'�l�Y}�<�N������6-:as!8����XV�HG�9�X&�Vp�fϢg��7W���S���)[{U�͍5s ���sV?�f���%t��N+��q�
-\Bg;�.����n�b���s��i��k�Ꞡ�]�
-}[t����&b�4�MV�$Pc��ˁ�s:�2���7�J�\v�,�̿Ro��F\>�?�l�>��}��7�C�"gI_���gn��j�sb�,�;�u����9��,���['ڑ����Wmg�3��Y��W�?5��M�_�:��Q=:^^�� ��t�K�����Farರ�fA�Y o��"�Ӷ�.�s��ac�Wt��mU^��9�x��\MЫ���Ǽ�t�>�F�ST���z�����8�=�s����{��9xfI�0��%�c��iX��x�]�������^L�C��$猰�Zt���i�J0*�����h��yn��܃�R�F�ztH�Sڣ���v��!�R.�����RɁu�:�&������v�u��8��&E;��V�H��~�w���*8�v�s$ƍ3��h�qź���� Za�|��6��D�t!�J�.샼em0�zW�Ǹ�j�G�A���±!*�ҥCQ8��5�p�[��Y�C���.W8�f�)��J$�n�X��!&�'@�e�H�
-��n�F$��P(�sWS�i�`�k��d��_�s����B����NwA��Nr�D�S��i��ʨw���M��Ȃ�:lz�A�|���o;��?��uYp�1jj����)v=jJՃnB��((�Jɑ=�j�f�BP���0�M��7tdϏ��6��T��������칹u+�I�!�<ȝ��΅��B�qχ���^n��h$�"�y�V��$j<S�r(� ��3��$DZ0���������,�$wqSMH߃�I���W-�Z6�!�Լ1r0oP/�n�[k��4e���Fn�y벏[��~EW�T�l7J�+��Q��<�I,3SU#рUM eʪF�n�Z��e�FJ[���1n����@Ub E1��)�bVyH1�s�q��O.u�|,'�Y&�M�@xp�)@5N����<Y�P>L�-����eǖW@2����^�"��[��
-�J�&�P���+P�+@5^�"TmH߽� �����h>����F�+ƭ��
-�� @�[ȸ���~P�C� $�QzPrV�[�}��@�!��U�`���6�@��AX�j�3S�>��A8���9>�� �t�k�)�?�m�}�����y�6r�t1)dq�0��vާ�V���`uf��y��l��j.���eާ9����>���}���zާ�˼Osȁ�8���>���}���vާ�zާϔb�tJSY���x���_|��i��望f���T��Ol73l��望v�l���ʤ]bh:��>@�
-�Nٰ �u��Hk�o�2� �.��5�f��P�܌�忴3>w��
--�9r�˞Zf:��]�����`�l�hy#�nߛ�d����\0p2W]8o��#����m2|�d��%���r������sg[ s7�>��ղ���lM:��<���܍���>�swq+϶��5F��B�����t�݁��|u<�>�sw
-q�"_��m:��X��,�0��Ƴ��a�Gi�9v5�W����Xs�:��\T]��#LZT<9��?�&xF�%��V�e�SQ�w�V�^�UV� "�n�^TY��ӱZ��j�HS�糱Z�3�Ue�^�@�C�`�p�ik��(������6�!�^@
-�V/ٍ�D�[�k��j���Xժj�8:߂�
-�V/ٍ��V�E_�U����X��@�^���;�(�^�ɷ�v4�_��]E��%�Q\����R�iy0H[�GŻޟ\�Gz8���mU^�łH?�ڛ���\{����6��M6��gʓ~N�7F�]�ڤ���m�o9D��lEU����;�3�z�֬���Y&t,�Q�f,��E@��vKC�p��=�v^���P���)�����s��t���^���;�� ��������W��
-����;�� �m�\�qG1c��ȁ��'r���N�N�pES�O���,�9�^!�Pt��AB������ΕP�қ�T�/T-l��j���h����w��Mz:H��=�N�z4L�d�;��&=����&z��PU敔������x��P��h^'��i���3f�O�N��@�H�:-2Ҽ�{`�摑�Et\ d�y5��6�#�&�K��j�<�r3�WsN^S4調ج���G��@��i�U'!Z:Ҽ�.�t�y5��:ͣ#ͻ�"bKG�Wsl�<�mҼ�,��`E����h���G'KD��l��ir�*x^i^]�ח�G�Wy5G�z4�d��u@�z:��=�N�z4�Tد�����^O�!5�����3�0ST�3�((!z��Iw-
-��o�?�.��PK1f��^��PKZ�P;pollen.todo�����Q(K-*���S�UP2�3PRH�K�O��K ����Z()��q�(��;�D�*���+G���*(�8z)%)J
-@% ���,.2���E���9e�)�E�%��� Y,B3PK4�[-m�PKZ�P;pollen_profile.profile�����Q(K-*���S�UP2�3PRH�K�O��K ����Z()��qq��e��q��ÙPK7Rp:BPKZ�P;
-pollen.xmi�]듣6����ڪN�^{x?��ٲ�����ܩ�$w�
-���3��_�������dD��[�GG��<t��/�����=�(��`���A\38����?�l��������~�}{����C��>����{�I���n�5������ˇY�M��!k�����8�L�f��H��4[o>�I�`>��a6�~o�F�g�����s|�A��������FI�v����q6��0�!�YF��F~��<�t�?����ʿN���X�?i?�"���Н���������u.J3�x������~:��3H�{�~�|ϛ�<�Ǭ����?~�
-1М�'�r0t�~Vp�����x93��(.�߽?�酅G�0H����2�����:�ͦf�)�a�Eu>i�K���xE�ɺ <�x�� <
-��J�^ؗѕ��S��� ����>@��|'T���1̾�#���C�~��Z?^�q��y��C��aƹEv;���GX4zi���ĸM3�bK�)y�(��f;PbԒ%��������5$�Dh��~yW�u�K��R��&�����9
-7������û%�ˤT�?�ٻ6�����K¿�4���O���]Ω(��2�G�COl�H��ڦ�x"'
-��r:������5���酝����!�tq��ذ�KK��jo\�9rn�ރ8F��+�|.��
-���nS6]�QQ�{�^?���ʜ�����b�o�{?��}z8�{����W�oŖ�C'�!�Sg&�Y:[������Ayü.��i�j����� �����"
-�P�,5뾞��9Ly��Ar��(_&I���� �E1�m�)�+M�i\O��g�ş�l�F����Re �4��q��`��ˋ��k�`R}O�#�ٌ�N�3�ߞx�x:������խX4���OI�Q6غ�d��J�5ų�N�������P�����$��T�5r.ߑMf�@o�s�K�D�˹�@G�T/�$����(�HT�5�Qu��w�����_5��N����a��k�a��0p���`@L��]״��d�A6C�\�j��&x{?5M&� �t98�ч����X
-��o��z��j=�c��(<���!8�����s:2��MS>�(�/��~�PÔ{4�/&5s�й�&�7�n�E�+�l��.�٧)tdR5ra����]�o��.����0h���e�L�N�VMѵu ���4�pQ\y3��ݞ@|={>��ŜJ��@����=Y�� hqO"�+�I�␇�1Rl$�5�j����C�4�S��xa�ڐxQiӠ�t��Dze�������ꄍ~Y��藑��x����˜�����+��
-�Ta������<��Vi�p�'�ߵO��E���Z?`$_B?ˋd�a܈�mľ����n�4YT�hz�k�
-���"��H����� i��(rz�`rqp��+��xa�]^W�nb��i)��V��i���Ċ�r�^z���9�R�tn���r���}^���&�fie&/r]�5C������j��#�^���Sɛr�nf���҉��1t���\�;�u8'|:���ܧ"�,(r�8i��C��VhT"ⲇ�}=���Z("7�ʝ��쫴l�����*�&&u4���������{K���t�W��HI#]!H����n�f�^3�kg�N��u���eG����hfY1���ǀ�GQ[k�l�I�䨮+gc:��k(_7��Y�m�1��|��)���H��ݕ��0�Rf*{.�bS5q�@@�Rk�d���!����a � �M ����.��T�� ���Y� (E�>���$u�X��Z����!9��Y��aJ����DC�"g}�Az)y��7�t�scl"e.;.;�&;ڙ�2�Gu��`���:2�@1+�=<��
-��1#��t"G�� �Y����� ���y�*�Z#��)6��.,H�ʀ�A��R�DF�Jcs�>e6] b��i`��<�R�;���e[�EGI�%C�4 �t��9!��O�1�.3v���DrGR��=�B��b��=��3�g�ܞ$)��4)�Y߇;�w����hyGJ�pq���H������?���;�&�������X,��
-jj�/��8�8�("��K&"�;�K���,)o8���+tU��R�p���`�@�=:{��'?�3�LF��|�,zED`�6(� �
-�2AZ�\]vm�����@�;��pX�������.5���Y�g��s���$��_r�w?E���d{rU�L*0��3ŏ��>6ƛ�52�'��S��]�F�������xntB|~>[i?9���Q��]L�R��g��&���K����S����_Qx<p����w �3)����g=�3�M��h�S�S���'�Rk5^-sE�
--�1A�SPk�Wi,ugh=]�A��!��+�:ܑ�H(�J��9c
-����Y��tv) �����`�;
-�+�e:n&"�ա؆$�q�Ѡ��!�N8!���c��K��m�R�l��xо�zc,�M4�L�:��4�R�[�
-(�ş�3)W��Z���]o�j&��c;)��mL(#=Ijcɛ'�|
-�����1/�mM$�wS�����z7�ژ���6~�D��I��x�tH�_Ԅ�ёJl�'�8�:�&+�F��z�����LF��ڞ@^-��a�И���؉�C��9`������.�:�\�5œ%7�E=E���/U-��9G.Ý����-@p���5A9�W�5������X���I��psT �QH�:dU\Rye�R�Jcu\�H�:d�\Ry��R�;����:r5�O������ў.�pբ�P6:��x8�ƎN'�!5��s�a<�t��U�=��.^�����I]68��t��>[�Xp7>C"��~[����:�\�-IH�gd�c�U=(5�̍��{�+�'� �<2�HeP�pG�@$*��d~�ۘ��]A@�*�A�L��k��lfU�]*.R*T�e�9�8���:��B� �$r8(u�#8(��4UP͖������H�E��� ����R@
-wc(1w��L�QB��݁Av�4�j����4+�ƨغg���^��}C���hD������U�kq4%�Zf%����
-�8~�c~�)��}V�=���
-l~�tGk{����%��//ĹlȎd)��@苾�Jp{���)�;.,hŜϵtʵt�MIr�?DC��3\6��F����b��QY�Hnh�:�&8Z�F��_�EE�g��u��I�L��@���
-��.�:L�밌���O���C�x�5Ir�x��8�cEU�h�U��f]�s�A��u���x����'�J-�#x�wP�j[tD�D.��`��9�߲�3��Epw~g
-p�ҵ;���ysx�/&����c�$j� J�$d�]�o�5�0y��aGc�����O �WB�� X�Q���vѦ���9�`��%�6�:K�ek��.��߹��7)uC�qDCGnu��5
-�� �R��Oݢ��+����
-gz�k���ym�4@R"U�l.���I�J4�oD����4�C3J6Z�Y��5��������A��V�L�8��Q~?��;þ7"� ������#«�h:��>^B��
-�M�'�����9���{?� Aƻ���vI]�I��ʽ�v�z�{&�o��GJjnNw�*�7���+n�a�)n��@F^p��k����O�����~{�L>�5�����Ɔ����փ��1�z����6e�MG��6��v��1�,�D"o�)��Mֽv�{��WMѵu ��}O��E]�Sm�BV�u�L;�Kk
-�剎�9�����
-EE�M�AgA6FT�z ��U��5����,f��Z/�HX��?�Js}I�E�B�eIҡ���ضj����b�\T`�s����ȋ��:LQT��l��Y�e0��%:2���~�w�h
-N
-��+��-!��ZRI�R֩�kIU�4UU�C�,���H���,�i�'E�E�I�|��͖��2w��-�y1<(�Wǘ��Ʈ0r7 ��KmLk�X�X����5ZlX@�)n�!:Y�
-WO�)������dr-����w�����9���ګk�e!J�P�N\A+��0%�����,��kpթ˂���EiU���p2*�SƏ,z Sg!�Pǯ�5Y����z�h��Fd!��T<-&��5�)�G�ڤ�O�~ϣ�Y�Rn=ߍ�(el~�ts|{���<J����g�f��dC�LEB7Yw �~��E�ܭ^���5Eט+z��I�|�[T���
-��[(]�!s~�?c�q�)�hP1
-� ��.��d���l* ��+g�G�
-��,���s(���
-l��-�.�7�sլ��CWKo^><���feՌt���C<�>�`�#z���ǧ/1��6UĴ��ڊ���o�����#��x�}�q}���{��W@oYЌ��P"�qj�r����}�p��c.��U@/�qsS�Z��K"��<b�ܩ+�-�b�U�]�%��0�-6[�K�Ww!�W<'x0ټb���Bw�͓�ͧ/?��3>.�+�%��ݩ�'��\�,:��int�<%#��7����WZ� ��T�Mp|�Q��E�
-�U�W����%�m���,���ߨQ)�d���f�`h�U$���v���3����
-Pt���m��ێ��5Z�.&� )��l;xm��ӷm���jѽ`@�j��f�����g0�n�}}���Ʀ=Ȯ��f�m8�Ņs��lpb> �u
-^��pA�yR��/d����-Gs�?'Q�>R͐�[���sO�!�ȾK��$p#�9�N�|mYQ;�L��k�I���O��n��~ 廭�����v�/�P��
-5o6�eco*���^\J�M7s���:��
-��/��z�>���;�b�/5t ��~:˄���:�h�K���Z]:E�s�X��;�R���h��v;:ﶂps�v������
-�涥�}k*طbt�YT��B�ox����F��+���^�!9��X3*;�)����%��c}Q�oL��]}
-�˺Fv0�>*V��a�}��mD��,8�+T�OfTvlt*�g��{��Ve�V��}[V��m�>|*4V����>h���j۲j�m�Л�h���U/�z|*�v��˂ ��Us���h�?K`��b�T,?���'�T�ObS�Z"
-��%2j�Y"
-ʋ%2���$�
-�mYe
->SKb�gjI���P1v`9�T�v����!���n_J��P�;+hݏ~��pdd)��R��T�}dD��P�7Pn�Mi?*L�U��B���Rn�M�d�J��U=��4*4g�U��F�i��]��-���rˠb���x�T8���^+J�GŁ�ɪ�kR�yMF�]�%�w���]�fj-ђ�21U��}T�\���t)e.�%��j֊��:Ğ~�[Qau�X�:�Tx�z��TH�5� �E�Q�u���Bq�В��m�`��i�$�{�.a�������N�2�`p�I]�����0�JTV.
-���%������@���W�.
-�hs�d���K%�p���Ϻ��(�((�W�%D;�z�q����P\�������0L�{ �ƥ�M��Ԕ ��Mkb+�qăK%1��d�}m��@��6.�}Ĥ�Ҁ��L=�(*�bB�@Lh�� �r��V�'��6�J�8TP��'��X*���!���]8T�7�X�S��T�^���ۋO%Z�M4�� �PA�G
-�p���3*�
-��!��82*��#�!��H*F��~=��]״��${�a��/����$�?��%!�K-���G֏IH������G>� Y��H~�D�� k���ć�&Y�Rk#���+\��<�Δ�ۙ���H~�=-�S_�ﳧet�#���=o$4w�� �������e�����3���e���@@�6�nVs�z�5�X6�*�\e#��6r����s�][bF��i�b���Q��741 ��*�_����o'$�������PK$�M+�-PKZ�P;ptB�pollen.argoPKZ�P;1f��^��Gpollen_DC_Pollen.pgmlPKZ�P;4�[-m��pollen.todoPKZ�P;7Rp:B� pollen_profile.profilePKZ�P;$�M+�-
-!pollen.xmiPK1o9
\ No newline at end of file
+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�PK�V<pollen_DC_Pollen.pgml�]mo�F���_�k\�(�pH����,
+�ݠM,��,ю�ʢ!�Isq�R29�9�9!�E��M��3g��y�������|�7�e�~s�^z�x=O������?�����^~��������?>��<��~��o��<�H�x��-.���v�Y>�wK6�/g���_���X��7�����l���{��<�wO�������?�t��m�o���ߔ��4�ȟN���n��^!ߑ ��݅����y�<�u����&�k={��\�����d����]����$O����_�{�W���w���"��� �B�/���q����r��]�o�f�m��vo�d��1�cy���<ƛY�k���w���v����..;�{?m�7��tsM�w�[�V|�K_ϓU�ys���r�?����'/��p��j6�O����ǯ7�ϳ]|���җ��m��n��_��̗�O��8��_~}s��}���r���/����|����v�=�;HOV�`��啿!?�d���Yd#zY bhH{��-����ҷTM(������\]tͲC_������+p0�*#@�(� �d�9�����~f����8��0���]�9����>�x����L�c2I�~�'wɚ��?������l�����|[���d�P����v��)�����<mw˻�|��07�o��_�e��!��w����{������{=;�l7�����Lh`�3����%�XCH�8(Ck�L?����i�+��x8r���{��v�<<�6���n�G���a�)7�)�;��#un�cd��p�ps)�)?����ǻ7l�m����s1��&ٜ�LF��2���C�9�%�2H�Q���Y-���F������\����q[�*'�ꖣ���?�-Gk�����-�w���@�\�M�\�q����uQM_5��y�
+���S|���r�'?.&�&�qdz�y7��;������Ɏ#�lZv��v�T�1���l��.p�3�q�R1J_�N���
+Cx�yKmC#�ń!�=��r�;��{�)MI���5qlek�bM��α����I&dUI�Ӛ41"x��)@���&�M��9�9�O�Qk��!I+;�b%��I�5�߷��@C�5������#�)7������8Ffn�(���:�&&.������c��!ۚX�,|��Y��9U�����@j����t�S�*6]�M7]��*�UL��`�i��Z��4b2�R��Y���P?ζ�/��PC�"&��bD{���r�����4����x�q���լ)ڬmH!�ވv��l�\/�ߛ~�sȯ�d�ֵ�5�����$�����쾁��5hS��ǀ��H
+hX���h���bB�\
+��_s7��xp������
+�D}ٖp�?�G�lKgg`k�ɀ�F3ދ�E��X�ff d
+n3�̠"��C�e`d��0�22�5�\�eH�$�C�#�{(#M���0��F��B�=�6�1�ӝ[[z*Vb�s��ֹu��}�a��AZ�
+5�S���8���F0�d"��XM���6��P�D��/�
+G�L��}�_Tm�t9n��-��V��9*�(ɤ��G�L3L�������~�3D�9�]*_X \(@c@�E���!-xRs�}=��u��C2�o�����S���o�G8�<��Zęq@CE"�M��X1�h�:�:^/�ꁆ���c ��?�N�[����]|oj���30�<�@3��d/c��iE�3��h�{�3ӾZ,�V��K3�e�Y�
+9G�{
+�l���>$O�?�]|���%���_�� ���%c�����3��n���o�V�F�돚J�gc�n����������돜,�l8r2�e��8kS\p)��FVB{.��<=�%�J��<��E�f��E�V�R�GT�%J�$d�Ee[:{����"����蛩�%J��`�!�$�v��B��0���P�u���qM�)e�H���\Վ��.dQ~Zn����n�K��|B�`�<\[Qw�����Cd��D�vН�-˥�
+�jT�#ѧW�b��B�f�� E�u�P����$�P�@�h���ʼnۭg9.U�-]��ۭ|�6Dž(9.�5��r�q�^�k�:�d�(r��/2�E�(�|ɞ=Uc�'�s�1����8C������� /c��]=FȲtJ��=�)ڞ�T��R��jW��&}�j��ch�u���:�ch�À�#�z�Q����1T��0��p$}�c>ěm���c���Ϊs��k�Hk���f�K=�E�IW��(Fz+o1�c���V
+{���1(:rp�
+D�a�5GUۍ���Z=��
+Q'��cjU�Q �;ٵ�ޡ�K�n��21��T�{���)�q~m���͎��r�r��;�G����ǿ�K���=�ӻ����
+H�J�&_��l��/���������R
+��������8�q�o���{��#7��x^�vɗu�����+�I����9��ww�x?`Jp�5�M+�@���n��?����Z� �M�o�;0� ���n��Z��]كu����W�X�M�}����q�Ž#ӯ_D#�5�(_�t$$��G=Lg��;���������rS�ͽr��7S>�r���SA��ʼn@��
+�o��܋ �ϖNO߬�����x���C���E$Z,�>d�n
+��T �I������b�$?-0�l�g�1���Jƣ �؎��v�tH�����Җc@L�:'5��\u�C@�C@Lj:'��d�.���}�.��lw�{1�1>�5�i�պ_kK�f@ǹ�G�;t~�v����-�C~}X���8?*�~��vsiaOp�i�0w��j���K�+�ӂNwZς>;-]��;�|�6�À>s�-�)����2��\fhb���l�s��gh5W�;���C�d~�o��W�U���L&����������Ǟ�hfS&�6۱L\�d�X&��+��Q+q=�e����l�̠�̦�����z3�w��
+؎b��b6���מ+��;�ii��f�z覞u��p��Ԓ��(~Y��x]��C����6���ё��]��0��:K�Z��։F�,����֯�m�:���2�w<�>E��kH�]%x]��4��+�*�{���>��j��4��yϐ܅��;�}e�M�]�Ve��dP�܈��"
+�]F�d��O�i3,�M#�ZL�jz�`N��E���PA&���9�&���F�R�Zd-AM1 {)j%��t�Z����f d
+n$�EJ�"=��x��z��ijQ)MMv%Anծ��j�V��f��t����$<x9L�rm��DJ��(�̐���Y��D��o)k�e���*�U��+�c����Z;Њ(:l8
+r��yk*����qpFj���Y�Z�K���+ߣM^���5�{*τ:1�J�����@��V!���s�>ͲYMS�js��RN��Cu{YU�F��>��Bp�$*���5'�%�(��`':}y���
+�܀}�*�_�&�6R�Ys����{1 X6�u��MIH�hFpf�q�fx6�L�=+ܯS"!B%��C*�����q��"dM%�M����qK�L�*z�dS���
+�0{$=��0c��?ʄ����/ꄒ3 � 3�3�L�ϋ�YQ�r�J���);�8�)���ŵ%Y��ָ���
+�8�a�]���,J� -G�d!��-�!�ԪF��q^p�q:���;NV ��A-��ץH�=�0v�WY�Z��<��G\c*���!k��F5��D4�̌a�c��;��C/ʃ6N�-��@gh!��3���[�jz�b]j~!\��`���nԦj"�lr�)]d�[]�u��K����'��l�<0(NB�zU�լ|��4�.�����f�h���{�ar�]M������r&®���X��+R��(�����
+��1�+
+��${�qd/��l����=��������@�����^�E�N��H��3<�##�k���q��!T��
+��J-ď���^��Dm\)]o�&mΨfi����l
+'s���=.��n%u�GT�R�*GV������ڮ�D�fT�d��S\p�S���LJ2GR���L����&�cJ�)]�!Ւ+��!ժ+�{JׇM�����J;�YS�9�у��W�i�ɵ�b�N���\ �n�9�.?Q��T��:�t9�RL���֥[̓�,ϩ��C�a�E��>�����tI��A�g�~��L��ݜ���.G��V�E�ҥ�V�T=v�O_��9?��tQ5�KF�@
+PF��P�k~�_�8�����}��G�����XӜ!��qVYg����:���{�g���sŜk�����п�����ˇFhz�#���=�t܇x�)Y����鸴��kAm1��Y'wS�~Z��R�`�9��_fz��#�Et;cs~�#aһ����\�����.���f����u.7#,M�9���[��e�����u)�W��R{ղ�4�RJ�)���P�q�����J�~IJ��HQ�^�F�.���y>&�39�V����J�z�x��t=_��e��1�pT����z~�tt��w����Δ[�ut߮���kސ����+{��6�Z�4�ʽ�5�k^�^�X�������QH_��9g�c�z�a]�^#�K���]�Aa(v��悭rh����qh����D�X�\O,%H�Di>�"Q���M������}R꽘�w
+�Y?��O��d��i�s���*|�[BUP�hi�3.��r�3���e�=�PX�d���<f�]�E����u,����X(b�Hz �����X�A����X%��H�����!�UZ�*�+Reލ����>[�n��E��� ��3��:M��&T��AZ��óϔJv�s�*�+T������~��*e�!��.���n�[�Ī���*}T�7d<�#�����r���^��|dP=���zc�V��|�i�0�6P�=�}�S�E��:Y}H��GNU���"�
+�E�0��Z�/���F:��*�L��$��E�;R�\!t��N��,�U�;���K�l���Y�~�m\Bg[�b�ok���%t�sN�_��-��?'
+���yg���'�a��R�]@3t=���b
+Y@�U4 �X��r���M��?����E���)<��LM"��(�ˇ�'۴�h_5���M����Y�}�˪���91r���:�~�ώ�ez�h�U����Y�ɿ��3֙v�,�k����.Ʀ�/r��Ѩ�/oL�ЅE:�e���BJ�0=p[Xx���,P�Ho��i�aW�fݰ��+:w��*���9�x��\C��e�t�c�c:g#�)j���\3�
+Z�[�s��9��[�z�=��<�$Bfs��c��iج�x�],������^L�}��4猰�Zt43��i�J0*�����h��+�yA� �T������T��8z��{H���j=��@v�F�C�R�I�����v�u��8��&e?��V�H��~�����*8�v�s�3����qŻ����"Z��R|����D��Az��]Zy=��`���t�q�G�n����۷���
+q�)]:�
+��6�v����z�U����p�ͮ3$q�Iݮ�jCL�O�4��ϐ&5H�ݮ�Hp���S��(�����n�@�� n�f��#�8��4ċ����NwA��Nr�DͩAԴ�ϛQ/���M��Ȃ�:lz�A�|���o;��?��uYp�1jj����)v=jJՃnJ��((�JɁ=6jn�BP���0�M��o�&؞��m0C���1F�4���w�VH��C�E�;]�s��|�a۽�0��,YNM<�v=�I�x���P6� g5�I����<��l�$�hfم ����B��L���$O\i�����43���A�ܺqo��W�Д�S�A��>n�c�+�����Q\���-��Lb9��m5
+x�)�Ly�����[�o�̪�F*[�Un5b��-��́���b1�SŬ�r����\�!���,i,'eY&�MQ�<�%
+P�(��q�'[*����
+P��@a;�T1��*@kU�"��[�Ph�*��I�!ԣ~T��T�
+0e��C��
+�'~�~G� �3h��`W�[kZ� @�[ȹ���~P�C��ը<�9+�-�=�&�C���4�B��V�&hfVm5���zM f��@�:E�M��\��@�Ql;��wt�ϳ��[���yH!�K�Y/��>ž֍���������<fa����>�^�}���I<[ާ���O��[���{��i90G��~ާ���O������]����R��Mi��~S~��7�����=m��]u�,ѣ�~���fn�
+��]u�.�
+��]��KM@G^�Gh�� 6��]" `�m@�:��%����,�������v�箋��E>G��s���ٞ��
+N���\0l6w
+���@���#�k��u2�����'s�H��o���&��qEo�0��?�r32w�Lbd�X�6��Z6W�mH�ܝG|~:wcpf�O��G��gۍ���F��B��g���霻��1��x�}:����M��t�����YJa:��gu���Ҧs��%������*ju,������G���$xrP���L��ZJ٭��-��Zv�Z/���L��j���Zϧc��٪�"M����j=�V��z�j�B{׆CW\[kDQm�G�ȵ����h(�z�j4, *�b^���V�ɀ�Z]�G�[�j��KW��V+ߢ�Ջjk��p��;C�^���;�(�^�)��v4�_��]E��%�Q8\����j��`��R��w�?�P��p��1˪��"��kozs�I�����J6Yb�)O�9���w�j��O�����pq~�}��^�k�π�}ڰ�N~g�б�F!���Y���l
+Ń[��9��%>�z��YU�u>:��H��1��ua�͡��9���N�!��L�q�3PA�>�C}'r6����<�"fU9���D����)��iN�h���4X�E<��+�����6�!H��9@5�ѹ��yz�����U����G�z4D�h�;��&=�z�5�N�z4L�h�;��&=�z�5�M��ѡ�̫(�#�����x��PճѼN�+���eSg�v?:���!#͋:�@�H���u�GF�u�q����5\�4�|�4/��k@����h^�9y�yW���h�q}�p�����]u��#ͻ�"NKG��p
+��<:Ҽ�."�t�y
+��6ͣ�&����V,J�܌�Y�|t�Ei��i�&���Uf�5%z}�day����^�f
+���^O� �q
+���B:���h�}���yHg\�D���H�)[�3�(� z��iw-
+��ߺX]~��PK�[��PK �V<pollen.todo�����Q(K-*���S�UP2�3PRH�K�O��K ����Z()��q�(��;�D�*���+G���*(�8z)%)J
+@% ���,.2���E���9e�)�E�%��� Y,B3PK4�[-m�PK �V<pollen_profile.profile�����Q(K-*���S�UP2�3PRH�K�O��K ����Z()��qq��e��q��ÙPK7Rp:BPK �V<
+pollen.xmi�]��6���(�����1h��-{Q� �&�ݯ�D9��Y�&��J��cY�,r� %��mb���!�;�s��?�=�g�0:�a0�u� .������]���_�s�a���?����;=��Bs�!�l���{�I���n�6�<�ɗ��O���C��C�-�g�4�GU{��z�e& ������,���W\���^���� 1��V�o�C�I�e�SZ~:�!|��
+Ap����_�'M.�M��/�
+�Q��������������,��������@�}.�sQ� �c�������O�A������{����?f�_� ���W��f4=�����������������Gq������M/,�9�A����I�����n:3sM��
+c.��(Hs]�mG���(BO�M�y����Q�~V���¾���U����<����t|�w�A��{`��7�a\��w��^^���1��s��2c��l�0��"�t����4���
+bܦ�]�%۔<�Q�DC��1j����gՃ|�薈�bp&4�P������%��C��kz~�g���A�|�����]���ERJ�_��]�I�F��%��t_����'����T��]��#Ρ' �k$��SmSq<�eu=��BNQ��F�iq����N���C��ɞr`�/,�;��v�7�ȥ�z�G�:O�"��`� ���6e�u��7��C�ݯ�Y
+�t� &������駇����m��FlI?tb��9uaBa�%����_.�?_7��r����&k*]O�`8���,��
+��R��Iz�Ä�0Zxħ���eG�}�ћ`� �P3��b���d���t\�x�_��N�i�� �;� ��M���+v��<�`��&�����9r����$<��w���>� ���Q��Es���4��!j���j���G���.Q�?���DoJ_�0;��K+�B�;�A�[#���dV����t�FM����tm5ы$I5���&J/Uc�fTՀ*��]aw��Wu�߅G'����0���5�0`q��0:�d�5m�9�j�
+�P<�t����OL��kx,]��x�!�?8�V=���{��U��,ƭZB���x�W��؍��X���g�dF[�*�|��1����ǘ��ј����@�ڛ\�x�-�������<��T��&БJ�ȅы�>�3tQ�v��.o F��
+�J�-2�==[5E�ց�-O��EqY��0zvs���� rs*Q�Q�t8�[�d�S���=�X��:I�C�GOH��8RT��������J"S�L�TOV�� m}�@�R)���>��ԦF�h��e��B���7�w_ t� ���H��/#�L�ps�-���9Z+ͷ�Wp�+�U�K��D��Cڣ��`L��[o�Ë`qi��H��<r�g��#
+��Z-]npFwe7E�4O4=ɵM�i�WCL$wx�t��4��y��H��88Vt�}������^�BҴ�u�+T�4UGCbŲW�8�/�����h�Y,:7yqxJ��K�>�B�M^a��
+�2�}T��TO?&@WSL�"�L�Hޔ�t75�V�=��#Ev��)h��9��!<��89E`A�cĹH��䰕��0@��>���-$�B��W�4~��Բ��F�++�����HG��WM���v�ōHF�@�+i#R�HWR0s=�]��A��L��Y��x�jgUyQ$A��YZFh�8�)��Q�V)Z}�"9��ʩ�X�0�
+��F�y��p�!)_�,8BJ#�9R�0�bX��
+L���Ql�&NHXj
+�٘>�;"80�5dd�[� ���")O�Lq$���uɑ�R$��IRg�%�W�E�
+,�s-�um.�$�^V�L4M rַ�����|O�87�&R��k���)COqT'[��*�c ������s���Q}3�9�H'b�px����}�:�@�jݑ��R�5bڝb��a���8D�p(t`Md��4��9�S
+`�"����I �+t��xC�(ۢ-:JB�,���Ƞ#�.�A|
+O��1cL@hN$w$:��Rׇ�U�!ğG�p6��I�RjH�"��}��'[?)��������$�̘��C��h��kx,]QȈ����<�ݝ����=?:�'�@�����c�ɅS��|��7�yJ��*Od)t'4>X0�e�.^d����'��8�>�^ج�
+J=ȍ�@��L���W�][�2�}�߫.�N`�u�n�A���q(t�&�|5 �b�l6b~�Y���>�K��h�wq�LbO�J�I9f���L�cc����f{�;�k��T(w��]����b���o՞���B��V�O�,~rT�0JЀ)]�V�l��$T1tIґ�pr���+
+O�8���.}#�wY����cf�I��~��sb��q���Uj�ƛe��@���e7&�a
+j��*���)ZOWb3��j�D��#� E�R*\�>,�A�p9�ҟή %A�p<x�r�as�@t�lB�MED�:ې$4���<$�� '$�u�;]p�4�mY���m��[��E�������]�ޜF�P���}\a��S>s&��pzAcY��c�[��t!pl'�[��
+� e�'I�-y��!7�:䅻����n
+Xs"RU�f[��^��Ϟh={"�\1jϝ�|�09:P�����B�dE�P[/5�c�p�I�@�R�ȫ�:Lj�\xt"���oXl�=w���#��۳F�x�䦱H���h:�����>��e�����w�n�@�� (�b���77&}�?�:`7"��n�
+Dx0����}V�%��W�-t�h��VDž�˱���}�%���-t�L֑��r���-���t����݅�ѹ���1�
+0tt:���.���S�K'��P�1����:�(���N�6���t���.����ǂ���xK�m�KJP�0",��[����H�ǎ�zP*ҙk� .�.�WpO�y�g�1�<ʠ�aD�@$*��d~�ۘ��]A@�*��A�H��k��lfU�]*.R*����%�8���:��B�� �$r8(t\I�*���A�]M�l$͢T{���A��D) ��
+D���$�@~�P�0:0H��"P
+���f%�[�ltBsm�+�o�<�f@��>�^�+^:�W@S�e���/ɫ0:�����_��B
+kc�U{O+�t����ڜ@~Gk�k�+��q.�#Y���"���/�ܞ#�:|J�Z�E>�s-�r-�rS�\/��4E���M���os>�A��!*�b�
+�B�G�����!���@�LUC���?9���7��u����i�K�S�:,����ϛ�
+�C�x�5Ir��,qǒ�X�$ˊ#Rͺ�� �:������&p[�K�9O��$Z�G���R��Զ�>��\��.ms
+���!g`������ j��+w`���f��_LI5ǜI��@' ��0���J�a�P=�Î�<��CR�.6�0 ���h>�͢M�+(�s,�8T�KJm*u�R��:�]�%�sCoR��V㈆��jo+4į� �>%����yAgWvS#*���$�6���Z�i��D�Hٜ?\{����h�߈@��:h4�f�4l��F}c"�%O[E#�g�"�ڙVr2]���~��w�}oDA^u]��������x�p D6+�6mT�����sg�r���#�RB"�%u �
+$��+c���#�J�L���Ǐ��ܜnvU�oJ3�W�HÂ)R�ȇ����~��^mC�8�E������|tkl%5-�
+m;s��^�[�>�C�TT�%h�y�'�
+�����r��7���V�
+�-l�jj�D���+���A�Nܝ�Ny��櫦��:3o��i��H�2C!-ȺOiɥOy�5���G�QIHMȆ���렳k#�y}\~ A0 dļg1����D¢2��\��K28.*�,K���lǶUS�PF�(�o���]ߜ@^���a���nf�|β�I/�Б������ ��0p¦!�y��]�d=_C*iZ�:�|
+�����
+w�e�>�N�y�6��vpQ*Zz�����|��͖��1��͖�<�ګe�UX[W���I̥6�1h�x�N�Bi-6,�R��7��,؆+�g�ΔM�uP��V2���Ne!��+h+d)N����j1j�'��j�b6QŬ�RT#R̈6a�&��Y��UȰ����U%[�l�ɨdkd?�hg����@��0����d���z�(aЎ����(1Ye�&�9�T&�|
+�{��Jr����.�G!c�s�����o�/t�QȨ���=�4��$j��H��$kt�.͇N_��8�q�KNlIdR��6�.pbÃ[�J�(A{� ��?C�q��Ӡb"�]]vm�F��ٔWƚ����e-�O�-^��i��\���r�����X�(\��*F�n�#��x�]���G�jeS�3%^.<�[<���ꉉDjk����o8�����ƑD<�.R�������^��
+�-��PJ4N-P.���lj��8��z�zُ{���2��^�p���Y>��7;p}^a� �i h��t����R��(d����&�W,x�W����yR�����Dt���4��}I{mwn� 8��3��d��F�]�0O�H��M"�����̀68�s*K��y:
+��F/��'eh��67��v����ը[�M�sSX04ہ*���z�A��F���5Pz���m�������qo�ӄ��Ma�������&ӂhy��^0�Z5�Y3Q����3�u�߃�.F^y�����3�&��¥�m�71��:9/Va�� h=�����o�|o�#�9џ㨋k�fH���Vx��'Đrd�5C~b���i�r��,����ɕޤS��'�H��e��������z�Et��U]��(�x��7WE�*���^\
+��n`{��[��v�;���H�U�gv�;����n�i�{�T���*3D3t ��~>����:�h�M����;�R�߱���D;���y�����G�è�^vv8T�w�-���BK����п�,*�gѢ���
+�����bs��W]Hl*ʎu;4�oɦ�X_�:�}kFW�E�沮�����gme�UU��W,�7���r�
+�Ɍʎ�N�Vw/��½L?��"
+�۲�7o�p��S��ʾ.N7�@��`VۖU�mK�E[m��:���S��;��_�9<�����G�Y�^K�b���.?Q�����i0�,�Q��iP^,�Q��% T�o�*�h�Z�>SK�.0
+�����)�BxH�c]h�
+��t_�R�?�
+�YA�~���##K���Ϥ�}�##�-�
+��r�mJ+�Qaz(��]ܦ�r�mJ'�T*D��艥�Q�9k��]4*�Oc��b�p^n���[��`5�ä��g��ZQ�>*<LV�^���k2�b-�ؼKV70Sk�������岼�K)��p�,�T�VT���!��cߊ
+�cŪձ��[�f�[��B�M�,*�ʭ�5p(e������oC�N�'��#� {D�x$4��AD�+Mj�@��T%�A�U���*pi�Ħ�-�ׅ/�J��5����pi�D��%��B�[J*�Vu�u[�Q�QP��"K�v�u��K%��dwh�K%a�dw܍K�Xת)AH���V���JbB1�V�8�ƥ���m\���I��]m�z�Q &T6ńJ���(���[�,ON%.l�bp���o�Oxw�8TP�Cxw�p�@oޡr�0(W�ؽ*�����
+J���h�Aơ��6�zw�g8TP�Cxwqd8TPG�Cxw�<8T���z>/��i�IH�d�0�E_�-�)sI~`iKBr�Z2���������|XA@��&�����Q�$$w �����kL�Ԧ�F��CW�$�y��)��3[�ˑ�>{ZF��8��gO�h��F��C{�Hhn��A��C� $��ͼ�߿�gP�3����8���dm`ݬ��zk
+��l�U�1��3m�2�g�S��)��Ĕf��4�pQ�� �ohb0�U�W�@:�LE�ޣ(i��ɪb��D�՛,�����lO�qj4���[������ݿ?��p� �A������/PK'w_)�r2PK�V<ptB�pollen.argoPK�V<�[��Gpollen_DC_Pollen.pgmlPK �V<4�[-m��pollen.todoPK �V<7Rp:B� pollen_profile.profilePK �V<'w_)�r2
+ !pollen.xmiPK1�9
\ 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-21 10:31:16 UTC (rev 2875)
+++ trunk/pollen-business/src/test/java/org/chorem/pollen/business/services/ServicePollImplTest.java 2010-02-22 21:16:44 UTC (rev 2876)
@@ -34,9 +34,13 @@
import org.chorem.pollen.common.VoteCountingType;
import org.junit.After;
import org.junit.AfterClass;
+import org.junit.Assert;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
+import org.nuiton.topia.TopiaContext;
+import org.nuiton.topia.TopiaException;
+import org.nuiton.topia.persistence.TopiaEntity;
/**
* Tests du service de gestion des sondages.
@@ -45,7 +49,7 @@
* @version $Id$
*/
public class ServicePollImplTest {
- private ServicePollImpl instance;
+ private ServicePollImpl instance = new ServicePollImpl();
/** log. */
private static final Log log = LogFactory.getLog(ServicePollImplTest.class);
@@ -65,7 +69,6 @@
@Before
public void setUp() {
- instance = new ServicePollImpl();
}
@After
@@ -76,7 +79,8 @@
* Test of createPoll method, of class ServicePollImpl.
*/
@Test
- public void testCreatePoll() {
+ public void testCreatePoll() throws TopiaException {
+ log.info("### START ###");
PollDTO dto = new PollDTO();
dto.setBeginChoiceDate(new Date());
dto.setBeginDate(new Date());
@@ -96,7 +100,23 @@
if (log.isDebugEnabled()) {
log.debug("result: " + result);
}
- assertTrue(result.length() > 0);
+ Assert.assertNotNull(result);
+
+ TopiaContext transaction = null;
+ try {
+ transaction = ContextUtil.getInstance().getContext().beginTransaction();
+
+ TopiaEntity entity = transaction.findByTopiaId(result);
+ Assert.assertNotNull(entity);
+ } catch (TopiaException eee) {
+ if (transaction != null) {
+ transaction.rollbackTransaction();
+ }
+ } finally {
+ if (transaction != null) {
+ transaction.closeContext();
+ }
+ }
}
/**
@@ -104,12 +124,16 @@
*/
@Test
public void testUpdatePoll() {
+ log.info("### START ###");
String pollId = "";
PollDTO dto = new PollDTO();
dto.setDescription("Test_updatePoll");
dto.setTitle("Test_updatePoll");
dto.setCreatorId("erwan");
dto.setAnonymous(false);
+ dto.setPollType(PollType.FREE);
+ dto.setChoiceType(ChoiceType.TEXT);
+ dto.setVoteCounting(VoteCountingType.NORMAL);
pollId = instance.createPoll(dto);
dto.setId(pollId);
dto.setDescription("new description");
@@ -122,10 +146,14 @@
*/
@Test
public void testDeletePoll() {
+ log.info("### START ###");
PollDTO dto = new PollDTO();
dto.setDescription("Test_deletePoll");
dto.setCreatorId("erwan");
dto.setAnonymous(false);
+ dto.setPollType(PollType.FREE);
+ dto.setChoiceType(ChoiceType.TEXT);
+ dto.setVoteCounting(VoteCountingType.NORMAL);
String pollId = instance.createPoll(dto);
boolean result = instance.deletePoll(pollId);
assertTrue(result);
@@ -136,11 +164,15 @@
*/
@Test
public void testFindPollById() {
+ log.info("### START ###");
String pollId = "";
PollDTO dto = new PollDTO();
dto.setDescription("Test_findPollById");
dto.setTitle("Test_findPollById");
dto.setAnonymous(false);
+ dto.setPollType(PollType.FREE);
+ dto.setChoiceType(ChoiceType.TEXT);
+ dto.setVoteCounting(VoteCountingType.NORMAL);
pollId = instance.createPoll(dto);
PollDTO result = instance.findPollById(pollId);
assertEquals(pollId, result.getId());
@@ -151,14 +183,20 @@
*/
@Test
public void testFindPollByPollId() {
+ log.info("### START ###");
String pollId = "";
PollDTO dto = new PollDTO();
dto.setDescription("Test_findPollByPollId");
dto.setTitle("Test_findPollByPollId");
dto.setAnonymous(false);
+ dto.setPollType(PollType.FREE);
+ dto.setChoiceType(ChoiceType.TEXT);
+ dto.setVoteCounting(VoteCountingType.NORMAL);
pollId = instance.createPoll(dto);
String pollUID = instance.findPollById(pollId).getPollId();
+ log.debug("pollUID : " + pollUID);
PollDTO result = instance.findPollByPollId(pollUID);
+ log.debug("title : " + result.getTitle());
assertEquals(pollId, result.getId());
}
@@ -167,10 +205,14 @@
*/
@Test
public void testFindPollsByName() {
+ log.info("### START ###");
PollDTO dto = new PollDTO();
dto.setDescription("Test_findPollsByName");
dto.setCreatorId("erwan");
dto.setAnonymous(false);
+ dto.setPollType(PollType.FREE);
+ dto.setChoiceType(ChoiceType.TEXT);
+ dto.setVoteCounting(VoteCountingType.NORMAL);
dto.setTitle("Test_findPollsByName");
String pollId = instance.createPoll(dto);
List<PollDTO> result = instance.findPollsByName("Test_findPollsByName");
@@ -182,6 +224,7 @@
*/
@Test
public void testFindPollsByUser() {
+ log.info("### START ###");
// création de l'utilisateur
UserDTO user = new UserDTO();
@@ -194,6 +237,9 @@
PollDTO poll = new PollDTO();
poll.setTitle("Test_findPollsByUser");
poll.setUserId(userId);
+ poll.setPollType(PollType.FREE);
+ poll.setChoiceType(ChoiceType.TEXT);
+ poll.setVoteCounting(VoteCountingType.NORMAL);
String pollId = instance.createPoll(poll);
// recherche des sondages de l'utilisateur
@@ -206,6 +252,7 @@
*/
@Test
public void testFindParticipatedPolls() {
+ log.info("### START ###");
// création de l'utilisateur
UserDTO user = new UserDTO();
@@ -223,6 +270,9 @@
// création du sondage
PollDTO poll = new PollDTO();
poll.setTitle("Test_findParticipatedPolls");
+ poll.setPollType(PollType.FREE);
+ poll.setChoiceType(ChoiceType.TEXT);
+ poll.setVoteCounting(VoteCountingType.NORMAL);
String pollId = instance.createPoll(poll);
// création du vote
@@ -240,29 +290,42 @@
*/
@Test
public void testFindRunningPolls() {
+ log.info("### START ###");
Date now = new Date();
// sondage en cours sans date de fin
PollDTO poll1 = new PollDTO();
poll1.setTitle("Test_findRunningPolls1");
+ poll1.setPollType(PollType.FREE);
+ poll1.setChoiceType(ChoiceType.TEXT);
+ poll1.setVoteCounting(VoteCountingType.NORMAL);
instance.createPoll(poll1);
// sondage en cours
PollDTO poll2 = new PollDTO();
poll2.setTitle("Test_findRunningPolls2");
poll2.setEndDate(new Date(now.getTime() + 100000));
+ poll2.setPollType(PollType.FREE);
+ poll2.setChoiceType(ChoiceType.TEXT);
+ poll2.setVoteCounting(VoteCountingType.NORMAL);
instance.createPoll(poll2);
// sondage terminé
PollDTO poll3 = new PollDTO();
poll3.setTitle("Test_findRunningPolls3");
poll3.setEndDate(new Date(now.getTime() - 100000));
+ poll3.setPollType(PollType.FREE);
+ poll3.setChoiceType(ChoiceType.TEXT);
+ poll3.setVoteCounting(VoteCountingType.NORMAL);
instance.createPoll(poll3);
// sondage pas commencé
PollDTO poll4 = new PollDTO();
poll4.setTitle("Test_findRunningPolls4");
poll4.setBeginDate(new Date(now.getTime() + 100000));
+ poll4.setPollType(PollType.FREE);
+ poll4.setChoiceType(ChoiceType.TEXT);
+ poll4.setVoteCounting(VoteCountingType.NORMAL);
instance.createPoll(poll4);
List<PollDTO> result1 = instance.findRunningPolls(true);
@@ -276,10 +339,14 @@
*/
@Test
public void testSelectPolls() {
+ log.info("### START ###");
PollDTO dto = new PollDTO();
dto.setDescription("test selectPolls");
dto.setTitle("selectPolls");
dto.setAnonymous(false);
+ dto.setPollType(PollType.FREE);
+ dto.setChoiceType(ChoiceType.TEXT);
+ dto.setVoteCounting(VoteCountingType.NORMAL);
String pollId = instance.createPoll(dto);
List<PollDTO> result = instance.selectPolls(null);
assertTrue(result.size() > 0);
Modified: trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/pages/poll/PollModification.java
===================================================================
--- trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/pages/poll/PollModification.java 2010-02-21 10:31:16 UTC (rev 2875)
+++ trunk/pollen-ui/src/main/java/org/chorem/pollen/ui/pages/poll/PollModification.java 2010-02-22 21:16:44 UTC (rev 2876)
@@ -455,7 +455,7 @@
/** Retourne le poids en entier de la liste courante */
public int getWeightAsInt() {
- return (int) votingList.getWeight();
+ return votingList.getWeight().intValue();
}
/** Retourne le numéro de la liste courante (index+1) */
1
0