directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1393031 - in /directory/site/trunk/content/api: download/groovy-ldap.zip groovy-ldap-download.mdtext groovy-ldap-origin.mdtext groovy-ldap.mdtext
Date Tue, 02 Oct 2012 16:59:54 GMT
Author: pamarcelot
Date: Tue Oct  2 16:59:54 2012
New Revision: 1393031

URL: http://svn.apache.org/viewvc?rev=1393031&view=rev
Log:
Added remaning pages for Groovy LDAP.

Added:
    directory/site/trunk/content/api/download/groovy-ldap.zip   (with props)
    directory/site/trunk/content/api/groovy-ldap-download.mdtext
    directory/site/trunk/content/api/groovy-ldap-origin.mdtext
Modified:
    directory/site/trunk/content/api/groovy-ldap.mdtext

Added: directory/site/trunk/content/api/download/groovy-ldap.zip
URL: http://svn.apache.org/viewvc/directory/site/trunk/content/api/download/groovy-ldap.zip?rev=1393031&view=auto
==============================================================================
Binary file - no diff available.

Propchange: directory/site/trunk/content/api/download/groovy-ldap.zip
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/site/trunk/content/api/groovy-ldap-download.mdtext
URL: http://svn.apache.org/viewvc/directory/site/trunk/content/api/groovy-ldap-download.mdtext?rev=1393031&view=auto
==============================================================================
--- directory/site/trunk/content/api/groovy-ldap-download.mdtext (added)
+++ directory/site/trunk/content/api/groovy-ldap-download.mdtext Tue Oct  2 16:59:54 2012
@@ -0,0 +1,110 @@
+Title: Groovy LDAP Download, Sources & Building
+Notice: 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.
+
+# Groovy LDAP Download, Sources & Building
+
+
+## Download Groovy LDAP
+
+Here is a ZIP-File which contains the source code and the compiled jar file to be used as
a Groovy module.
+
+**[groovy-ldap.zip](download/groovy-ldap.zip)**
+
+
+## Implementation
+
+Currently, the implementation is comprised of some Java classes and two enumerations (search
scopes and modification types). The class _LDAP_ is the main entry point for scripts, just
as the class _LDAPConnection_ in the Netscape SDK. It provides the operations implemented
so far. I have decided to omit methods for connecting and disconnecting explicitly (_bind_,
_unbind_ in LDAP). Instead all methods handle the connection themselves, which makes the Groovy
source code shorter. Class _DirContextToMapObjectFactory_ acts under the hood. It transforms
a _DirContext_ object from JNDI search results and lookups into a Java map. This trick enables
the script writer to use expressions like _tori.cn_ in order to retrieve an attribute value.
 There are probably better solutions to accomplish this task.
