Permalink
Browse files

first commit

  • Loading branch information...
vbarrier committed Feb 21, 2011
0 parents commit fa32511cb1b4acc1151f5875170f5738110df2f9
Showing with 33,207 additions and 0 deletions.
  1. +24 −0 .gitignore
  2. +145 −0 IcescrumCoreGrailsPlugin.groovy
  3. 0 README
  4. +6 −0 application.properties
  5. +81 −0 grails-app/conf/BuildConfig.groovy
  6. +13 −0 grails-app/conf/UrlMappings.groovy
  7. +124 −0 grails-app/domain/org/icescrum/core/domain/Actor.groovy
  8. +74 −0 grails-app/domain/org/icescrum/core/domain/BacklogElement.groovy
  9. +152 −0 grails-app/domain/org/icescrum/core/domain/Cliche.groovy
  10. +44 −0 grails-app/domain/org/icescrum/core/domain/Domain.groovy
  11. +106 −0 grails-app/domain/org/icescrum/core/domain/Feature.groovy
  12. +144 −0 grails-app/domain/org/icescrum/core/domain/Impediment.groovy
  13. +169 −0 grails-app/domain/org/icescrum/core/domain/Product.groovy
  14. +111 −0 grails-app/domain/org/icescrum/core/domain/Release.groovy
  15. +218 −0 grails-app/domain/org/icescrum/core/domain/Sprint.groovy
  16. +429 −0 grails-app/domain/org/icescrum/core/domain/Story.groovy
  17. +176 −0 grails-app/domain/org/icescrum/core/domain/Task.groovy
  18. +159 −0 grails-app/domain/org/icescrum/core/domain/Team.groovy
  19. +75 −0 grails-app/domain/org/icescrum/core/domain/TimeBox.groovy
  20. +124 −0 grails-app/domain/org/icescrum/core/domain/User.groovy
  21. +71 −0 grails-app/domain/org/icescrum/core/domain/preferences/ProductPreferences.groovy
  22. +41 −0 grails-app/domain/org/icescrum/core/domain/preferences/TeamPreferences.groovy
  23. +53 −0 grails-app/domain/org/icescrum/core/domain/preferences/UserPreferences.groovy
  24. +51 −0 grails-app/domain/org/icescrum/core/domain/security/Authority.groovy
  25. +78 −0 grails-app/domain/org/icescrum/core/domain/security/UserAuthority.groovy
  26. +466 −0 grails-app/i18n/messages.properties
  27. +473 −0 grails-app/i18n/messages_fr.properties
  28. +33 −0 grails-app/migrations/org/icescrum/core/domain/TaskMigration.groovy
  29. +41 −0 grails-app/migrations/org/icescrum/core/domain/preferences/ProductPreferencesMigration.groovy
  30. +32 −0 grails-app/migrations/org/icescrum/core/domain/preferences/UserPreferencesMigration.groovy
  31. +82 −0 grails-app/services/org/icescrum/core/services/ActorService.groovy
  32. +41 −0 grails-app/services/org/icescrum/core/services/BootStrapService.groovy
  33. +373 −0 grails-app/services/org/icescrum/core/services/ClicheService.groovy
  34. +141 −0 grails-app/services/org/icescrum/core/services/DropImportService.groovy
  35. +195 −0 grails-app/services/org/icescrum/core/services/FeatureService.groovy
  36. +140 −0 grails-app/services/org/icescrum/core/services/ImpedimentService.groovy
  37. +243 −0 grails-app/services/org/icescrum/core/services/NotificationEmailService.groovy
  38. +742 −0 grails-app/services/org/icescrum/core/services/ProductBacklogService.groovy
  39. +475 −0 grails-app/services/org/icescrum/core/services/ProductService.groovy
  40. +361 −0 grails-app/services/org/icescrum/core/services/ReleaseService.groovy
  41. +462 −0 grails-app/services/org/icescrum/core/services/SecurityService.groovy
  42. +572 −0 grails-app/services/org/icescrum/core/services/SprintService.groovy
  43. +512 −0 grails-app/services/org/icescrum/core/services/TaskService.groovy
  44. +308 −0 grails-app/services/org/icescrum/core/services/TeamService.groovy
  45. +214 −0 grails-app/services/org/icescrum/core/services/UserService.groovy
  46. +59 −0 grails-app/taglib/org/icescrum/core/taglib/CommentTagLib.groovy
  47. +101 −0 grails-app/taglib/org/icescrum/core/taglib/EventlineTagLib.groovy
  48. +1,077 −0 grails-app/taglib/org/icescrum/core/taglib/FormTagLib.groovy
  49. +190 −0 grails-app/taglib/org/icescrum/core/taglib/KanbanTagLib.groovy
  50. +60 −0 grails-app/taglib/org/icescrum/core/taglib/MarkItUpTagLib.groovy
  51. +124 −0 grails-app/taglib/org/icescrum/core/taglib/MenuTagLib.groovy
  52. +95 −0 grails-app/taglib/org/icescrum/core/taglib/NoticeTagLib.groovy
  53. +198 −0 grails-app/taglib/org/icescrum/core/taglib/PanelTagLib.groovy
  54. +396 −0 grails-app/taglib/org/icescrum/core/taglib/ScrumTagLib.groovy
  55. +323 −0 grails-app/taglib/org/icescrum/core/taglib/TableTagLib.groovy
  56. +52 −0 grails-app/taglib/org/icescrum/core/taglib/ThemeTagLib.groovy
  57. +179 −0 grails-app/taglib/org/icescrum/core/taglib/TimelineTagLib.groovy
  58. +189 −0 grails-app/taglib/org/icescrum/core/taglib/TooltipTagLib.groovy
  59. +538 −0 grails-app/taglib/org/icescrum/core/taglib/WindowTagLib.groovy
  60. +21 −0 grails-app/utils/NL2BRCodec.groovy
  61. +103 −0 grails-app/utils/org/icescrum/core/support/MenuBarSupport.groovy
  62. +60 −0 grails-app/views/components/_autoCompleteChoose.gsp
  63. +46 −0 grails-app/views/components/_browser.gsp
  64. +47 −0 grails-app/views/components/_browserColumn.gsp
  65. +64 −0 grails-app/views/components/_comment.gsp
  66. +52 −0 grails-app/views/components/_commentEditor.gsp
  67. +38 −0 grails-app/views/components/_comments.gsp
  68. +25 −0 grails-app/views/components/_dropHelper.gsp
  69. +35 −0 grails-app/views/components/_dropMenu.gsp
  70. +24 −0 grails-app/views/components/_event.gsp
  71. +34 −0 grails-app/views/components/_eventline.gsp
  72. +27 −0 grails-app/views/components/_menu.gsp
  73. +128 −0 grails-app/views/components/_menuBar.gsp
  74. +78 −0 grails-app/views/components/_postit.gsp
  75. +45 −0 grails-app/views/components/_textTemplate.gsp
  76. +57 −0 grails-app/views/components/_widgetBar.gsp
  77. +115 −0 grails-app/views/components/_window.gsp
  78. +37 −0 grails-app/views/emails-templates/reportError.gsp
  79. +26 −0 grails-app/views/emails-templates/retrieve.gsp
  80. +26 −0 grails-app/views/emails-templates/storyAcceptedAs.gsp
  81. +26 −0 grails-app/views/emails-templates/storyChangedState.gsp
  82. +26 −0 grails-app/views/emails-templates/storyCommentDeleted.gsp
  83. +26 −0 grails-app/views/emails-templates/storyCommentEdited.gsp
  84. +26 −0 grails-app/views/emails-templates/storyCommented.gsp
  85. +26 −0 grails-app/views/emails-templates/storyCreated.gsp
  86. +26 −0 grails-app/views/emails-templates/storyDeleted.gsp
  87. +26 −0 grails-app/views/emails-templates/storyUpdated.gsp
  88. +54 −0 grails-app/views/error.gsp
  89. +165 −0 license.txt
  90. +68 −0 plugin.xml
  91. +44 −0 src/groovy/org/icescrum/components/UiControllerArtefactHandler.groovy
  92. +144 −0 src/groovy/org/icescrum/components/UtilsWebComponents.groovy
  93. +64 −0 src/groovy/org/icescrum/core/domain/PlanningPokerGame.groovy
  94. +18 −0 src/groovy/org/icescrum/core/event/IceScrumActorEvent.groovy
  95. +50 −0 src/groovy/org/icescrum/core/event/IceScrumEvent.groovy
  96. +27 −0 src/groovy/org/icescrum/core/event/IceScrumFeatureEvent.groovy
  97. +27 −0 src/groovy/org/icescrum/core/event/IceScrumProductEvent.groovy
  98. +22 −0 src/groovy/org/icescrum/core/event/IceScrumReleaseEvent.groovy
  99. +24 −0 src/groovy/org/icescrum/core/event/IceScrumSprintEvent.groovy
  100. +53 −0 src/groovy/org/icescrum/core/event/IceScrumStoryEvent.groovy
  101. +23 −0 src/groovy/org/icescrum/core/event/IceScrumTaskEvent.groovy
  102. +26 −0 src/groovy/org/icescrum/core/event/IceScrumTeamEvent.groovy
  103. +39 −0 src/groovy/org/icescrum/core/event/IceScrumUserEvent.groovy
  104. +63 −0 src/groovy/org/icescrum/core/security/AuthorityManager.groovy
  105. +61 −0 src/groovy/org/icescrum/core/security/ScrumDetailsService.groovy
  106. +66 −0 src/groovy/org/icescrum/core/support/ApplicationSupport.groovy
  107. +47 −0 src/groovy/org/icescrum/core/support/ProgressSupport.groovy
  108. +513 −0 src/groovy/org/icescrum/core/support/XMLConverterSupport.groovy
  109. +229 −0 src/groovy/org/icescrum/core/test/DummyPopulator.groovy
  110. +60 −0 src/groovy/org/icescrum/core/utils/ImageConvert.groovy
  111. +39 −0 src/groovy/org/icescrum/core/utils/ServicesUtils.groovy
  112. +52 −0 src/java/org/icescrum/core/domain/PlanningPokerCard.java
  113. +59 −0 src/java/org/icescrum/core/domain/PlanningPokerGameOld.java
  114. +93 −0 src/java/org/icescrum/core/security/MethodScrumEvaluationContext.java
  115. +179 −0 src/java/org/icescrum/core/security/MethodScrumExpressionHandler.java
  116. +167 −0 src/java/org/icescrum/core/security/MethodScrumExpressionRoot.java
  117. +40 −0 src/java/org/icescrum/core/security/ScrumExpressionRoot.java
  118. +67 −0 src/java/org/icescrum/core/security/WebScrumExpressionHandler.java
  119. +128 −0 src/java/org/icescrum/core/security/WebScrumExpressionRoot.java
  120. +6 −0 target/classes/application.properties
  121. +18 −0 target/pom.xml
  122. +1 −0 target/pom.xml.sha1
  123. +80 −0 test/integration/org/icescrum/core/domain/test/ImpedimentIntegrationTests.groovy
  124. +124 −0 test/integration/org/icescrum/core/domain/test/ProductIntegrationTests.groovy
  125. +102 −0 test/integration/org/icescrum/core/domain/test/ReleaseIntegrationTests.groovy
  126. +148 −0 test/integration/org/icescrum/core/domain/test/StoriesIntegrationTests.groovy
  127. +91 −0 test/integration/org/icescrum/core/domain/test/TestIntegrationTests.groovy
  128. +171 −0 test/integration/org/icescrum/core/services/test/ActorServiceTests.groovy
  129. +315 −0 test/integration/org/icescrum/core/services/test/ExportXMLServiceTests.groovy
  130. +300 −0 test/integration/org/icescrum/core/services/test/ImportXMLServiceTests.groovy
  131. +285 −0 test/integration/org/icescrum/core/services/test/ProductBacklogServiceIntegrationTests.groovy
  132. +88 −0 test/integration/org/icescrum/core/services/test/TaskServiceTests.groovy
  133. +158 −0 test/integration/org/icescrum/core/services/test/TestServiceTests.groovy
  134. +109 −0 test/integration/org/icescrum/core/services/test/UserServiceTests.groovy
  135. +56 −0 test/unit/org/icescrum/core/domain/test/ActorTests.groovy
  136. +35 −0 test/unit/org/icescrum/core/domain/test/BacklogTests.groovy
  137. +148 −0 test/unit/org/icescrum/core/domain/test/BuildTests.groovy
  138. +56 −0 test/unit/org/icescrum/core/domain/test/ClicheTests.groovy
  139. +35 −0 test/unit/org/icescrum/core/domain/test/DomainTests.groovy
  140. +57 −0 test/unit/org/icescrum/core/domain/test/FeatureTests.groovy
  141. +35 −0 test/unit/org/icescrum/core/domain/test/FileTests.groovy
  142. +75 −0 test/unit/org/icescrum/core/domain/test/ImpedimentTests.groovy
  143. +83 −0 test/unit/org/icescrum/core/domain/test/ProductTests.groovy
  144. +68 −0 test/unit/org/icescrum/core/domain/test/ReleaseTests.groovy
  145. +31 −0 test/unit/org/icescrum/core/domain/test/SprintTests.groovy
  146. +56 −0 test/unit/org/icescrum/core/domain/test/StoryTests.groovy
  147. +31 −0 test/unit/org/icescrum/core/domain/test/TaskTests.groovy
  148. +35 −0 test/unit/org/icescrum/core/domain/test/TeamTests.groovy
  149. +31 −0 test/unit/org/icescrum/core/domain/test/TestTests.groovy
  150. +35 −0 test/unit/org/icescrum/core/domain/test/TimeBoxTests.groovy
  151. +31 −0 test/unit/org/icescrum/core/domain/test/UserTests.groovy
  152. +42 −0 web-app/WEB-INF/applicationContext.xml
  153. +14 −0 web-app/WEB-INF/sitemesh.xml
  154. +563 −0 web-app/WEB-INF/tld/c.tld
  155. +671 −0 web-app/WEB-INF/tld/fmt.tld
  156. +550 −0 web-app/WEB-INF/tld/grails.tld
  157. +311 −0 web-app/WEB-INF/tld/spring.tld
  158. +273 −0 web-app/css/main.css
  159. BIN web-app/images/favicon.ico
  160. BIN web-app/images/grails_logo.jpg
  161. BIN web-app/images/grails_logo.png
  162. BIN web-app/images/leftnav_btm.png
  163. BIN web-app/images/leftnav_midstretch.png
  164. BIN web-app/images/leftnav_top.png
  165. BIN web-app/images/skin/database_add.png
  166. BIN web-app/images/skin/database_delete.png
  167. BIN web-app/images/skin/database_edit.png
  168. BIN web-app/images/skin/database_save.png
  169. BIN web-app/images/skin/database_table.png
  170. BIN web-app/images/skin/exclamation.png
  171. BIN web-app/images/skin/house.png
  172. BIN web-app/images/skin/information.png
  173. BIN web-app/images/skin/shadow.jpg
  174. BIN web-app/images/skin/sorted_asc.gif
  175. BIN web-app/images/skin/sorted_desc.gif
  176. BIN web-app/images/spinner.gif
  177. BIN web-app/images/springsource.png
  178. +13 −0 web-app/js/application.js
  179. +7 −0 web-app/js/prototype/animation.js
  180. +136 −0 web-app/js/prototype/builder.js
  181. +965 −0 web-app/js/prototype/controls.js
  182. +974 −0 web-app/js/prototype/dragdrop.js
  183. +1,123 −0 web-app/js/prototype/effects.js
  184. +4,874 −0 web-app/js/prototype/prototype.js
  185. +2,691 −0 web-app/js/prototype/rico.js
  186. +68 −0 web-app/js/prototype/scriptaculous.js
  187. +275 −0 web-app/js/prototype/slider.js
  188. +59 −0 web-app/js/prototype/sound.js
  189. +568 −0 web-app/js/prototype/unittest.js
