directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r839904 - in /websites/staging/directory/trunk/content: ./ api/ api/groovy-api/ images/
Date Wed, 28 Nov 2012 16:15:27 GMT
Author: buildbot
Date: Wed Nov 28 16:15:26 2012
New Revision: 839904

Log:
Staging update by buildbot for directory

Added:
    websites/staging/directory/trunk/content/api/groovy-api/
    websites/staging/directory/trunk/content/api/groovy-api/1-groovy-ldap-download.html
    websites/staging/directory/trunk/content/api/groovy-api/2-groovy-ldap-user-guide.html
    websites/staging/directory/trunk/content/api/groovy-api/3-groovy-ldap-implementation.html
    websites/staging/directory/trunk/content/api/groovy-api/4-groovy-ldap-build.html
    websites/staging/directory/trunk/content/images/JetBrains_logo.png   (with props)
    websites/staging/directory/trunk/content/images/SQLManager.bmp   (with props)
    websites/staging/directory/trunk/content/images/borland.gif   (with props)
    websites/staging/directory/trunk/content/images/opengroup_logo.png   (with props)
    websites/staging/directory/trunk/content/images/opensourceposeidon_supportedby.gif   (with props)
    websites/staging/directory/trunk/content/images/zenl_logo.gif   (with props)
Removed:
    websites/staging/directory/trunk/content/api/groovy-ldap-download.html
    websites/staging/directory/trunk/content/api/groovy-ldap-user-guide.html
Modified:
    websites/staging/directory/trunk/content/   (props changed)
    websites/staging/directory/trunk/content/api/groovy-ldap.html

Propchange: websites/staging/directory/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Wed Nov 28 16:15:26 2012
@@ -1 +1 @@
-1411774
+1414783

Added: websites/staging/directory/trunk/content/api/groovy-api/1-groovy-ldap-download.html
==============================================================================
--- websites/staging/directory/trunk/content/api/groovy-api/1-groovy-ldap-download.html (added)
+++ websites/staging/directory/trunk/content/api/groovy-api/1-groovy-ldap-download.html Wed Nov 28 16:15:26 2012
@@ -0,0 +1,163 @@
+<!DOCTYPE html>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<html>
+	<head>
+		<title>1 - Groovy LDAP : Download, Sources &amp; Building &mdash; Apache Directory</title>
+		
+	    <link href="./../../css/common.css" rel="stylesheet" type="text/css">
+	    <link href="./../../css/brown.css" rel="stylesheet" type="text/css">
+    
+	</head>
+	<body>
+	    <div id="container">
+            <div id="header">
+                <div id="subProjectsNavBar">
+                    <a href="./../../">
+                        
+                        Apache Directory Project
+                        
+                    </a>
+                    &nbsp;|&nbsp;
+                    <a href="./../../apacheds">
+                        
+                        ApacheDS
+                        
+                    </a>
+                    &nbsp;|&nbsp;
+                    <a href="./../../studio">
+                        
+                        Apache Directory Studio
+                        
+                    </a>
+                    &nbsp;|&nbsp;
+                    <a href="./../../api">
+                        
+                        <STRONG>Apache LDAP API</STRONG>
+                        
+                    </a>
+                </div><!-- subProjectsNavBar -->
+            </div><!-- header -->
+            <div id="content">
+                <div id="leftColumn">
+                    
+<div id="navigation">
+    
+    <h5>Latest Downloads</h5>
+    <ul>
+	    <li><a href="./../../api/downloads.html">Version 1.0.0-M13</a>&nbsp;&nbsp;<IMG src="./../../images/new_badge.gif" alt="" style="margin-bottom:-3px;" border="0"></li>
+    </ul>
+    <h5>Getting Started</h5>
+    <ul>
+        <li><a href="./../../api/vision.html">Vision</a></li>
+        <li><a href="./../../api/java-api.html">Java API</a></li>
+        <li><a href="./../../api/groovy-ldap.html">Groovy API</a></li>
+    </ul>
+    <h5>Documentation</h5>
+    <ul>
+	    <li><a href="./../../api/five-minutes-tutorial.html">Five minutes tutorial</a></li>
+	    <li><a href="./../../api/user-guide.html">User Guide</a></li>
+        <li><a href="./../../api/gen-docs/latest/apidocs/">JavaDocs</a></li>
+        <!--li><a href="./../../api/gen-docs/latest/">Generated Reports</a></li-->
+        <li><a href="./../../api/developer-guide.html">Developer Guide</a></li>
+    </ul>
+    
+    
+    <h5>Support</h5>
+    <ul>
+        <li><a href="./../../mailing-lists-and-irc.html">Mailing Lists &amp; IRC</a></li>
+        <li><a href="./../../sources.html">Sources</a></li>
+        <li><a href="./../../issue-tracking.html">Issue Tracking</a></li>
+        <li><a href="./../../commercial-support.html">Commercial Support</a></li>
+    </ul>
+    <h5>Community</h5>
+    <ul>
+        <li><a href="./../../contribute.html">How to Contribute</a></li>
+        <li><a href="./../../team.html">Team</a></li>
+        <li><a href="./../../original-project-proposal.html">Original Project Proposal</a></li>
+        <li><a href="./../../special-thanks.html" class="external-link" rel="nofollow">Special Thanks</a></li>
+    </ul>
+    <h5>About Apache</h5>
+    <ul>
+        <li><a href="http://www.apache.org/">Apache</a></li>
+        <li><a href="http://www.apache.org/licenses/">License</a></li>
+        <li><a href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li>
+        <li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+        <li><a href="http://www.apache.org/security/">Security</a></li>
+    </ul>
+    
+</div><!-- navigation -->
+
+                </div><!-- leftColumn -->
+                <div id="rightColumn">
+
+
+    <div class="nav">
+        <div class="nav_prev">
+        
+			&nbsp;
+        
+        </div>
+        <div class="nav_up">
+        
+            <a href="../groovy-ldap.html">Groovy LDAP</a>
+		
+        </div>
+        <div class="nav_next">
+        
+            <a href="2-groovy-ldap-user-guide.html">2 - Groovy LDAP User Guide</a>
+		
+        </div>
+        <div class="clearfix"></div>
+    </div>
+
+
+<h1 id="1-groovy-ldap-download-sources-building">1 - Groovy LDAP : Download, Sources &amp; Building</h1>
+<h2 id="download-groovy-ldap">Download Groovy LDAP</h2>
+<p>Here is a ZIP-File which contains the source code and the compiled jar file to be used as a Groovy module.</p>
+<p><strong><a href="download/groovy-ldap.zip">groovy-ldap.zip</a></strong></p>
+
+
+    <div class="nav">
+        <div class="nav_prev">
+        
+			&nbsp;
+        
+        </div>
+        <div class="nav_up">
+        
+            <a href="../groovy-ldap.html">Groovy LDAP</a>
+		
+        </div>
+        <div class="nav_next">
+        
+            <a href="2-groovy-ldap-user-guide.html">2 - Groovy LDAP User Guide</a>
+		
+        </div>
+        <div class="clearfix"></div>
+    </div>
+
+
+                </div><!-- rightColumn -->
+                <div id="endContent"></div>
+            </div><!-- content -->
+            <div id="footer">&copy; 2003-2012, <a href="http://www.apache.org">The Apache Software Foundation</a> - <a href="./../../privacy-policy.html">Privacy Policy</a><br />
+                Apache Directory, ApacheDS, Apache Directory Server, Apache Directory Studio, Apache LDAP API, Apache Triplesec, Triplesec, Apache, the Apache feather logo, and the Apache Directory project logos are trademarks of The Apache Software Foundation.
+            </div>
+        </div><!-- container -->
+    </body>
+</html>
\ No newline at end of file

