Browse files

Added domain as a plugin

  • Loading branch information...
1 parent a79aaf0 commit 64a8a11d5dfd85910db4833e488e1c93f41f8e0c @mirhagen mirhagen committed Jan 15, 2010
Showing with 9,393 additions and 0 deletions.
  1. +11 −0 qanban-domain-plugin/QanbanDomain-test.launch
  2. +19 −0 qanban-domain-plugin/QanbanDomain.launch
  3. +73 −0 qanban-domain-plugin/QanbanDomain.tmproj
  4. +50 −0 qanban-domain-plugin/QanbanDomainGrailsPlugin.groovy
  5. +6 −0 qanban-domain-plugin/application.properties
  6. +142 −0 qanban-domain-plugin/build.xml
  7. +32 −0 qanban-domain-plugin/grails-app/conf/DataSource.groovy
  8. +11 −0 qanban-domain-plugin/grails-app/conf/UrlMappings.groovy
  9. +35 −0 qanban-domain-plugin/grails-app/domain/se/qbranch/qanban/Board.groovy
  10. +43 −0 qanban-domain-plugin/grails-app/domain/se/qbranch/qanban/BoardEvent.groovy
  11. +49 −0 qanban-domain-plugin/grails-app/domain/se/qbranch/qanban/BoardEventCreate.groovy
  12. +53 −0 qanban-domain-plugin/grails-app/domain/se/qbranch/qanban/Card.groovy
  13. +41 −0 qanban-domain-plugin/grails-app/domain/se/qbranch/qanban/CardEvent.groovy
  14. +98 −0 qanban-domain-plugin/grails-app/domain/se/qbranch/qanban/CardEventCreate.groovy
  15. +73 −0 qanban-domain-plugin/grails-app/domain/se/qbranch/qanban/CardEventDelete.groovy
  16. +81 −0 qanban-domain-plugin/grails-app/domain/se/qbranch/qanban/CardEventMove.groovy
  17. +57 −0 qanban-domain-plugin/grails-app/domain/se/qbranch/qanban/CardEventSetAssignee.groovy
  18. +80 −0 qanban-domain-plugin/grails-app/domain/se/qbranch/qanban/CardEventUpdate.groovy
  19. +80 −0 qanban-domain-plugin/grails-app/domain/se/qbranch/qanban/Event.groovy
  20. +53 −0 qanban-domain-plugin/grails-app/domain/se/qbranch/qanban/Phase.groovy
  21. +39 −0 qanban-domain-plugin/grails-app/domain/se/qbranch/qanban/PhaseEvent.groovy
  22. +82 −0 qanban-domain-plugin/grails-app/domain/se/qbranch/qanban/PhaseEventCreate.groovy
  23. +77 −0 qanban-domain-plugin/grails-app/domain/se/qbranch/qanban/PhaseEventDelete.groovy
  24. +54 −0 qanban-domain-plugin/grails-app/domain/se/qbranch/qanban/PhaseEventMove.groovy
  25. +76 −0 qanban-domain-plugin/grails-app/domain/se/qbranch/qanban/PhaseEventUpdate.groovy
  26. +41 −0 qanban-domain-plugin/grails-app/domain/se/qbranch/qanban/Role.groovy
  27. +62 −0 qanban-domain-plugin/grails-app/domain/se/qbranch/qanban/User.groovy
  28. +38 −0 qanban-domain-plugin/grails-app/domain/se/qbranch/qanban/UserEvent.groovy
  29. +80 −0 qanban-domain-plugin/grails-app/domain/se/qbranch/qanban/UserEventCreate.groovy
  30. +4 −0 qanban-domain-plugin/grails-app/migrations/changelog.xml
  31. +29 −0 qanban-domain-plugin/grails-app/services/se/qbranch/qanban/EventService.groovy
  32. +54 −0 qanban-domain-plugin/grails-app/views/error.gsp
  33. +28 −0 qanban-domain-plugin/ivy.xml
  34. +15 −0 qanban-domain-plugin/ivysettings.xml
  35. +36 −0 qanban-domain-plugin/plugin.xml
  36. +101 −0 qanban-domain-plugin/scripts/DbDiffIncremental.groovy
  37. +10 −0 qanban-domain-plugin/scripts/_Install.groovy
  38. +5 −0 qanban-domain-plugin/scripts/_Uninstall.groovy
  39. +10 −0 qanban-domain-plugin/scripts/_Upgrade.groovy
  40. +10 −0 qanban-domain-plugin/test/reports/TEST-se.qbranch.qanban.BoardEventCreateTests.xml
  41. +9 −0 qanban-domain-plugin/test/reports/TEST-se.qbranch.qanban.BoardTests.xml
  42. +27 −0 qanban-domain-plugin/test/reports/TEST-se.qbranch.qanban.CardEventCreateTests.xml
  43. +15 −0 qanban-domain-plugin/test/reports/TEST-se.qbranch.qanban.CardEventDeleteTests.xml
  44. +44 −0 qanban-domain-plugin/test/reports/TEST-se.qbranch.qanban.CardEventMoveTests.xml
  45. +15 −0 qanban-domain-plugin/test/reports/TEST-se.qbranch.qanban.CardEventSetAssigneeTests.xml
  46. +9 −0 qanban-domain-plugin/test/reports/TEST-se.qbranch.qanban.CardEventTests.xml
  47. +25 −0 qanban-domain-plugin/test/reports/TEST-se.qbranch.qanban.CardEventUpdateTests.xml
  48. +9 −0 qanban-domain-plugin/test/reports/TEST-se.qbranch.qanban.CardTests.xml
  49. +9 −0 qanban-domain-plugin/test/reports/TEST-se.qbranch.qanban.EventServiceTests.xml
  50. +11 −0 qanban-domain-plugin/test/reports/TEST-se.qbranch.qanban.EventTests.xml
  51. +16 −0 qanban-domain-plugin/test/reports/TEST-se.qbranch.qanban.PhaseEventCreateTests.xml
  52. +15 −0 qanban-domain-plugin/test/reports/TEST-se.qbranch.qanban.PhaseEventDeleteTests.xml
  53. +15 −0 qanban-domain-plugin/test/reports/TEST-se.qbranch.qanban.PhaseEventMoveTests.xml
  54. +9 −0 qanban-domain-plugin/test/reports/TEST-se.qbranch.qanban.PhaseEventTests.xml
  55. +15 −0 qanban-domain-plugin/test/reports/TEST-se.qbranch.qanban.PhaseEventUpdateTests.xml
  56. +16 −0 qanban-domain-plugin/test/reports/TEST-se.qbranch.qanban.PhaseTests.xml
  57. +21 −0 qanban-domain-plugin/test/reports/TEST-se.qbranch.qanban.UserEventCreateTests.xml
  58. +360 −0 qanban-domain-plugin/test/reports/TESTS-TestSuites.xml
  59. +115 −0 qanban-domain-plugin/test/reports/html/all-tests.html
  60. +66 −0 qanban-domain-plugin/test/reports/html/allclasses-frame.html
  61. +22 −0 qanban-domain-plugin/test/reports/html/alltests-errors.html
  62. +22 −0 qanban-domain-plugin/test/reports/html/alltests-fails.html
  63. +19 −0 qanban-domain-plugin/test/reports/html/index.html
  64. +18 −0 qanban-domain-plugin/test/reports/html/overview-frame.html
  65. +41 −0 qanban-domain-plugin/test/reports/html/overview-summary.html
  66. +2 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/0_BoardEventCreateTests-err.txt
  67. +3 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/0_BoardEventCreateTests-out.txt
  68. +83 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/0_BoardEventCreateTests.html
  69. +2 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/10_EventTests-err.txt
  70. +4 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/10_EventTests-out.txt
  71. +83 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/10_EventTests.html
  72. +4 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/11_PhaseEventCreateTests-err.txt
  73. +5 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/11_PhaseEventCreateTests-out.txt
  74. +89 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/11_PhaseEventCreateTests.html
  75. +2 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/12_PhaseEventDeleteTests-err.txt
  76. +8 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/12_PhaseEventDeleteTests-out.txt
  77. +83 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/12_PhaseEventDeleteTests.html
  78. +2 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/13_PhaseEventMoveTests-err.txt
  79. +8 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/13_PhaseEventMoveTests-out.txt
  80. +83 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/13_PhaseEventMoveTests.html
  81. +2 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/14_PhaseEventTests-err.txt
  82. +2 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/14_PhaseEventTests-out.txt
  83. +83 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/14_PhaseEventTests.html
  84. +2 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/15_PhaseEventUpdateTests-err.txt
  85. +8 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/15_PhaseEventUpdateTests-out.txt
  86. +83 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/15_PhaseEventUpdateTests.html
  87. +4 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/16_PhaseTests-err.txt
  88. +5 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/16_PhaseTests-out.txt
  89. +89 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/16_PhaseTests.html
  90. +6 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/17_UserEventCreateTests-err.txt
  91. +6 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/17_UserEventCreateTests-out.txt
  92. +95 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/17_UserEventCreateTests.html
  93. +2 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/1_BoardTests-err.txt
  94. +2 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/1_BoardTests-out.txt
  95. +83 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/1_BoardTests.html
  96. +3 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/2_CardEventCreateTests-err.txt
  97. +18 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/2_CardEventCreateTests-out.txt
  98. +86 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/2_CardEventCreateTests.html
  99. +2 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/3_CardEventDeleteTests-err.txt
  100. +8 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/3_CardEventDeleteTests-out.txt
  101. +83 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/3_CardEventDeleteTests.html
  102. +5 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/4_CardEventMoveTests-err.txt
  103. +31 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/4_CardEventMoveTests-out.txt
  104. +92 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/4_CardEventMoveTests.html
  105. +2 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/5_CardEventSetAssigneeTests-err.txt
  106. +8 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/5_CardEventSetAssigneeTests-out.txt
  107. +83 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/5_CardEventSetAssigneeTests.html
  108. +2 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/6_CardEventTests-err.txt
  109. +2 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/6_CardEventTests-out.txt
  110. +83 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/6_CardEventTests.html
  111. +3 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/7_CardEventUpdateTests-err.txt
  112. +16 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/7_CardEventUpdateTests-out.txt
  113. +86 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/7_CardEventUpdateTests.html
  114. +2 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/8_CardTests-err.txt
  115. +2 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/8_CardTests-out.txt
  116. +83 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/8_CardTests.html
  117. +2 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/9_EventServiceTests-err.txt
  118. +2 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/9_EventServiceTests-out.txt
  119. +83 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/9_EventServiceTests.html
  120. +75 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/package-frame.html
  121. +78 −0 qanban-domain-plugin/test/reports/html/se/qbranch/qanban/package-summary.html
  122. +48 −0 qanban-domain-plugin/test/reports/html/stylesheet.css
  123. +1 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.BoardEventCreateTests-err.txt
  124. +2 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.BoardEventCreateTests-out.txt
  125. +11 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.BoardEventCreateTests.txt
  126. +1 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.BoardTests-err.txt
  127. +1 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.BoardTests-out.txt
  128. +10 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.BoardTests.txt
  129. +2 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.CardEventCreateTests-err.txt
  130. +17 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.CardEventCreateTests-out.txt
  131. +28 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.CardEventCreateTests.txt
  132. +1 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.CardEventDeleteTests-err.txt
  133. +7 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.CardEventDeleteTests-out.txt
  134. +16 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.CardEventDeleteTests.txt
  135. +4 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.CardEventMoveTests-err.txt
  136. +30 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.CardEventMoveTests-out.txt
  137. +45 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.CardEventMoveTests.txt
  138. +1 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.CardEventSetAssigneeTests-err.txt
  139. +7 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.CardEventSetAssigneeTests-out.txt
  140. +16 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.CardEventSetAssigneeTests.txt
  141. +1 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.CardEventTests-err.txt
  142. +1 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.CardEventTests-out.txt
  143. +10 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.CardEventTests.txt
  144. +2 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.CardEventUpdateTests-err.txt
  145. +15 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.CardEventUpdateTests-out.txt
  146. +26 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.CardEventUpdateTests.txt
  147. +1 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.CardTests-err.txt
  148. +1 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.CardTests-out.txt
  149. +10 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.CardTests.txt
  150. +1 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.EventServiceTests-err.txt
  151. +1 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.EventServiceTests-out.txt
  152. +10 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.EventServiceTests.txt
  153. +1 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.EventTests-err.txt
  154. +3 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.EventTests-out.txt
  155. +12 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.EventTests.txt
  156. +3 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.PhaseEventCreateTests-err.txt
  157. +4 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.PhaseEventCreateTests-out.txt
  158. +17 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.PhaseEventCreateTests.txt
  159. +1 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.PhaseEventDeleteTests-err.txt
  160. +7 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.PhaseEventDeleteTests-out.txt
  161. +16 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.PhaseEventDeleteTests.txt
  162. +1 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.PhaseEventMoveTests-err.txt
  163. +7 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.PhaseEventMoveTests-out.txt
  164. +16 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.PhaseEventMoveTests.txt
  165. +1 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.PhaseEventTests-err.txt
  166. +1 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.PhaseEventTests-out.txt
  167. +10 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.PhaseEventTests.txt
  168. +1 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.PhaseEventUpdateTests-err.txt
  169. +7 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.PhaseEventUpdateTests-out.txt
  170. +16 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.PhaseEventUpdateTests.txt
  171. +3 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.PhaseTests-err.txt
  172. +4 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.PhaseTests-out.txt
  173. +17 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.PhaseTests.txt
  174. +5 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.UserEventCreateTests-err.txt
  175. +5 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.UserEventCreateTests-out.txt
  176. +22 −0 qanban-domain-plugin/test/reports/plain/TEST-se.qbranch.qanban.UserEventCreateTests.txt
  177. +57 −0 qanban-domain-plugin/test/unit/se/qbranch/qanban/BoardEventCreateTests.groovy
  178. +35 −0 qanban-domain-plugin/test/unit/se/qbranch/qanban/BoardTests.groovy
  179. +174 −0 qanban-domain-plugin/test/unit/se/qbranch/qanban/CardEventCreateTests.groovy
  180. +151 −0 qanban-domain-plugin/test/unit/se/qbranch/qanban/CardEventDeleteTests.groovy
  181. +201 −0 qanban-domain-plugin/test/unit/se/qbranch/qanban/CardEventMoveTests.groovy
  182. +163 −0 qanban-domain-plugin/test/unit/se/qbranch/qanban/CardEventSetAssigneeTests.groovy
  183. +33 −0 qanban-domain-plugin/test/unit/se/qbranch/qanban/CardEventTests.groovy
  184. +176 −0 qanban-domain-plugin/test/unit/se/qbranch/qanban/CardEventUpdateTests.groovy
  185. +38 −0 qanban-domain-plugin/test/unit/se/qbranch/qanban/CardTests.groovy
  186. +33 −0 qanban-domain-plugin/test/unit/se/qbranch/qanban/EventServiceTests.groovy
  187. +45 −0 qanban-domain-plugin/test/unit/se/qbranch/qanban/EventTests.groovy
  188. +192 −0 qanban-domain-plugin/test/unit/se/qbranch/qanban/PhaseEventCreateTests.groovy
  189. +161 −0 qanban-domain-plugin/test/unit/se/qbranch/qanban/PhaseEventDeleteTests.groovy
  190. +148 −0 qanban-domain-plugin/test/unit/se/qbranch/qanban/PhaseEventMoveTests.groovy
  191. +33 −0 qanban-domain-plugin/test/unit/se/qbranch/qanban/PhaseEventTests.groovy
  192. +134 −0 qanban-domain-plugin/test/unit/se/qbranch/qanban/PhaseEventUpdateTests.groovy
  193. +63 −0 qanban-domain-plugin/test/unit/se/qbranch/qanban/PhaseTests.groovy
  194. +138 −0 qanban-domain-plugin/test/unit/se/qbranch/qanban/UserEventCreateTests.groovy
  195. +47 −0 qanban-domain-plugin/web-app/WEB-INF/applicationContext.xml
  196. +14 −0 qanban-domain-plugin/web-app/WEB-INF/sitemesh.xml
  197. +563 −0 qanban-domain-plugin/web-app/WEB-INF/tld/c.tld
  198. +671 −0 qanban-domain-plugin/web-app/WEB-INF/tld/fmt.tld
  199. +551 −0 qanban-domain-plugin/web-app/WEB-INF/tld/grails.tld
  200. +311 −0 qanban-domain-plugin/web-app/WEB-INF/tld/spring.tld
