summaryrefslogtreecommitdiff
path: root/src/session-object.lisp
blob: 480cf6f0ab54d90ba1084917937ab81b50452f72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
(declaim (optimize (speed 0) (safety 3) (debug 3)))

(in-package :org-ckons-session)

(defclass session-object ()
  ((*session-key :initarg :*session-key
                 :initform (error 'org-ckons-condition::handled-error :text "Subclasses of `session-object' must supply an initform for the *SESSION-KEY slot.")
                 :accessor *session-key
                 :documentation "The key to the user_session_objects table."))
  (:documentation "Superclass for all session objects.
`session-object' is involved in multiple inheritance. Every
`session-object' is also a `record'. It must have a `*where-expresion'
of id = ~a."))

(defmethod sanitize-json ((session-object session-object))
  (setf (*session-key session-object) nil)
  (call-next-method))