diff options
Diffstat (limited to 'entity')
| -rw-r--r-- | entity/entity.lisp | 14 | ||||
| -rw-r--r-- | entity/generics.lisp | 7 | ||||
| -rw-r--r-- | entity/ldap-user.lisp | 14 |
3 files changed, 18 insertions, 17 deletions
diff --git a/entity/entity.lisp b/entity/entity.lisp index c7f9842..327fb2f 100644 --- a/entity/entity.lisp +++ b/entity/entity.lisp @@ -15,26 +15,26 @@ on those slots. `slot' is the iterator." `(remove-if #'null (mapcar (lambda (slot) (when (slot-is-field-p slot) ,@body)) - (map-slot-names ,entity)))) + (org-ckons-core::map-slot-names ,entity)))) (defmethod attribute-value-list ((entity entity) &optional (keep-nulls nil)) (with-entity-slots-to-list (entity slot) (when (or keep-nulls (and (not keep-nulls) - (not (null-or-empty-p (slot-value entity slot))))) + (not (org-ckons-core::null-or-empty-p (slot-value entity slot))))) `(,slot . ,(slot-value entity slot))))) (defmethod get-slots-regex ((entity entity) regex) - (sort (remove-if-not (lambda (x) (match-it regex (symbol-name x))) - (map-slot-names entity)) + (sort (remove-if-not (lambda (x) (org-ckons-core::match-it regex (symbol-name x))) + (org-ckons-core::map-slot-names entity)) (lambda (x y) (string< (symbol-name x) (symbol-name y))))) (defmethod intersect-slots ((entity entity) slots) (let ((intersect-slots ())) - (loop for class-slot in (map-slot-names entity) do - (let ((class-slot-string (parse-symbol class-slot))) + (loop for class-slot in (org-ckons-core::map-slot-names entity) do + (let ((class-slot-string (org-ckons-core::parse-symbol class-slot))) (loop for arg-slot in slots do - (let ((arg-slot-string (parse-symbol arg-slot))) + (let ((arg-slot-string (org-ckons-core::parse-symbol arg-slot))) (when (string-equal class-slot-string arg-slot-string) (push class-slot intersect-slots)))))) (nreverse intersect-slots))) diff --git a/entity/generics.lisp b/entity/generics.lisp index e2a050a..b14aa9a 100644 --- a/entity/generics.lisp +++ b/entity/generics.lisp @@ -12,9 +12,10 @@ slots whose names match `regex'.")) (defgeneric intersect-slots (entity slots) (:documentation "Since the built-in `intersect' function does not -take package name prefixes into account, and since `map-slot-names' -returns slot names prefixed with the package name, this method was -written to intersect lists ignoring package prefixes.")) +take package name prefixes into account, and since +`org-ckons-core::map-slot-names' returns slot names prefixed with the +package name, this method was written to intersect lists ignoring +package prefixes.")) (defgeneric get-cn (ldap-user) (:documentation "Generates the CN of an `ldap-user'. `trivial-ldap' diff --git a/entity/ldap-user.lisp b/entity/ldap-user.lisp index f8d8a1c..9097e54 100644 --- a/entity/ldap-user.lisp +++ b/entity/ldap-user.lisp @@ -50,14 +50,14 @@ (change-attrs (remove-if #'null (mapcar (lambda (attr) (let ((new-attr (assoc (car attr) new-attrs))) - (cond ((and (null-or-empty-p (cdr attr)) - (not (null-or-empty-p (cdr new-attr)))) + (cond ((and (org-ckons-core::null-or-empty-p (cdr attr)) + (not (org-ckons-core::null-or-empty-p (cdr new-attr)))) `(ldap:add ,(car attr) ,(cdr new-attr))) - ((and (not (null-or-empty-p (cdr attr))) - (null-or-empty-p (cdr new-attr))) + ((and (not (org-ckons-core::null-or-empty-p (cdr attr))) + (org-ckons-core::null-or-empty-p (cdr new-attr))) `(ldap:delete ,(car attr) ,(cdr attr))) - ((and (not (null-or-empty-p (cdr attr))) - (not (null-or-empty-p (cdr new-attr))) + ((and (not (org-ckons-core::null-or-empty-p (cdr attr))) + (not (org-ckons-core::null-or-empty-p (cdr new-attr))) (not (string= (cdr attr) (cdr new-attr)))) `(ldap:replace ,(car attr) ,(cdr new-attr)))))) existing-attrs)))) @@ -71,5 +71,5 @@ (defmethod add-ldap-user ((ldap-user ldap-user) (ldap ldap)) (let* ((new-attrs (attribute-value-list ldap-user)) - (new-entry (ldap:new-entry (get-user-dn ldap-user ldap) :attrs (add-to-list new-attrs '((objectclass . (inetorgperson))))))) + (new-entry (ldap:new-entry (get-user-dn ldap-user ldap) :attrs (org-ckons-core::add-to-list new-attrs '((objectclass . (inetorgperson))))))) (ldap:add new-entry (connection ldap)))) |
