Changeset 3677

Show
Ignore:
Timestamp:
07/29/08 14:13:33 (4 months ago)
Author:
hans
Message:

INITIALIZE-PERSISTENT-INSTANCE now receives the initargs supplied
to MAKE-OBJECT.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/bknr/datastore/src/data/object.lisp

    r3673 r3677  
    245245                          :args (append (list object (if (symbolp class) class (class-name class))) args)))) 
    246246 
    247 (defgeneric initialize-persistent-instance (store-object
     247(defgeneric initialize-persistent-instance (store-object &key
    248248  (:documentation 
    249    "Initializes the persistent aspects of a persistent object. This method is called 
    250 at the creationg of a persistent object, but not when the object is loaded from a 
    251 snapshot.")) 
     249   "Initializes the persistent aspects of a persistent object. This 
     250method is called at the creation of a persistent object, but not when 
     251the object is loaded from a snapshot.")) 
    252252 
    253253(defgeneric initialize-transient-instance (store-object) 
    254254  (:documentation 
    255    "Initializes the transient aspects of a persistent object. This method is called 
    256 whenever a persistent object is initialized, also when the object is loaded from 
    257 a snapshot.")) 
    258  
    259 (defmethod initialize-persistent-instance ((object store-object))) 
     255   "Initializes the transient aspects of a persistent object. This 
     256method is called whenever a persistent object is initialized, also 
     257when the object is loaded from a snapshot.")) 
     258 
     259(defmethod initialize-persistent-instance ((object store-object) &key)) 
    260260(defmethod initialize-transient-instance ((object store-object))) 
    261261 
     
    642642                                (remove-transient-slot-initargs (find-class class-name) initargs) 
    643643                                initargs))) 
    644            (initialize-persistent-instance obj
     644           (apply #'initialize-persistent-instance obj initargs
    645645           (initialize-transient-instance obj) 
    646646           (setf error nil) 
  • trunk/bknr/web/src/frontend/frontend-config.lisp

    r3382 r3677  
    1010 
    1111(defun cachable-prefixes-regex () 
    12   (format nil "^(~{~A~^|~})" (mapcar #'page-handler-prefix (website-cachable-handlers bknr.web:*website*)))) 
     12  (format nil "^(~{~A~^|~})" 
     13          (mapcar #'page-handler-prefix (website-cachable-handlers bknr.web::*website*)))) 
    1314 
    1415(defun generate-frontend-config (stream &key 
  • trunk/bknr/web/src/rss/rss.lisp

    r3511 r3677  
    148148    (warn "no RSS channel defined for item ~A" item))) 
    149149 
    150 (defmethod initialize-persistent-instance :after ((rss-item rss-item)
     150(defmethod initialize-persistent-instance :after ((rss-item rss-item) &key
    151151  (add-item (rss-item-channel rss-item) rss-item)) 
    152152 
  • trunk/bknr/web/src/sysclasses/user.lisp

    r3137 r3677  
    6161                "unbound")))) 
    6262 
    63 (defmethod initialize-persistent-instance ((user user)
     63(defmethod initialize-persistent-instance ((user user) &key
    6464  (let* ((plaintext-password (slot-value user 'password)) 
    6565         (password (when plaintext-password (crypt-md5 plaintext-password (make-salt))))) 
     
    7373  ()) 
    7474 
    75 (defmethod initialize-persistent-instance ((user smb-user)
     75(defmethod initialize-persistent-instance ((user smb-user) &key
    7676  (let* ((plaintext-password (slot-value user 'password))) 
    7777    (when plaintext-password 
  • trunk/projects/bos/m2/allocation.lisp

    r3671 r3677  
    3535            (store-object-id allocation-area)))) 
    3636 
    37 (defmethod initialize-persistent-instance :after ((allocation-area allocation-area)
     37(defmethod initialize-persistent-instance :after ((allocation-area allocation-area) &key
    3838  (with-slots (total-m2s free-m2s) allocation-area 
    3939    (setf total-m2s (calculate-total-m2-count allocation-area)) 
  • trunk/projects/bos/m2/m2.lisp

    r3671 r3677  
    277277  (equal (class-of object) (find-class 'contract))) 
    278278 
    279 (defmethod initialize-persistent-instance :after ((contract contract)
     279(defmethod initialize-persistent-instance :after ((contract contract) &key
    280280  (pushnew contract (sponsor-contracts (contract-sponsor contract))) 
    281281  (dolist (m2 (contract-m2s contract)) 
     
    378378      (collect (list (m2-x m2) (m2-y m2)))))) 
    379379 
    380 (defun contracts-bounding-box (&optional (contracts (class-instances 'contract))) 
     380(defun all-contracts () 
     381  "Return list of all contracts in the system." 
     382  (class-instances 'all-contracts)) 
     383 
     384(defun contracts-bounding-box (&optional (contracts (all-contracts))) 
    381385  (geometry:with-bounding-box-collect (collect) 
    382386    (dolist (contract contracts) 
  • trunk/projects/bos/m2/poi.lisp

    r3675 r3677  
    3131      (setf (poi-images poi) (remove poi-image (poi-images poi)))))) 
    3232 
    33 (defmethod initialize-persistent-instance :after ((poi-image poi-image)
     33(defmethod initialize-persistent-instance :after ((poi-image poi-image) &key
    3434  (setf (poi-images (poi-image-poi poi-image)) (append (poi-images (poi-image-poi poi-image)) (list poi-image)))) 
    3535 
     
    5454               :index-reader find-poi :index-values all-pois 
    5555               :documentation "Symbolischer Name") 
     56   (published :update :initform nil) 
    5657   (title :update :initform (make-string-hash-table) :documentation "Angezeigter Name") 
    5758   (subtitle :update :initform (make-string-hash-table) :documentation "Unterschrift")