-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathapplication-mop.lisp
More file actions
27 lines (21 loc) · 934 Bytes
/
application-mop.lisp
File metadata and controls
27 lines (21 loc) · 934 Bytes
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
(in-package :weblocks)
(export '(webapp-class))
(defclass webapp-class (standard-class)
((home-package
:accessor webapp-class-home-package :initform *package*
:documentation "The current package when I was defined.")
(default-store-name
:accessor webapp-default-store-name :initform nil
:documentation "If non-nil, the name of the `*default-store*'
bound during request handlers."))
(:documentation "The class of all webapp classes."))
(defmethod validate-superclass ((self webapp-class) (super standard-class))
(typep (class-name (class-of super))
'(member standard-class webapp-class)))
(defmethod shared-initialize :after
((self webapp-class) slots &key autostart &allow-other-keys)
(declare (ignore slots))
(let ((name (class-name self)))
(pushnew name (symbol-value '*registered-webapps*))
(when autostart
(pushnew name (symbol-value '*autostarting-webapps*)))))