          :attribute-e [value1 value2]}
       :replace
         {:attibute-d value
-         :attribute-e [value1 value2]}}
+         :attribute-e [value1 value2]}
+      :pre-read
+        #{:attribute-a :attribute-b}
+      :post-read
+        #{:attribute-c :attribute-d}}
+
+Where :add adds an attribute value, :delete deletes an attribute value and :replace replaces the set of values for the attribute with the ones specified. The entries :pre-read and :post-read specify attributes that have be read and returned either before or after the modifications have taken place. 
 "
   [connection dn modifications]
   (let [modify-obj (get-modify-request dn modifications)]

      (> (.size attr) 1)     [k (vec (.getValues attr))]
      :else                  [k (.getValue attr)])))

(defn- entry-as-map
  "Converts an Entry object into a map"
  [entry]
  (let [col-a (.getAttributes entry)
        attrs (seq (.getAttributes entry))]
      (apply hash-map :dn (.getDN entry)
             (mapcat extract-attribute attrs))))

(defn- set-entry-kv!
  "Sets the given key/value pair in the given entry object"

            LDAPEntrySource
            EntrySourceException
            SearchScope])
  (:import [com.unboundid.ldap.sdk.controls
            PreReadRequestControl
            PostReadRequestControl
            PreReadResponseControl
            PostReadResponseControl])
  (:import [com.unboundid.util.ssl
            SSLUtil
            TrustAllTrustManager
