aboutsummaryrefslogtreecommitdiffstats
path: root/defmodule.lisp
blob: 00a18414172e3bac959ff0322b1842b5a2ee340f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
(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.")

  (define-method get-story (id)
    "Get a story from the datastore.")

  (define-method get-tasks-for-story (id)
    "Get the tasks associated with a story.")

  (define-method post-story (role necessity title content reporter)
    "Post a new story.")

  (define-method post-task (story-id description reporter)
    "Post a new task for a story.")

  (define-method story-get-state (type id)
    "Get the state of a story.")

  (define-method story-set-state (type id state)
    "Set the state of a story.")

  (define-method story-change-priority (type id dir)
    "Change the priority of a story in direction DIR."))

(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)