directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r839907 - in /websites/staging/directory/trunk/content: ./ apacheds/advanced-ug/ api/ api/groovy-api/
Date Wed, 28 Nov 2012 16:48:10 GMT
Author: buildbot
Date: Wed Nov 28 16:48:09 2012
New Revision: 839907

Log:
Staging update by buildbot for directory

Added:
    websites/staging/directory/trunk/content/api/groovy-api/4-groovy-ldap-building.html
    websites/staging/directory/trunk/content/api/groovy-api/5-groovy-ldap-reference.html
    websites/staging/directory/trunk/content/api/groovy-api/6-groovy-ldap-origin.html
Removed:
    websites/staging/directory/trunk/content/api/groovy-api/4-groovy-ldap-build.html
    websites/staging/directory/trunk/content/api/groovy-ldap-origin.html
Modified:
    websites/staging/directory/trunk/content/   (props changed)
    websites/staging/directory/trunk/content/apacheds/advanced-ug/1.5-schemamanager.html

Propchange: websites/staging/directory/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Wed Nov 28 16:48:09 2012
@@ -1 +1 @@
-1414787
+1414807

Modified: websites/staging/directory/trunk/content/apacheds/advanced-ug/1.5-schemamanager.html
==============================================================================
--- websites/staging/directory/trunk/content/apacheds/advanced-ug/1.5-schemamanager.html (original)
+++ websites/staging/directory/trunk/content/apacheds/advanced-ug/1.5-schemamanager.html Wed
Nov 28 16:48:09 2012
@@ -118,7 +118,7 @@
         </div>
         <div class="nav_next">
         
-            <a href="1.6-admin-model.html">1.6 - Administrative Model</a>
+            <a href="2-server-config.html">2 - Server Configuration</a>
 		
         </div>
         <div class="clearfix"></div>
@@ -142,7 +142,7 @@
         </div>
         <div class="nav_next">
         
-            <a href="1.6-admin-model.html">1.6 - Administrative Model</a>
+            <a href="2-server-config.html">2 - Server Configuration</a>
 		
         </div>
         <div class="clearfix"></div>

Added: websites/staging/directory/trunk/content/api/groovy-api/4-groovy-ldap-building.html
==============================================================================
--- websites/staging/directory/trunk/content/api/groovy-api/4-groovy-ldap-building.html (added)
+++ websites/staging/directory/trunk/content/api/groovy-api/4-groovy-ldap-building.html Wed
Nov 28 16:48:09 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

