Permalink
Browse files

Deleted domain and added BuildConfig with path to domain plugin

  • Loading branch information...
mirhagen committed Jan 15, 2010
1 parent 4ca7d05 commit 4d399c6cd66f6c2822f9a29ea0c352808a90df72
Showing with 6 additions and 1,294 deletions.
  1. +4 −1 qanban-domain-plugin/plugin.xml
  2. +1 −1 qanban/application.properties
  3. +1 −0 qanban/grails-app/conf/BuildConfig.groovy
  4. +0 −35 qanban/grails-app/domain/se/qbranch/qanban/Board.groovy
  5. +0 −43 qanban/grails-app/domain/se/qbranch/qanban/BoardEvent.groovy
  6. +0 −49 qanban/grails-app/domain/se/qbranch/qanban/BoardEventCreate.groovy
  7. +0 −53 qanban/grails-app/domain/se/qbranch/qanban/Card.groovy
  8. +0 −41 qanban/grails-app/domain/se/qbranch/qanban/CardEvent.groovy
  9. +0 −98 qanban/grails-app/domain/se/qbranch/qanban/CardEventCreate.groovy
  10. +0 −73 qanban/grails-app/domain/se/qbranch/qanban/CardEventDelete.groovy
  11. +0 −81 qanban/grails-app/domain/se/qbranch/qanban/CardEventMove.groovy
  12. +0 −57 qanban/grails-app/domain/se/qbranch/qanban/CardEventSetAssignee.groovy
  13. +0 −80 qanban/grails-app/domain/se/qbranch/qanban/CardEventUpdate.groovy
  14. +0 −80 qanban/grails-app/domain/se/qbranch/qanban/Event.groovy
  15. +0 −53 qanban/grails-app/domain/se/qbranch/qanban/Phase.groovy
  16. +0 −39 qanban/grails-app/domain/se/qbranch/qanban/PhaseEvent.groovy
  17. +0 −82 qanban/grails-app/domain/se/qbranch/qanban/PhaseEventCreate.groovy
  18. +0 −77 qanban/grails-app/domain/se/qbranch/qanban/PhaseEventDelete.groovy
  19. +0 −54 qanban/grails-app/domain/se/qbranch/qanban/PhaseEventMove.groovy
  20. +0 −76 qanban/grails-app/domain/se/qbranch/qanban/PhaseEventUpdate.groovy
  21. +0 −41 qanban/grails-app/domain/se/qbranch/qanban/Role.groovy
  22. +0 −62 qanban/grails-app/domain/se/qbranch/qanban/User.groovy
  23. +0 −38 qanban/grails-app/domain/se/qbranch/qanban/UserEvent.groovy
  24. +0 −80 qanban/grails-app/domain/se/qbranch/qanban/UserEventCreate.groovy
@@ -32,5 +32,8 @@ This plugin hold the domain model for the Qanban application
<resource>UrlMappings</resource>
<resource>DataSource</resource>
</resources>
- <dependencies />
+ <dependencies>
+ <plugin name='acegi' version='* &gt; 0.5.2' />
+ <plugin name='hibernate' version='1.1.1' />
+ </dependencies>
</plugin>
@@ -1,5 +1,5 @@
#utf-8
-#Thu Jan 14 10:30:39 CET 2010
+#Fri Jan 15 11:38:29 CET 2010
plugins.acegi=0.5.2
app.version=0.1
plugins.jquery=1.3.2.4
@@ -0,0 +1 @@
+grails.plugin.location.'qanban-domain' = "../qanban-domain-plugin"
@@ -1,35 +0,0 @@
-/*
- * 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
-
-}
@@ -1,43 +0,0 @@
-/*
- * 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]
- }
-
-}
@@ -1,49 +0,0 @@
-/*
- * 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()
- }
-
-
-}
@@ -1,53 +0,0 @@
-/*
- * 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"
- }
-
-}
@@ -1,41 +0,0 @@
-/*
- * 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
- }
-}
@@ -1,98 +0,0 @@
-/*
- * 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"
- }
-}
Oops, something went wrong.

0 comments on commit 4d399c6

Please sign in to comment.