+
+
+## Source code
+
+Source code of the proof of concept is currently available for review here :
+
+<http://svn.apache.org/repos/asf/directory/sandbox/szoerner/groovyldap>
+
+In order to check it out, simply type
+
+    D:\Apache>svn co http://svn.apache.org/repos/asf/directory/sandbox/szoerner/groovyldap
+    A    groovyldap\src
+    A    groovyldap\src\main
+    A    groovyldap\src\main\java
+    A    groovyldap\src\main\java\org
+    A    groovyldap\src\main\java\org\apache
+    ...
+    Checked out revision 558335.
+    
+    D:\Apache>_
+
+
+## Building the software
+
+### Resolving the dependencies
+
+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. 
+
+In order to build the software, Apache ant is used. For dependency resolution we use [Ivy](http://incubator.apache.org/ivy).
You need to configure your ant tool to use Ivy. One option is to place the corresponding jar
file _ivy-1.4.1.jar_ (or later) in the _lib_ folder of your ant distribution.
+
+### Building with ant and ivy (deprecated)
+
+Simply change to the _groovyldap_ directory and type _ant_.
+ 
+    D:\Apache>cd groovyldap
+    D:\Apache\groovyldap>ant
+    Buildfile: build.xml
+    
+    prepare:
+        [mkdir] Created dir: D:\Apache\groovyldap\dist
+        [mkdir] Created dir: D:\Apache\groovyldap\dist\classes
+        [mkdir] Created dir: D:\Apache\groovyldap\lib
+    
+    resolve:
+    [ivy:retrieve] :: Ivy 1.4.1 - 20061109165313 :: http://ivy.jayasoft.org/ ::
+    
+    ...
+
+    jarfile:
+          [jar] Building jar: D:\Apache\groovyldap\dist\groovy-ldap.jar
+    
+    BUILD SUCCESSFUL
+    Total time: 7 seconds
+    D:\Apache\groovyldap>_
+
+Done.
+
+The jarfile which includes the software, _groovy-ldap.jar_, is created in the _dist_ directory.
Feel free to call _ant clean_ afterwards. 
+
+### Building with Maven
+
+We are changing the build process to Maven 2, in order to have the same build tool for all
sub projects within Apache Directory. 
+
+Simply change to the _groovyldap_ directory and type _mvn install_.
+ 
+    D:\Apache\groovyldap>mvn install
+    [INFO] Scanning for projects...
+    [INFO] -----------------------------------------------------------------
+    [INFO] Building Apache Directory Groovy LDAP
+    [INFO]    task-segment: [install]
+    [INFO] -----------------------------------------------------------------
+    ...
+    [INFO] -----------------------------------------------------------------
+    [INFO] BUILD SUCCESSFUL
+    [INFO] -----------------------------------------------------------------
+    [INFO] Total time: 25 seconds
+    [INFO] Finished at: Mon Mar 02 22:06:54 CET 2009
+    [INFO] Final Memory: 19M/38M
+    [INFO] -----------------------------------------------------------------
\ No newline at end of file

Added: directory/site/trunk/content/api/groovy-ldap-origin.mdtext
URL: http://svn.apache.org/viewvc/directory/site/trunk/content/api/groovy-ldap-origin.mdtext?rev=1393031&view=auto
==============================================================================
--- directory/site/trunk/content/api/groovy-ldap-origin.mdtext (added)
+++ directory/site/trunk/content/api/groovy-ldap-origin.mdtext Tue Oct  2 16:59:54 2012
@@ -0,0 +1,28 @@
+Title: Groovy LDAP Origin
+Notice: 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.
+
+# Groovy LDAP Origin
+
+I did some research about accessing LDAP from [Groovy](http://groovy.codehaus.org), 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).
+
+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 **horrible**, because of the LDAP abstraction JNDI does. For instance you have to type
"entry.nameInNamespace" instead of "entry.DN" (Netscape).
+
+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. 
+
+
+__Stefan Zoerner on Jun 30, 2007__

Modified: directory/site/trunk/content/api/groovy-ldap.mdtext
URL: http://svn.apache.org/viewvc/directory/site/trunk/content/api/groovy-ldap.mdtext?rev=1393031&r1=1393030&r2=1393031&view=diff
==============================================================================
--- directory/site/trunk/content/api/groovy-ldap.mdtext (original)
+++ directory/site/trunk/content/api/groovy-ldap.mdtext Tue Oct  2 16:59:54 2012
@@ -30,11 +30,11 @@ Feel free to provide feedback: <mailto:d
 
 Create a way to access LDAP from Groovy scripts, which is suitable for people familiar to
LDAP. Primary audience are people who plan to write simple scripts against their LDAP servers.
This is not about LDAP abstraction. The API should be comparable to the native LDAP library
for C, in order to provide an easy start for the primary target group. Nevertheless it should
"smell" like other Groovy integration solutions (namely GSQL) do. Especially the use of closures
is planned. In order to reduce the number of dependencies, nothing besides Java SE and Groovy
itself should be used. JNDI will therefore be used under the hood to communicate with LDAP.

 
-* Why this? Learn more about the origin of this attempt [here](6. Groovy LDAP Origin). 
+* Why this? Learn more about the origin of this attempt [here](groovy-ldap-origin.html).

 
 ## How it looks like in Groovy 
 
-Here are two example scripts which use Groovy LDAP in order to give you a first impression.
Learn more about how to use Groovy LDAP in the [User Guide](2. Groovy LDAP User Guide).
+Here are two example scripts which use Groovy LDAP in order to give you a first impression.
Learn more about how to use Groovy LDAP in the [User Guide](groovy-ldap-user-guide.html).
 
 ### Adding an entry
 
@@ -96,7 +96,7 @@ An interesting alternative to Groovy LDA
 
 ## Where to go from here
 
- * [Download](1. Download Groovy LDAP) a binary version including the source code
- * Read the [User Guide](2. Groovy LDAP User Guide) in order to understand which operations
are already implemented, and how to use them
- * Learn more about the [implementation](3. Groovy LDAP Implementation)
- * Learn how to [build the software](4. Groovy LDAP Building the software) on your own
\ No newline at end of file
+ * [Download](groovy-ldap-download.html) a binary version including the source code
+ * Read the [User Guide](groovy-ldap-user-guide.html) in order to understand which operations
are already implemented, and how to use them
+ * Learn more about the [implementation](groovy-ldap-download.html#implementation)
+ * Learn how to [build the software](groovy-ldap-download.html#building-the-software) on
your own
\ No newline at end of file



Mime
View raw message