Added: websites/staging/directory/trunk/content/api/groovy-api/5-groovy-ldap-reference.html
==============================================================================
--- websites/staging/directory/trunk/content/api/groovy-api/5-groovy-ldap-reference.html (added)
+++ websites/staging/directory/trunk/content/api/groovy-api/5-groovy-ldap-reference.html Wed
Nov 28 16:48:09 2012
@@ -0,0 +1,283 @@
+<!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>5 - Groovy LDAP Reference &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="4-groovy-ldap-building.html">4 - Groovy LDAP Building</a>
+		
+        </div>
+        <div class="nav_up">
+        
+            <a href="../groovy-ldap.html">Groovy LDAP</a>
+		
+        </div>
+        <div class="nav_next">
+        
+            <a href="6-groovy-ldap-origin.html">6 - Groovy LDAP Origin</a>
+		
+        </div>
+        <div class="clearfix"></div>
+    </div>
+
+
+<h1>5 - Groovy LDAP Reference</h1>
+
+<div class="toc">
+<ul>
+<li><a href="#search">search</a><ul>
+<li><a href="#three-options-to-call-a-search-method">Three options to call a
search method</a><ul>
+<li><a href="#short-cut-methods">Short cut methods</a></li>
+</ul>
+</li>
+<li><a href="#using-a-search-object">Using a Search object</a><ul>
+<li><a href="#using-map-style-syntax">Using map style syntax</a></li>
+</ul>
+</li>
+<li><a href="#using-filter-arguments">Using filter arguments</a></li>
+<li><a href="#specifying-the-attributes-returned-by-a-search">Specifying the
attributes returned by a search</a></li>
+</ul>
+</li>
+</ul>
+</div>
+<h2 id="search">search</h2>
+<p>The <em>search</em> method performs an LDAP search operation and returns
the result as a list of entries. In Groovy LDAP, an entry is simply a map.</p>
+<h3 id="three-options-to-call-a-search-method">Three options to call a search method</h3>
+<h4 id="short-cut-methods">Short cut methods</h4>
+<p>For the most common types of search requests, the <em>LDAP</em> class
contains two direct methods.</p>
+<div class="codehilite"><pre><span class="kd">public</span> <span
class="n">List</span><span class="o">&lt;</span><span class="n">Object</span><span
class="o">&gt;</span> <span class="n">search</span><span class="o">(</span>
<span class="n">String</span> <span class="n">filter</span> <span
class="o">)</span> <span class="kd">throws</span> <span class="n">NamingException</span>
+<span class="kd">public</span> <span class="n">List</span><span
class="o">&lt;</span><span class="n">Object</span><span class="o">&gt;</span>
<span class="n">search</span><span class="o">(</span> <span class="n">String</span>
<span class="n">filter</span><span class="o">,</span> <span class="n">String</span>
<span class="n">base</span><span class="o">,</span> <span class="n">SearchScope</span>
<span class="n">scope</span> <span class="o">)</span> <span class="kd">throws</span>
<span class="n">NamingException</span>
+</pre></div>
+
+
+<p>This example uses the second variant:</p>
+<div class="codehilite"><pre><span class="o">...</span>
+<span class="n">ldap</span> <span class="o">=</span> <span class="n">LDAP</span><span
class="o">.</span><span class="na">newInstance</span><span class="o">(</span><span
class="err">&#39;</span><span class="nl">ldap:</span><span class="c1">//zanzibar:10389/&#39;)</span>
+
+<span class="n">results</span> <span class="o">=</span> <span
class="n">ldap</span><span class="o">.</span><span class="na">search</span><span
class="o">(</span><span class="err">&#39;</span><span class="o">(</span><span
class="n">objectClass</span><span class="o">=</span><span class="n">person</span><span
class="o">)</span><span class="err">&#39;</span><span class="o">,</span>
<span class="err">&#39;</span><span class="n">dc</span><span
class="o">=</span><span class="n">example</span><span class="o">,</span><span
class="n">dc</span><span class="o">=</span><span class="n">com</span><span
class="err">&#39;</span><span class="o">,</span> <span class="n">SearchScope</span><span
class="o">.</span><span class="na">ONE</span><span class="o">)</span>
+<span class="n">println</span> <span class="s">&quot; ${results.size}
entries found &quot;</span><span class="o">.</span><span class="na">center</span><span
class="o">(</span><span class="mi">40</span><span class="o">,</span><span
class="sc">&#39;-&#39;</span><span class="o">)</span>
+<span class="k">for</span> <span class="o">(</span><span class="n">entry</span>
<span class="n">in</span> <span class="n">results</span><span class="o">)</span>
<span class="o">{</span>
+  <span class="n">println</span> <span class="n">entry</span><span
class="o">.</span><span class="na">dn</span>
+<span class="o">}</span>
+<span class="o">...</span>
+</pre></div>
+
+
+<h3 id="using-a-search-object">Using a Search object</h3>
+<p>The class org.apache.directory.groovyldap.Search is a JavaBean which contains parameters
for a search.</p>
+<table>
+<thead>
+<tr>
+<th>Property name</th>
+<th>Type</th>
+<th>Default value</th>
+<th>Description</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td><em>base</em></td>
+<td>java.lang.String</td>
+<td>""</td>
+<td>Search base</td>
+</tr>
+<tr>
+<td><em>scope</em></td>
+<td>org.apache.directory.groovyldap.SearchScope</td>
+<td>SearchScope.SUB (whole sub tree)</td>
+<td>Search scope, one of BASE, ONE, SUB</td>
+</tr>
+<tr>
+<td><em>filter</em></td>
+<td>java.lang.String</td>
+<td>"(objectClass=*)" (matches all entries)</td>
+<td>filter expression</td>
+</tr>
+<tr>
+<td><em>filterArgs</em></td>
+<td>java.lang.Object[]</td>
+<td>null</td>
+<td>filter arguments</td>
+</tr>
+<tr>
+<td><em>attrs</em></td>
+<td>java.lang.String[]</td>
+<td>null (all attributes)</td>
+<td>returning attributes</td>
+</tr>
+</tbody>
+</table>
+<p>You can simply create an object of this class, adjust the attributes to your needs
and call an appropriate search method from the <em>LDAP</em> class with it. Here
is an example:</p>
+<div class="codehilite"><pre><span class="o">...</span>
+<span class="n">params</span> <span class="o">=</span> <span class="k">new</span>
<span class="n">Search</span><span class="o">()</span>
+<span class="n">params</span><span class="o">.</span><span class="na">filter</span><span
class="o">=</span><span class="err">&#39;</span><span class="o">(</span><span
class="n">objectClass</span><span class="o">=</span><span class="n">person</span><span
class="o">)</span><span class="err">&#39;</span>
+<span class="n">params</span><span class="o">.</span><span class="na">base</span><span
class="o">=</span><span class="err">&#39;</span><span class="n">dc</span><span
class="o">=</span><span class="n">example</span><span class="o">,</span><span
class="n">dc</span><span class="o">=</span><span class="n">com</span><span
class="err">&#39;</span>
+<span class="n">params</span><span class="o">.</span><span class="na">scope</span><span
class="o">=</span><span class="n">SearchScope</span><span class="o">.</span><span
class="na">ONE</span>
+
+<span class="n">results</span> <span class="o">=</span> <span
class="n">ldap</span><span class="o">.</span><span class="na">search</span><span
class="o">(</span><span class="n">params</span><span class="o">)</span>
+<span class="o">...</span>
+</pre></div>
+
+
+<h4 id="using-map-style-syntax">Using map style syntax</h4>
+<p>A very handy way to call search operations is to use the expressive map style arguments.
The same properties as described for the <em>Search</em> class are supported.
Here is an example.</p>
+<div class="codehilite"><pre><span class="o">...</span>
+<span class="n">results</span> <span class="o">=</span> <span
class="n">ldap</span><span class="o">.</span><span class="na">search</span><span
class="o">(</span><span class="nl">filter:</span> <span class="err">&#39;</span><span
class="o">(</span><span class="n">objectClass</span><span class="o">=</span><span
class="n">person</span><span class="o">)</span><span class="err">&#39;</span><span
class="o">,</span> 
+    <span class="nl">base:</span> <span class="err">&#39;</span><span
class="n">dc</span><span class="o">=</span><span class="n">example</span><span
class="o">,</span><span class="n">dc</span><span class="o">=</span><span
class="n">com</span><span class="err">&#39;</span><span class="o">,</span>
<span class="nl">scope:</span> <span class="err">&#39;</span><span
class="n">ONE</span><span class="err">&#39;</span><span class="o">)</span>
+<span class="o">...</span>
+</pre></div>
+
+
+<p>The order of arguments does not matter, and this variant is very descriptive, and
therefore recommended to use.</p>
+<h3 id="using-filter-arguments">Using filter arguments</h3>
+<p>JNDI supports filter expressions with placeholders like {0}, {1} etc., and Groovy
LDAP offers their use as well. 
+Here is a simple example:</p>
+<div class="codehilite"><pre><span class="o">...</span>
+<span class="n">params</span> <span class="o">=</span> <span class="k">new</span>
<span class="n">Search</span><span class="o">()</span>
+<span class="n">params</span><span class="o">.</span><span class="na">filter</span><span
class="o">=</span><span class="err">&#39;</span><span class="o">(&amp;(</span><span
class="n">objectClass</span><span class="o">={</span><span class="mi">0</span><span
class="o">})(</span><span class="n">cn</span><span class="o">={</span><span
class="mi">1</span><span class="o">}))</span><span class="err">&#39;</span>
+<span class="n">params</span><span class="o">.</span><span class="na">filterArgs</span><span
class="o">=[</span><span class="err">&#39;</span><span class="n">person</span><span
class="err">&#39;</span><span class="o">,</span> <span class="err">&#39;</span><span
class="n">Heather</span> <span class="n">Nova</span><span class="err">&#39;</span><span
class="o">]</span>
+
+<span class="n">results</span> <span class="o">=</span> <span
class="n">ldap</span><span class="o">.</span><span class="na">search</span><span
class="o">(</span><span class="n">params</span><span class="o">)</span>
+<span class="o">...</span>
+</pre></div>
+
+
+<p>It is possible to use this in map style as well.</p>
+<h3 id="specifying-the-attributes-returned-by-a-search">Specifying the attributes returned
by a search</h3>
+<p>tbd.</p>
+
+
+    <div class="nav">
+        <div class="nav_prev">
+        
+            <a href="4-groovy-ldap-building.html">4 - Groovy LDAP Building</a>
+		
+        </div>
+        <div class="nav_up">
+        
+            <a href="../groovy-ldap.html">Groovy LDAP</a>
+		
+        </div>
+        <div class="nav_next">
+        
+            <a href="6-groovy-ldap-origin.html">6 - Groovy LDAP Origin</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/6-groovy-ldap-origin.html
==============================================================================
--- websites/staging/directory/trunk/content/api/groovy-api/6-groovy-ldap-origin.html (added)
+++ websites/staging/directory/trunk/content/api/groovy-api/6-groovy-ldap-origin.html Wed
Nov 28 16:48:09 2012
@@ -0,0 +1,164 @@
+<!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>6 - Groovy LDAP Origin &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="5-groovy-ldap-reference.html">5 - Groovy LDAP Reference</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="6-groovy-ldap-origin">6-Groovy LDAP Origin</h1>
+<p>I did some research about accessing LDAP from <a href="http://groovy.codehaus.org">Groovy</a>,
in order to create some simple scripts. It is possible to use both JNDI and libraries like
Netscape or Novell SDK from Groovy (you can basically use any Java library in Groovy scripts).</p>
+<p>But these approaches have disadvantages. Netscape SDK is plain LDAP, so the scripts
look like one familiar to LDAP would expect. But the API is not connected very well to the
Collection API, so sometimes it is not easy to use the result from Groovy. And you have a
non-standard dependency. JNDI on the other hand is easier to use (exists in every VM), but
the scripts look <strong>horrible</strong>, because of the LDAP abstraction JNDI
does. For instance you have to type "entry.nameInNamespace" instead of "entry.DN" (Netscape).</p>
+<p>It seems that there does no special solution/library for Groovy and LDAP exist.
So I started to create a little prototype. Basically, it is a wrapper which uses JNDI (in
order to omit the dependency to a non-standard library) under the hood, but looks like LDAP
from the outside (script). Unfortunately, I am not a Groovy expert. </p>
+<p><strong>Stefan Zoerner on Jun 30, 2007</strong></p>
+
+
+    <div class="nav">
+        <div class="nav_prev">
+        
+            <a href="5-groovy-ldap-reference.html">5 - Groovy LDAP Reference</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



Mime
View raw message