Added: websites/staging/directory/trunk/content/api/groovy-api/2-groovy-ldap-user-guide.html
==============================================================================
--- websites/staging/directory/trunk/content/api/groovy-api/2-groovy-ldap-user-guide.html (added)
+++ websites/staging/directory/trunk/content/api/groovy-api/2-groovy-ldap-user-guide.html Wed Nov 28 16:15:26 2012
@@ -0,0 +1,400 @@
+<!DOCTYPE html>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<html>
+	<head>
+		<title>2 - Groovy LDAP : User Guide &mdash; Apache Directory</title>
+		
+	    <link href="./../../css/common.css" rel="stylesheet" type="text/css">
+	    <link href="./../../css/brown.css" rel="stylesheet" type="text/css">
+    
+	</head>
+	<body>
+	    <div id="container">
+            <div id="header">
+                <div id="subProjectsNavBar">
+                    <a href="./../../">
+                        
+                        Apache Directory Project
+                        
+                    </a>
+                    &nbsp;|&nbsp;
+                    <a href="./../../apacheds">
+                        
+                        ApacheDS
+                        
+                    </a>
+                    &nbsp;|&nbsp;
+                    <a href="./../../studio">
+                        
+                        Apache Directory Studio
+                        
+                    </a>
+                    &nbsp;|&nbsp;
+                    <a href="./../../api">
+                        
+                        <STRONG>Apache LDAP API</STRONG>
+                        
+                    </a>
+                </div><!-- subProjectsNavBar -->
+            </div><!-- header -->
+            <div id="content">
+                <div id="leftColumn">
+                    
+<div id="navigation">
+    
+    <h5>Latest Downloads</h5>
+    <ul>
+	    <li><a href="./../../api/downloads.html">Version 1.0.0-M13</a>&nbsp;&nbsp;<IMG src="./../../images/new_badge.gif" alt="" style="margin-bottom:-3px;" border="0"></li>
+    </ul>
+    <h5>Getting Started</h5>
+    <ul>
+        <li><a href="./../../api/vision.html">Vision</a></li>
+        <li><a href="./../../api/java-api.html">Java API</a></li>
+        <li><a href="./../../api/groovy-ldap.html">Groovy API</a></li>
+    </ul>
+    <h5>Documentation</h5>
+    <ul>
+	    <li><a href="./../../api/five-minutes-tutorial.html">Five minutes tutorial</a></li>
+	    <li><a href="./../../api/user-guide.html">User Guide</a></li>
+        <li><a href="./../../api/gen-docs/latest/apidocs/">JavaDocs</a></li>
+        <!--li><a href="./../../api/gen-docs/latest/">Generated Reports</a></li-->
+        <li><a href="./../../api/developer-guide.html">Developer Guide</a></li>
+    </ul>
+    
+    
+    <h5>Support</h5>
+    <ul>
+        <li><a href="./../../mailing-lists-and-irc.html">Mailing Lists &amp; IRC</a></li>
+        <li><a href="./../../sources.html">Sources</a></li>
+        <li><a href="./../../issue-tracking.html">Issue Tracking</a></li>
+        <li><a href="./../../commercial-support.html">Commercial Support</a></li>
+    </ul>
+    <h5>Community</h5>
+    <ul>
+        <li><a href="./../../contribute.html">How to Contribute</a></li>
+        <li><a href="./../../team.html">Team</a></li>
+        <li><a href="./../../original-project-proposal.html">Original Project Proposal</a></li>
+        <li><a href="./../../special-thanks.html" class="external-link" rel="nofollow">Special Thanks</a></li>
+    </ul>
+    <h5>About Apache</h5>
+    <ul>
+        <li><a href="http://www.apache.org/">Apache</a></li>
+        <li><a href="http://www.apache.org/licenses/">License</a></li>
+        <li><a href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li>
+        <li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+        <li><a href="http://www.apache.org/security/">Security</a></li>
+    </ul>
+    
+</div><!-- navigation -->
+
+                </div><!-- leftColumn -->
+                <div id="rightColumn">
+
+
+    <div class="nav">
+        <div class="nav_prev">
+        
+            <a href="1-groovy-ldap-download.html">1 - Groovy LDAP Download</a>
+		
+        </div>
+        <div class="nav_up">
+        
+            <a href="../groovy-ldap.html">Groovy LDAP</a>
+		
+        </div>
+        <div class="nav_next">
+        
+            <a href="3-groovy-ldap-implementation.html">3 - Groovy LDAP Implementation</a>
+		
+        </div>
+        <div class="clearfix"></div>
+    </div>
+
+
+<h1>2 - Groovy LDAP : User Guide</h1>
+
+<blockquote>
+<p><strong>Note:</strong> This guide is work in progress and is written at the same time as Groovy LDAP integration developes. The API may change. Feedback highly welcome.</p>
+</blockquote>
+<div class="toc">
+<ul>
+<li><a href="#prerequisites">Prerequisites</a></li>
+<li><a href="#installation">Installation</a></li>
+<li><a href="#connection-to-an-ldap-server">Connection to an LDAP server</a></li>
+<li><a href="#basic-ldap-operations">Basic LDAP operations</a><ul>
+<li><a href="#ldap-add-operation">LDAP add operation</a></li>
+<li><a href="#ldap-delete-operation">LDAP delete operation</a></li>
+<li><a href="#ldap-search-operation">LDAP search operation</a></li>
+<li><a href="#ldap-compare-operation">LDAP compare operation</a></li>
+<li><a href="#ldap-modify-operation">LDAP modify operation</a></li>
+</ul>
+</li>
+<li><a href="#additions-to-the-original-ldap-api">Additions to the original LDAP API</a><ul>
+<li><a href="#ldapexists-checking-whether-an-entry-exist">LDAP.exists(...): Checking whether an entry exist</a></li>
+<li><a href="#ldapread-reading-an-entry-by-its-distinguished-name">LDAP.read(...): Reading an entry by its distinguished name</a></li>
+</ul>
+</li>
+<li><a href="#ldap-the-groovy-way">LDAP the Groovy way</a><ul>
+<li><a href="#performing-searches-with-closures">Performing searches with closures</a></li>
+</ul>
+</li>
+</ul>
+</div>
+<h2 id="prerequisites">Prerequisites</h2>
+<ul>
+<li>Java SE 5 (JDK 1.5) or above</li>
+<li>Groovy 1.0 or above</li>
+</ul>
+<h2 id="installation">Installation</h2>
+<p>You only have to add the jar file <em>groovy-ldap.jar</em> with the <em>Groovy LDAP</em> classes to the class path. If you plan to write Groovy scripts whoich use the functionality, an easy option is to copy the library into the <em>lib</em> folder of your Groovy installation.</p>
+<p>That's it.</p>
+<h2 id="connection-to-an-ldap-server">Connection to an LDAP server</h2>
+<p>Main entry point is the class <em>LDAP</em> from the <em>org.apache.directory.groovyldap</em> package (contained in <em>groovy-ldap.jar</em>). You obtain an instance via a call to a static method <em>newInstance</em>, like this:</p>
+<div class="codehilite"><pre><span class="kr">import</span> <span class="nx">org</span><span class="p">.</span><span class="nx">apache</span><span class="p">.</span><span class="nx">directory</span><span class="p">.</span><span class="nx">groovyldap</span><span class="p">.</span><span class="nx">LDAP</span>
+
+<span class="nx">ldap</span> <span class="o">=</span> <span class="nx">LDAP</span><span class="p">.</span><span class="nx">newInstance</span><span class="p">(</span><span class="s1">&#39;ldap://zanzibar:10389/&#39;</span><span class="p">)</span>
+<span class="p">...</span>
+</pre></div>
+
+
+<p>The argument used here is the LDAP URL of your directory server and contains hostname and port. This method as shown above is for anonymous binds. A variant of it expects the bind name of a user and his/her credentials:</p>
+<div class="codehilite"><pre><span class="p">...</span>
+<span class="nx">ldap</span> <span class="o">=</span> <span class="nx">LDAP</span><span class="p">.</span><span class="nx">newInstance</span><span class="p">(</span><span class="s1">&#39;ldap://zanzibar:10389/&#39;</span><span class="p">,</span> <span class="s1">&#39;uid=admin,ou=system&#39;</span><span class="p">,</span> <span class="s1">&#39;******&#39;</span><span class="p">)</span>
+<span class="p">...</span>
+</pre></div>
+
+
+<p>Please note that <em>Groovy LDAP</em> uses JNDI and its configuration facilities. This means that if you provide a <em>jndi.properties</em> file in your class path, Groovy LDAP will take these parameters into account. This enables you to keep your user name and password outside of the script code, for instance.</p>
+<p>Like with JNDI with its <em>InitialContext</em>, calling newInstance will <em>not</em> connect to the LDAP server immediately. This means that an authentication will likely occur later (with the first operation).</p>
+<h2 id="basic-ldap-operations">Basic LDAP operations</h2>
+<p>Groovy LDAP basically supports the operations provided by the native LDAP protocol, with some exceptions:</p>
+<ul>
+<li>It is not necessary to connect explicitly to the server or to <em>bind</em>/<em>unbind</em>. Groovy LDAP performs these operations automatically.</li>
+<li>LDAP controls are not supported yet</li>
+<li>No asynchronous calls are supported yet. Consequently, no <em>abandon</em> operation is available in the API</li>
+</ul>
+<h3 id="ldap-add-operation">LDAP add operation</h3>
+<p>The <em>add</em> operation is used to create a new entry within the directory.</p>
+<p>One option in Groovy LDAP is to define the attribute values of the new entry as a Map. One <em>add</em> operation takes the distinguished name (DN) of the new entry (as a String) and the attributes map as parameters. Here is an example:</p>
+<div class="codehilite"><pre><span class="kr">import</span> <span class="nx">org</span><span class="p">.</span><span class="nx">apache</span><span class="p">.</span><span class="nx">directory</span><span class="p">.</span><span class="nx">groovyldap</span><span class="p">.</span><span class="nx">LDAP</span>
+
+<span class="nx">ldap</span> <span class="o">=</span> <span class="nx">LDAP</span><span class="p">.</span><span class="nx">newInstance</span><span class="p">(</span><span class="s1">&#39;ldap://zanzibar:10389&#39;</span><span class="p">,</span> <span class="s1">&#39;uid=admin,ou=system&#39;</span> <span class="p">,</span><span class="s1">&#39;******&#39;</span><span class="p">)</span>
+
+<span class="nx">assert</span> <span class="o">!</span> <span class="nx">ldap</span><span class="p">.</span><span class="nx">exists</span><span class="p">(</span><span class="s1">&#39;cn=Heather Nova,dc=example,dc=com&#39;</span><span class="p">)</span>
+
+<span class="c1">// define the attributes as a map</span>
+<span class="nx">attrs</span> <span class="o">=</span> <span class="p">[</span>
+  <span class="nx">objectclass</span><span class="o">:</span> <span class="p">[</span><span class="s1">&#39;top&#39;</span><span class="p">,</span> <span class="s1">&#39;person&#39;</span><span class="p">],</span>              
+  <span class="nx">sn</span><span class="o">:</span> <span class="s1">&#39;Nova&#39;</span><span class="p">,</span>
+  <span class="nx">cn</span><span class="o">:</span> <span class="s1">&#39;Heather Nova&#39;</span>
+<span class="p">]</span>
+<span class="nx">ldap</span><span class="p">.</span><span class="nx">add</span><span class="p">(</span><span class="s1">&#39;cn=Heather Nova,dc=example,dc=com&#39;</span><span class="p">,</span> <span class="nx">attrs</span><span class="p">)</span>
+
+<span class="nx">assert</span> <span class="nx">ldap</span><span class="p">.</span><span class="nx">exists</span><span class="p">(</span><span class="s1">&#39;cn=Heather Nova,dc=example,dc=com&#39;</span><span class="p">)</span>
+</pre></div>
+
+
+<p>In the <em>assert</em> expressions, the <em>exists</em> method of Groovy LDAP is used. It checks whether an entry with this DN already exists (see below). </p>
+<p>If no error occurs, the script adds the following entry to the directory:</p>
+<div class="codehilite"><pre><span class="err">dn:</span> <span class="err">cn=Heather</span> <span class="err">Nova,dc=example,dc=com</span>
+<span class="err">cn:</span> <span class="err">Heather</span> <span class="err">Nova</span>
+<span class="err">sn:</span> <span class="err">Nova</span>
+<span class="err">objectClass:</span> <span class="err">person</span>
+<span class="err">objectClass:</span> <span class="err">top</span>
+</pre></div>
+
+
+<h3 id="ldap-delete-operation">LDAP delete operation</h3>
+<p>The <em>delete</em> operation is used to delete an existing entry within the directory. As in the original LDAP protocol, only the deletion of leaf entries is allowed. Deletion of a subtree of entries (for instance with the <em>Tree Delete Control</em>) is not supported yet.</p>
+<p>Here is an example script which uses the <em>delete</em> method from Groovy LDAP.</p>
+<div class="codehilite"><pre><span class="kr">import</span> <span class="nx">org</span><span class="p">.</span><span class="nx">apache</span><span class="p">.</span><span class="nx">directory</span><span class="p">.</span><span class="nx">groovyldap</span><span class="p">.</span><span class="nx">LDAP</span>
+
+<span class="nx">ldap</span> <span class="o">=</span> <span class="nx">LDAP</span><span class="p">.</span><span class="nx">newInstance</span><span class="p">(</span><span class="s1">&#39;ldap://zanzibar:10389&#39;</span><span class="p">,</span> <span class="s1">&#39;uid=admin,ou=system&#39;</span> <span class="p">,</span><span class="s1">&#39;******&#39;</span><span class="p">)</span>
+
+<span class="nx">assert</span> <span class="nx">ldap</span><span class="p">.</span><span class="nx">exists</span><span class="p">(</span><span class="s1">&#39;cn=Heather Nova,dc=example,dc=com&#39;</span><span class="p">)</span>
+
+<span class="c1">// delete the entry with the given DN</span>
+<span class="nx">ldap</span><span class="p">.</span><span class="k">delete</span><span class="p">(</span><span class="s1">&#39;cn=Heather Nova,dc=example,dc=com&#39;</span><span class="p">)</span>
+
+<span class="nx">assert</span> <span class="o">!</span><span class="nx">ldap</span><span class="p">.</span><span class="nx">exists</span><span class="p">(</span><span class="s1">&#39;cn=Heather Nova,dc=example,dc=com&#39;</span><span class="p">)</span>
+</pre></div>
+
+
+<p>Note that if the given entry does not exist, calling <em>delete</em> throws a javax.naming.NameNotFoundException. This is different to JNDI, where no error will occur in this case. The behavior here imitates the original LDAP delete operation. In the example script, this will not occur due to the <em>assert</em> statements.</p>
+<h3 id="ldap-search-operation">LDAP search operation</h3>
+<div class="codehilite"><pre><span class="kr">import</span> <span class="nx">org</span><span class="p">.</span><span class="nx">apache</span><span class="p">.</span><span class="nx">directory</span><span class="p">.</span><span class="nx">groovyldap</span><span class="p">.</span><span class="o">*</span>
+
+<span class="nx">ldap</span> <span class="o">=</span> <span class="nx">LDAP</span><span class="p">.</span><span class="nx">newInstance</span><span class="p">(</span><span class="s1">&#39;ldap://zanzibar:10389/&#39;</span><span class="p">)</span>
+
+<span class="c1">// search op</span>
+<span class="nx">results</span> <span class="o">=</span> <span class="nx">ldap</span><span class="p">.</span><span class="nx">search</span><span class="p">(</span><span class="s1">&#39;(objectClass=*)&#39;</span><span class="p">,</span> <span class="s1">&#39;dc=example,dc=com&#39;</span><span class="p">,</span> <span class="nx">SearchScope</span><span class="p">.</span><span class="nx">ONE</span> <span class="p">)</span>
+<span class="nx">println</span> <span class="s2">&quot;${results.size} entries found:&quot;</span>
+<span class="k">for</span> <span class="p">(</span><span class="nx">entry</span> <span class="k">in</span> <span class="nx">results</span><span class="p">)</span> <span class="p">{</span>
+  <span class="nx">println</span> <span class="nx">entry</span><span class="p">.</span><span class="nx">dn</span>
+<span class="p">}</span>
+</pre></div>
+
+
+<p>The output looks like:</p>
+<div class="codehilite"><pre><span class="mi">3</span> <span class="n">entries</span> <span class="n">found:</span>
+<span class="n">cn</span><span class="o">=</span><span class="n">Tori</span> <span class="n">Amos</span><span class="p">,</span><span class="n">dc</span><span class="o">=</span><span class="n">example</span><span class="p">,</span><span class="n">dc</span><span class="o">=</span><span class="n">com</span>
+<span class="n">cn</span><span class="o">=</span><span class="n">Kate</span> <span class="n">Bush</span><span class="p">,</span><span class="n">dc</span><span class="o">=</span><span class="n">example</span><span class="p">,</span><span class="n">dc</span><span class="o">=</span><span class="n">com</span>
+<span class="n">cn</span><span class="o">=</span><span class="n">Heather</span> <span class="n">Nova</span><span class="p">,</span><span class="n">dc</span><span class="o">=</span><span class="n">example</span><span class="p">,</span><span class="n">dc</span><span class="o">=</span><span class="n">com</span>
+</pre></div>
+
+
+<p>Learn more about options on how to search within a directory in the [Reference|5. Groovy LDAP Reference]</p>
+<h3 id="ldap-compare-operation">LDAP compare operation</h3>
+<p>The <em>compare</em> operation is used to check attribute value assertions.</p>
+<p>The following script adds an entry and uses <em>compare</em> several times to demonstrate the different matching rules for attribute type <em>cn</em> (case insensitive) and <em>userPassword</em> (case sensitive). </p>
+<div class="codehilite"><pre><span class="kr">import</span> <span class="nx">org</span><span class="p">.</span><span class="nx">apache</span><span class="p">.</span><span class="nx">directory</span><span class="p">.</span><span class="nx">groovyldap</span><span class="p">.</span><span class="nx">LDAP</span>
+
+<span class="nx">ldap</span> <span class="o">=</span> <span class="nx">LDAP</span><span class="p">.</span><span class="nx">newInstance</span><span class="p">(</span><span class="s1">&#39;ldap://zanzibar:10389&#39;</span><span class="p">,</span> <span class="s1">&#39;uid=admin,ou=system&#39;</span> <span class="p">,</span><span class="s1">&#39;******&#39;</span><span class="p">)</span>
+
+<span class="nx">assert</span> <span class="o">!</span> <span class="nx">ldap</span><span class="p">.</span><span class="nx">exists</span><span class="p">(</span><span class="s1">&#39;cn=Heather Nova,dc=example,dc=com&#39;</span><span class="p">)</span>
+
+<span class="c1">// define an entry for compare ops</span>
+<span class="nx">attrs</span> <span class="o">=</span> <span class="p">[</span>
+  <span class="nx">objectclass</span><span class="o">:</span> <span class="p">[</span><span class="s1">&#39;top&#39;</span><span class="p">,</span> <span class="s1">&#39;person&#39;</span><span class="p">],</span>              
+  <span class="nx">sn</span><span class="o">:</span> <span class="s1">&#39;Nova&#39;</span><span class="p">,</span>
+  <span class="nx">cn</span><span class="o">:</span> <span class="s1">&#39;Heather Nova&#39;</span><span class="p">,</span>
+  <span class="nx">userPassword</span><span class="o">:</span> <span class="s1">&#39;secret&#39;</span>
+<span class="p">]</span>
+<span class="nx">ldap</span><span class="p">.</span><span class="nx">add</span><span class="p">(</span><span class="s1">&#39;cn=Heather Nova,dc=example,dc=com&#39;</span><span class="p">,</span> <span class="nx">attrs</span><span class="p">)</span>
+
+<span class="nx">assert</span> <span class="nx">ldap</span><span class="p">.</span><span class="nx">exists</span><span class="p">(</span><span class="s1">&#39;cn=Heather Nova,dc=example,dc=com&#39;</span><span class="p">)</span>
+
+<span class="nx">assert</span> <span class="nx">ldap</span><span class="p">.</span><span class="nx">compare</span><span class="p">(</span><span class="s1">&#39;cn=Heather Nova,dc=example,dc=com&#39;</span><span class="p">,</span> <span class="p">[</span><span class="nx">cn</span><span class="o">:</span> <span class="s1">&#39;Heather Nova&#39;</span><span class="p">]</span> <span class="p">)</span>
+<span class="nx">assert</span> <span class="nx">ldap</span><span class="p">.</span><span class="nx">compare</span><span class="p">(</span><span class="s1">&#39;cn=Heather Nova,dc=example,dc=com&#39;</span><span class="p">,</span> <span class="p">[</span><span class="nx">cn</span><span class="o">:</span> <span class="s1">&#39;HEATHER NOVA&#39;</span><span class="p">]</span> <span class="p">)</span>
+
+<span class="nx">assert</span> <span class="nx">ldap</span><span class="p">.</span><span class="nx">compare</span><span class="p">(</span><span class="s1">&#39;cn=Heather Nova,dc=example,dc=com&#39;</span><span class="p">,</span> <span class="p">[</span><span class="nx">userPassword</span><span class="o">:</span> <span class="s1">&#39;secret&#39;</span><span class="p">]</span> <span class="p">)</span>
+<span class="nx">assert</span> <span class="o">!</span> <span class="nx">ldap</span><span class="p">.</span><span class="nx">compare</span><span class="p">(</span><span class="s1">&#39;cn=Heather Nova,dc=example,dc=com&#39;</span><span class="p">,</span> <span class="p">[</span><span class="nx">userPassword</span><span class="o">:</span> <span class="s1">&#39;SECRET&#39;</span><span class="p">]</span> <span class="p">)</span>
+
+<span class="nx">ldap</span><span class="p">.</span><span class="k">delete</span><span class="p">(</span><span class="s1">&#39;cn=Heather Nova,dc=example,dc=com&#39;</span><span class="p">)</span>
+</pre></div>
+
+
+<h3 id="ldap-modify-operation">LDAP modify operation</h3>
+<p>I am not perfectly happy with the syntax for modify yet. Here are two calls that perform modifications against the entry added above:</p>
+<div class="codehilite"><pre><span class="kr">import</span> <span class="nx">org</span><span class="p">.</span><span class="nx">apache</span><span class="p">.</span><span class="nx">directory</span><span class="p">.</span><span class="nx">groovyldap</span><span class="p">.</span><span class="o">*</span>
+
+<span class="nx">ldap</span> <span class="o">=</span> <span class="nx">LDAP</span><span class="p">.</span><span class="nx">newInstance</span><span class="p">(</span><span class="s1">&#39;ldap://zanzibar:10389&#39;</span><span class="p">,</span> <span class="s1">&#39;uid=admin,ou=system&#39;</span> <span class="p">,</span><span class="s1">&#39;secret&#39;</span><span class="p">)</span>
+
+<span class="nx">dn</span> <span class="o">=</span> <span class="s1">&#39;cn=Heather Nova,dc=example,dc=com&#39;</span>
+
+<span class="c1">// Adding a single attribute</span>
+<span class="nx">descr</span> <span class="o">=</span> <span class="p">[</span> <span class="nx">description</span><span class="o">:</span> <span class="s1">&#39;a singer-songwriter&#39;</span> <span class="p">]</span>
+<span class="nx">ldap</span><span class="p">.</span><span class="nx">modify</span><span class="p">(</span><span class="nx">dn</span><span class="p">,</span> <span class="s1">&#39;ADD&#39;</span><span class="p">,</span> <span class="nx">descr</span><span class="p">)</span>
+
+<span class="c1">// performing two operations atomically</span>
+<span class="nx">mods</span> <span class="o">=</span> <span class="p">[</span> 
+    <span class="p">[</span> <span class="s1">&#39;REPLACE&#39;</span><span class="p">,</span> <span class="p">[</span><span class="nx">description</span><span class="o">:</span> <span class="s1">&#39;a singer-songwriter, born in Bermuda&#39;</span><span class="p">]</span> <span class="p">],</span>
+    <span class="p">[</span> <span class="s1">&#39;ADD&#39;</span><span class="p">,</span> <span class="p">[</span><span class="nx">userPassword</span><span class="o">:</span> <span class="s1">&#39;secret&#39;</span><span class="p">]</span> <span class="p">]</span>
+<span class="p">]</span>
+<span class="nx">ldap</span><span class="p">.</span><span class="nx">modify</span><span class="p">(</span><span class="nx">dn</span><span class="p">,</span> <span class="nx">mods</span><span class="p">)</span>
+</pre></div>
+
+
+<p>The second call uses a list <em>mods</em> of modifications as an argument; each modification consists of a list of two elements (a pair): the modification type and a map with the attribute(s). </p>
+<p>Afterwards, the entry looks like this in the directory</p>
+<div class="codehilite"><pre><span class="err">dn:</span> <span class="err">cn=Heather</span> <span class="err">Nova,dc=example,dc=com</span>
+<span class="err">cn:</span> <span class="err">Heather</span> <span class="err">Nova</span>
+<span class="err">sn:</span> <span class="err">Nova</span>
+<span class="err">objectClass:</span> <span class="err">person</span>
+<span class="err">objectClass:</span> <span class="err">top</span>
+<span class="err">userpassword:</span> <span class="err">secret</span>
+<span class="err">description:</span> <span class="err">a</span> <span class="err">singer-songwriter,</span> <span class="err">born</span> <span class="err">in</span> <span class="err">Bermuda</span>
+</pre></div>
+
+
+<h2 id="additions-to-the-original-ldap-api">Additions to the original LDAP API</h2>
+<h3 id="ldapexists-checking-whether-an-entry-exist">LDAP.exists(...): Checking whether an entry exist</h3>
+<p>implemented, but not documented yet</p>
+<h3 id="ldapread-reading-an-entry-by-its-distinguished-name">LDAP.read(...): Reading an entry by its distinguished name</h3>
+<p>I have included a <em>read</em> operation as in the Netscape API -- note that there is nothing like that in LDAP (you have to perform a search for it). Nevertheless, it is quite handy to have it. In this example I have use an anonymous LDAP connection. My LDAP server allows me to read entries without user and password (which is quite common). </p>
+<div class="codehilite"><pre><span class="kr">import</span> <span class="nx">org</span><span class="p">.</span><span class="nx">apache</span><span class="p">.</span><span class="nx">directory</span><span class="p">.</span><span class="nx">groovyldap</span><span class="p">.</span><span class="nx">LDAP</span>
+
+<span class="nx">ldap</span> <span class="o">=</span> <span class="nx">LDAP</span><span class="p">.</span><span class="nx">newInstance</span><span class="p">(</span><span class="s2">&quot;ldap://zanzibar:10389&quot;</span><span class="p">)</span>
+
+<span class="c1">// Simple entry lookup via dn</span>
+<span class="nx">heather</span> <span class="o">=</span> <span class="nx">ldap</span><span class="p">.</span><span class="nx">read</span><span class="p">(</span><span class="s1">&#39;cn=Heather Nova,dc=example,dc=com&#39;</span><span class="p">)</span>
+
+<span class="nx">print</span> <span class="s2">&quot;&quot;&quot;</span>
+<span class="s2">DN: ${heather.dn}</span>
+<span class="s2">Common name: ${heather.cn}</span>
+<span class="s2">Object classes: ${heather.objectclass}</span>
+<span class="s2">&quot;&quot;&quot;</span>
+</pre></div>
+
+
+<p>The output (if this entry exists) is:</p>
+<div class="codehilite"><pre><span class="err">DN:</span> <span class="err">cn=Heather</span> <span class="err">Nova,dc=example,dc=com</span>
+<span class="err">Common</span> <span class="err">name:</span> <span class="err">Heather</span> <span class="err">Nova</span>
+<span class="err">Object</span> <span class="kd">class</span><span class="err">es:</span> <span class="err">[&quot;person&quot;,</span> <span class="err">&quot;top&quot;]</span>
+</pre></div>
+
+
+<h2 id="ldap-the-groovy-way">LDAP the Groovy way</h2>
+<h3 id="performing-searches-with-closures">Performing searches with closures</h3>
+<p>There is a search variant in the <em>LDAP</em> class comparable to <em>eachRow</em> in GSQL. It takes a closure as parameter. I have added the search base to the ldap URL. There is also a variant which takes the base and a scope (defaults to subtree). </p>
+<div class="codehilite"><pre><span class="kr">import</span> <span class="nx">org</span><span class="p">.</span><span class="nx">apache</span><span class="p">.</span><span class="nx">directory</span><span class="p">.</span><span class="nx">groovyldap</span><span class="p">.</span><span class="nx">LDAP</span>
+
+<span class="nx">ldap</span> <span class="o">=</span> <span class="nx">LDAP</span><span class="p">.</span><span class="nx">newInstance</span><span class="p">(</span><span class="s1">&#39;ldap://zanzibar:10389/dc=example,dc=com&#39;</span><span class="p">)</span>
+
+<span class="nx">ldap</span><span class="p">.</span><span class="nx">eachEntry</span> <span class="p">(</span><span class="s1">&#39;(objectClass=person)&#39;</span><span class="p">)</span> <span class="p">{</span> <span class="nx">person</span> <span class="o">-&gt;</span>  
+    <span class="nx">println</span> <span class="nx">person</span><span class="p">.</span><span class="nx">cn</span>
+<span class="p">}</span>
+</pre></div>
+
+
+<p>The output looks like:</p>
+<div class="codehilite"><pre><span class="n">Tori</span> <span class="n">Amos</span>
+<span class="n">Kate</span> <span class="n">Bush</span>
+<span class="n">Heather</span> <span class="n">Nova</span>
+</pre></div>
+
+
+    <div class="nav">
+        <div class="nav_prev">
+        
+            <a href="1-groovy-ldap-download.html">1 - Groovy LDAP Download</a>
+		
+        </div>
+        <div class="nav_up">
+        
+            <a href="../groovy-ldap.html">Groovy LDAP</a>
+		
+        </div>
+        <div class="nav_next">
+        
+            <a href="3-groovy-ldap-implementation.html">3 - Groovy LDAP Implementation</a>
+		
+        </div>
+        <div class="clearfix"></div>
+    </div>
+
+
+                </div><!-- rightColumn -->
+                <div id="endContent"></div>
+            </div><!-- content -->
+            <div id="footer">&copy; 2003-2012, <a href="http://www.apache.org">The Apache Software Foundation</a> - <a href="./../../privacy-policy.html">Privacy Policy</a><br />
+                Apache Directory, ApacheDS, Apache Directory Server, Apache Directory Studio, Apache LDAP API, Apache Triplesec, Triplesec, Apache, the Apache feather logo, and the Apache Directory project logos are trademarks of The Apache Software Foundation.
+            </div>
+        </div><!-- container -->
+    </body>
+</html>
\ No newline at end of file

Added: websites/staging/directory/trunk/content/api/groovy-api/3-groovy-ldap-implementation.html
==============================================================================
--- websites/staging/directory/trunk/content/api/groovy-api/3-groovy-ldap-implementation.html (added)
+++ websites/staging/directory/trunk/content/api/groovy-api/3-groovy-ldap-implementation.html Wed Nov 28 16:15:26 2012
@@ -0,0 +1,177 @@
+<!DOCTYPE html>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<html>
+	<head>
+		<title>3 - Groovy LDAP : Implementation &mdash; Apache Directory</title>
+		
+	    <link href="./../../css/common.css" rel="stylesheet" type="text/css">
+	    <link href="./../../css/brown.css" rel="stylesheet" type="text/css">
+    
+	</head>
+	<body>
+	    <div id="container">
+            <div id="header">
+                <div id="subProjectsNavBar">
+                    <a href="./../../">
+                        
+                        Apache Directory Project
+                        
+                    </a>
+                    &nbsp;|&nbsp;
+                    <a href="./../../apacheds">
+                        
+                        ApacheDS
+                        
+                    </a>
+                    &nbsp;|&nbsp;
+                    <a href="./../../studio">
+                        
+                        Apache Directory Studio
+                        
+                    </a>
+                    &nbsp;|&nbsp;
+                    <a href="./../../api">
+                        
+                        <STRONG>Apache LDAP API</STRONG>
+                        
+                    </a>
+                </div><!-- subProjectsNavBar -->
+            </div><!-- header -->
+            <div id="content">
+                <div id="leftColumn">
+                    
+<div id="navigation">
+    
+    <h5>Latest Downloads</h5>
+    <ul>
+	    <li><a href="./../../api/downloads.html">Version 1.0.0-M13</a>&nbsp;&nbsp;<IMG src="./../../images/new_badge.gif" alt="" style="margin-bottom:-3px;" border="0"></li>
+    </ul>
+    <h5>Getting Started</h5>
+    <ul>
+        <li><a href="./../../api/vision.html">Vision</a></li>
+        <li><a href="./../../api/java-api.html">Java API</a></li>
+        <li><a href="./../../api/groovy-ldap.html">Groovy API</a></li>
+    </ul>
+    <h5>Documentation</h5>
+    <ul>
+	    <li><a href="./../../api/five-minutes-tutorial.html">Five minutes tutorial</a></li>
+	    <li><a href="./../../api/user-guide.html">User Guide</a></li>
+        <li><a href="./../../api/gen-docs/latest/apidocs/">JavaDocs</a></li>
+        <!--li><a href="./../../api/gen-docs/latest/">Generated Reports</a></li-->
+        <li><a href="./../../api/developer-guide.html">Developer Guide</a></li>
+    </ul>
+    
+    
+    <h5>Support</h5>
+    <ul>
+        <li><a href="./../../mailing-lists-and-irc.html">Mailing Lists &amp; IRC</a></li>
+        <li><a href="./../../sources.html">Sources</a></li>
+        <li><a href="./../../issue-tracking.html">Issue Tracking</a></li>
+        <li><a href="./../../commercial-support.html">Commercial Support</a></li>
+    </ul>
+    <h5>Community</h5>
+    <ul>
+        <li><a href="./../../contribute.html">How to Contribute</a></li>
+        <li><a href="./../../team.html">Team</a></li>
+        <li><a href="./../../original-project-proposal.html">Original Project Proposal</a></li>
+        <li><a href="./../../special-thanks.html" class="external-link" rel="nofollow">Special Thanks</a></li>
+    </ul>
+    <h5>About Apache</h5>
+    <ul>
+        <li><a href="http://www.apache.org/">Apache</a></li>
+        <li><a href="http://www.apache.org/licenses/">License</a></li>
+        <li><a href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li>
+        <li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+        <li><a href="http://www.apache.org/security/">Security</a></li>
+    </ul>
+    
+</div><!-- navigation -->
+
+                </div><!-- leftColumn -->
+                <div id="rightColumn">
+
+
+    <div class="nav">
+        <div class="nav_prev">
+        
+            <a href="1-groovy-ldap-user-guide.html">2 - Groovy LDAP User Guide</a>
+		
+        </div>
+        <div class="nav_up">
+        
+            <a href="../groovy-ldap.html">Groovy LDAP</a>
+		
+        </div>
+        <div class="nav_next">
+        
+            <a href="4-groovy-ldap-building.html">4 - Groovy LDAP Building the Software</a>
+		
+        </div>
+        <div class="clearfix"></div>
+    </div>
+
+
+<h1 id="3-groovy-ldap-implementation">3 - Groovy LDAP : Implementation</h1>
+<h2 id="implementation">Implementation</h2>
+<p>Currently, the implementation is comprised of some Java classes and two enumerations (search scopes and modification types). The class <em>LDAP</em> is the main entry point for scripts, just as the class <em>LDAPConnection</em> in the Netscape SDK. It provides the operations implemented so far. I have decided to omit methods for connecting and disconnecting explicitly (<em>bind</em>, <em>unbind</em> in LDAP). Instead all methods handle the connection themselves, which makes the Groovy source code shorter. Class <em>DirContextToMapObjectFactory</em> acts under the hood. It transforms a <em>DirContext</em> object from JNDI search results and lookups into a Java map. This trick enables the script writer to use expressions like <em>tori.cn</em> in order to retrieve an attribute value.  There are probably better solutions to accomplish this task.</p>
+<h2 id="source-code">Source code</h2>
+<p>Source code of the proof of concept is currently available for review here :</p>
+<p><a href="http://svn.apache.org/repos/asf/directory/sandbox/szoerner/groovyldap">http://svn.apache.org/repos/asf/directory/sandbox/szoerner/groovyldap</a></p>
+<p>In order to check it out, simply type</p>
+<div class="codehilite"><pre><span class="n">D:</span><span class="o">\</span><span class="n">Apache</span><span class="o">&gt;</span><span class="n">svn</span> <span class="n">co</span> <span class="n">http:</span><span class="sr">//s</span><span class="n">vn</span><span class="o">.</span><span class="n">apache</span><span class="o">.</span><span class="n">org</span><span class="sr">/repos/</span><span class="n">asf</span><span class="sr">/directory/s</span><span class="n">andbox</span><span class="sr">/szoerner/g</span><span class="n">roovyldap</span>
+<span class="n">A</span>    <span class="n">groovyldap</span><span class="o">\</span><span class="n">src</span>
+<span class="n">A</span>    <span class="n">groovyldap</span><span class="o">\</span><span class="n">src</span><span class="o">\</span><span class="n">main</span>
+<span class="n">A</span>    <span class="n">groovyldap</span><span class="o">\</span><span class="n">src</span><span class="o">\</span><span class="n">main</span><span class="o">\</span><span class="n">java</span>
+<span class="n">A</span>    <span class="n">groovyldap</span><span class="o">\</span><span class="n">src</span><span class="o">\</span><span class="n">main</span><span class="o">\</span><span class="n">java</span><span class="o">\</span><span class="n">org</span>
+<span class="n">A</span>    <span class="n">groovyldap</span><span class="o">\</span><span class="n">src</span><span class="o">\</span><span class="n">main</span><span class="o">\</span><span class="n">java</span><span class="o">\</span><span class="n">org</span><span class="o">\</span><span class="n">apache</span>
+<span class="o">...</span>
+<span class="n">Checked</span> <span class="n">out</span> <span class="n">revision</span> <span class="mi">558335</span><span class="o">.</span>
+
+<span class="n">D:</span><span class="o">\</span><span class="n">Apache</span><span class="o">&gt;</span><span class="n">_</span>
+</pre></div>
+
+
+    <div class="nav">
+        <div class="nav_prev">
+        
+            <a href="1-groovy-ldap-user-guide.html">2 - Groovy LDAP User Guide</a>
+		
+        </div>
+        <div class="nav_up">
+        
+            <a href="../groovy-ldap.html">Groovy LDAP</a>
+		
+        </div>
+        <div class="nav_next">
+        
+            <a href="4-groovy-ldap-building.html">4 - Groovy LDAP Building the Software</a>
+		
+        </div>
+        <div class="clearfix"></div>
+    </div>
+
+
+                </div><!-- rightColumn -->
+                <div id="endContent"></div>
+            </div><!-- content -->
+            <div id="footer">&copy; 2003-2012, <a href="http://www.apache.org">The Apache Software Foundation</a> - <a href="./../../privacy-policy.html">Privacy Policy</a><br />
+                Apache Directory, ApacheDS, Apache Directory Server, Apache Directory Studio, Apache LDAP API, Apache Triplesec, Triplesec, Apache, the Apache feather logo, and the Apache Directory project logos are trademarks of The Apache Software Foundation.
+            </div>
+        </div><!-- container -->
+    </body>
+</html>
\ No newline at end of file

Added: websites/staging/directory/trunk/content/api/groovy-api/4-groovy-ldap-build.html
==============================================================================
--- websites/staging/directory/trunk/content/api/groovy-api/4-groovy-ldap-build.html (added)
+++ websites/staging/directory/trunk/content/api/groovy-api/4-groovy-ldap-build.html Wed Nov 28 16:15:26 2012
@@ -0,0 +1,209 @@
+<!DOCTYPE html>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<html>
+	<head>
+		<title>4 - Groovy LDAP : Buildng the Software &mdash; Apache Directory</title>
+		
+	    <link href="./../../css/common.css" rel="stylesheet" type="text/css">
+	    <link href="./../../css/brown.css" rel="stylesheet" type="text/css">
+    
+	</head>
+	<body>
+	    <div id="container">
+            <div id="header">
+                <div id="subProjectsNavBar">
+                    <a href="./../../">
+                        
+                        Apache Directory Project
+                        
+                    </a>
+                    &nbsp;|&nbsp;
+                    <a href="./../../apacheds">
+                        
+                        ApacheDS
+                        
+                    </a>
+                    &nbsp;|&nbsp;
+                    <a href="./../../studio">
+                        
+                        Apache Directory Studio
+                        
+                    </a>
+                    &nbsp;|&nbsp;
+                    <a href="./../../api">
+                        
+                        <STRONG>Apache LDAP API</STRONG>
+                        
+                    </a>
+                </div><!-- subProjectsNavBar -->
+            </div><!-- header -->
+            <div id="content">
+                <div id="leftColumn">
+                    
+<div id="navigation">
+    
+    <h5>Latest Downloads</h5>
+    <ul>
+	    <li><a href="./../../api/downloads.html">Version 1.0.0-M13</a>&nbsp;&nbsp;<IMG src="./../../images/new_badge.gif" alt="" style="margin-bottom:-3px;" border="0"></li>
+    </ul>
+    <h5>Getting Started</h5>
+    <ul>
+        <li><a href="./../../api/vision.html">Vision</a></li>
+        <li><a href="./../../api/java-api.html">Java API</a></li>
+        <li><a href="./../../api/groovy-ldap.html">Groovy API</a></li>
+    </ul>
+    <h5>Documentation</h5>
+    <ul>
+	    <li><a href="./../../api/five-minutes-tutorial.html">Five minutes tutorial</a></li>
+	    <li><a href="./../../api/user-guide.html">User Guide</a></li>
+        <li><a href="./../../api/gen-docs/latest/apidocs/">JavaDocs</a></li>
+        <!--li><a href="./../../api/gen-docs/latest/">Generated Reports</a></li-->
+        <li><a href="./../../api/developer-guide.html">Developer Guide</a></li>
+    </ul>
+    
+    
+    <h5>Support</h5>
+    <ul>
+        <li><a href="./../../mailing-lists-and-irc.html">Mailing Lists &amp; IRC</a></li>
+        <li><a href="./../../sources.html">Sources</a></li>
+        <li><a href="./../../issue-tracking.html">Issue Tracking</a></li>
+        <li><a href="./../../commercial-support.html">Commercial Support</a></li>
+    </ul>
+    <h5>Community</h5>
+    <ul>
+        <li><a href="./../../contribute.html">How to Contribute</a></li>
+        <li><a href="./../../team.html">Team</a></li>
+        <li><a href="./../../original-project-proposal.html">Original Project Proposal</a></li>
+        <li><a href="./../../special-thanks.html" class="external-link" rel="nofollow">Special Thanks</a></li>
+    </ul>
+    <h5>About Apache</h5>
+    <ul>
+        <li><a href="http://www.apache.org/">Apache</a></li>
+        <li><a href="http://www.apache.org/licenses/">License</a></li>
+        <li><a href="http://www.apache.org/foundation/sponsorship.html">Sponsorship</a></li>
+        <li><a href="http://www.apache.org/foundation/thanks.html">Thanks</a></li>
+        <li><a href="http://www.apache.org/security/">Security</a></li>
+    </ul>
+    
+</div><!-- navigation -->
+
+                </div><!-- leftColumn -->
+                <div id="rightColumn">
+
+
+    <div class="nav">
+        <div class="nav_prev">
+        
+            <a href="2-groovy-ldap-implementation.html">2 - Groovy LDAP Implementation</a>
+		
+        </div>
+        <div class="nav_up">
+        
+            <a href="../groovy-ldap.html">Groovy LDAP</a>
+		
+        </div>
+        <div class="nav_next">
+        
+			&nbsp;
+        
+        </div>
+        <div class="clearfix"></div>
+    </div>
+
+
+<h1 id="4-groovy-ldap-buildng-the-software">4 - Groovy LDAP : Buildng the Software</h1>
+<h2 id="building-the-software">Building the software</h2>
+<h3 id="resolving-the-dependencies">Resolving the dependencies</h3>
+<p>Groovy LDAP needs Java 5 to compile. Besides this, it has only one dependency: Groovy itself. For LDAP communication, JNDI and its LDAP provider are used. These are part of the JDK since ages. </p>
+<p>In order to build the software, Apache ant is used. For dependency resolution we use <a href="http://incubator.apache.org/ivy">Ivy</a>. You need to configure your ant tool to use Ivy. One option is to place the corresponding jar file <em>ivy-1.4.1.jar</em> (or later) in the <em>lib</em> folder of your ant distribution.</p>
+<h3 id="building-with-ant-and-ivy-deprecated">Building with ant and ivy (deprecated)</h3>
+<p>Simply change to the <em>groovyldap</em> directory and type <em>ant</em>.</p>
+<div class="codehilite"><pre><span class="n">D:</span><span class="o">\</span><span class="n">Apache</span><span class="o">&gt;</span><span class="n">cd</span> <span class="n">groovyldap</span>
+<span class="n">D:</span><span class="o">\</span><span class="n">Apache</span><span class="o">\</span><span class="n">groovyldap</span><span class="o">&gt;</span><span class="n">ant</span>
+<span class="n">Buildfile:</span> <span class="n">build</span><span class="o">.</span><span class="n">xml</span>
+
+<span class="n">prepare:</span>
+    <span class="p">[</span><span class="nb">mkdir</span><span class="p">]</span> <span class="n">Created</span> <span class="n">dir:</span> <span class="n">D:</span><span class="o">\</span><span class="n">Apache</span><span class="o">\</span><span class="n">groovyldap</span><span class="o">\</span><span class="n">dist</span>
+    <span class="p">[</span><span class="nb">mkdir</span><span class="p">]</span> <span class="n">Created</span> <span class="n">dir:</span> <span class="n">D:</span><span class="o">\</span><span class="n">Apache</span><span class="o">\</span><span class="n">groovyldap</span><span class="o">\</span><span class="n">dist</span><span class="o">\</span><span class="n">classes</span>
+    <span class="p">[</span><span class="nb">mkdir</span><span class="p">]</span> <span class="n">Created</span> <span class="n">dir:</span> <span class="n">D:</span><span class="o">\</span><span class="n">Apache</span><span class="o">\</span><span class="n">groovyldap</span><span class="o">\</span><span class="n">lib</span>
+
+<span class="n">resolve:</span>
+<span class="p">[</span><span class="n">ivy:retrieve</span><span class="p">]</span> <span class="o">::</span> <span class="n">Ivy</span> <span class="mf">1.4.1</span> <span class="o">-</span> <span class="mi">20061109165313</span> <span class="o">::</span> <span class="n">http:</span><span class="sr">//i</span><span class="n">vy</span><span class="o">.</span><span class="n">jayasoft</span><span class="o">.</span><span class="n">org</span><span class="o">/</span> <span class="o">::</span>
+
+<span class="o">...</span>
+
+<span class="n">jarfile:</span>
+      <span class="p">[</span><span class="n">jar</span><span class="p">]</span> <span class="n">Building</span> <span class="n">jar:</span> <span class="n">D:</span><span class="o">\</span><span class="n">Apache</span><span class="o">\</span><span class="n">groovyldap</span><span class="o">\</span><span class="n">dist</span><span class="o">\</span><span class="n">groovy</span><span class="o">-</span><span class="n">ldap</span><span class="o">.</span><span class="n">jar</span>
+
+<span class="n">BUILD</span> <span class="n">SUCCESSFUL</span>
+<span class="n">Total</span> <span class="nb">time</span><span class="p">:</span> <span class="mi">7</span> <span class="n">seconds</span>
+<span class="n">D:</span><span class="o">\</span><span class="n">Apache</span><span class="o">\</span><span class="n">groovyldap</span><span class="o">&gt;</span><span class="n">_</span>
+</pre></div>
+
+
+<p>Done.</p>
+<p>The jarfile which includes the software, <em>groovy-ldap.jar</em>, is created in the <em>dist</em> directory. Feel free to call <em>ant clean</em> afterwards. </p>
+<h3 id="building-with-maven">Building with Maven</h3>
+<p>We are changing the build process to Maven 2, in order to have the same build tool for all sub projects within Apache Directory. </p>
+<p>Simply change to the <em>groovyldap</em> directory and type <em>mvn install</em>.</p>
+<div class="codehilite"><pre><span class="n">D:</span><span class="o">\</span><span class="n">Apache</span><span class="o">\</span><span class="n">groovyldap</span><span class="o">&gt;</span><span class="n">mvn</span> <span class="n">install</span>
+<span class="p">[</span><span class="n">INFO</span><span class="p">]</span> <span class="n">Scanning</span> <span class="k">for</span> <span class="n">projects</span><span class="o">...</span>
+<span class="p">[</span><span class="n">INFO</span><span class="p">]</span> <span class="o">-----------------------------------------------------------------</span>
+<span class="p">[</span><span class="n">INFO</span><span class="p">]</span> <span class="n">Building</span> <span class="n">Apache</span> <span class="n">Directory</span> <span class="n">Groovy</span> <span class="n">LDAP</span>
+<span class="p">[</span><span class="n">INFO</span><span class="p">]</span>    <span class="n">task</span><span class="o">-</span><span class="n">segment:</span> <span class="p">[</span><span class="n">install</span><span class="p">]</span>
+<span class="p">[</span><span class="n">INFO</span><span class="p">]</span> <span class="o">-----------------------------------------------------------------</span>
+<span class="o">...</span>
+<span class="p">[</span><span class="n">INFO</span><span class="p">]</span> <span class="o">-----------------------------------------------------------------</span>
+<span class="p">[</span><span class="n">INFO</span><span class="p">]</span> <span class="n">BUILD</span> <span class="n">SUCCESSFUL</span>
+<span class="p">[</span><span class="n">INFO</span><span class="p">]</span> <span class="o">-----------------------------------------------------------------</span>
+<span class="p">[</span><span class="n">INFO</span><span class="p">]</span> <span class="n">Total</span> <span class="nb">time</span><span class="p">:</span> <span class="mi">25</span> <span class="n">seconds</span>
+<span class="p">[</span><span class="n">INFO</span><span class="p">]</span> <span class="n">Finished</span> <span class="n">at:</span> <span class="n">Mon</span> <span class="n">Mar</span> <span class="mo">02</span> <span class="mi">22</span><span class="p">:</span><span class="mo">06</span><span class="p">:</span><span class="mi">54</span> <span class="n">CET</span> <span class="mi">2009</span>
+<span class="p">[</span><span class="n">INFO</span><span class="p">]</span> <span class="n">Final</span> <span class="n">Memory:</span> <span class="mi">19</span><span class="n">M</span><span class="o">/</span><span class="mi">38</span><span class="n">M</span>
+<span class="p">[</span><span class="n">INFO</span><span class="p">]</span> <span class="o">-----------------------------------------------------------------</span>
+</pre></div>
+
+
+    <div class="nav">
+        <div class="nav_prev">
+        
+            <a href="2-groovy-ldap-implementation.html">2 - Groovy LDAP Implementation</a>
+		
+        </div>
+        <div class="nav_up">
+        
+            <a href="../groovy-ldap.html">Groovy LDAP</a>
+		
+        </div>
+        <div class="nav_next">
+        
+			&nbsp;
+        
+        </div>
+        <div class="clearfix"></div>
+    </div>
+
+
+                </div><!-- rightColumn -->
+                <div id="endContent"></div>
+            </div><!-- content -->
+            <div id="footer">&copy; 2003-2012, <a href="http://www.apache.org">The Apache Software Foundation</a> - <a href="./../../privacy-policy.html">Privacy Policy</a><br />
+                Apache Directory, ApacheDS, Apache Directory Server, Apache Directory Studio, Apache LDAP API, Apache Triplesec, Triplesec, Apache, the Apache feather logo, and the Apache Directory project logos are trademarks of The Apache Software Foundation.
+            </div>
+        </div><!-- container -->
+    </body>
+</html>
\ No newline at end of file

Modified: websites/staging/directory/trunk/content/api/groovy-ldap.html
==============================================================================
--- websites/staging/directory/trunk/content/api/groovy-ldap.html (original)
+++ websites/staging/directory/trunk/content/api/groovy-ldap.html Wed Nov 28 16:15:26 2012
@@ -154,11 +154,11 @@
 
 
 <p>In LDIF format, the entry in the directory looks like this afterwards.</p>
-<div class="codehilite"><pre><span class="err">dn:</span> <span class="err">cn=Heather</span> <span class="err">Nova,dc=example,dc=com</span>
-<span class="err">cn:</span> <span class="err">Heather</span> <span class="err">Nova</span>
-<span class="err">sn:</span> <span class="err">Nova</span>
-<span class="err">objectClass:</span> <span class="err">person</span>
-<span class="err">objectClass:</span> <span class="err">top</span>
+<div class="codehilite"><pre>dn: cn=Heather Nova,dc=example,dc=com
+cn: Heather Nova
+sn: Nova
+objectClass: person
+objectClass: top
 </pre></div>
 
 
@@ -192,10 +192,10 @@ ldap.eachEntry (filter: &#39;(objectClas
 An interesting alternative to Groovy LDAP is Gldapo (<a href="http://gldapo.codehaus.org/">http://gldapo.codehaus.org/</a>)</p>
 <h2 id="where-to-go-from-here">Where to go from here</h2>
 <ul>
-<li><a href="groovy-ldap-download.html">Download</a> a binary version including the source code</li>
-<li>Read the <a href="groovy-ldap-user-guide.html">User Guide</a> in order to understand which operations are already implemented, and how to use them</li>
-<li>Learn more about the <a href="groovy-ldap-download.html#implementation">implementation</a></li>
-<li>Learn how to <a href="groovy-ldap-download.html#building-the-software">build the software</a> on your own</li>
+<li><a href="groovy-api/1-groovy-ldap-download.html">Download</a> a binary version including the source code</li>
+<li>Read the <a href="groovy-api/2-groovy-ldap-user-guide.html">User Guide</a> in order to understand which operations are already implemented, and how to use them</li>
+<li>Learn more about the <a href="groovy-api/3-groovy-ldap-download.html">implementation</a></li>
+<li>Learn how to <a href="groovy-api/4-groovy-ldap-build.html">build the software</a> on your own</li>
 </ul>
 
 

Added: websites/staging/directory/trunk/content/images/JetBrains_logo.png
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/directory/trunk/content/images/JetBrains_logo.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: websites/staging/directory/trunk/content/images/SQLManager.bmp
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/directory/trunk/content/images/SQLManager.bmp
------------------------------------------------------------------------------
    svn:mime-type = image/x-ms-bmp

Added: websites/staging/directory/trunk/content/images/borland.gif
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/directory/trunk/content/images/borland.gif
------------------------------------------------------------------------------
    svn:mime-type = image/gif

Added: websites/staging/directory/trunk/content/images/opengroup_logo.png
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/directory/trunk/content/images/opengroup_logo.png
------------------------------------------------------------------------------
    svn:mime-type = image/png

Added: websites/staging/directory/trunk/content/images/opensourceposeidon_supportedby.gif
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/directory/trunk/content/images/opensourceposeidon_supportedby.gif
------------------------------------------------------------------------------
    svn:mime-type = image/gif

Added: websites/staging/directory/trunk/content/images/zenl_logo.gif
==============================================================================
Binary file - no diff available.

Propchange: websites/staging/directory/trunk/content/images/zenl_logo.gif
------------------------------------------------------------------------------
    svn:mime-type = image/gif



Mime
View raw message