r3491 - trunk/pollen-services/src/main/java/org/chorem/pollen/services/impl
Author: tchemit Date: 2012-06-16 14:36:30 +0200 (Sat, 16 Jun 2012) New Revision: 3491 Url: http://chorem.org/repositories/revision/pollen/3491 Log: refs #618: change urls Modified: trunk/pollen-services/src/main/java/org/chorem/pollen/services/impl/PollUrlService.java Modified: trunk/pollen-services/src/main/java/org/chorem/pollen/services/impl/PollUrlService.java =================================================================== --- trunk/pollen-services/src/main/java/org/chorem/pollen/services/impl/PollUrlService.java 2012-06-16 12:01:22 UTC (rev 3490) +++ trunk/pollen-services/src/main/java/org/chorem/pollen/services/impl/PollUrlService.java 2012-06-16 12:36:30 UTC (rev 3491) @@ -39,55 +39,56 @@ public class PollUrlService extends PollenServiceSupport { public PollUrl getPollSummaryUrl(Poll poll) { - - PollUrl result = newPollUri(PollActions.SUMMARY, poll, true); + PollUrl result = newPollUrl(PollActions.SUMMARY, poll, true); return result; } public PollUrl getPollCloneUrl(Poll poll) { - - PollUrl result = newPollUri(PollActions.CLONE, poll, true); + PollUrl result = newPollUrl(PollActions.CLONE, poll, true); + result.setSuffixUrl("!input"); return result; } public PollUrl getPollExportUrl(Poll poll) { - - PollUrl result = newPollUri(PollActions.EXPORT, poll, true); + PollUrl result = newPollUrl(PollActions.EXPORT, poll, true); return result; } public PollUrl getPollVoteUrl(Poll poll) { - PollUrl result = newPollUri(PollActions.VOTE, poll, false); + PollUrl result = newPollUrl(PollActions.VOTE, poll, false); return result; } public PollUrl getPollVoteUrl(Poll poll, PollAccount pollAccount) { - PollUrl result = newPollUri(PollActions.VOTE, poll, pollAccount); + PollUrl result = newPollUrl(PollActions.VOTE, poll, pollAccount); return result; } public PollUrl getPollModerateUrl(Poll poll) { - PollUrl result = newPollUri(PollActions.MODERATE, poll, true); + PollUrl result = newPollUrl(PollActions.MODERATE, poll, true); return result; } public PollUrl getPollEditUrl(Poll poll) { - PollUrl result = newPollUri(PollActions.EDIT, poll, true); + PollUrl result = newPollUrl(PollActions.EDIT, poll, true); + result.setSuffixUrl("!input"); return result; } public PollUrl getPollResultUrl(Poll poll) { - PollUrl result = newPollUri(PollActions.RESULT, poll, + PollUrl result = newPollUrl(PollActions.RESULT, poll, !poll.isPublicResults()); return result; } - protected PollUrl newPollUri(PollActions action, Poll poll, boolean admin) { + protected PollUrl newPollUrl(PollActions action, Poll poll, boolean admin) { Preconditions.checkNotNull(poll); - return newPollUri(action, poll, admin ? poll.getCreator() : null); + return newPollUrl(action, poll, admin ? poll.getCreator() : null); } - protected PollUrl newPollUri(PollActions action, Poll poll, PollAccount pollAccount) { + protected PollUrl newPollUrl(PollActions action, + Poll poll, + PollAccount pollAccount) { Preconditions.checkNotNull(poll); Preconditions.checkNotNull(action); @@ -104,7 +105,6 @@ // no account id pollUri = PollUri.newPollUri(poll.getPollId()); - } else { // add account id
participants (1)
-
tchemit@users.chorem.org