Changeset 2525
- Timestamp:
- 02/17/08 22:39:28 (9 months ago)
- Files:
-
- branches/trunk-reorg/bknr/datastore/src/data/object.lisp (modified) (1 diff)
- branches/trunk-reorg/bknr/datastore/src/data/txn.lisp (modified) (2 diffs)
- branches/trunk-reorg/bknr/modules/mail/mail.lisp (modified) (1 diff)
- branches/trunk-reorg/bknr/web/src/rss/rss.lisp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/trunk-reorg/bknr/datastore/src/data/object.lisp
r2508 r2525 648 648 649 649 (defun find-store-object (id-or-name &key (class 'store-object) query-function key-slot-name) 650 " mock up implementation of find-store-object apias in the old datastore"650 "Mock up implementation of find-store-object API as in the old datastore" 651 651 (unless id-or-name 652 652 (error "can't search a store object with null key")) branches/trunk-reorg/bknr/datastore/src/data/txn.lisp
r2523 r2525 224 224 ;;; transaction. Named transactions do not explicitly log the nested 225 225 ;;; transactions as the nesting is implicit, meaning that any repeated 226 ;;; execution of the transactions triggered by rolling forward the 227 ;;; transaction log will automatically repeat the sequence of 228 ;;; executing nested transactions by the program code executed. 229 ;;; Contrasted to that, an anonymous transaction has no implicit 230 ;;; nesting, so any nested transactions which are called are 231 ;;; explicitly logged. 226 ;;; execution of the transactions while rolling forward the 227 ;;; transaction log will automatically repeat the sequence of nested 228 ;;; transaction executions by the program code executed. Contrasted 229 ;;; to that, an anonymous transaction has no implicit nesting, so any 230 ;;; nested transactions which are called are explicitly logged. 232 231 233 232 (defgeneric execute-transaction (executor transaction) … … 300 299 "Define a transaction function tx-NAME and a function NAME executing 301 300 tx-NAME in the context of the current store. The arguments to NAME 302 will be serialized to the transaction-log, and should must be 303 supported by the binary encoder. tx-NAME will be called during a 304 roll-forward." 301 will be serialized to the transaction-log, and must be supported by 302 the binary encoder. tx-NAME will be called during a roll-forward to 303 repeat any effects that the transaction function had on the persistent 304 store." 305 305 (let ((name name) 306 306 (args args) branches/trunk-reorg/bknr/modules/mail/mail.lisp
r2508 r2525 93 93 :id (regex-replace-all 94 94 *message-id-re* 95 (header :message-id) #?/\1/) 96 #| :in-reply (regex-replace-all 95 (header :message-id) 96 #?/\1/) 97 :in-reply (regex-replace-all 97 98 *message-id-re* 98 99 (first (if (header :in-reply-to) 99 100 (split #?/\s+/ (header :in-reply-to)) 100 (last (split #?/\s+/ (header :references)))))) |# 101 (last (split #?/\s+/ (header :references))))) 102 #?/\1/) 101 103 :headers headers 102 104 :body body))))) branches/trunk-reorg/bknr/web/src/rss/rss.lisp
r2522 r2525 65 65 66 66 (defun make-rss-channel (name title description link &rest args) 67 "Create an RSS channel with the given NAME, TITLE, DESCRIPTION and 68 LINK (all strings) which are the mandatory fields in an RSS channel. 69 Returns the persistent RSS-CHANNEL object that has been created." 67 70 (apply #'make-object 'rss-channel :name name :title title :description description :link link args)) 68 71 … … 74 77 (format nil "(channel ~(~A~) not defined)" element))))) 75 78 76 (defmethod rss-channel-xml ((channel rss-channel) stream) 77 (with-xml-output (make-character-stream-sink stream) 78 (with-element "rss" 79 (attribute "version" "2.0") 80 (attribute* "xmlns" "content" "http://purl.org/rss/1.0/modules/content/") 81 (with-element "channel" 82 (dolist (slot '(title link description)) 83 (render-mandatory-element channel slot)) 79 (defgeneric rss-channel-xml (channel stream) 80 (:documentation "Generate XML for the current state of RSS channel 81 CHANNEL to STREAM.") 82 (:method ((channel rss-channel) stream) 83 (with-xml-output (make-character-stream-sink stream) 84 (with-element "rss" 85 (attribute "version" "2.0") 86 (attribute* "xmlns" "content" "http://purl.org/rss/1.0/modules/content/") 87 (with-element "channel" 88 (dolist (slot '(title link description)) 89 (render-mandatory-element channel slot)) 84 90 85 (dolist (item (remove-if-not #'(lambda (item)86 (and (not (object-destroyed-p item))87 (rss-item-published item)))88 (rss-channel-items channel)))89 (rss-item-xml item))))))91 (dolist (item (remove-if-not #'(lambda (item) 92 (and (not (object-destroyed-p item)) 93 (rss-item-published item))) 94 (rss-channel-items channel))) 95 (rss-item-xml item))))))) 90 96 91 97 (defgeneric rss-channel-items (channel)
