[pollen_1.x] branch feature/1112 updated (323038a -> 4a16312)
This is an automated email from the git hooks/post-receive script. New change to branch feature/1112 in repository pollen_1.x. See http://git.chorem.org/pollen_1.x.git from 323038a fix comments export and ChoiceType management (TODO : manage image export) new 4a16312 #1112 [poll export] Add image choices in poll data The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 4a163121f9e988fcaa2b6389dcf41337889aedfd Author: Yannick Martel <yannick.martel@gmail.com> Date: Fri Oct 24 17:26:07 2014 +0200 #1112 [poll export] Add image choices in poll data Summary of changes: .../chorem/pollen/services/impl/PollenExportService.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
This is an automated email from the git hooks/post-receive script. New commit to branch feature/1112 in repository pollen_1.x. See http://git.chorem.org/pollen_1.x.git commit 4a163121f9e988fcaa2b6389dcf41337889aedfd Author: Yannick Martel <yannick.martel@gmail.com> Date: Fri Oct 24 17:26:07 2014 +0200 #1112 [poll export] Add image choices in poll data --- .../chorem/pollen/services/impl/PollenExportService.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/pollen-services/src/main/java/org/chorem/pollen/services/impl/PollenExportService.java b/pollen-services/src/main/java/org/chorem/pollen/services/impl/PollenExportService.java index 84b2850..a8bc163 100644 --- a/pollen-services/src/main/java/org/chorem/pollen/services/impl/PollenExportService.java +++ b/pollen-services/src/main/java/org/chorem/pollen/services/impl/PollenExportService.java @@ -147,10 +147,16 @@ public class PollenExportService extends PollenServiceSupport { for (org.chorem.pollen.business.persistence.Choice incomingChoice : incomingPoll.getChoice()) { - Choice choice = extractChoice(creator, incomingChoice, choiceOrder++, incomingPoll.getChoiceType()); + org.chorem.pollen.business.persistence.ChoiceType choiceType = incomingPoll.getChoiceType(); + Choice choice = extractChoice(creator, incomingChoice, choiceOrder++, choiceType); poll.addChoice(choice); choiceIds.add(incomingChoice.getTopiaId()); + // need to keep the images + if (org.chorem.pollen.business.persistence.ChoiceType.IMAGE.equals(choiceType)) { + PollenResource pollenResource = extractChoiceResource(incomingPoll.getPollId(), choice); + poll.addResource(pollenResource); + } } } @@ -297,11 +303,12 @@ public class PollenExportService extends PollenServiceSupport { String choiceId = choice.getCreator().getPermission().getToken(); - File file = pollService.getPollChoiceImageFile(pollId, choiceId); + String choiceValue = choice.getChoiceValue(); + File file = pollService.getPollChoiceImageFile(pollId, choiceValue); PollenResourceFile resourceFile = new PollenResourceFile(); resourceFile.setFile(file); - resourceFile.setId(pollId + "--" + choiceId); + resourceFile.setId(pollId + "--" + choiceValue); resourceFile.setName(file.getName()); resourceFile.setContentType("image"); resourceFile.setSize(file.length()); -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm