2013-07-23 23:40:09 +02:00
|
|
|
;; scrumli --- A simple scrum web application
|
|
|
|
;; Copyright (C) 2013 Tom Willemse
|
|
|
|
|
|
|
|
;; scrumli is free software: you can redistribute it and/or modify
|
|
|
|
;; it under the terms of the GNU Affero General Public License as published by
|
|
|
|
;; the Free Software Foundation, either version 3 of the License, or
|
|
|
|
;; (at your option) any later version.
|
|
|
|
|
|
|
|
;; scrumli 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 Affero General Public License for more details.
|
|
|
|
|
|
|
|
;; You should have received a copy of the GNU Affero General Public License
|
|
|
|
;; along with scrumli. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
2013-06-30 22:38:05 +02:00
|
|
|
(restas:define-policy datastore
|
|
|
|
(:interface-package #:scrumli.policy.datastore)
|
|
|
|
(:interface-method-template "DATASTORE-~A")
|
|
|
|
(:internal-package #:scrumli.datastore)
|
|
|
|
|
|
|
|
(define-method init ()
|
|
|
|
"Initiate the datastore.")
|
|
|
|
|
|
|
|
(define-method get-all-stories ()
|
|
|
|
"Get all of the stories in the datastore.")
|
|
|
|
|
2013-07-25 22:45:04 +02:00
|
|
|
(define-method get-stories-for (username)
|
|
|
|
"Get all of the storiess for USERNAME.")
|
|
|
|
|
2013-06-30 22:38:05 +02:00
|
|
|
(define-method get-story (id)
|
|
|
|
"Get a story from the datastore.")
|
|
|
|
|
2013-07-04 21:51:31 +02:00
|
|
|
(define-method get-tasks-for-story (id)
|
|
|
|
"Get the tasks associated with a story.")
|
|
|
|
|
2013-06-30 22:38:05 +02:00
|
|
|
(define-method post-story (role necessity title content reporter)
|
|
|
|
"Post a new story.")
|
|
|
|
|
2013-07-04 21:51:31 +02:00
|
|
|
(define-method post-task (story-id description reporter)
|
|
|
|
"Post a new task for a story.")
|
|
|
|
|
2013-07-04 23:55:43 +02:00
|
|
|
(define-method story-get-state (type id)
|
2013-06-30 22:38:05 +02:00
|
|
|
"Get the state of a story.")
|
|
|
|
|
2013-07-04 23:55:43 +02:00
|
|
|
(define-method story-set-state (type id state)
|
2013-06-30 22:38:05 +02:00
|
|
|
"Set the state of a story.")
|
|
|
|
|
2013-07-04 23:55:43 +02:00
|
|
|
(define-method story-change-priority (type id dir)
|
2013-07-24 19:56:52 +02:00
|
|
|
"Change the priority of a story in direction DIR.")
|
|
|
|
|
|
|
|
(define-method set-assignee (type id assignee)
|
|
|
|
"Change the assigned person for a story or task."))
|
2013-06-30 22:38:05 +02:00
|
|
|
|
|
|
|
(restas:define-module #:scrumli
|
|
|
|
(:use #:cl #:restas #:json #:scrumli.datastore #:drakma)
|
|
|
|
(:export #:start-scrumli))
|
|
|
|
|
|
|
|
(defpackage #:scrumli.pg-datastore
|
|
|
|
(:use #:cl #:postmodern #:scrumli.policy.datastore)
|
|
|
|
(:export #:pg-datastore))
|
|
|
|
|
|
|
|
(in-package #:scrumli)
|
|
|
|
|
|
|
|
(defparameter *static-directory*
|
|
|
|
(merge-pathnames #P"static/" scrumli-config:*base-directory*))
|
|
|
|
|
|
|
|
(eval-when (:compile-toplevel :load-toplevel :execute)
|
|
|
|
(sexml:with-compiletime-active-layers
|
|
|
|
(sexml:standard-sexml sexml:xml-doctype)
|
|
|
|
(sexml:support-dtd
|
|
|
|
(merge-pathnames "html5.dtd" (asdf:system-source-directory "sexml"))
|
|
|
|
:<)))
|
|
|
|
(<:augment-with-doctype "html" "" :auto-emit-p t)
|