[Remove useless code clinton@unknownlamer.org**20080205213926] { hunk ./src/admin.lisp 1 -(in-package :org.unknownlamer.lame-web.admin) - -;;; Tiny admin tool system. This is a temporary bit of -;;; code. Eventually the system will be converted to use -;;; ucw-presentations, and this will probably be scrapped, or at least -;;; used only as legacy glue to avoid rewriting existing applications. - -;;; Generic Admin Tool Protocol - -(defcomponent admin-component (lame-component) - ((operations :initform nil :reader admin-operations - :documentation "List of names of operation classes supported by the component")) - (:documentation "Lame-CMS application adminstration component")) - -(defcomponent admin-operation-component (admin-component) - () - (:documentation "Admin tool operation mixin")) - -(defgeneric run-operation-component (tool operation) - (:documentation "Invoke operation of component. The main method should only be overriden by an actual component class.")) - -(defgeneric allocate-operation-component (component operation) - (:documentation "Allocate an instance of operation")) - -;; Generic implementation scaffolding - -(defmethod run-operation-component ((component admin-component) - (operation-name symbol)) - (run-operation component (allocate-operation component - operation-name))) - -(defmethod allocate-operation-component ((component admin-component) - operation) - (make-instance operation)) - -(defmethod run-operation ((component admin-component) - (operation admin-operation-component)) - (call-component component operation)) - -;;; Object Editing Tool - -(defcomponent object-editor-component (admin-component) - ((edited-object :initform nil - :initarg :edited-instance - :accessor edited-instance)) - (:documentation "Admin tool that edits an object")) - -(defcomponent object-editor-operation-component (admin-operation-component - object-editor-component) - () - (:documentation "Operation that edits an object")) - -(defmethod allocate-operation ((component object-editor-component) - (operation object-editor-operation-component)) - (make-instance operation :edited-instance (edited-instance component))) - - -;;; CRUD Tools - -(defcomponent crud-admin-component (object-editor-component) - ()) - -(defmethod admin-operations ((component crud-admin-component)) - '(crud-create-operation crud-read-operation - crud-update-operation crud-delete-operation)) - -(defmethod run-operation ((component crud-admin-component) - (operation crud-operation-component)) - (run-operation component (allocate-operation component ))) + rmfile ./src/admin.lisp hunk ./src/component-manager.lisp 1 -(in-package :org.unknownlamer.lame-web.component-manager) - -(defvar *cms* nil - "Default cms") - -(defgeneric register-managed-component (component &optional cms) - (:documentation "Makes component available in the component manager")) + hunk ./src/lame-web.lisp 1 -(in-package :org.unknownlamer.lame-web.web) - -(defclass lame-application-module (modular-application-mixin) - ((admin-component :initarg :admin-component - :accessor admin-component-of - :documentation "UCW Component for application adminstration") - (user-component :initarg :user-component - :accessor user-component-of - :documentation "Main web site component")) - (:documentation "Mixin for UCW Lame Web applications")) - -(defcomponent lame-component () - () - (:documentation "Mixin for Lame Web components")) - hunk ./src/packages.lisp 12 -(defpackage :org.unknownlamer.lame-web.users - (:use :common-lisp) - (:nicknames :lame-web-users)) + :query-view-get-instances + :query-view-count-instances hunk ./src/packages.lisp 15 -(defpackage :org.unknownlamer.org.lame-web.admin - (:use :common-lisp :ucw :lame-web) - (:nicknames :lame-web-admin) - (:export - ;; Types - admin-component - object-editor-component - ;; Methods - )) - -(defpackage :org.unknownlamer.lame-web.component-manager - (:use :common-lisp) - (:nicknames :lame-web-cm)) + :current-items + + :scroll-start + :scroll-end + :scroll-forward + :scroll-backward + :scroll-to-page + :have-previous-page-p + :have-next-page-p + :page-size + :page-count + :page-offset + :current-page)) hunk ./src/users.lisp 1 -(in-package :org.unknownlamer.lame-web.users) - -(defclass cms-user () - ((user-name :documentation "Short username used for logins and - uniquely identifying the user throughout the system") - (password :documentation "Hashed password"))) + rmfile ./src/users.lisp }