View
11 qanban-domain-plugin/QanbanDomain-test.launch
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<launchConfiguration type="org.eclipse.jdt.junit.launchconfig">
+<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit3"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="grails.test.GrailsAwareGroovyTestSuite"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="QanbanDomain"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dtest=${resource_loc}"/>
+</launchConfiguration>
View
19 qanban-domain-plugin/QanbanDomain.launch
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/QanbanDomain"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="4"/>
+</listAttribute>
+<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/>
+<listAttribute key="org.eclipse.jdt.launching.CLASSPATH">
+<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry containerPath=&quot;org.eclipse.jdt.launching.JRE_CONTAINER&quot; javaProject=&quot;QanbanDomain&quot; path=&quot;1&quot; type=&quot;4&quot;/&gt;&#10;"/>
+<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry containerPath=&quot;GRAILS_HOME/dist/grails-bootstrap-1.1.1.jar&quot; path=&quot;3&quot; type=&quot;3&quot;/&gt;&#10;"/>
+<listEntry value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#10;&lt;runtimeClasspathEntry containerPath=&quot;GRAILS_HOME/lib/groovy-all-1.6.3.jar&quot; path=&quot;3&quot; type=&quot;3&quot;/&gt;&#10;"/>
+</listAttribute>
+<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="grails.util.GrailsMain"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="QanbanDomain"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dbase.dir=&quot;${project_loc:QanbanDomain}&quot; -Dserver.port=8080 -Dgrails.env=development"/>
+</launchConfiguration>
View
73 qanban-domain-plugin/QanbanDomain.tmproj
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>documents</key>
+ <array>
+ <dict>
+ <key>filename</key>
+ <string>QanbanDomain.launch</string>
+ </dict>
+ <dict>
+ <key>filename</key>
+ <string>build.xml</string>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>grails-app</string>
+ <key>regexFolderFilter</key>
+ <string>!.*/(\.[^/]*|CVS|_darcs|_MTN|\{arch\}|blib|.*~\.nib|.*\.(framework|app|pbproj|pbxproj|xcode(proj)?|bundle))$</string>
+ <key>sourceDirectory</key>
+ <string>grails-app</string>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>test</string>
+ <key>regexFolderFilter</key>
+ <string>!.*/(\.[^/]*|CVS|_darcs|_MTN|\{arch\}|blib|.*~\.nib|.*\.(framework|app|pbproj|pbxproj|xcode(proj)?|bundle))$</string>
+ <key>sourceDirectory</key>
+ <string>test</string>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>lib</string>
+ <key>regexFolderFilter</key>
+ <string>!.*/(\.[^/]*|CVS|_darcs|_MTN|\{arch\}|blib|.*~\.nib|.*\.(framework|app|pbproj|pbxproj|xcode(proj)?|bundle))$</string>
+ <key>sourceDirectory</key>
+ <string>lib</string>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>scripts</string>
+ <key>regexFolderFilter</key>
+ <string>!.*/(\.[^/]*|CVS|_darcs|_MTN|\{arch\}|blib|.*~\.nib|.*\.(framework|app|pbproj|pbxproj|xcode(proj)?|bundle))$</string>
+ <key>sourceDirectory</key>
+ <string>scripts</string>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>src</string>
+ <key>regexFolderFilter</key>
+ <string>!.*/(\.[^/]*|CVS|_darcs|_MTN|\{arch\}|blib|.*~\.nib|.*\.(framework|app|pbproj|pbxproj|xcode(proj)?|bundle))$</string>
+ <key>sourceDirectory</key>
+ <string>src</string>
+ </dict>
+ <dict>
+ <key>name</key>
+ <string>web-app</string>
+ <key>regexFolderFilter</key>
+ <string>!.*/(\.[^/]*|CVS|_darcs|_MTN|\{arch\}|blib|.*~\.nib|.*\.(framework|app|pbproj|pbxproj|xcode(proj)?|bundle))$</string>
+ <key>sourceDirectory</key>
+ <string>web-app</string>
+ </dict>
+ </array>
+ <key>fileHierarchyDrawerWidth</key>
+ <integer>200</integer>
+ <key>metaData</key>
+ <dict/>
+ <key>showFileHierarchyDrawer</key>
+ <true/>
+ <key>windowFrame</key>
+ <string>{{237, 127}, {742, 553}}</string>
+</dict>
+</plist>
View
50 qanban-domain-plugin/QanbanDomainGrailsPlugin.groovy
@@ -0,0 +1,50 @@
+class QanbanDomainGrailsPlugin {
+ // the plugin version
+ def version = "0.1"
+ // the version or versions of Grails the plugin is designed for
+ def grailsVersion = "1.1.1 > *"
+ // the other plugins this plugin depends on
+ def dependsOn = [acegi:"* > 0.5.2", hibernate:"1.1.1"]
+ // resources that are excluded from plugin packaging
+ def pluginExcludes = [
+ "grails-app/views/error.gsp"
+ ]
+
+ // TODO Fill in these fields
+ def author = "Mattias Mirhagen"
+ def authorEmail = "mattias.mirhagen@qbranch.se"
+ def title = "Qanban Domain"
+ def description = '''\\
+This plugin hold the domain model for the Qanban application
+'''
+
+ // URL to the plugin's documentation
+ def documentation = "http://grails.org/QanbanDomain+Plugin"
+
+ def doWithSpring = {
+ // TODO Implement runtime spring config (optional)
+ }
+
+ def doWithApplicationContext = { applicationContext ->
+ // TODO Implement post initialization spring config (optional)
+ }
+
+ def doWithWebDescriptor = { xml ->
+ // TODO Implement additions to web.xml (optional)
+ }
+
+ def doWithDynamicMethods = { ctx ->
+ // TODO Implement registering dynamic methods to classes (optional)
+ }
+
+ def onChange = { event ->
+ // TODO Implement code that is executed when any artefact that this plugin is
+ // watching is modified and reloaded. The event contains: event.source,
+ // event.application, event.manager, event.ctx, and event.plugin.
+ }
+
+ def onConfigChange = { event ->
+ // TODO Implement code that is executed when the project configuration changes.
+ // The event is the same as for 'onChange'.
+ }
+}
View
6 qanban-domain-plugin/application.properties
@@ -0,0 +1,6 @@
+#utf-8
+#Fri Jan 15 10:59:54 CET 2010
+plugins.acegi=0.5.2
+app.grails.version=1.1.1
+plugins.hibernate=1.1.1
+app.name=QanbanDomain
View
142 qanban-domain-plugin/build.xml
@@ -0,0 +1,142 @@
+<project xmlns:ivy="antlib:org.apache.ivy.ant" name="qanbandomain" default="test">
+ <property environment="env"/>
+ <property name="ivy.install.version" value="2.0.0" />
+ <condition property="ivy.home" value="${env.IVY_HOME}">
+ <isset property="env.IVY_HOME" />
+ </condition>
+ <property name="ivy.home" value="${user.home}/.ant" />
+ <property name="ivy.jar.dir" value="${ivy.home}/lib" />
+ <property name="ivy.jar.file" value="${ivy.jar.dir}/ivy-${ivy.install.version}.jar" />
+
+ <target name="download-ivy" unless="offline">
+ <available file="${ivy.jar.file}" property="ivy.available"/>
+ <antcall target="-download-ivy" />
+ </target>
+
+ <target name="-download-ivy" unless="ivy.available">
+ <mkdir dir="${ivy.jar.dir}"/>
+ <!-- download Ivy from web site so that it can be used even without any special installation -->
+ <get src="http://www.apache.org/dist/ant/ivy/${ivy.install.version}/apache-ivy-${ivy.install.version}-bin.zip"
+ dest="${ivy.home}/ivy.zip" usetimestamp="true" verbose="true"/>
+ <unzip src="${ivy.home}/ivy.zip" dest="${ivy.jar.dir}">
+ <patternset>
+ <include name="**/*.jar"/>
+ </patternset>
+ <mapper type="flatten"/>
+ </unzip>
+ </target>
+
+ <target name="init-ivy" depends="download-ivy" unless="ivy.lib.path">
+ <!-- try to load ivy here from ivy home, in case the user has not already dropped
+ it into ant's lib dir (note that the latter copy will always take precedence).
+ We will not fail as long as local lib dir exists (it may be empty) and
+ ivy is in at least one of ant's lib dir or the local lib dir. -->
+ <path id="ivy.lib.path">
+ <fileset dir="${ivy.jar.dir}" includes="*.jar"/>
+ </path>
+ <taskdef resource="org/apache/ivy/ant/antlib.xml"
+ uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/>
+ </target>
+
+
+ <property name="lib.dir" value="${basedir}/lib"/>
+
+ <macrodef name="grails">
+ <attribute name="script"/>
+ <attribute name="args" default="" />
+ <sequential>
+ <grailsTask script="@{script}" args="@{args}" classpathref="grails.classpath">
+ <compileClasspath refid="compile.classpath"/>
+ <testClasspath refid="test.classpath"/>
+ <runtimeClasspath refid="app.classpath"/>
+ </grailsTask>
+ </sequential>
+ </macrodef>
+
+ <!-- =================================
+ target: resolve
+ ================================= -->
+ <target name="-resolve" description="--> Retrieve dependencies with ivy" depends="init-ivy">
+ <ivy:retrieve pattern="${lib.dir}/[conf]/[artifact]-[revision].[ext]"/>
+ </target>
+
+ <target name="-init-grails" depends="-resolve">
+ <path id="grails.classpath">
+ <fileset dir="${lib.dir}/build"/>
+ <fileset dir="${lib.dir}"/>
+ </path>
+
+ <path id="compile.classpath">
+ <fileset dir="${lib.dir}/compile"/>
+ </path>
+
+ <path id="test.classpath">
+ <fileset dir="${lib.dir}/test"/>
+ </path>
+
+ <path id="app.classpath">
+ <fileset dir="${lib.dir}/runtime"/>
+ </path>
+
+ <taskdef name="grailsTask"
+ classname="grails.ant.GrailsTask"
+ classpathref="grails.classpath"/>
+ </target>
+
+ <target name="deps-report" depends="-resolve" description="--> Generate report of module dependencies.">
+ <ivy:report conf="*"/>
+ </target>
+
+ <!-- =================================
+ target: clean
+ ================================= -->
+ <target name="clean" description="--> Cleans a Grails application">
+ <delete failonerror="true">
+ <fileset dir="${lib.dir}/build" includes="*/"/>
+ <fileset dir="${lib.dir}/compile" includes="*/"/>
+ <fileset dir="${lib.dir}/runtime" includes="*/"/>
+ <fileset dir="${lib.dir}/test" includes="*/"/>
+ </delete>
+ <antcall target="--grails-clean"/>
+ </target>
+
+ <!-- extra target to avoid errors on Windows because libs on classpath can not be deleted -->
+ <target name="--grails-clean" depends="-init-grails">
+ <grails script="Clean"/>
+ </target>
+
+ <!-- =================================
+ target: compile
+ ================================= -->
+ <target name="compile" depends="-init-grails" description="--> Compiles a Grails application">
+ <grails script="Compile"/>
+ </target>
+
+ <!-- =================================
+ target: war
+ ================================= -->
+ <target name="war" depends="-init-grails" description="--> Creates a WAR of a Grails application">
+ <grails script="War"/>
+ </target>
+
+ <!-- =================================
+ target: test
+ ================================= -->
+ <target name="test" depends="-init-grails" description="--> Run a Grails applications unit tests">
+ <grails script="TestApp"/>
+ </target>
+
+ <!-- =================================
+ target: run
+ ================================= -->
+ <target name="run" depends="-init-grails" description="--> Runs a Grails application using embedded Jetty">
+ <grails script="RunApp"/>
+ </target>
+
+ <!-- =================================
+ target: deploy
+ ================================= -->
+ <target name="deploy" depends="war" description="--> The deploy target (initially empty)">
+ <!-- TODO -->
+ </target>
+</project>
View
32 qanban-domain-plugin/grails-app/conf/DataSource.groovy
@@ -0,0 +1,32 @@
+dataSource {
+ pooled = true
+ driverClassName = "org.hsqldb.jdbcDriver"
+ username = "sa"
+ password = ""
+}
+hibernate {
+ cache.use_second_level_cache=true
+ cache.use_query_cache=true
+ cache.provider_class='com.opensymphony.oscache.hibernate.OSCacheProvider'
+}
+// environment specific settings
+environments {
+ development {
+ dataSource {
+ dbCreate = "create-drop" // one of 'create', 'create-drop','update'
+ url = "jdbc:hsqldb:mem:devDB"
+ }
+ }
+ test {
+ dataSource {
+ dbCreate = "update"
+ url = "jdbc:hsqldb:mem:testDb"
+ }
+ }
+ production {
+ dataSource {
+ dbCreate = "update"
+ url = "jdbc:hsqldb:file:prodDb;shutdown=true"
+ }
+ }
+}
View
11 qanban-domain-plugin/grails-app/conf/UrlMappings.groovy
@@ -0,0 +1,11 @@
+class UrlMappings {
+ static mappings = {
+ "/$controller/$action?/$id?"{
+ constraints {
+ // apply constraints here
+ }
+ }
+ "/"(view:"/index")
+ "500"(view:'/error')
+ }
+}
View
35 qanban-domain-plugin/grails-app/domain/se/qbranch/qanban/Board.groovy
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2009 Qbranch AB
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package se.qbranch.qanban
+
+class Board {
+
+ static constraints = {
+ domainId( unique: true, blank: false )
+ title( unique: true, blank: false )
+ }
+
+ static hasMany = [phases:Phase]
+ List phases = []
+
+ String domainId
+ String title
+
+ Date dateCreated
+ Date lastUpdated
+
+}
View
43 qanban-domain-plugin/grails-app/domain/se/qbranch/qanban/BoardEvent.groovy
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2009 Qbranch AB
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package se.qbranch.qanban
+
+class BoardEvent extends Event{
+
+ static constraints = {
+ }
+
+ transient public String checkCurrentTitle() {
+ if( domainId ){
+ def board = Board.findByDomainId(domainId)
+ if (board){
+ return board.title
+ }else{
+ return 'The board does not exist'
+ }
+ }
+ else return "This should not be a valid output"
+ }
+
+ public boolean doesDomainExist(){
+ return Board.findByDomainId(domainId) != null
+ }
+
+ public List getItems() {
+ return [dateCreated, user, getBoard().title]
+ }
+
+}
View
49 qanban-domain-plugin/grails-app/domain/se/qbranch/qanban/BoardEventCreate.groovy
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2009 Qbranch AB
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package se.qbranch.qanban
+
+class BoardEventCreate extends BoardEvent{
+
+ static constraints = {
+ title ( nullable: false, blank: false )
+ }
+
+ static transients = ['board','items']
+
+ Board board
+ String title
+
+ public Board getBoard(){
+ if( !board && domainId )
+ board = Board.findByDomainId(domainId)
+ return board
+ }
+
+ def beforeInsert = {
+ generateDomainId('board','create')
+ setEventCreator(user)
+ }
+
+ def process(){
+ board = new Board()
+ board.domainId = domainId
+ board.title = title
+ board.save()
+ }
+
+
+}
View
53 qanban-domain-plugin/grails-app/domain/se/qbranch/qanban/Card.groovy
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2009 Qbranch AB
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package se.qbranch.qanban
+
+class Card {
+
+ static constraints = {
+ title(blank:false, length:1..50)
+ description( blank: true, nullable: true)
+ caseNumber( blank: false )
+ assignee(nullable: true)
+ phase()
+ domainId( unique: true, blank: false )
+ }
+
+
+ static mapping = {
+ columns {
+ description type:'text'
+ }
+ }
+
+
+ String domainId
+ String title
+ String description
+ String caseNumber
+
+ Date dateCreated
+ Date lastUpdated
+
+ User assignee
+ Phase phase
+
+ public String toString() {
+ return "$title"
+ }
+
+}
View
41 qanban-domain-plugin/grails-app/domain/se/qbranch/qanban/CardEvent.groovy
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2009 Qbranch AB
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package se.qbranch.qanban
+
+class CardEvent extends Event {
+
+ static constraints = {
+ // TODO: Check if there is a way to let this override the inherited contraint?
+ // user(nullable: false)
+ }
+
+ transient public String checkCurrentTitle() {
+ if( domainId ){
+ def card = Card.findByDomainId(domainId)
+ if (card){
+ return card.title
+ }else{
+ return CardEventDelete.findByDomainId(domainId).title
+ }
+ }
+ else return "This should not be a valid output"
+ }
+
+ transient boolean doesDomainExist(){
+ return Card.findByDomainId(domainId) != null
+ }
+}
View
98 qanban-domain-plugin/grails-app/domain/se/qbranch/qanban/CardEventCreate.groovy
@@ -0,0 +1,98 @@
+/*
+ * Copyright 2009 Qbranch AB
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package se.qbranch.qanban
+
+
+class CardEventCreate extends CardEvent {
+
+ static constraints = {
+ assignee ( nullable : true )
+ title( blank: false, length: 1..50 )
+ description(blank: true, nullable: true)
+ phaseDomainId( nullable: false, blank: false )
+ caseNumber( blank: false )
+ }
+
+ static mapping = {
+ columns {
+ description type:'text'
+ }
+ }
+
+ static transients = ['card','phase','board','items']
+
+ Card card
+
+ String title
+ String description
+ String caseNumber
+ String phaseDomainId
+
+ //TODO: Change to checksum connections?
+ User assignee
+
+ public List getItems() {
+ return [dateCreated, user, getCard().title]
+ }
+
+ public Phase getPhase() {
+ def phase
+
+ if( phaseDomainId ){
+ phase = Phase.findByDomainId(phaseDomainId)
+ }
+ return phase
+ }
+
+ public Card getCard(){
+ if( !card && domainId ){
+ card = Card.findByDomainId(domainId)
+ if(!card) {
+ card = CardEventDelete.findByDomainId(domainId).card
+ }
+ }
+ return card
+ }
+
+ //TODO: Cleanup, check lazy settings.
+ public Board getBoard(){
+ Phase.findByDomainId(phaseDomainId).board
+ }
+
+ def beforeInsert = {
+ generateDomainId(title, caseNumber)
+ setEventCreator(user)
+ }
+
+ def process(){
+ def phase = getPhase()
+ card = new Card()
+ card.domainId = domainId
+ card.title = title
+ card.phase = phase
+ card.description = description
+ card.caseNumber = caseNumber
+ card.assignee = assignee
+ phase.addToCards(card)
+ card.save()
+ }
+
+
+ String toString() {
+ return "$dateCreated: $user created the card"
+ }
+}
View
73 qanban-domain-plugin/grails-app/domain/se/qbranch/qanban/CardEventDelete.groovy
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2009 Qbranch AB
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package se.qbranch.qanban
+
+class CardEventDelete extends CardEvent {
+
+ static constraints = {
+ assignee ( nullable : true )
+ title( nullable: true )
+ description( nullable: true)
+ phaseDomainId( nullable: true )
+ phasePos ( nullable: true )
+ caseNumber( nullable: true )
+ }
+
+ static mapping = {
+ columns {
+ description type:'text'
+ }
+ }
+
+ static transients = ['card','items']
+
+ Card card
+
+ String title
+ String description
+ String caseNumber
+ String phaseDomainId
+ Integer phasePos
+ User assignee
+
+ public List getItems() {
+ return [getCard().title]
+ }
+
+ public Card getCard(){
+ if(!card && domainId) {
+ card = new Card(title: title, description: description, caseNumber: caseNumber, phase: Phase.findByDomainId(phaseDomainId))
+ }
+ return card
+ }
+
+ transient beforeInsert = {
+ domainId = card.domainId
+ title = card.title
+ description = card.description
+ caseNumber = card.caseNumber
+ phaseDomainId = card.phase.domainId
+ phasePos = card.phase.board.phases.indexOf(card)
+ assignee = card.assignee
+ setEventCreator(user)
+ }
+
+ transient process(){
+ card.phase.cards.remove(card)
+ card.delete(flush:true)
+ }
+}
View
81 qanban-domain-plugin/grails-app/domain/se/qbranch/qanban/CardEventMove.groovy
@@ -0,0 +1,81 @@
+/*
+ * Copyright 2009 Qbranch AB
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package se.qbranch.qanban
+
+class CardEventMove extends CardEvent {
+
+ static constraints = {
+ phaseDomainId ( nullable: true, blank: false )
+ newCardIndex ( nullable: false, min: 0)
+ }
+
+ static transients = ['card','newPhase','items']
+ Card card
+ Phase newPhase
+
+ String phaseDomainId
+ Integer newCardIndex
+
+ public List getItems() {
+ return [dateCreated, user, getCard().title, getNewPhase().title]
+ }
+
+ public Card getCard(){
+ if( !card && domainId ){
+ card = Card.findByDomainId(domainId)
+ if(!card) {
+ card = CardEventDelete.findByDomainId(domainId).card
+ }
+ }
+ return card
+ }
+
+ public Phase getNewPhase(){
+ if( !newPhase && phaseDomainId ){
+ newPhase = Phase.findByDomainId(phaseDomainId)
+ if(!newPhase) {
+ newPhase = PhaseEventDelete.findByDomainId(phaseDomainId).phase
+ }
+ }
+ return newPhase
+ }
+
+
+ transient beforeInsert = {
+ domainId = card.domainId
+ phaseDomainId = newPhase.domainId
+ setEventCreator(user)
+ }
+
+ transient process = {
+
+ card.phase.cards.remove(card)
+ newPhase.cards.add(newCardIndex, card)
+ card.phase = newPhase
+ card.lastUpdated = new Date()
+ card.save(flush:true)
+
+ }
+
+ String toString(){
+ def phase = Phase.findByDomainId(phaseDomainId)
+ if (phase)
+ return "$dateCreated: $user moved the card to $phase.title"
+ else
+ return "$dateCreated: $user moved the card to a deleted phase"
+ }
+}
View
57 qanban-domain-plugin/grails-app/domain/se/qbranch/qanban/CardEventSetAssignee.groovy
@@ -0,0 +1,57 @@
+/*
+ * Copyright 2009 Qbranch AB
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package se.qbranch.qanban
+
+class CardEventSetAssignee extends CardEvent {
+
+ static constraints = {
+ newAssignee ( nullable: true )
+ }
+
+ static transients = ['card','items']
+ Card card
+
+ User newAssignee
+
+ public List getItems() {
+ return [dateCreated, user, newAssignee]
+ }
+
+ public Card getCard(){
+ if( !card && domainId ){
+ card = Card.findByDomainId(domainId)
+ if(!card) {
+ card = CardEventDelete.findByDomainId(domainId).card
+ }
+ }
+ return card
+ }
+
+ transient beforeInsert = {
+ domainId = card.domainId
+ setEventCreator(user)
+ }
+
+ transient process(){
+ card.assignee = newAssignee
+ card.save()
+ }
+
+ String toString(){
+ return "$dateCreated: $user set the assignee to $newAssignee"
+ }
+}
View
80 qanban-domain-plugin/grails-app/domain/se/qbranch/qanban/CardEventUpdate.groovy
@@ -0,0 +1,80 @@
+/*
+ * Copyright 2009 Qbranch AB
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package se.qbranch.qanban
+
+class CardEventUpdate extends CardEvent {
+
+ // TODO: Validera så att eventen inte sparas om inget värde har ändrats
+
+ static constraints = {
+ title( blank: false, length: 1..50)
+ description( blank: true, nullable: true )
+ caseNumber( blank: false)
+ }
+
+
+ static mapping = {
+ columns {
+ description type:'text'
+ }
+ }
+
+ static transients = ['card','items']
+ Card card
+
+ String title
+ String description
+ String caseNumber
+
+ public List getItems() {
+ return [dateCreated, user, getCard().title]
+ }
+
+ public Card getCard(){
+ if( !card && domainId ){
+ card = Card.findByDomainId(domainId)
+ if(!card) {
+ card = CardEventDelete.findByDomainId(domainId).card
+ }
+ }
+ return card
+ }
+
+ public void setCard(card){
+ this.card = card
+ title = card.title
+ description = card.description
+ caseNumber = card.caseNumber
+ }
+
+ transient beforeInsert = {
+ domainId = card.domainId
+ setEventCreator(user)
+ }
+
+ transient process(){
+
+ card.title = title
+ card.description = description
+ card.caseNumber = caseNumber
+ card.save()
+ }
+
+ String toString(){
+ return "$dateCreated: $user updated the card info"
+ }
+}
View
80 qanban-domain-plugin/grails-app/domain/se/qbranch/qanban/Event.groovy
@@ -0,0 +1,80 @@
+/*
+ * Copyright 2009 Qbranch AB
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package se.qbranch.qanban
+
+import org.codehaus.groovy.grails.plugins.codecs.MD5Codec as Codec
+
+class Event implements Comparable {
+
+ static constraints = {
+ domainId( nullable:true, blank: false )
+ userDomainId(nullable: true)
+ user(nullable: true)
+ }
+
+ static transients = ['items','user','eventCreator']
+ User user
+
+ Date dateCreated
+ String domainId
+ String userDomainId
+
+ public List getItems() {
+ return []
+ }
+
+ public void setEventCreator(user){
+ userDomainId = user.domainId
+ }
+
+ public User getUser(){
+ if( !user && userDomainId ){
+ return user = User.findByDomainId(userDomainId)
+ }
+ return user
+ }
+
+ def generateDomainId( Object[] notNullableProperties ){
+ domainId = Codec.encode( new Date().time + notNullableProperties.toString() )
+ }
+
+ int compareTo(Object o) {
+ if (o instanceof Event) {
+ Event event = (Event) o
+ final int BEFORE = -1;
+ final int EQUAL = 0;
+ final int AFTER = 1;
+
+ if(this.dateCreated < event.dateCreated) return AFTER
+ if(this.dateCreated > event.dateCreated) return BEFORE
+
+ return EQUAL
+ }
+
+ }
+
+ boolean equals(Object o) {
+ if(o instanceof Event) {
+ Event event = (Event) o
+ if(this.id == event.id)
+ return true
+ }
+ return false
+ }
+
+
+}
View
53 qanban-domain-plugin/grails-app/domain/se/qbranch/qanban/Phase.groovy
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2009 Qbranch AB
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package se.qbranch.qanban
+
+class Phase {
+
+ static constraints = {
+ title(nullable: false, blank: false)
+ cardLimit(nullable: false, min: 0, validator:{ limit, phaseInstance ->
+ if( limit != 0 && limit < phaseInstance.cards.size() )
+ return ['phase.cardLimit.lessThanCardsSize', limit]
+ })
+ domainId( nullable: false, unique: true, blank: false)
+ }
+
+ static hasMany = [cards:Card]
+
+ String title
+ Board board
+ List cards = []
+ Integer cardLimit
+ String domainId
+
+ Date dateCreated
+ Date lastUpdated
+
+ boolean equals(Object o) {
+ if(o instanceof Phase) {
+ Phase p = (Phase) o
+ if(this.id == p.id)
+ return true
+ }
+ return false
+ }
+
+ public String toString() {
+ return "$title"
+ }
+}
View
39 qanban-domain-plugin/grails-app/domain/se/qbranch/qanban/PhaseEvent.groovy
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2009 Qbranch AB
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package se.qbranch.qanban
+
+class PhaseEvent extends Event {
+
+ static constraints = {
+ }
+
+ transient public String checkCurrentTitle() {
+ if( domainId ){
+ def phase = Phase.findByDomainId(domainId)
+ if (phase){
+ return phase.title
+ }else{
+ return PhaseEventDelete.findByDomainId(domainId).title
+ }
+ }
+ else return "This should not be a valid output"
+ }
+
+ public boolean doesDomainExist(){
+ return Phase.findByDomainId(domainId) != null
+ }
+}
View
82 qanban-domain-plugin/grails-app/domain/se/qbranch/qanban/PhaseEventCreate.groovy
@@ -0,0 +1,82 @@
+/*
+ * Copyright 2009 Qbranch AB
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package se.qbranch.qanban
+
+import org.codehaus.groovy.grails.plugins.codecs.MD5Codec
+
+class PhaseEventCreate extends PhaseEvent {
+
+ static constraints = {
+ cardLimit ( nullable: false, min : 0 )
+ phasePos ( nullable: false )
+ title(nullable: false, blank: false)
+ boardDomainId ( nullable: true )
+ }
+
+ static transients = ['board','phase','items']
+ Phase phase
+ Board board
+
+ String title
+ Integer cardLimit
+ Integer phasePos
+ String boardDomainId
+
+ public List getItems() {
+ return [getPhase().title]
+ }
+
+ public Phase getPhase(){
+ if( !phase && domainId ){
+ phase = Phase.findByDomainId(domainId)
+ if(!phase) {
+ phase = PhaseEventDelete.findByDomainId(domainId).phase
+ }
+ }
+ return phase
+ }
+
+ public Board getBoard(){
+ if( !board && boardDomainId){
+ board = Board.findByDomainId(boardDomainId)
+ }else if( board )(
+ board = Board.get(board.id)
+ )
+ return board
+ }
+
+ transient beforeInsert = {
+ generateDomainId(title, board )
+ boardDomainId = board.domainId
+ setEventCreator(user)
+ }
+
+ transient process = {
+
+ phase = new Phase(
+ title: title,
+ board: board,
+ cardLimit: cardLimit,
+ domainId: domainId
+ )
+ // Board.get() because GORM doesn't let us persist transient values
+ Board.get(board.id).phases.add(phasePos, phase)
+
+ phase.save()
+
+ }
+}
View
77 qanban-domain-plugin/grails-app/domain/se/qbranch/qanban/PhaseEventDelete.groovy
@@ -0,0 +1,77 @@
+/*
+ * Copyright 2009 Qbranch AB
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package se.qbranch.qanban
+
+class PhaseEventDelete extends PhaseEvent {
+
+ static constraints = {
+ cardLimit ( nullable: true )
+ title ( nullable: true )
+ boardDomainId ( nullable: true )
+ phasePos ( nullable: true )
+ }
+
+ static transients = ['phase','items','board']
+
+ Phase phase
+ Board board
+
+ String title
+ Integer cardLimit
+ Integer phasePos
+ String boardDomainId
+
+ public List getItems() {
+ return [getPhase().title]
+ }
+
+ public Phase getPhase(){
+ if( !phase && domainId ){
+ phase = new Phase(title: title, board: board, cardLimit: cardLimit);
+ }
+ return phase
+ }
+
+ public void setPhase(phase){
+ this.phase = phase
+ this.board = phase.board
+ }
+
+ public Board getBoard(){
+ if( !board && boardDomainId ){
+ board = Board.findByDomainId(boardDomainId)
+ }
+ return board
+ }
+
+ transient beforeInsert = {
+ domainId = phase.domainId
+ title = phase.title
+ boardDomainId = phase.board.domainId
+ cardLimit = phase.cardLimit
+ phasePos = Board.get(board.id).phases.indexOf(phase)
+ setEventCreator(user)
+ }
+
+ transient process(){
+ //board.phases.remove(phase)
+ board.removeFromPhases(phase)
+ phase.delete()
+
+
+ }
+}
View
54 qanban-domain-plugin/grails-app/domain/se/qbranch/qanban/PhaseEventMove.groovy
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2009 Qbranch AB
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package se.qbranch.qanban
+
+class PhaseEventMove extends PhaseEvent {
+
+ static constraints = {
+ phasePos (min: 0, nullable: false, validator:{ val, obj ->
+
+ return ( val < obj.phase.board.phases.size() )
+
+ })
+ }
+
+ static transients = ['phase']
+ Phase phase
+
+ Integer phasePos
+
+ public Phase getPhase(){
+ if( !phase && domainId ){
+ phase = Phase.findByDomainId(domainId)
+ if(!phase) {
+ phase = PhaseEventDelete.findByDomainId(domainId).phase
+ }
+ }
+ return phase
+ }
+
+ transient beforeInsert = {
+ domainId = phase.domainId
+ setEventCreator(user)
+ }
+
+ transient process(){
+ phase.board.phases.remove(phase)
+ phase.board.phases.add(phasePos, phase)
+ phase.board.save()
+ }
+}
View
76 qanban-domain-plugin/grails-app/domain/se/qbranch/qanban/PhaseEventUpdate.groovy
@@ -0,0 +1,76 @@
+/*
+ * Copyright 2009 Qbranch AB
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package se.qbranch.qanban
+
+class PhaseEventUpdate extends PhaseEvent {
+
+ // TODO: Validera så att eventen inte sparas om inget värde har ändrats
+
+ static constraints = {
+ title ( nullable: false, blank: false )
+ cardLimit ( nullable: false, min : 0 )
+ }
+
+ static transients = ['phase','board','items']
+
+ Phase phase
+
+ String title
+ Integer cardLimit
+
+ public List getItems() {
+ return [getPhase().title]
+ }
+
+ public Phase getPhase(){
+ if( !phase && domainId ){
+ phase = Phase.findByDomainId(domainId)
+ if(!phase) {
+ phase = PhaseEventDelete.findByDomainId(domainId).phase
+ }
+ }
+ return phase
+ }
+
+ public void setPhase(phase){
+ this.phase = phase
+ }
+
+ //TODO: Cleanup, check lazy settings.
+ public Board getBoard(){
+ Phase.get(phase.id).board
+ }
+
+ transient beforeInsert = {
+ domainId = Phase.get(phase.id).domainId
+ setEventCreator(user)
+ }
+
+ transient void populateFromPhase(){
+ if( phase ){
+ title = phase.title
+ cardLimit = phase.cardLimit
+ }
+ }
+ transient process( ) {
+
+ phase.title = title
+ phase.cardLimit = cardLimit
+ phase.save()
+
+ }
+}
View
41 qanban-domain-plugin/grails-app/domain/se/qbranch/qanban/Role.groovy
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2009 Qbranch AB
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package se.qbranch.qanban
+
+import se.qbranch.qanban.User
+
+/**
+ * Authority domain class.
+ */
+class Role {
+
+ static constraints = {
+ authority(blank: false, unique: true)
+ description()
+ }
+
+ static hasMany = [people: User]
+
+ String description
+ /** ROLE String */
+ String authority
+
+ public boolean equals(obj){
+ return ( obj instanceof Role && obj.id == this.id )
+ }
+
+}
View
62 qanban-domain-plugin/grails-app/domain/se/qbranch/qanban/User.groovy
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2009 Qbranch AB
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package se.qbranch.qanban
+
+import se.qbranch.qanban.Role
+
+/**
+ * User domain class.
+ */
+class User {
+
+ static constraints = {
+ username(blank: false, unique: true)
+ userRealName(blank: false)
+ passwd( nullable: false, blank: false, validator:{ val, obj ->
+ if( val != obj.passwdRepeat ){
+ return ['userEventCreate.passwd.notEqualRepeat']
+ }
+ })
+ enabled()
+ domainId( nullable: false, blank: false, unique: true)
+ }
+
+ static transients = ['pass','passwdRepeat']
+ static hasMany = [authorities: Role]
+ static belongsTo = Role
+
+ String domainId
+ String username
+ String userRealName
+ /** MD5 Password */
+ String passwd
+ boolean enabled
+
+ String email
+ boolean emailShow
+
+ String description = ''
+
+ /** plain password to create a MD5 password */
+ String pass = '[secret]'
+ String passwdRepeat
+
+
+ String toString(){
+ return userRealName
+ }
+}
View
38 qanban-domain-plugin/grails-app/domain/se/qbranch/qanban/UserEvent.groovy
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2009 Qbranch AB
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package se.qbranch.qanban
+
+class UserEvent extends Event{
+
+ static constraints = {
+ }
+
+ transient public String checkCurrentTitle() {
+ if( domainId ){
+ def user = User.findByDomainId(domainId)
+ if (user){
+ return user.userRealName
+ }else{
+ return 'The user does not exist'
+ }
+ }
+ else return "This should not be a valid output"
+ }
+
+ public boolean doesDomainExist(){
+ return User.findByDomainId(domainId) != null
+ }
+}
View
80 qanban-domain-plugin/grails-app/domain/se/qbranch/qanban/UserEventCreate.groovy
@@ -0,0 +1,80 @@
+/*
+ * Copyright 2009 Qbranch AB
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package se.qbranch.qanban
+
+class UserEventCreate extends UserEvent {
+
+ def authenticateService
+
+ static constraints = {
+ username(blank: false, unique: true)
+ userRealName(blank: false)
+ email(nullable: false, blank: false, email:true)
+ enabled( nullable: true)
+ emailShow( nullable: true)
+ passwd( nullable: false, blank: false, validator:{ val, obj ->
+ if( val != obj.passwdRepeat ){
+ return ['userEventCreate.passwd.notEqualRepeat']
+ }
+ })
+ }
+
+ static transients = ['list','passwdRepeat']
+
+ static mapping = {
+ columns {
+ description type:'text'
+ }
+ }
+
+ String username
+ String userRealName
+ String email
+ boolean enabled = true
+ boolean emailShow = true
+ String description = ''
+ String passwd
+ String passwdRepeat
+
+ public List getItems() {
+ return [dateCreated, user]
+ }
+
+ def beforeInsert = {
+ generateDomainId(username,userRealName,email)
+ passwd = authenticateService.encodePassword(passwd)
+ passwdRepeat = authenticateService.encodePassword(passwdRepeat)
+ userDomainId = domainId // You create yourself
+ }
+
+ def populateFromUser(){
+ this.properties = user.properties['username','userRealName','email','enabled','emailShow','description','passwd','passwdRepeat']
+ }
+
+ def process(){
+ user = new User()
+ user.properties = this.properties['username','userRealName','email','enabled','emailShow','description','passwd','passwdRepeat','domainId']
+
+ // Gives every user the admin role, this is a temporary fix until a user manager is implemented
+ Role.list().each{ role ->
+ role.addToPeople(user)
+ }
+
+
+ user.save()
+ }
+
+}
View
4 qanban-domain-plugin/grails-app/migrations/changelog.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<databaseChangeLog
+ xmlns="http://www.liquibase.org/xml/ns/dbchangelog/1.9"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog/1.9 http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.9.xsd"/>
View
29 qanban-domain-plugin/grails-app/services/se/qbranch/qanban/EventService.groovy
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2009 Qbranch AB
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package se.qbranch.qanban
+
+class EventService {
+
+ boolean transactional = true
+
+ def persist(event) {
+ if( event && event.save() ){
+ event.process()
+ }
+
+ }
+}
View
54 qanban-domain-plugin/grails-app/views/error.gsp
@@ -0,0 +1,54 @@
+<html>
+ <head>
+ <title>Grails Runtime Exception</title>
+ <style type="text/css">
+ .message {
+ border: 1px solid black;
+ padding: 5px;
+ background-color:#E9E9E9;
+ }
+ .stack {
+ border: 1px solid black;
+ padding: 5px;
+ overflow:auto;
+ height: 300px;
+ }
+ .snippet {
+ padding: 5px;
+ background-color:white;
+ border:1px solid black;
+ margin:3px;
+ font-family:courier;
+ }
+ </style>
+ </head>
+
+ <body>
+ <h1>Grails Runtime Exception</h1>
+ <h2>Error Details</h2>
+
+ <div class="message">
+ <strong>Error ${request.'javax.servlet.error.status_code'}:</strong> ${request.'javax.servlet.error.message'.encodeAsHTML()}<br/>
+ <strong>Servlet:</strong> ${request.'javax.servlet.error.servlet_name'}<br/>
+ <strong>URI:</strong> ${request.'javax.servlet.error.request_uri'}<br/>
+ <g:if test="${exception}">
+ <strong>Exception Message:</strong> ${exception.message?.encodeAsHTML()} <br />
+ <strong>Caused by:</strong> ${exception.cause?.message?.encodeAsHTML()} <br />
+ <strong>Class:</strong> ${exception.className} <br />
+ <strong>At Line:</strong> [${exception.lineNumber}] <br />
+ <strong>Code Snippet:</strong><br />
+ <div class="snippet">
+ <g:each var="cs" in="${exception.codeSnippet}">
+ ${cs?.encodeAsHTML()}<br />
+ </g:each>
+ </div>
+ </g:if>
+ </div>
+ <g:if test="${exception}">
+ <h2>Stack Trace</h2>
+ <div class="stack">
+ <pre><g:each in="${exception.stackTraceLines}">${it.encodeAsHTML()}<br/></g:each></pre>
+ </div>
+ </g:if>
+ </body>
+</html>
View
28 qanban-domain-plugin/ivy.xml
@@ -0,0 +1,28 @@
+<ivy-module version="2.0">
+ <info organisation="org.example" module="QanbanDomain"/>
+ <configurations defaultconfmapping="build->default;compile->compile(*),master(*);test,runtime->runtime(*),master(*)">
+ <conf name="build"/>
+ <conf name="compile"/>
+ <conf name="test" extends="compile"/>
+ <conf name="runtime" extends="compile"/>
+ </configurations>
+ <dependencies>
+ <dependency org="org.grails" name="grails-bootstrap" rev="1.1.1" conf="build"/>
+ <dependency org="org.grails" name="grails-scripts" rev="1.1.1" conf="build"/>
+ <dependency org="org.grails" name="grails-gorm" rev="1.1.1" conf="compile"/>
+ <dependency org="org.grails" name="grails-web" rev="1.1.1" conf="compile"/>
+ <dependency org="org.grails" name="grails-test" rev="1.1.1" conf="test"/>
+ <dependency org="org.slf4j" name="slf4j-log4j12" rev="1.5.5" conf="runtime"/>
+ <dependency org="opensymphony" name="oscache" rev="2.4" conf="runtime">
+ <exclude org="javax.jms" module="jms" name="*" type="*" ext="*" conf="" matcher="exact"/>
+ <exclude org="commons-logging" module="commons-logging" name="*" type="*" ext="*" conf="" matcher="exact"/>
+ <exclude org="javax.servlet" module="servlet-api" name="*" type="*" ext="*" conf="" matcher="exact"/>
+ </dependency>
+ <dependency org="hsqldb" name="hsqldb" rev="1.8.0.5" conf="runtime"/>
+ <dependency org="net.sf.ehcache" name="ehcache" rev="1.5.0" conf="runtime"/>
+ <!--
+ <dependency org="mysql" name="mysql-connector-java" rev="5.1.6" conf="runtime"/>
+ <dependency org="postgresql" name="postgresql" rev="8.3-603.jdbc3" conf="runtime"/>
+ -->
+ </dependencies>
+</ivy-module>
View
15 qanban-domain-plugin/ivysettings.xml
@@ -0,0 +1,15 @@
+<ivysettings>
+ <settings defaultResolver="codehaus-plus"/>
+ <include url="${ivy.default.settings.dir}/ivysettings-public.xml" />
+ <include url="${ivy.default.settings.dir}/ivysettings-shared.xml"/>
+ <include url="${ivy.default.settings.dir}/ivysettings-local.xml" />
+ <include url="${ivy.default.settings.dir}/ivysettings-main-chain.xml"/>
+ <resolvers>
+ <chain name="codehaus-plus" dual="true">
+ <ibiblio name="codehaus-snapshots" root="http://snapshots.repository.codehaus.org" m2compatible="true" changingPattern=".*SNAPSHOT"/>
+ <ibiblio name="codehaus" root="http://repository.codehaus.org" m2compatible="true"/>
+ <ibiblio name="javanet" root="http://download.java.net/maven/2/" m2compatible="true"/>
+ <resolver ref="public"/>
+ </chain>
+ </resolvers>
+</ivysettings>
View
36 qanban-domain-plugin/plugin.xml
@@ -0,0 +1,36 @@
+<plugin name='qanban-domain' version='0.1' grailsVersion='1.1.1 &gt; *'>
+ <author>Mattias Mirhagen</author>
+ <authorEmail>mattias.mirhagen@qbranch.se</authorEmail>
+ <title>Qanban Domain</title>
+ <description>\
+This plugin hold the domain model for the Qanban application
+</description>
+ <documentation>http://grails.org/QanbanDomain+Plugin</documentation>
+ <resources>
+ <resource>se.qbranch.qanban.PhaseEventCreate</resource>
+ <resource>se.qbranch.qanban.Card</resource>
+ <resource>se.qbranch.qanban.PhaseEvent</resource>
+ <resource>se.qbranch.qanban.CardEventUpdate</resource>
+ <resource>se.qbranch.qanban.CardEventDelete</resource>
+ <resource>se.qbranch.qanban.CardEventMove</resource>
+ <resource>se.qbranch.qanban.Event</resource>
+ <resource>se.qbranch.qanban.Phase</resource>
+ <resource>se.qbranch.qanban.PhaseEventUpdate</resource>
+ <resource>se.qbranch.qanban.Board</resource>
+ <resource>se.qbranch.qanban.UserEvent</resource>
+ <resource>se.qbranch.qanban.BoardEvent</resource>
+ <resource>se.qbranch.qanban.BoardEventCreate</resource>
+ <resource>se.qbranch.qanban.Role</resource>
+ <resource>se.qbranch.qanban.CardEventCreate</resource>
+ <resource>se.qbranch.qanban.CardEvent</resource>
+ <resource>se.qbranch.qanban.UserEventCreate</resource>
+ <resource>se.qbranch.qanban.PhaseEventMove</resource>
+ <resource>se.qbranch.qanban.PhaseEventDelete</resource>
+ <resource>se.qbranch.qanban.User</resource>
+ <resource>se.qbranch.qanban.CardEventSetAssignee</resource>
+ <resource>se.qbranch.qanban.EventService</resource>
+ <resource>UrlMappings</resource>
+ <resource>DataSource</resource>
+ </resources>
+ <dependencies />
+</plugin>
View
101 qanban-domain-plugin/scripts/DbDiffIncremental.groovy
@@ -0,0 +1,101 @@
+import liquibase.diff.Diff
+import liquibase.diff.DiffResult
+import java.sql.Driver
+import liquibase.database.DatabaseFactory
+import java.sql.Connection
+import liquibase.database.Database
+import liquibase.Liquibase
+import liquibase.database.DatabaseFactory
+
+includeTargets << new File("${liquibasePluginDir}/scripts/LiquibaseSetup.groovy")
+includeTargets << new File("${liquibasePluginDir}/scripts/Migrate.groovy")
+
+target('dbDiffIncremental': '''Generates change log required to make Test DB match Development''') {
+ depends(setup)
+
+ try {
+ def baseDatabase = getDatabase(config)
+ ConfigObject testConfig = loadTestConfig(classLoader, servletVersion, basedir, userHome, grailsAppVersion, grailsAppName, grailsHome)
+
+ def targetLiquibase = getDiffDbLiquibase(testConfig)
+
+ targetLiquibase.update(null)