     (api01-public-alfresco-java-api)
     (api06-service-locator)
     (com06-compiled-jvm-version)
-    (sec04-stb03-stb04-stb05-stb06-stb10-stb12-java-apis)
-    (stb07-stb14-search-apis)
+    (com09-stb07-stb14-search-apis)
     (sec02-minimise-manual-authentication)
+    (sec04-process-exec-builder)
+    (stb03-servlets-servlet-filters)
+    (stb04-database-access)
     (stb06-stb18-manual-transactions)
+    (stb10-threading)
+    (stb12-logging)
+    (up01-explorer-ui)
   ))
 
 (defn validate

                         ORDER BY n.name
                       ")
        message        (if (empty? res)
                         ""
                         (s/join "\n"
                                 (map #(str (get % "ClassName")
                                            " is compiled for JVM version "
                                            (get % "ClassVersion")))
                                      res))]
    (build-bookmark-map "COM06" message "The code has been compiled for JVM 1.6 or greater.")))


(defn- sec04-stb03-stb04-stb05-stb06-stb10-stb12-java-apis
  []
  (let [res (cy/tquery "
                         START n=NODE(*)
                         MATCH (n)-->(m)
                         WHERE HAS(n.name)
                           AND HAS(m.name)
                           AND (   m.name IN [
                                              'java.lang.Throwable',
                                              'java.lang.Error',
                                              'java.lang.System',
                                              'java.lang.Thread',
                                              'java.lang.ThreadGroup',
                                              'java.lang.ThreadLocal',
                                              'java.lang.Runnable',
                                              'java.lang.Process',
                                              'java.lang.ProcessBuilder',
                                              'java.lang.ClassLoader',
                                              'java.security.SecureClassLoader'
                                             ]
                            OR (    HAS(m.package)
                           AND m.package IN [
                                              'java.sql',
                                              'javax.sql',
                                              'org.springframework.jdbc',
                                              'com.ibatis',
                                              'org.hibernate',
                                              'java.util.concurrent',
                                              'javax.servlet',
                                              'javax.servlet.http',
                                              'javax.transaction',
                                              'javax.transaction.xa'
                                            ]))
                        RETURN n.name as UsedBy, COLLECT(DISTINCT m.name) AS BlacklistedJavaAPIs
                         ORDER BY n.name
                       ")
        message        (if (empty? res)
                         ""
                         (s/join "\n"
                                 (map #(str (get % "UsedBy")
                                            " uses "
                                            (s/join ", " (get % "BlacklistedJavaAPIs")))
                                      res)))]
    (merge
      (build-bookmark-map "SEC04" message "The technology does not use blacklisted Java APIs.")
      (build-bookmark-map "STB03" message "The technology does not use blacklisted Java APIs.")
      (build-bookmark-map "STB04" message "The technology does not use blacklisted Java APIs.")
      (build-bookmark-map "STB05" message "The technology does not use blacklisted Java APIs.")
      (build-bookmark-map "STB10" message "The technology does not use blacklisted Java APIs.")
      (build-bookmark-map "STB12" message "The technology does not use blacklisted Java APIs."))))

(defn- stb07-stb14-search-apis
  []
  (let [res (cy/tquery "
                         START n=NODE(*)
                         MATCH (n)-->(m)
                         WHERE HAS(n.name)
                           AND HAS(m.name)
                           AND m.name IN [
                                           'org.alfresco.service.cmr.search.SearchService',
                                           'org.alfresco.service.cmr.search.ResultSet'
                                         ]
                        RETURN n.name as UsedBy, COLLECT(DISTINCT m.name) AS SearchAPIs
                         ORDER BY n.name
                       ")
        message        (if (empty? res)
                         ""
                         (s/join "\n"
                                 (map #(str (get % "UsedBy")
                                            " uses "
                                            (s/join ", " (get % "SearchAPIs")))
                                      res)))]
    (merge
      (build-bookmark-map "STB07" message "The technology does not use the Search APIs.")
      (build-bookmark-map "STB14" message "The technology does not use the Search APIs."))))

(defn- sec02-minimise-manual-authentication
  []
  (let [res (cy/tquery "
                         START n=NODE(*)
                         MATCH (n)-->(m)
                         WHERE HAS(n.name)
                           AND HAS(m.name)
                           AND m.name = 'org.alfresco.repo.security.authentication.AuthenticationUtil'
                        RETURN n.name AS UsedBy, m.name AS AuthenticationUtilAPI
                         ORDER BY n.name
                       ")
        message        (if (empty? res)
                         ""
                         (s/join "\n"
                                   (map #(str (get % "UsedBy")
                                              " uses "
                                              (get % "AuthenticationUtilAPI"))
                                        res)))]
    (build-bookmark-map "SEC02" message "The technology does not manually control the authenticated session.")))

(defn- stb06-stb18-manual-transactions
  []

                                                                'org.springframework.context.ApplicationContextAware',
                                                                'org.springframework.context.ApplicationContext'
                                                              ]
                                             RETURN n.name AS UsedBy, COLLECT(DISTINCT m.name) AS BlacklistedSpringAPIs
                                              ORDER BY n.name
                                            ")
        message                  (if (empty? res)
                                   nil
                                   (s/join "\n"
                                           (map #(str (get % "UsedBy")
                                                      " uses "
                                                      (s/join ", " (get % "BlacklistedSpringAPIs")))
                                                res)))]
    (build-bookmark-map "API06" (empty? res) message "The technology does not use the service locator pattern.")))

(defn- com06-compiled-jvm-version
  []
