/connect-web/src/main/java/org/osforce/connect/web/route/RouteController.java

http://focus-sns.googlecode.com/ · Java · 434 lines · 348 code · 51 blank · 35 comment · 0 complexity · ea9e89b58abd0cf71b0dabeeb92d4406 MD5 · raw file

  1. package org.osforce.connect.web.route;
  2. import org.osforce.connect.entity.system.ProjectFeature;
  3. import org.osforce.connect.web.AttributeKeys;
  4. import org.springframework.stereotype.Controller;
  5. import org.springframework.web.bind.annotation.PathVariable;
  6. import org.springframework.web.bind.annotation.RequestMapping;
  7. import org.springframework.web.bind.annotation.RequestMethod;
  8. import org.springframework.web.context.request.WebRequest;
  9. /**
  10. *
  11. * @author <a href="mailto:haozhonghu@hotmail.com">gavin</a>
  12. * @since 1.1.0
  13. * @create May 18, 2011 - 9:31:37 PM
  14. * <a href="http://www.opensourceforce.org">????</a>
  15. */
  16. @Controller
  17. public class RouteController {
  18. // ----------------------------------------------- Custom Pages ------------------------------------------------ //
  19. @RequestMapping(value={"/", "/home"}, method=RequestMethod.GET)
  20. public String route0() {
  21. return "page:dashboards?path=/home";
  22. }
  23. @RequestMapping(value={"/login"}, method=RequestMethod.GET)
  24. public String route10() {
  25. return "page:system/login";
  26. }
  27. @RequestMapping(value={"/register"}, method=RequestMethod.GET)
  28. public String route11() {
  29. return "page:system/register";
  30. }
  31. @RequestMapping(value={"/logout"}, method=RequestMethod.GET)
  32. public String route20() {
  33. return "forward:system/user/logout-action";
  34. }
  35. @RequestMapping(value={"/search/profile"}, method=RequestMethod.GET)
  36. public String route30() {
  37. return "page:search/profile-result";
  38. }
  39. @RequestMapping(value={"/{categoryCode}"}, method=RequestMethod.GET)
  40. public String route90(@PathVariable String categoryCode, WebRequest request) {
  41. request.setAttribute("categoryCode", categoryCode, WebRequest.SCOPE_REQUEST);
  42. return String.format("page:dashboards?path=/%s", categoryCode);
  43. }
  44. @RequestMapping(value={"/{categoryCode}/{mode}"}, method=RequestMethod.GET)
  45. public String route91(@PathVariable String categoryCode,
  46. @PathVariable String mode, WebRequest request) {
  47. request.setAttribute("mode", mode, WebRequest.SCOPE_REQUEST);
  48. request.setAttribute("categoryCode", categoryCode, WebRequest.SCOPE_REQUEST);
  49. return String.format("page:dashboards?path=/%s", categoryCode);
  50. }
  51. @RequestMapping(value={"/{categoryCode}/form"}, method=RequestMethod.GET)
  52. public String route92(@PathVariable String categoryCode, WebRequest request) {
  53. request.setAttribute("categoryCode", categoryCode, WebRequest.SCOPE_REQUEST);
  54. return String.format("page:system/project-form", categoryCode);
  55. }
  56. @RequestMapping(value={"/app/user/login"}, method=RequestMethod.GET)
  57. public String route98(WebRequest request) {
  58. request.setAttribute("popup", Boolean.TRUE, WebRequest.SCOPE_REQUEST);
  59. return "page:apps/login-form";
  60. }
  61. @RequestMapping(value={"/app/message/form"}, method=RequestMethod.GET)
  62. public String route99(WebRequest request) {
  63. request.setAttribute("popup", Boolean.TRUE, WebRequest.SCOPE_REQUEST);
  64. return "page:apps/message-form";
  65. }
  66. // ----------------------------------------------- Custom Pages ------------------------------------------------ //
  67. // ----------------------------------------------- System Module ------------------------------------------------ //
  68. @RequestMapping(value={"/system", "/system/welcome"}, method=RequestMethod.GET)
  69. public String route100() {
  70. return "page:system/welcome";
  71. }
  72. @RequestMapping(value={"/system/site/{mode}"})
  73. public String route101(@PathVariable String mode) {
  74. return String.format("page:system/site-%s", mode);
  75. }
  76. @RequestMapping(value={"/system/resource/{mode}"}, method=RequestMethod.GET)
  77. public String route102(@PathVariable String mode) {
  78. return String.format("page:system/resource-%s", mode);
  79. }
  80. @RequestMapping(value={"/system/category/{mode}"}, method=RequestMethod.GET)
  81. public String route103(@PathVariable String mode) {
  82. return String.format("page:system/category-%s", mode);
  83. }
  84. @RequestMapping(value={"/system/template/{mode}"}, method=RequestMethod.GET)
  85. public String route104(@PathVariable String mode) {
  86. return String.format("page:system/template-%s", mode);
  87. }
  88. @RequestMapping(value={"/system/user/{mode}"}, method=RequestMethod.GET)
  89. public String route105(@PathVariable String mode) {
  90. return String.format("page:system/user-%s", mode);
  91. }
  92. @RequestMapping(value={"/system/role/{mode}"}, method=RequestMethod.GET)
  93. public String route106(@PathVariable String mode) {
  94. return String.format("page:system/role-%s", mode);
  95. }
  96. @RequestMapping(value={"/system/permission/{mode}"}, method=RequestMethod.GET)
  97. public String route107(@PathVariable String mode) {
  98. return String.format("page:system/permission-%s", mode);
  99. }
  100. // ----------------------------------------------- System Module ------------------------------------------------ //
  101. // ----------------------------------------------- Profile Module ------------------------------------------------ //
  102. @RequestMapping(value={"/{uniqueId}/profile"}, method=RequestMethod.GET)
  103. public String route120(@PathVariable String uniqueId, WebRequest webRequest) {
  104. webRequest.setAttribute(AttributeKeys.PROJECT_UNIQUE_KEY_READABLE,
  105. uniqueId, WebRequest.SCOPE_REQUEST);
  106. webRequest.setAttribute(AttributeKeys.FEATURE_CODE_KEY_READABLE,
  107. "profile", WebRequest.SCOPE_REQUEST);
  108. return "page:profile/profile-detail";
  109. }
  110. @RequestMapping(value={"/{uniqueId}/profile/form"}, method=RequestMethod.GET)
  111. public String route121(@PathVariable String uniqueId, WebRequest webRequest) {
  112. webRequest.setAttribute(AttributeKeys.PROJECT_UNIQUE_KEY_READABLE,
  113. uniqueId, WebRequest.SCOPE_REQUEST);
  114. webRequest.setAttribute(AttributeKeys.FEATURE_CODE_KEY_READABLE,
  115. ProjectFeature.FEATURE_PROFILE, WebRequest.SCOPE_REQUEST);
  116. return "page:profile/profile-form";
  117. }
  118. // ----------------------------------------------- Profile Module ------------------------------------------------ //
  119. // ------------------------------------------- Knowledge Module --------------------------------------------- //
  120. @RequestMapping(value={"/{uniqueId}/knowledge"}, method=RequestMethod.GET)
  121. public String route140(@PathVariable String uniqueId, WebRequest webRequest) {
  122. webRequest.setAttribute(AttributeKeys.PROJECT_UNIQUE_KEY_READABLE,
  123. uniqueId, WebRequest.SCOPE_REQUEST);
  124. webRequest.setAttribute(AttributeKeys.FEATURE_CODE_KEY_READABLE,
  125. ProjectFeature.FEATURE_KNOWLEDGE, WebRequest.SCOPE_REQUEST);
  126. return "page:knowledge/question-list";
  127. }
  128. @RequestMapping(value={"/{uniqueId}/knowledge/question/{mode}"}, method=RequestMethod.GET)
  129. public String route141(@PathVariable String uniqueId,
  130. @PathVariable String mode, WebRequest webRequest) {
  131. webRequest.setAttribute(AttributeKeys.PROJECT_UNIQUE_KEY_READABLE,
  132. uniqueId, WebRequest.SCOPE_REQUEST);
  133. webRequest.setAttribute(AttributeKeys.FEATURE_CODE_KEY_READABLE,
  134. ProjectFeature.FEATURE_KNOWLEDGE, WebRequest.SCOPE_REQUEST);
  135. return String.format("page:knowledge/question-%s", mode);
  136. }
  137. @RequestMapping(value={"/{uniqueId}/knowledge/answer/{mode}"}, method=RequestMethod.GET)
  138. public String route142(@PathVariable String uniqueId,
  139. @PathVariable String mode, WebRequest webRequest) {
  140. webRequest.setAttribute(AttributeKeys.PROJECT_UNIQUE_KEY_READABLE,
  141. uniqueId, WebRequest.SCOPE_REQUEST);
  142. webRequest.setAttribute(AttributeKeys.FEATURE_CODE_KEY_READABLE,
  143. ProjectFeature.FEATURE_KNOWLEDGE, WebRequest.SCOPE_REQUEST);
  144. return String.format("page:knowledge/answer-%s", mode);
  145. }
  146. // ------------------------------------------- Knowledge Module --------------------------------------------- //
  147. // -------------------------------------------- Calendar Module ----------------------------------------------- //
  148. @RequestMapping(value={"/{uniqueId}/calendar"}, method=RequestMethod.GET)
  149. public String route160(@PathVariable String uniqueId, WebRequest webRequest) {
  150. webRequest.setAttribute(AttributeKeys.PROJECT_UNIQUE_KEY_READABLE,
  151. uniqueId, WebRequest.SCOPE_REQUEST);
  152. webRequest.setAttribute(AttributeKeys.FEATURE_CODE_KEY_READABLE,
  153. ProjectFeature.FEATURE_CALENDAR, WebRequest.SCOPE_REQUEST);
  154. return "page:calendar/event-list";
  155. }
  156. @RequestMapping(value={"/{uniqueId}/calendar/event/{mode}"}, method=RequestMethod.GET)
  157. public String route161(@PathVariable String uniqueId,
  158. @PathVariable String mode, WebRequest webRequest) {
  159. webRequest.setAttribute(AttributeKeys.PROJECT_UNIQUE_KEY_READABLE,
  160. uniqueId, WebRequest.SCOPE_REQUEST);
  161. webRequest.setAttribute(AttributeKeys.FEATURE_CODE_KEY_READABLE,
  162. ProjectFeature.FEATURE_CALENDAR, WebRequest.SCOPE_REQUEST);
  163. return String.format("page:calendar/event-%s", mode);
  164. }
  165. // -------------------------------------------- Calendar Module ----------------------------------------------- //
  166. // ----------------------------------------------- Blog Module -------------------------------------------------- //
  167. @RequestMapping(value={"/{uniqueId}/blog"}, method=RequestMethod.GET)
  168. public String route180(@PathVariable String uniqueId, WebRequest webRequest) {
  169. webRequest.setAttribute(AttributeKeys.PROJECT_UNIQUE_KEY_READABLE,
  170. uniqueId, WebRequest.SCOPE_REQUEST);
  171. webRequest.setAttribute(AttributeKeys.FEATURE_CODE_KEY_READABLE,
  172. ProjectFeature.FEATURE_BLOG, WebRequest.SCOPE_REQUEST);
  173. return "page:blog/post-list";
  174. }
  175. @RequestMapping(value={"/{uniqueId}/blog/post/{mode}"}, method=RequestMethod.GET)
  176. public String route181(@PathVariable String uniqueId,
  177. @PathVariable String mode, WebRequest webRequest) {
  178. webRequest.setAttribute(AttributeKeys.PROJECT_UNIQUE_KEY_READABLE,
  179. uniqueId, WebRequest.SCOPE_REQUEST);
  180. webRequest.setAttribute(AttributeKeys.FEATURE_CODE_KEY_READABLE,
  181. ProjectFeature.FEATURE_BLOG, WebRequest.SCOPE_REQUEST);
  182. return String.format("page:blog/post-%s", mode);
  183. }
  184. @RequestMapping(value={"/{uniqueId}/blog/category/{mode}"}, method=RequestMethod.GET)
  185. public String route182(@PathVariable String uniqueId,
  186. @PathVariable String mode, WebRequest webRequest) {
  187. webRequest.setAttribute(AttributeKeys.PROJECT_UNIQUE_KEY_READABLE,
  188. uniqueId, WebRequest.SCOPE_REQUEST);
  189. webRequest.setAttribute(AttributeKeys.FEATURE_CODE_KEY_READABLE,
  190. ProjectFeature.FEATURE_BLOG, WebRequest.SCOPE_REQUEST);
  191. return String.format("page:blog/category-%s", mode);
  192. }
  193. // ----------------------------------------------- Blog Module -------------------------------------------------- //
  194. // --------------------------------------------- Gallery Module ------------------------------------------------- //
  195. @RequestMapping(value={"/{uniqueId}/gallery"}, method=RequestMethod.GET)
  196. public String route200(@PathVariable String uniqueId, WebRequest webRequest) {
  197. webRequest.setAttribute(AttributeKeys.PROJECT_UNIQUE_KEY_READABLE,
  198. uniqueId, WebRequest.SCOPE_REQUEST);
  199. webRequest.setAttribute(AttributeKeys.FEATURE_CODE_KEY_READABLE,
  200. ProjectFeature.FEATURE_GALLERY, WebRequest.SCOPE_REQUEST);
  201. return "page:gallery/album-list";
  202. }
  203. @RequestMapping(value={"/{uniqueId}/gallery/album/{mode}"}, method=RequestMethod.GET)
  204. public String route201(@PathVariable String uniqueId,
  205. @PathVariable String mode, WebRequest webRequest) {
  206. webRequest.setAttribute(AttributeKeys.PROJECT_UNIQUE_KEY_READABLE,
  207. uniqueId, WebRequest.SCOPE_REQUEST);
  208. webRequest.setAttribute(AttributeKeys.FEATURE_CODE_KEY_READABLE,
  209. ProjectFeature.FEATURE_GALLERY, WebRequest.SCOPE_REQUEST);
  210. return String.format("page:gallery/album-%s", mode);
  211. }
  212. @RequestMapping(value={"/{uniqueId}/gallery/photo/{mode}"}, method=RequestMethod.GET)
  213. public String route202(@PathVariable String uniqueId,
  214. @PathVariable String mode, WebRequest webRequest) {
  215. webRequest.setAttribute(AttributeKeys.PROJECT_UNIQUE_KEY_READABLE,
  216. uniqueId, WebRequest.SCOPE_REQUEST);
  217. webRequest.setAttribute(AttributeKeys.FEATURE_CODE_KEY_READABLE,
  218. ProjectFeature.FEATURE_GALLERY, WebRequest.SCOPE_REQUEST);
  219. return String.format("page:gallery/photo-%s", mode);
  220. }
  221. // --------------------------------------------- Gallery Module ------------------------------------------------- //
  222. // ------------------------------------------ Discussion Module ---------------------------------------------- //
  223. @RequestMapping(value={"/{uniqueId}/discussion"}, method=RequestMethod.GET)
  224. public String route220(@PathVariable String uniqueId, WebRequest webRequest) {
  225. webRequest.setAttribute(AttributeKeys.PROJECT_UNIQUE_KEY_READABLE,
  226. uniqueId, WebRequest.SCOPE_REQUEST);
  227. webRequest.setAttribute(AttributeKeys.FEATURE_CODE_KEY_READABLE,
  228. ProjectFeature.FEATURE_DISCUSSION, WebRequest.SCOPE_REQUEST);
  229. return "page:discussion/forum-list";
  230. }
  231. @RequestMapping(value={"/{uniqueId}/discussion/forum/{mode}"}, method=RequestMethod.GET)
  232. public String route221(@PathVariable String uniqueId,
  233. @PathVariable String mode, WebRequest webRequest) {
  234. webRequest.setAttribute(AttributeKeys.PROJECT_UNIQUE_KEY_READABLE,
  235. uniqueId, WebRequest.SCOPE_REQUEST);
  236. webRequest.setAttribute(AttributeKeys.FEATURE_CODE_KEY_READABLE,
  237. ProjectFeature.FEATURE_DISCUSSION, WebRequest.SCOPE_REQUEST);
  238. return String.format("page:discussion/forum-%s", mode);
  239. }
  240. @RequestMapping(value={"/{uniqueId}/discussion/topic/{mode}"}, method=RequestMethod.GET)
  241. public String route222(@PathVariable String uniqueId,
  242. @PathVariable String mode, WebRequest webRequest) {
  243. webRequest.setAttribute(AttributeKeys.PROJECT_UNIQUE_KEY_READABLE,
  244. uniqueId, WebRequest.SCOPE_REQUEST);
  245. webRequest.setAttribute(AttributeKeys.FEATURE_CODE_KEY_READABLE,
  246. ProjectFeature.FEATURE_DISCUSSION, WebRequest.SCOPE_REQUEST);
  247. return String.format("page:discussion/topic-%s", mode);
  248. }
  249. @RequestMapping(value={"/{uniqueId}/discussion/reply/{mode}"}, method=RequestMethod.GET)
  250. public String route223(@PathVariable String uniqueId,
  251. @PathVariable String mode, WebRequest webRequest) {
  252. webRequest.setAttribute(AttributeKeys.PROJECT_UNIQUE_KEY_READABLE,
  253. uniqueId, WebRequest.SCOPE_REQUEST);
  254. webRequest.setAttribute(AttributeKeys.FEATURE_CODE_KEY_READABLE,
  255. ProjectFeature.FEATURE_DISCUSSION, WebRequest.SCOPE_REQUEST);
  256. return String.format("page:discussion/reply-%s", mode);
  257. }
  258. // ------------------------------------------ Discussion Module ---------------------------------------------- //
  259. // ------------------------------------------- Document Module ---------------------------------------------- //
  260. @RequestMapping(value={"/{uniqueId}/document"}, method=RequestMethod.GET)
  261. public String route240(@PathVariable String uniqueId, WebRequest webRequest) {
  262. webRequest.setAttribute(AttributeKeys.PROJECT_UNIQUE_KEY_READABLE,
  263. uniqueId, WebRequest.SCOPE_REQUEST);
  264. webRequest.setAttribute(AttributeKeys.FEATURE_CODE_KEY_READABLE,
  265. ProjectFeature.FEATURE_DOCUMENT, WebRequest.SCOPE_REQUEST);
  266. return "page:document/file-list";
  267. }
  268. @RequestMapping(value={"/{uniqueId}/document/file/{mode}"}, method=RequestMethod.GET)
  269. public String route241(@PathVariable String uniqueId,
  270. @PathVariable String mode, WebRequest webRequest) {
  271. webRequest.setAttribute(AttributeKeys.PROJECT_UNIQUE_KEY_READABLE,
  272. uniqueId, WebRequest.SCOPE_REQUEST);
  273. webRequest.setAttribute(AttributeKeys.FEATURE_CODE_KEY_READABLE,
  274. ProjectFeature.FEATURE_DOCUMENT, WebRequest.SCOPE_REQUEST);
  275. return String.format("page:document/file-%s", mode);
  276. }
  277. @RequestMapping(value={"/{uniqueId}/document/folder/{mode}"}, method=RequestMethod.GET)
  278. public String route242(@PathVariable String uniqueId,
  279. @PathVariable String mode, WebRequest webRequest) {
  280. webRequest.setAttribute(AttributeKeys.PROJECT_UNIQUE_KEY_READABLE,
  281. uniqueId, WebRequest.SCOPE_REQUEST);
  282. webRequest.setAttribute(AttributeKeys.FEATURE_CODE_KEY_READABLE,
  283. ProjectFeature.FEATURE_DOCUMENT, WebRequest.SCOPE_REQUEST);
  284. return String.format("page:document/folder-%s", mode);
  285. }
  286. // ------------------------------------------- Document Module ---------------------------------------------- //
  287. // ---------------------------------------------- Team Module ------------------------------------------------- //
  288. @RequestMapping(value={"/{uniqueId}/team"}, method=RequestMethod.GET)
  289. public String route260(@PathVariable String uniqueId, WebRequest webRequest) {
  290. webRequest.setAttribute(AttributeKeys.PROJECT_UNIQUE_KEY_READABLE,
  291. uniqueId, WebRequest.SCOPE_REQUEST);
  292. webRequest.setAttribute(AttributeKeys.FEATURE_CODE_KEY_READABLE,
  293. ProjectFeature.FEATURE_TEAM, WebRequest.SCOPE_REQUEST);
  294. return "page:team/member-list";
  295. }
  296. @RequestMapping(value={"/{uniqueId}/team/member/{mode}"}, method=RequestMethod.GET)
  297. public String route260(@PathVariable String uniqueId,
  298. @PathVariable String mode, WebRequest webRequest) {
  299. webRequest.setAttribute(AttributeKeys.PROJECT_UNIQUE_KEY_READABLE,
  300. uniqueId, WebRequest.SCOPE_REQUEST);
  301. webRequest.setAttribute(AttributeKeys.FEATURE_CODE_KEY_READABLE,
  302. ProjectFeature.FEATURE_TEAM, WebRequest.SCOPE_REQUEST);
  303. return String.format("page:team/member-%s", mode);
  304. }
  305. // ---------------------------------------------- Team Module ------------------------------------------------- //
  306. // -------------------------------------------- Message Module ----------------------------------------------- //
  307. @RequestMapping(value={"/{uniqueId}/message"}, method=RequestMethod.GET)
  308. public String route300(@PathVariable String uniqueId, WebRequest webRequest) {
  309. webRequest.setAttribute(AttributeKeys.PROJECT_UNIQUE_KEY_READABLE,
  310. uniqueId, WebRequest.SCOPE_REQUEST);
  311. webRequest.setAttribute(AttributeKeys.FEATURE_CODE_KEY_READABLE,
  312. ProjectFeature.FEATURE_MESSAGE, WebRequest.SCOPE_REQUEST);
  313. return "page:message/message-inbox";
  314. }
  315. @RequestMapping(value={"/{uniqueId}/message/{mode}"}, method=RequestMethod.GET)
  316. public String route301(@PathVariable String uniqueId,
  317. @PathVariable String mode, WebRequest webRequest) {
  318. webRequest.setAttribute(AttributeKeys.PROJECT_UNIQUE_KEY_READABLE,
  319. uniqueId, WebRequest.SCOPE_REQUEST);
  320. webRequest.setAttribute(AttributeKeys.FEATURE_CODE_KEY_READABLE,
  321. ProjectFeature.FEATURE_MESSAGE, WebRequest.SCOPE_REQUEST);
  322. return String.format("page:message/message-%s", mode);
  323. }
  324. @RequestMapping(value={"/{uniqueId}/message/{box}/{mode}"}, method=RequestMethod.GET)
  325. public String route302(@PathVariable String uniqueId,
  326. @PathVariable String box, @PathVariable String mode, WebRequest webRequest) {
  327. webRequest.setAttribute(AttributeKeys.PROJECT_UNIQUE_KEY_READABLE,
  328. uniqueId, WebRequest.SCOPE_REQUEST);
  329. webRequest.setAttribute(AttributeKeys.FEATURE_CODE_KEY_READABLE,
  330. ProjectFeature.FEATURE_MESSAGE, WebRequest.SCOPE_REQUEST);
  331. webRequest.setAttribute("box", box, WebRequest.SCOPE_REQUEST);
  332. return String.format("page:message/message-%s", mode);
  333. }
  334. // -------------------------------------------- Message Module ----------------------------------------------- //
  335. // ---------------------------------------------- Admin Module ------------------------------------------------- //
  336. @RequestMapping(value={"/{uniqueId}/admin"}, method=RequestMethod.GET)
  337. public String route280(@PathVariable String uniqueId, WebRequest webRequest) {
  338. webRequest.setAttribute(AttributeKeys.PROJECT_UNIQUE_KEY_READABLE,
  339. uniqueId, WebRequest.SCOPE_REQUEST);
  340. webRequest.setAttribute(AttributeKeys.FEATURE_CODE_KEY_READABLE,
  341. ProjectFeature.FEATURE_ADMIN, WebRequest.SCOPE_REQUEST);
  342. return "page:admin/welcome";
  343. }
  344. @RequestMapping(value={"/{uniqueId}/admin/{target}/form"}, method=RequestMethod.GET)
  345. public String route281(@PathVariable String uniqueId,
  346. @PathVariable String target, WebRequest webRequest) {
  347. webRequest.setAttribute(AttributeKeys.PROJECT_UNIQUE_KEY_READABLE,
  348. uniqueId, WebRequest.SCOPE_REQUEST);
  349. webRequest.setAttribute(AttributeKeys.FEATURE_CODE_KEY_READABLE,
  350. ProjectFeature.FEATURE_ADMIN, WebRequest.SCOPE_REQUEST);
  351. return String.format("page:admin/%s-form", target);
  352. }
  353. // ---------------------------------------------- Admin Module ------------------------------------------------- //
  354. // ---------------------------------------------- List Module ------------------------------------------------- //
  355. @RequestMapping(value={"/{uniqueId}/list"})
  356. public String route320(@PathVariable String uniqueId, WebRequest webRequest) {
  357. webRequest.setAttribute(AttributeKeys.PROJECT_UNIQUE_KEY_READABLE,
  358. uniqueId, WebRequest.SCOPE_REQUEST);
  359. webRequest.setAttribute(AttributeKeys.FEATURE_CODE_KEY_READABLE,
  360. ProjectFeature.FEATURE_LIST, WebRequest.SCOPE_REQUEST);
  361. return "page:list/link-list";
  362. }
  363. // ---------------------------------------------- List Module ------------------------------------------------- //
  364. // ---------------------------------------------- Review Module ------------------------------------------------- //
  365. @RequestMapping(value={"/{uniqueId}/review"})
  366. public String route340(@PathVariable String uniqueId, WebRequest webRequest) {
  367. webRequest.setAttribute(AttributeKeys.PROJECT_UNIQUE_KEY_READABLE,
  368. uniqueId, WebRequest.SCOPE_REQUEST);
  369. webRequest.setAttribute(AttributeKeys.FEATURE_CODE_KEY_READABLE,
  370. ProjectFeature.FEATURE_REVIEW, WebRequest.SCOPE_REQUEST);
  371. return "page:review/rating-list";
  372. }
  373. @RequestMapping(value={"/{uniqueId}/review/rating/{mode}"})
  374. public String route340(@PathVariable String uniqueId,
  375. @PathVariable String mode, WebRequest webRequest) {
  376. webRequest.setAttribute(AttributeKeys.PROJECT_UNIQUE_KEY_READABLE,
  377. uniqueId, WebRequest.SCOPE_REQUEST);
  378. webRequest.setAttribute(AttributeKeys.FEATURE_CODE_KEY_READABLE,
  379. ProjectFeature.FEATURE_REVIEW, WebRequest.SCOPE_REQUEST);
  380. return String.format("page:review/rating-%s", mode);
  381. }
  382. // ---------------------------------------------- List Module ------------------------------------------------- //
  383. }