@@ -0,0 +1,24 @@
+*.iml
+
+ompiled source #
+###################
+*.com
+*.class
+*.dll
+*.exe
+*.o
+*.so
+
+# OS generated files #
+######################
+.DS_Store?
+ehthumbs.db
+Icon?
+Thumbs.db
+
+*.zip.sha1
+*.zip
+*.log
+.idea
+
+
@@ -0,0 +1,145 @@
+/*
+* Copyright (c) 2010 iceScrum Technologies.
+*
+* This file is part of iceScrum.
+*
+* iceScrum is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License as published by
+* the Free Software Foundation, either version 3 of the License.
+*
+* iceScrum is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public License
+* along with iceScrum. If not, see <http://www.gnu.org/licenses/>.
+*
+* Authors:
+*
+* Vincent Barrier (vincent.barrier@icescrum.com)
+*/
+import org.icescrum.components.UiControllerArtefactHandler
+import org.springframework.context.ApplicationContext
+import org.codehaus.groovy.grails.scaffolding.view.ScaffoldingViewResolver
+import org.codehaus.groovy.grails.commons.GrailsClassUtils
+
+class IcescrumCoreGrailsPlugin {
+ def groupId = 'org.icescrum'
+ // the plugin version
+ def version = "1.2"
+ // the version or versions of Grails the plugin is designed for
+ def grailsVersion = "1.3.7 > *"
+ // the other plugins this plugin depends on
+ def dependsOn = [:]
+
+ // resources that are excluded from plugin packaging
+ def pluginExcludes = [
+ "grails-app/views/error.gsp"
+ ]
+
+ def artefacts = [new UiControllerArtefactHandler()]
+
+ def observe = ['controllers']
+
+ def loadAfter = ['controllers','feeds']
+
+ // TODO Fill in these fields
+ def author = "iceScrum"
+ def authorEmail = "contact@icescrum.org"
+ def title = "iceScrum core plugin (include domain / services / taglib)"
+ def description = '''
+ iceScrum core plugin (include domain / services / taglib)
+'''
+
+ // URL to the plugin's documentation
+ def documentation = "http://www.icescrum.org/plugin/icescrum-core"
+
+ def doWithWebDescriptor = { xml ->
+ // TODO Implement additions to web.xml (optional), this event occurs before
+ }
+
+ def doWithSpring = {
+ // TODO Implement runtime spring config (optional)
+ }
+
+ def doWithDynamicMethods = { ctx ->
+ // Manually match the UIController classes
+ application.controllerClasses.each {
+ if (it.hasProperty(UiControllerArtefactHandler.PROPERTY)) {
+ application.addArtefact(UiControllerArtefactHandler.TYPE, it)
+ def plugin = it.hasProperty(UiControllerArtefactHandler.PLUGINNAME)?it.getPropertyValue(UiControllerArtefactHandler.PLUGINNAME):null
+ addUIControllerMethods(it, ctx, plugin)
+ }
+ }
+ }
+
+ def doWithApplicationContext = { applicationContext ->
+ applicationContext.bootStrapService.start()
+ }
+
+ def onChange = { event ->
+ def controller = application.getControllerClass(event.source?.name)
+ if (controller?.hasProperty(UiControllerArtefactHandler.PROPERTY)) {
+ ScaffoldingViewResolver.clearViewCache()
+ application.addArtefact(UiControllerArtefactHandler.TYPE, controller)
+ def plugin = controller.hasProperty(UiControllerArtefactHandler.PLUGINNAME)?controller.getPropertyValue(UiControllerArtefactHandler.PLUGINNAME):null
+ addUIControllerMethods(controller, application.mainContext, plugin)
+ }
+ }
+
+ def onConfigChange = { event ->
+ // TODO Implement code that is executed when the project configuration changes.
+ // The event is the same as for 'onChange'.
+ }
+
+ private addUIControllerMethods(clazz, ApplicationContext ctx, pluginName) {
+ def mc = clazz.metaClass
+ def dynamicActions = [
+ toolbar:{->
+ try {
+ render (plugin:pluginName, template:"window/toolbar", model:[currentView:session.currentView, id:id])
+ } catch(Exception e) {
+ render ('')
+ e.printStackTrace()
+ }
+ },
+ toolbarWidget:{->
+ try {
+ render (plugin:pluginName, template:"widget/toolbar", model:[id:id])
+ } catch(Exception e) {
+ render ('')
+ e.printStackTrace()
+ }
+ },
+ titleBarContent:{
+ try {
+ render (plugin:pluginName, template:"window/titleBarContent", model:[id:id])
+ } catch(Exception e) {
+ render ('')
+ e.printStackTrace()
+ }
+ },
+ titleBarContentWidget:{
+ try {
+ render (plugin:pluginName, template:"widget/titleBarContent", model:[id:id])
+ } catch(Exception e) {
+ render ('')
+ e.printStackTrace()
+ }
+ }
+ ]
+
+ dynamicActions.each { actionName, actionClosure ->
+ if(!clazz.getPropertyValue(actionName)) {
+ mc."${GrailsClassUtils.getGetterName(actionName)}" = {->
+ actionClosure.delegate = delegate
+ actionClosure.resolveStrategy = Closure.DELEGATE_FIRST
+ actionClosure
+ }
+ clazz.registerMapping(actionName)
+ }
+ }
+ }
+
+}
0 README
No changes.
@@ -0,0 +1,6 @@
+#Grails Metadata file
+#Fri Feb 18 23:23:46 CET 2011
+app.grails.version=1.3.7
+app.name=icescrum-core
+plugins.hibernate=1.3.7
+plugins.tomcat=1.3.7
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2010 iceScrum Technologies.
+ *
+ * This file is part of iceScrum.
+ *
+ * iceScrum is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License.
+ *
+ * iceScrum is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with iceScrum. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Authors:
+ *
+ * Vincent Barrier (vincent.barrier@icescrum.com)
+ */
+
+
+grails.project.class.dir = "target/classes"
+grails.project.test.class.dir = "target/test-classes"
+grails.project.test.reports.dir = "target/test-reports"
+//grails.project.war.file = "target/${appName}-${appVersion}.war"
+
+grails.project.dependency.resolution = {
+ // inherit Grails' default dependencies
+ inherits("global") {
+ // uncomment to disable ehcache
+ // excludes 'ehcache'
+ }
+ log "warn" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose'
+ repositories {
+ grailsPlugins()
+ grailsHome()
+ grailsCentral()
+
+ // uncomment the below to enable remote dependency resolution
+ // from public Maven repositories
+ //mavenLocal()
+ mavenCentral()
+ mavenRepo "http://repo.icescrum.org/artifactory/plugins-release/"
+ //mavenRepo "http://snapshots.repository.codehaus.org"
+ //mavenRepo "http://repository.codehaus.org"
+ //mavenRepo "http://download.java.net/maven/2/"
+ //mavenRepo "http://repository.jboss.com/maven2/"
+ }
+
+ dependencies {
+ // specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes eg.
+ runtime 'mysql:mysql-connector-java:5.1.5'
+ }
+
+ plugins {
+ compile 'org.icescrum:fluxiable:0.3'
+ compile 'org.icescrum:icescrum-attachmentable:0.2'
+ compile 'spring:spring-security-core:1.1'
+ compile 'spring:spring-security-acl:1.1'
+ compile ':commentable:0.7.5'
+ compile ':followable:0.3'
+ compile ':autobase:0.11.0'
+ compile ':jdbc-pool:0.3'
+ compile ':spring-events:1.1'
+ compile ':springcache:1.3.1'
+ compile ':mail:1.0-SNAPSHOT'
+ compile ':jasper:1.2'
+ compile ':maven-publisher:0.7.5'
+ }
+}
+
+grails.project.dependency.distribution = {
+ remoteRepository(id: "pluginsSnapshot", url: "http://repo.icescrum.org/artifactory/plugins-snapshot-local/") {
+ authentication username: "", password: ""
+ }
+ remoteRepository(id: "pluginsRelease", url: "http://repo.icescrum.org/artifactory/plugins-release-local/") {
+ authentication username: "", password: ""
+ }
+}
@@ -0,0 +1,13 @@
+class UrlMappings {
+
+ static mappings = {
+ "/$controller/$action?/$id?"{
+ constraints {
+ // apply constraints here
+ }
+ }
+
+ "/"(view:"/index")
+ "500"(view:'/error')
+ }
+}
@@ -0,0 +1,124 @@
+/*
+ * Copyright (c) 2010 iceScrum Technologies.
+ *
+ * This file is part of iceScrum.
+ *
+ * iceScrum is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License.
+ *
+ * iceScrum is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with iceScrum. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Authors:
+ *
+ * Vincent Barrier (vincent.barrier@icescrum.com)
+ * Manuarii Stein (manuarii.stein@icescrum.com)
+ */
+
+
+
+package org.icescrum.core.domain
+
+class Actor extends BacklogElement implements Serializable, Comparable<Actor> {
+
+ static final long serialVersionUID = 2762136778121132424L
+
+ static final int NUMBER_INSTANCES_INTERVAL_1 = 0
+ static final int NUMBER_INSTANCES_INTERVAL_2 = 1
+ static final int NUMBER_INSTANCES_INTERVAL_3 = 2
+ static final int NUMBER_INSTANCES_INTERVAL_4 = 3
+ static final int NUMBER_INSTANCES_INTERVAL_5 = 4
+
+ static final int EXPERTNESS_LEVEL_LOW = 0
+ static final int EXPERTNESS_LEVEL_MEDIUM = 1
+ static final int EXPERTNESS_LEVEL_HIGH = 2
+
+ static final int USE_FREQUENCY_HOUR = 0
+ static final int USE_FREQUENCY_DAY = 1
+ static final int USE_FREQUENCY_WEEK = 2
+ static final int USE_FREQUENCY_MONTH = 3
+ static final int USE_FREQUENCY_TRIMESTER = 4
+
+ String satisfactionCriteria = ""
+
+ int instances = Actor.NUMBER_INSTANCES_INTERVAL_1
+ int expertnessLevel = Actor.EXPERTNESS_LEVEL_MEDIUM
+ int useFrequency = Actor.USE_FREQUENCY_WEEK
+
+
+ static hasMany = [stories: Story]
+
+ static mappedBy = [stories: "actor"]
+
+ static mapping = {
+ cache true
+ table 'icescrum2_actor'
+ stories cascade: "refresh, evict", cache: true
+ }
+
+ static constraints = {
+ satisfactionCriteria(nullable:true)
+ }
+
+ static namedQueries = {
+ findActorByProductAndTerm { pid, term ->
+ backlog {
+ eq 'id', pid
+ }
+ or {
+ ilike 'name', term
+ ilike 'description', term
+ ilike 'notes', term
+ }
+ }
+ }
+
+ @Override
+ boolean equals(Object obj) {
+ if (this.is(obj))
+ return true
+ if (obj == null)
+ return false
+ if (getClass() != obj.getClass())
+ return false
+ final Actor other = (Actor) obj
+ if (backlog == null) {
+ if (other.backlog != null)
+ return false
+ } else if (!backlog.equals(other.backlog))
+ return false
+ if (name != other.name)
+ return false
+ if (instances != other.instances)
+ return false
+ if (description != other.description)
+ return false
+ if (satisfactionCriteria != other.satisfactionCriteria)
+ return false
+ if (expertnessLevel != other.expertnessLevel)
+ return false
+ if (useFrequency != other.useFrequency)
+ return false
+ return true
+ }
+
+ @Override
+ int hashCode() {
+ final int prime = 31
+ int result = 1
+ result = prime * result + ((backlog == null) ? 0 : backlog.hashCode())
+ result = prime * result + name.hashCode()
+ return result
+ }
+
+ int compareTo(Actor cr) {
+ return name.compareTo(cr.name)
+ }
+
+}
Oops, something went wrong.

0 comments on commit fa32511

Please sign in to comment.