You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by er...@apache.org on 2006/10/14 23:16:20 UTC
svn commit: r464032 - in
/directory/sandbox/ersiner/apachecon-us06-fr14/src/main:
java/apachecon/us06/fr14/tool/
java/apachecon/us06/fr14/tool/ServerTools.java resources/demo.ldif
Author: ersiner
Date: Sat Oct 14 14:16:20 2006
New Revision: 464032
URL: http://svn.apache.org/viewvc?view=rev&rev=464032
Log:
More license header fix.
Added:
directory/sandbox/ersiner/apachecon-us06-fr14/src/main/java/apachecon/us06/fr14/tool/
directory/sandbox/ersiner/apachecon-us06-fr14/src/main/java/apachecon/us06/fr14/tool/ServerTools.java
directory/sandbox/ersiner/apachecon-us06-fr14/src/main/resources/demo.ldif
Added: directory/sandbox/ersiner/apachecon-us06-fr14/src/main/java/apachecon/us06/fr14/tool/ServerTools.java
URL: http://svn.apache.org/viewvc/directory/sandbox/ersiner/apachecon-us06-fr14/src/main/java/apachecon/us06/fr14/tool/ServerTools.java?view=auto&rev=464032
==============================================================================
--- directory/sandbox/ersiner/apachecon-us06-fr14/src/main/java/apachecon/us06/fr14/tool/ServerTools.java (added)
+++ directory/sandbox/ersiner/apachecon-us06-fr14/src/main/java/apachecon/us06/fr14/tool/ServerTools.java Sat Oct 14 14:16:20 2006
@@ -0,0 +1,57 @@
+/*
+ * 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.
+ *
+ */
+
+
+package apachecon.us06.fr14.tool;
+
+
+import java.util.Hashtable;
+
+import javax.naming.NamingException;
+import javax.naming.ldap.InitialLdapContext;
+import javax.naming.ldap.LdapContext;
+
+
+/**
+ * ApacheCon US 2006
+ * FR14 - LDAP Stored Procedures and Triggers Arrive in ApacheDS
+ *
+ * ServerTools
+ *
+ * @author Ersin Er - ersiner@apache.org
+ * @see http://people.apache.org/ersiner/apacheconus06
+ */
+public class ServerTools
+{
+ private static String host = "localhost";
+ private static int port = 1024;
+
+
+ public static LdapContext connectToServer() throws NamingException
+ {
+ Hashtable env = new Hashtable();
+ env.put( "java.naming.factory.initial", "com.sun.jndi.ldap.LdapCtxFactory" );
+ env.put( "java.naming.provider.url", "ldap://" + host + ":" + port + "/ou=system" );
+ env.put( "java.naming.security.principal", "uid=admin,ou=system" );
+ env.put( "java.naming.security.credentials", "secret" );
+ env.put( "java.naming.security.authentication", "simple" );
+ return new InitialLdapContext( env, null );
+ }
+}
Added: directory/sandbox/ersiner/apachecon-us06-fr14/src/main/resources/demo.ldif
URL: http://svn.apache.org/viewvc/directory/sandbox/ersiner/apachecon-us06-fr14/src/main/resources/demo.ldif?view=auto&rev=464032
==============================================================================
--- directory/sandbox/ersiner/apachecon-us06-fr14/src/main/resources/demo.ldif (added)
+++ directory/sandbox/ersiner/apachecon-us06-fr14/src/main/resources/demo.ldif Sat Oct 14 14:16:20 2006
@@ -0,0 +1,78 @@
+# 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.
+#
+# ApacheCon US 2006
+# FR14 - LDAP Stored Procedures and Triggers Arrive in ApacheDS
+#
+# Demo LDIF
+#
+# @author Ersin Er - ersiner@apache.org
+# @see http://people.apache.org/ersiner/apacheconus06
+
+dn: ou=People,ou=system
+ou: People
+objectclass: organizationalUnit
+objectclass: top
+
+dn: cn=John,ou=People,ou=system
+objectclass: person
+objectclass: top
+sn: John
+cn: John
+
+dn: cn=Jane,ou=People,ou=system
+objectclass: person
+objectclass: top
+sn: Jane
+cn: Jane
+
+dn: ou=Engineers,ou=People,ou=system
+ou: Engineers
+objectclass: organizationalUnit
+objectclass: top
+
+dn: ou=Test Entry,ou=system
+ou: Test Entry
+objectclass: organizationalUnit
+objectclass: top
+
+dn: ou=Backups,ou=system
+ou: Backups
+objectclass: organizationalUnit
+objectclass: top
+
+dn: ou=Stored Procedures,ou=system
+ou: Stored Procedures
+objectclass: organizationalUnit
+objectclass: top
+
+dn: ou=Mailing Lists,ou=system
+ou: Mailing Lists
+objectclass: organizationalUnit
+objectclass: top
+
+dn: ou=General,ou=Mailing Lists,ou=system
+ou: General
+objectclass: organizationalUnit
+objectclass: extensibleObject
+objectclass: top
+
+dn: ou=Board,ou=Mailing Lists,ou=system
+ou: Board
+objectclass: organizationalUnit
+objectclass: extensibleObject
+objectclass: top