directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oer...@apache.org
Subject svn commit: r529293 [4/4] - in /directory/sandbox/oersoy/das.ldap.parent: ./ das.ldap.configuration.model.ecore.v100/ das.ldap.configuration.model.ecore.v100/.settings/ das.ldap.configuration.model.ecore.v100/model/ das.ldap.configuration.model.ecore.v...
Date Mon, 16 Apr 2007 15:43:26 GMT
Added: directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/create/SyntaxEntryCreator.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/create/SyntaxEntryCreator.java?view=auto&rev=529293
==============================================================================
--- directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/create/SyntaxEntryCreator.java (added)
+++ directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/create/SyntaxEntryCreator.java Mon Apr 16 08:43:15 2007
@@ -0,0 +1,71 @@
+
+package org.apache.tuscany.das.ldap.create;
+
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.BasicAttribute;
+import javax.naming.directory.BasicAttributes;
+import javax.naming.directory.DirContext;
+
+import org.apache.tuscany.das.ldap.create.test.MetaSchemaConstants;
+import org.apache.tuscany.das.ldap.create.test.SystemSchemaConstants;
+
+public class SyntaxEntryCreator
+{
+    public static void create(
+        String oidPrefix,
+        String syntaxNamespace,
+        String syntaxName,
+        String namespacePrefix,
+        DirContext directoryContext) 
+    throws Exception
+    {
+        String syntaxDescription = 
+            namespacePrefix + ":" + syntaxName;
+        
+        String oidGenerationInput =
+            syntaxNamespace + "." + syntaxName;
+        
+        String oid = UniqueOIDCreator.create(
+            oidPrefix, 
+            oidGenerationInput);
+        
+        Attributes attributes = 
+            prepareSyntaxAttributes( 
+                oid, 
+                syntaxDescription );
+        
+        String rdn = MetaSchemaConstants.M_OID_AT + "=" + oid;
+        
+        directoryContext.createSubcontext( rdn, attributes );
+    }
+    
+    public static Attributes prepareSyntaxAttributes(
+        String oid, 
+        String syntaxDescription)
+    {
+        Attribute objectClassAttribute = new BasicAttribute(
+            SystemSchemaConstants.OBJECT_CLASS_AT, 
+            "top" );
+        
+        objectClassAttribute.add( MetaSchemaConstants.META_TOP_OC );
+        objectClassAttribute.add( MetaSchemaConstants.META_SYNTAX_OC );
+        
+        Attribute oidAttribute = new BasicAttribute(
+            MetaSchemaConstants.M_OID_AT, 
+            oid);
+        
+        Attribute descriptionAttribute = new BasicAttribute(
+            MetaSchemaConstants.M_DESCRIPTION_AT, 
+            syntaxDescription);
+        
+        Attributes attributes = new BasicAttributes();
+        
+        attributes.put( objectClassAttribute );
+        attributes.put( oidAttribute );
+        attributes.put( descriptionAttribute );
+
+        return attributes;
+    }
+
+}

Added: directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/create/UniqueOIDCreator.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/create/UniqueOIDCreator.java?view=auto&rev=529293
==============================================================================
--- directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/create/UniqueOIDCreator.java (added)
+++ directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/create/UniqueOIDCreator.java Mon Apr 16 08:43:15 2007
@@ -0,0 +1,90 @@
+
+package org.apache.tuscany.das.ldap.create;
+
+import java.security.MessageDigest;
+
+public class UniqueOIDCreator
+{
+    private static int MAX_OID_SEGMENT_LENGTH = 8;
+    
+    /**
+     * Creates a unique OID
+     * 
+     * @param namespacedMetadata the namespaced metadata
+     * @param oidPrefix the OID Branch
+     * 
+     * @return the string
+     * @throws Exception 
+     */
+    public static String create(
+        String oidPrefix,
+        String namespacedMetadata) 
+    throws Exception
+    {
+        MessageDigest messageDigest = MessageDigest.getInstance("SHA-1");
+        
+        byte[] digest             = messageDigest.digest(namespacedMetadata.getBytes());
+    
+        StringBuffer hexString = new StringBuffer();
+        for (int i=0;i<digest.length;i++) {
+          hexString.append (
+            Integer.toHexString(0xFF & digest[i]));
+        }
+    
+        char[] hexStringCharacters = hexString.toString().toCharArray();
+        String postfixOID = "";
+        
+        for( char i : hexStringCharacters)
+        {
+            int ascii = (int) i;
+            postfixOID = postfixOID + Integer.toString(ascii);
+        }
+        
+        postfixOID = calculateSegmentedOID(postfixOID);
+        return oidPrefix + "." + postfixOID;
+    }
+    
+    /**
+     * Calculate segmented OID.
+     * 
+     * @param oid the oid
+     * 
+     * @return the string
+     * 
+     * @throws Exception the exception
+     */
+    public static String calculateSegmentedOID(String oid) throws Exception
+    {
+        if (oid.length() < 10)
+        {
+            throw new Exception("The length of the oid must be greater than 9");
+        }
+        int oidLength = oid.length();
+        int numberOfPeriods  = oidLength / MAX_OID_SEGMENT_LENGTH;
+        
+        int beginIndex = 0;
+        int endIndex = MAX_OID_SEGMENT_LENGTH;
+        
+        String segmentedOID = 
+            oid.substring(beginIndex, endIndex ) + ".";
+
+        for (int i = 2; i < numberOfPeriods; i++)
+        {
+            beginIndex = (i-1) * MAX_OID_SEGMENT_LENGTH + 1;
+            endIndex = i * MAX_OID_SEGMENT_LENGTH;
+            segmentedOID +=  oid.substring( beginIndex, endIndex ) + ".";
+        }
+        int finalSegmentLength = oid.length() - (endIndex + 2);
+        
+        if ( finalSegmentLength > MAX_OID_SEGMENT_LENGTH )
+        {
+            segmentedOID += oid.substring( endIndex + 1,endIndex + 9  ) + ".";
+            segmentedOID += oid.substring( endIndex + 10, oid.length()  );
+        }
+        else
+        {
+            segmentedOID += oid.substring( endIndex + 1, oid.length()  );            
+        }
+        return segmentedOID;
+    }
+}
\ No newline at end of file

Added: directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/create/helpers/InitialContextCreatorHelper.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/create/helpers/InitialContextCreatorHelper.java?view=auto&rev=529293
==============================================================================
--- directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/create/helpers/InitialContextCreatorHelper.java (added)
+++ directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/create/helpers/InitialContextCreatorHelper.java Mon Apr 16 08:43:15 2007
@@ -0,0 +1,60 @@
+
+package org.apache.tuscany.das.ldap.create.helpers;
+
+import javax.naming.NamingException;
+import javax.naming.directory.DirContext;
+
+import org.apache.commons.lang.StringUtils;
+import org.eclipse.emf.common.util.URI;
+
+public class InitialContextCreatorHelper
+{
+    public static void capitalizeInitialContextRDN(String[] pathTokens)
+    {
+        String capitalizedRDN = 
+            StringUtils.capitalize(pathTokens[pathTokens.length-1]);
+        pathTokens[pathTokens.length-1] = capitalizedRDN;
+    }
+
+    public static DirContext createSubContext(
+        DirContext dirContext, 
+        String subContext) 
+    throws NamingException
+    {
+        try
+        {
+            dirContext = ( DirContext ) dirContext.createSubcontext( subContext );
+        }
+        catch ( NamingException e )
+        {
+            dirContext = ( DirContext ) dirContext.lookup( subContext );
+        }
+        return dirContext;
+    }
+
+    public static DirContext createAuthorityContext(
+        DirContext directoryContext, 
+        String[] authorityTokens) 
+    throws NamingException
+    {
+        for (int i = 0; i <= (authorityTokens.length-2); i++)
+        {
+            String subContext = "cn=" + authorityTokens[i];
+            directoryContext = createSubContext( directoryContext, subContext );
+        }
+        return directoryContext;
+    }
+    
+    public static DirContext createPathContext(
+        DirContext dirContext, 
+        String[] pathTokens) 
+    throws NamingException
+    {
+        for (int i = 1; i < (pathTokens.length); i++)
+        {
+            String subContext = "cn=" + pathTokens[i];
+            dirContext = createSubContext( dirContext, subContext );
+        }
+        return dirContext;
+    }
+}

Added: directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/delete/InitialContextDestroyer.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/delete/InitialContextDestroyer.java?view=auto&rev=529293
==============================================================================
--- directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/delete/InitialContextDestroyer.java (added)
+++ directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/delete/InitialContextDestroyer.java Mon Apr 16 08:43:15 2007
@@ -0,0 +1,53 @@
+
+package org.apache.tuscany.das.ldap.delete;
+
+
+import javax.naming.NamingException;
+import javax.naming.directory.DirContext;
+
+import org.apache.tuscany.das.ldap.util.JNDIUtil;
+
+/**
+ * The Class InitialContextDestroyer
+ */
+public class InitialContextDestroyer
+{
+    /**
+     * Destroys the initial naming context
+     * when the parent entries do not contain
+     * other child entries.  If the initial
+     * naming context also supports other
+     * entries, then a NamingException will
+     * be thrown.
+     * 
+     * @param directoryContext the dir context
+     * @param xsdNamespace the xml namespace of the DataObjects
+     * 
+     * @throws NamingException the naming exception
+     */
+    public static void destroy(
+        DirContext initialContext, 
+        DirContext partitionContext) throws NamingException
+    {
+        String[] initialContextComponents = 
+            JNDIUtil.calculateDNComponents( initialContext );
+        
+        String[] partitionContextComponents = 
+            JNDIUtil.calculateDNComponents( partitionContext );
+        
+        int numberOfPossibleSubcontexts = 
+            initialContextComponents.length
+            - partitionContextComponents.length;
+        
+        for (int i = 0; i < numberOfPossibleSubcontexts; i++)
+        {
+            String rdn = initialContextComponents[i];
+            
+            initialContext = JNDIUtil.getParentContext( 
+                initialContext, 
+                partitionContext );
+
+            initialContext.destroySubcontext( rdn );
+        }
+    }
+}

Added: directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/impl/LdapDASImpl.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/impl/LdapDASImpl.java?view=auto&rev=529293
==============================================================================
--- directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/impl/LdapDASImpl.java (added)
+++ directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/impl/LdapDASImpl.java Mon Apr 16 08:43:15 2007
@@ -0,0 +1,36 @@
+
+package org.apache.tuscany.das.ldap.impl;
+
+import javax.naming.directory.DirContext;
+
+import org.apache.tuscany.das.ldap.LdapDAS;
+
+import commonj.sdo.DataGraph;
+
+public class LdapDASImpl implements LdapDAS
+{
+    public void write(DirContext connection, DataGraph dataGraph)
+    {
+        // TODO Auto-generated method stub
+        //connection.
+    }
+
+    public void delete(DirContext connection, DataGraph dataGraph)
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+    public DataGraph read(DirContext connection, String parameters)
+    {
+        return null;
+        
+    }
+
+    public void update(DirContext connection, DataGraph dataGraph)
+    {
+        // TODO Auto-generated method stub
+        
+    }
+
+}

Added: directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/util/JNDIUtil.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/util/JNDIUtil.java?view=auto&rev=529293
==============================================================================
--- directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/util/JNDIUtil.java (added)
+++ directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/util/JNDIUtil.java Mon Apr 16 08:43:15 2007
@@ -0,0 +1,168 @@
+
+package org.apache.tuscany.das.ldap.util;
+
+import javax.naming.NamingException;
+import javax.naming.directory.DirContext;
+
+/**
+ * The Class JNDIUtil.
+ */
+public class JNDIUtil
+{
+    /**
+     * Calculate DN components.
+     * 
+     * @param context the context
+     * 
+     * @return the string[] containing the components of the DN
+     * 
+     * @throws NamingException the naming exception
+     */
+    public static String[] calculateDNComponents(
+        DirContext context) 
+    throws NamingException
+    {
+        String contextDN                  = 
+            context.getNameInNamespace();
+        
+        String[] initialContextComponents = 
+            contextDN.split( "[,]" );
+
+        return initialContextComponents;
+    }
+
+    
+    /**
+     * Calculate DN components.
+     * 
+     * @param contextDN the context DN
+     * 
+     * @return the string[] containing the components of the DN
+     * 
+     * @throws NamingException the naming exception
+     */
+    public static String[] calculateDNComponents(
+        String contextDN) 
+    throws NamingException
+    {
+        String[] initialContextComponents = 
+            contextDN.split( "[,]" );
+
+        return initialContextComponents;
+    }
+    
+    /**
+     * Gets the parent context.
+     * 
+     * @param partitionContext the partition context
+     * @param childContext the child context
+     * 
+     * @return the parent context (Null if the child context is the root)
+     * 
+     * @throws NamingException the naming exception
+     */
+    public static DirContext getParentContext(
+        DirContext childContext, 
+        DirContext partitionContext) 
+    throws NamingException
+    {
+        String[] childContextDNComponents = 
+            calculateDNComponents( childContext );
+        
+        String[] partitionDNComponents    = 
+            calculateDNComponents( partitionContext );
+        
+        DirContext parentContext          = null; 
+        
+        if (childContextDNComponents.length == partitionDNComponents.length)
+        {
+            return null;
+        }
+        else if ( (childContextDNComponents.length - 1) == partitionDNComponents.length)
+        {
+            return partitionContext;
+        }
+        else
+        {
+            String parentLookupDN = 
+                calculateParentRelativeDN( 
+                    childContext, partitionContext.getNameInNamespace() );
+            
+            
+            
+            parentContext = 
+                ( DirContext ) partitionContext.lookup( parentLookupDN );
+        }
+        return parentContext;
+    }
+
+    
+    /**
+     * Calculate parent relative DN.
+     * The parent relative DN is the
+     * DN of the parent context, relative
+     * to the partition context.
+     * 
+     * So if the partition context is
+     * <i>ou=system</i> and
+     * the child context has DN
+     * <i>cn=accounts, cn=users, cn=example, ou=system</i>
+     * 
+     * then the parent relative DN is
+     * <i>cn=users, cn=example</i>
+     * 
+     * @param childContext the child context
+     * @param partitionDN the partition DN
+     * 
+     * @return the string
+     * 
+     * @throws NamingException the naming exception
+     */
+    public static String calculateParentRelativeDN(
+        DirContext childContext, 
+        String partitionDN) 
+    throws NamingException
+    {
+        String parentRelativeDN           = null;
+        
+        String[] childContextDNComponents = 
+            calculateDNComponents( childContext );
+        
+        String[] partitionDNComponents    = 
+            calculateDNComponents( partitionDN );
+        
+        if (childContextDNComponents.length == 
+            partitionDNComponents.length)
+        {
+            return null;
+        }
+        else if (childContextDNComponents.length ==
+             partitionDNComponents.length + 1)
+        {
+            String childRDN            = childContextDNComponents[0];
+            String childContextDN      = childContext.getNameInNamespace();
+            
+            int beginIndex = childRDN.length() + 1;
+            int endIndex   = childContextDN.length();
+
+            parentRelativeDN = childContextDN.substring( 
+                beginIndex, endIndex );
+            
+            return parentRelativeDN;
+        }
+        else
+        {
+            String childRDN            = childContextDNComponents[0];
+            String childContextDN      = childContext.getNameInNamespace();
+            
+            int beginIndex = childRDN.length() + 1;
+            int endIndex   = 
+                childContextDN.length() - 
+                ( partitionDN.length() +1);
+            
+            parentRelativeDN = childContextDN.substring( 
+                beginIndex, endIndex );
+        }
+        return parentRelativeDN;
+    }
+}

Added: directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/util/XSDNamespaceToInitialContextTransformer.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/util/XSDNamespaceToInitialContextTransformer.java?view=auto&rev=529293
==============================================================================
--- directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/util/XSDNamespaceToInitialContextTransformer.java (added)
+++ directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/util/XSDNamespaceToInitialContextTransformer.java Mon Apr 16 08:43:15 2007
@@ -0,0 +1,49 @@
+
+package org.apache.tuscany.das.ldap.util;
+
+import org.eclipse.emf.common.util.URI;
+
+/**
+ * The Class XSDNamespaceToInitialContextTransformer.
+ * 
+ * Takes the XSD Namespace used by the DataObjects
+ * and transforms it into the DN of the initial context
+ * used for the root DataObject entry.
+ */
+public class XSDNamespaceToInitialContextTransformer
+{
+    /**
+     * Transform.
+     * 
+     * @param namespaceURIString the namespace URI string
+     * 
+     * @return the DN of the initial context
+     * 
+     * @throws Exception the exception
+     */
+    public static String transform(String namespaceURIString) throws Exception
+    {
+        URI namespaceURI = URI.createURI(namespaceURIString);
+        String authority = namespaceURI.authority();
+
+        String path      = namespaceURI.path();
+
+        String[] authorityTokens = authority.split( "[.]" );
+        String[] pathTokens      = path.split("[/]");
+        
+        String DN = new String("");
+        
+        for (int i = (pathTokens.length-1); i > 0; i--)
+        {
+            DN = DN + "cn=" + pathTokens[i] + ", ";
+        }
+
+        for (int i = 0; i <= (authorityTokens.length-2); i++)
+        {
+            DN = DN + "cn=" + authorityTokens[i] + ", ";
+        }
+        
+        DN = DN + "ou=" + authorityTokens[authorityTokens.length-1];
+        return DN;
+    }
+}

Added: directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/util/XSDNamespaceURITokenizer.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/util/XSDNamespaceURITokenizer.java?view=auto&rev=529293
==============================================================================
--- directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/util/XSDNamespaceURITokenizer.java (added)
+++ directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/util/XSDNamespaceURITokenizer.java Mon Apr 16 08:43:15 2007
@@ -0,0 +1,22 @@
+
+package org.apache.tuscany.das.ldap.util;
+
+import org.eclipse.emf.common.util.URI;
+
+public class XSDNamespaceURITokenizer
+{
+    
+    public static String[] createAuthorityTokens( URI xsdNamespace )
+    {
+        String authority = xsdNamespace.authority();
+        String[] authorityTokens = authority.split( "[.]" );
+        return authorityTokens;
+    }
+    
+    public static String[] createPathTokens(URI xsdNamespace)
+    {
+        String path              = xsdNamespace.path(); 
+        String[] pathTokens      = path.split("[/]");
+        return pathTokens;
+    }
+}

Added: directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/validate/URIValidator.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/validate/URIValidator.java?view=auto&rev=529293
==============================================================================
--- directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/validate/URIValidator.java (added)
+++ directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/main/java/org/apache/tuscany/das/ldap/validate/URIValidator.java Mon Apr 16 08:43:15 2007
@@ -0,0 +1,13 @@
+
+package org.apache.tuscany.das.ldap.validate;
+
+public class URIValidator
+{
+    public static void validateAuthority(String authority) throws Exception
+    {
+        if ( authority.contains( ":" ) )
+        {
+            throw new Exception("The authority should not contain a port number.");
+        }
+    }
+}

Added: directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/test/java/org/apache/tuscany/das/ldap/create/helper/test/InitialContextCreatorHelperTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/test/java/org/apache/tuscany/das/ldap/create/helper/test/InitialContextCreatorHelperTest.java?view=auto&rev=529293
==============================================================================
--- directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/test/java/org/apache/tuscany/das/ldap/create/helper/test/InitialContextCreatorHelperTest.java (added)
+++ directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/test/java/org/apache/tuscany/das/ldap/create/helper/test/InitialContextCreatorHelperTest.java Mon Apr 16 08:43:15 2007
@@ -0,0 +1,120 @@
+
+package org.apache.tuscany.das.ldap.create.helper.test;
+
+import javax.naming.NamingException;
+import javax.naming.directory.DirContext;
+
+import org.apache.tuscany.das.ldap.create.helpers.InitialContextCreatorHelper;
+
+import org.apache.tuscany.das.ldap.configuration.model.v100.DASLdapModelV100Factory;
+import org.apache.tuscany.das.ldap.test.TestSetup;
+import org.apache.tuscany.das.ldap.util.XSDNamespaceURITokenizer;
+
+/*
+ * Note these tests require a running instance of ApacheDS
+ */
+
+public class InitialContextCreatorHelperTest extends TestSetup
+{
+    public void setUp() throws NamingException
+    {
+        DASLdapModelV100Factory dasLdapV100Factory = 
+            DASLdapModelV100Factory.eINSTANCE;
+        jndiProperties                             = 
+            dasLdapV100Factory.createJNDIProperties();
+
+        directoryContext = jndiProperties.connect();
+    }
+
+    public void tearDown() throws NamingException
+    {
+        jndiProperties.disconnect( directoryContext );
+    }
+
+    public void testCapitalizeInitialContextRDN()
+    {
+        String[] pathTokens =  XSDNamespaceURITokenizer.createPathTokens(xsdNamespaceURI);
+        InitialContextCreatorHelper.capitalizeInitialContextRDN( pathTokens );
+        assertTrue(pathTokens[pathTokens.length -1].equals("Accounts"));
+    }
+
+    public void testCreateSubContext() throws NamingException
+    {
+        directoryContext = jndiProperties.connect();
+        
+        String name      = "cn=newContext";
+        
+        //We should be able to call multiple times without exceptions
+        InitialContextCreatorHelper.createSubContext(directoryContext, name );
+        InitialContextCreatorHelper.createSubContext(directoryContext, name );
+        
+        DirContext subContext = 
+            InitialContextCreatorHelper.createSubContext(
+                directoryContext, 
+                name );
+        
+        assertTrue(subContext instanceof DirContext);
+        assertTrue("cn=newContext,ou=system".equals(subContext.getNameInNamespace()));
+        
+        directoryContext.destroySubcontext( name );
+    }
+    
+    public void testCreateAuthorityContext() throws NamingException
+    {
+        Object authoritySubcontext = null;
+        try
+        {
+            authoritySubcontext = directoryContext.lookup("cn=example");
+        }
+        catch ( NamingException e )
+        {
+            //Good - the subcontext does not exist
+        }
+        
+        assertTrue(authoritySubcontext==null);
+  
+        String[] authorityTokens    = 
+            XSDNamespaceURITokenizer.createAuthorityTokens(xsdNamespaceURI);
+        
+        
+        InitialContextCreatorHelper.createAuthorityContext(
+                directoryContext, 
+                authorityTokens );
+        
+        
+        authoritySubcontext            =
+            ( DirContext ) directoryContext.lookup("cn=example");
+        
+        assertTrue(authoritySubcontext != null);
+        
+        directoryContext.destroySubcontext( "cn=example" );
+    }
+    
+    public void testCreatePathContext() throws NamingException
+    {
+        String[] pathTokens      =  
+            XSDNamespaceURITokenizer.createPathTokens(xsdNamespaceURI);
+        String[] authorityTokens =  
+            XSDNamespaceURITokenizer.createAuthorityTokens(xsdNamespaceURI);
+
+        DirContext authorityContext = null; 
+        authorityContext            =
+            InitialContextCreatorHelper.createAuthorityContext(
+                directoryContext, 
+                authorityTokens );
+        
+        DirContext pathContext = null;
+
+        pathContext            = 
+            InitialContextCreatorHelper.createPathContext(
+                authorityContext, 
+                pathTokens );
+        
+        assertTrue(pathContext != null );
+        
+        DirContext d = ( DirContext ) authorityContext.lookup( "cn=users" );
+        d.destroySubcontext( "cn=Accounts" );
+        authorityContext.destroySubcontext( "cn=users" );
+        directoryContext.destroySubcontext( "cn=example" );
+    }
+}

Added: directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/test/java/org/apache/tuscany/das/ldap/create/test/AttributeTypeEntryCreatorTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/test/java/org/apache/tuscany/das/ldap/create/test/AttributeTypeEntryCreatorTest.java?view=auto&rev=529293
==============================================================================
--- directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/test/java/org/apache/tuscany/das/ldap/create/test/AttributeTypeEntryCreatorTest.java (added)
+++ directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/test/java/org/apache/tuscany/das/ldap/create/test/AttributeTypeEntryCreatorTest.java Mon Apr 16 08:43:15 2007
@@ -0,0 +1,90 @@
+
+package org.apache.tuscany.das.ldap.create.test;
+
+import javax.naming.directory.Attribute;
+import javax.naming.directory.BasicAttribute;
+import javax.naming.directory.DirContext;
+import javax.naming.directory.ModificationItem;
+
+import junit.framework.TestCase;
+
+public class AttributeTypeEntryCreatorTest extends TestCase
+{
+    private static final String OID = "1.3.6.1.4.1.18060.0.4.0.0.100000";
+
+    public void testCreateSchemaEntry()
+    {
+        //Attributes ldapAttributes = new AttributesImpl();
+        ModificationItem[] modificationItems = new ModificationItem[7];
+        
+        Attribute objectClassAttribute = new BasicAttribute(
+            SystemSchemaConstants.OBJECT_CLASS_AT, 
+            "top" );
+        
+        objectClassAttribute.add( MetaSchemaConstants.META_TOP_OC );
+        objectClassAttribute.add( MetaSchemaConstants.META_SYNTAX_OC );
+        
+        Attribute oidAttribute = new BasicAttribute(
+            MetaSchemaConstants.M_OID_AT, 
+            OID);
+        
+        Attribute nameAttribute = new BasicAttribute(
+            MetaSchemaConstants.M_NAME_AT,
+            "org.tuscany.das.ldap.config.DASConfig");
+        
+        //TODO Check what this is
+        Attribute objectClassMetaTypeAttribute = new BasicAttribute(
+            MetaSchemaConstants.M_DESCRIPTION_AT, 
+            "SyntaxAddTest");
+        
+        
+        
+        modificationItems[0] = 
+            new ModificationItem(DirContext.ADD_ATTRIBUTE, objectClassAttribute);
+        
+        modificationItems[1] = 
+            new ModificationItem(
+                DirContext.ADD_ATTRIBUTE,
+                new BasicAttribute( 
+                    MetaSchemaConstants.M_NAME_AT, 
+                    "org.tuscany.das.ldap.config.DASConfig") );
+
+        
+        modificationItems[2] = 
+            new ModificationItem(
+                DirContext.ADD_ATTRIBUTE, 
+                new BasicAttribute( 
+                    MetaSchemaConstants.M_TYPE_OBJECT_CLASS_AT, 
+                    "STRUCTURAL" ) );
+
+        modificationItems[3] = 
+            new ModificationItem(
+                DirContext.ADD_ATTRIBUTE, 
+                new BasicAttribute( 
+                    MetaSchemaConstants.M_NAME_AT, 
+                    "org.tuscany.das.ldap.config.DASConfig") );
+
+        modificationItems[4] = 
+            new ModificationItem(
+                DirContext.ADD_ATTRIBUTE, 
+                new BasicAttribute( 
+                    MetaSchemaConstants.M_NAME_AT, 
+                    "org.tuscany.das.ldap.config.DASConfig") );
+
+        modificationItems[5] = 
+            new ModificationItem(
+                DirContext.ADD_ATTRIBUTE, 
+                new BasicAttribute( 
+                    MetaSchemaConstants.M_MUST_AT, 
+                    "baseDN" ) );
+
+        modificationItems[6] = 
+            new ModificationItem(
+                DirContext.ADD_ATTRIBUTE, 
+                new BasicAttribute( 
+                    MetaSchemaConstants.M_MAY_AT, 
+                    "optionalOPP" ) );
+    }
+
+
+}

Added: directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/test/java/org/apache/tuscany/das/ldap/create/test/CreateSyntaxEntryTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/test/java/org/apache/tuscany/das/ldap/create/test/CreateSyntaxEntryTest.java?view=auto&rev=529293
==============================================================================
--- directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/test/java/org/apache/tuscany/das/ldap/create/test/CreateSyntaxEntryTest.java (added)
+++ directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/test/java/org/apache/tuscany/das/ldap/create/test/CreateSyntaxEntryTest.java Mon Apr 16 08:43:15 2007
@@ -0,0 +1,155 @@
+
+package org.apache.tuscany.das.ldap.create.test;
+
+import java.util.Hashtable;
+
+import javax.naming.NamingException;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.BasicAttribute;
+import javax.naming.directory.BasicAttributes;
+import javax.naming.directory.DirContext;
+import javax.naming.directory.InitialDirContext;
+import javax.naming.directory.ModificationItem;
+
+import org.apache.tuscany.das.ldap.test.TestSetup;
+
+public class CreateSyntaxEntryTest extends TestSetup
+{
+    private static final String OID    = "1.3.6.1.4.1.18060.0.4.0.0.100000.233.1233";
+    private DirContext xsdContext      = null;
+    private DirContext syntaxesContext = null;
+    
+    private String xsdSyntaxStringRDN = MetaSchemaConstants.M_OID_AT + "=" + OID;
+    
+    
+    public void setUp() throws NamingException
+    {
+        directoryContext = connect();
+        
+        Attributes xsdAttributes = new BasicAttributes();
+
+        Attribute topAttribute = new BasicAttribute(
+            "objectClass", "top"); 
+
+        Attribute metaSchemaAttribute = new BasicAttribute(
+            "objectClass", "metaSchema");
+        
+        Attribute xsdAttribute = new BasicAttribute(
+            "cn", "xsd");
+        
+        Attribute mDependenciesAttribute = new BasicAttribute(
+            "m-dependencies", "system");
+
+        xsdAttributes.put( xsdAttribute );
+        xsdAttributes.put( topAttribute );
+        xsdAttributes.put( metaSchemaAttribute );
+        xsdAttributes.put( mDependenciesAttribute );
+        
+        xsdContext = directoryContext.createSubcontext( 
+                "cn=xsd", xsdAttributes );
+        
+        Attribute syntaxesAttribute = new BasicAttribute(
+            "ou", "syntaxes");
+
+        Attribute organizationUnitAttribute = new BasicAttribute(
+            "objectClass", "organizationalUnit");
+        
+        Attributes syntaxAttributes = new BasicAttributes();
+        syntaxAttributes.put( syntaxesAttribute );
+        syntaxAttributes.put( topAttribute );
+        syntaxAttributes.put( metaSchemaAttribute );
+        syntaxAttributes.put( organizationUnitAttribute);
+        
+        syntaxesContext = 
+           ( DirContext ) xsdContext.createSubcontext( "ou=syntaxes", syntaxAttributes );
+    }
+
+    
+    public void tearDown() throws NamingException
+    {
+        syntaxesContext.destroySubcontext(xsdSyntaxStringRDN);
+        xsdContext.destroySubcontext( "ou=syntaxes" );
+        directoryContext.destroySubcontext( "cn=xsd" );
+    }
+    
+    public void testCreateSyntaxSchemaEntry() throws NamingException
+    {
+        Attribute objectClassAttribute = new BasicAttribute(
+            SystemSchemaConstants.OBJECT_CLASS_AT, 
+            "top" );
+        
+        objectClassAttribute.add( MetaSchemaConstants.META_TOP_OC );
+        objectClassAttribute.add( MetaSchemaConstants.META_SYNTAX_OC );
+        
+        Attribute oidAttribute = new BasicAttribute(
+            MetaSchemaConstants.M_OID_AT, 
+            OID);
+        
+        Attribute descriptionAttribute = new BasicAttribute(
+            MetaSchemaConstants.M_DESCRIPTION_AT, 
+            "xsd:String");
+        
+        Attributes attributes = new BasicAttributes();
+        
+        attributes.put( objectClassAttribute );
+        attributes.put( oidAttribute );
+        attributes.put( descriptionAttribute );
+
+        syntaxesContext.createSubcontext( xsdSyntaxStringRDN, attributes );
+    }
+
+    public DirContext connect() throws NamingException
+    {
+                Hashtable<String,String> env = new Hashtable<String, String>();
+                
+                env.put( 
+                    "java.naming.factory.initial", 
+                    "com.sun.jndi.ldap.LdapCtxFactory" );
+                env.put( 
+                    "java.naming.provider.url", 
+                    "ldap://localhost:10389/ou=schema");
+                env.put( 
+                    "java.naming.security.authentication", 
+                    "simple");
+                env.put( 
+                    "java.naming.security.principal", 
+                    "uid=admin,ou=system" );
+                env.put( 
+                   "java.naming.security.credentials", 
+                   "secret" );
+                
+                return new InitialDirContext(env);
+    }
+
+    public void updateModificationTemp()
+    {
+        Attribute objectClassAttribute = new BasicAttribute(
+            SystemSchemaConstants.OBJECT_CLASS_AT, 
+            "top" );
+        
+        objectClassAttribute.add( MetaSchemaConstants.META_TOP_OC );
+        objectClassAttribute.add( MetaSchemaConstants.META_SYNTAX_OC );
+        
+        Attribute oidAttribute = new BasicAttribute(
+            MetaSchemaConstants.M_OID_AT, 
+            OID);
+        
+        Attribute descriptionAttribute = new BasicAttribute(
+            MetaSchemaConstants.M_DESCRIPTION_AT, 
+            "xsd:String");
+
+        ModificationItem[] modificationItems = new ModificationItem[3];
+        
+        modificationItems[0] = 
+            new ModificationItem(DirContext.ADD_ATTRIBUTE, objectClassAttribute);
+
+        modificationItems[1] = 
+            new ModificationItem(
+                DirContext.ADD_ATTRIBUTE, oidAttribute );
+
+        modificationItems[2] = 
+            new ModificationItem(
+                DirContext.ADD_ATTRIBUTE, descriptionAttribute );
+    }
+}

Added: directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/test/java/org/apache/tuscany/das/ldap/create/test/InitialContextCreatorTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/test/java/org/apache/tuscany/das/ldap/create/test/InitialContextCreatorTest.java?view=auto&rev=529293
==============================================================================
--- directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/test/java/org/apache/tuscany/das/ldap/create/test/InitialContextCreatorTest.java (added)
+++ directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/test/java/org/apache/tuscany/das/ldap/create/test/InitialContextCreatorTest.java Mon Apr 16 08:43:15 2007
@@ -0,0 +1,42 @@
+package org.apache.tuscany.das.ldap.create.test;
+
+import javax.naming.NamingException;
+import javax.naming.directory.DirContext;
+
+import org.apache.tuscany.das.ldap.create.InitialContextCreator;
+import org.apache.tuscany.das.ldap.test.TestSetup;
+
+public class InitialContextCreatorTest extends TestSetup
+{
+    public void testCreate() throws NamingException
+    {
+        DirContext exampleContext = directoryContext;
+        DirContext usersContext = null;
+        DirContext accountsContext = null;
+        
+        try 
+        {
+            exampleContext = ( DirContext ) directoryContext.lookup( "cn=example" );            
+        }
+        catch(Exception e)
+        {
+            exampleContext = null;
+        }
+
+        assertTrue(exampleContext == null);
+        
+        InitialContextCreator.create( xsdNamespace, directoryContext );
+        
+        exampleContext  = ( DirContext ) directoryContext.lookup( "cn=example" );
+        usersContext    = ( DirContext ) exampleContext.lookup( "cn=users" );
+        accountsContext = ( DirContext ) usersContext.lookup( "cn=Accounts" );
+        
+        assertTrue(exampleContext !=null);
+        assertTrue(usersContext !=null);
+        assertTrue(accountsContext !=null);
+        
+        usersContext.destroySubcontext( "cn=Accounts" );
+        exampleContext.destroySubcontext( "cn=users" );
+        directoryContext.destroySubcontext( "cn=example" );
+    }
+}

Added: directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/test/java/org/apache/tuscany/das/ldap/create/test/MetaSchemaConstants.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/test/java/org/apache/tuscany/das/ldap/create/test/MetaSchemaConstants.java?view=auto&rev=529293
==============================================================================
--- directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/test/java/org/apache/tuscany/das/ldap/create/test/MetaSchemaConstants.java (added)
+++ directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/test/java/org/apache/tuscany/das/ldap/create/test/MetaSchemaConstants.java Mon Apr 16 08:43:15 2007
@@ -0,0 +1,79 @@
+/*
+ *   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 org.apache.tuscany.das.ldap.create.test;
+
+
+/**
+ * Apache meta schema specific constants used throughout the server.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public interface MetaSchemaConstants
+{
+    String SCHEMA_NAME = "apachemeta";
+
+    // -- objectClass names --
+    
+    String META_TOP_OC = "metaTop";
+    String META_SCHEMA_OC = "metaSchema";
+    String META_OBJECT_CLASS_OC = "metaObjectClass";
+    String META_ATTRIBUTE_TYPE_OC = "metaAttributeType";
+    String META_MATCHING_RULE_OC = "metaMatchingRule";
+    String META_NORMALIZER_OC = "metaNormalizer";
+    String META_SYNTAX_OC = "metaSyntax";
+    String META_SYNTAX_CHECKER_OC = "metaSyntaxChecker";
+    String META_COMPARATOR_OC = "metaComparator";
+    String META_NAME_FORM_OC = "metaNameForm";
+    String META_DIT_CONTENT_RULE_OC = "metaDITContentRule";
+
+    // -- attributeType names --
+    
+    String M_SUP_OBJECT_CLASS_AT = "m-supObjectClass";
+    String M_BYTECODE_AT = "m-bytecode";
+    String M_FQCN_AT = "m-fqcn";
+    String M_DEPENDENCIES_AT = "m-dependencies";
+    String M_DISABLED_AT = "m-disabled";
+    String M_DESCRIPTION_AT = "m-description";
+    String M_OBSOLETE_AT = "m-obsolete";
+    String M_NAME_AT = "m-name";
+    String M_OID_AT = "m-oid";
+    String M_OC_AT = "m-oc";
+    String M_AUX_AT = "m-aux";
+    String M_USAGE_AT = "m-usage";
+    String M_NO_USER_MODIFICATION_AT = "m-noUserModification";
+    String M_SINGLE_VALUE_AT = "m-singleValue";
+    String M_COLLECTIVE_AT = "m-collective";
+    String M_SUBSTR_AT = "m-substr";
+    String M_SUP_ATTRIBUTE_TYPE_AT = "m-supAttributeType";
+    String M_ORDERING_AT = "m-ordering";
+    String M_EQUALITY_AT = "m-equality";
+    String M_SYNTAX_AT = "m-syntax";
+    String M_MUST_AT = "m-must";
+    String M_MAY_AT = "m-may";
+    String M_TYPE_OBJECT_CLASS_AT = "m-typeObjectClass";
+    String X_HUMAN_READIBLE_AT = "x-humanReadible";
+    
+    // -- schema extensions & values --
+    
+    String X_SCHEMA = "X-SCHEMA";
+    String X_IS_HUMAN_READABLE = "X-IS-HUMAN-READABLE";
+    String SCHEMA_OTHER = "other";
+}

Added: directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/test/java/org/apache/tuscany/das/ldap/create/test/SystemSchemaConstants.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/test/java/org/apache/tuscany/das/ldap/create/test/SystemSchemaConstants.java?view=auto&rev=529293
==============================================================================
--- directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/test/java/org/apache/tuscany/das/ldap/create/test/SystemSchemaConstants.java (added)
+++ directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/test/java/org/apache/tuscany/das/ldap/create/test/SystemSchemaConstants.java Mon Apr 16 08:43:15 2007
@@ -0,0 +1,48 @@
+/*
+ *   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 org.apache.tuscany.das.ldap.create.test;
+
+
+/**
+ * Constants for the System schema.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public interface SystemSchemaConstants
+{
+    String SCHEMA_NAME = "system";
+
+    String CN_AT = "cn";
+    String OBJECT_CLASS_AT = "objectClass";
+    String CREATORS_NAME_AT = "creatorsName";
+    String CREATE_TIMESTAMP_AT = "createTimestamp";
+    String MODIFY_TIMESTAMP_AT = "modifyTimestamp";
+    String MODIFIERS_NAME_AT = "modifiersName";
+
+    String LDAP_SYNTAXES_AT = "ldapSyntaxes";
+    String MATCHING_RULES_AT = "matchingRules";
+    String ATTRIBUTE_TYPES_AT = "attributeTypes";
+    String OBJECT_CLASSES_AT = "objectClasses";
+    String MATCHING_RULE_USE_AT = "matchingRuleUse";
+    String DIT_STRUCTURE_RULES_AT = "ditStructureRules";
+    String DIT_CONTENT_RULES_AT = "ditContentRules";
+    String NAME_FORMS_AT = "nameForms";
+}

Added: directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/test/java/org/apache/tuscany/das/ldap/create/test/UniqueOIDCreatorTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/test/java/org/apache/tuscany/das/ldap/create/test/UniqueOIDCreatorTest.java?view=auto&rev=529293
==============================================================================
--- directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/test/java/org/apache/tuscany/das/ldap/create/test/UniqueOIDCreatorTest.java (added)
+++ directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/test/java/org/apache/tuscany/das/ldap/create/test/UniqueOIDCreatorTest.java Mon Apr 16 08:43:15 2007
@@ -0,0 +1,36 @@
+package org.apache.tuscany.das.ldap.create.test;
+
+import org.apache.tuscany.das.ldap.create.UniqueOIDCreator;
+
+import junit.framework.TestCase;
+
+public class UniqueOIDCreatorTest extends TestCase
+{
+    public void testCalculateSegmentedOID() throws Exception
+    {
+        String input1 = "56102578";
+        String input2 = "5610257834";
+
+        String result = "will not pass if exception not caught";
+        try {
+            result = UniqueOIDCreator.calculateSegmentedOID( input1 );            
+        }
+        catch (Exception e)
+        {
+            result = "passed";
+        }
+        assertEquals(result, "passed");
+        
+        
+        result = UniqueOIDCreator.calculateSegmentedOID( input2 );
+        assertEquals(result, "56102578.4");
+    }
+    
+    public void testCreate() throws Exception
+    {
+        String input  = "org.apache.tuscany.das.ldap.DASConfig";
+        String prefix = "11.22.33";
+        String result = UniqueOIDCreator.create( prefix, input );
+        assertEquals(result, "11.22.33.56102575.5010254.0054102.7101555.1015550.0251100.1995255.7100995.1029754.2499754.81015650");
+    }
+}

Added: directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/test/java/org/apache/tuscany/das/ldap/delete/test/InitialContextDestroyerTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/test/java/org/apache/tuscany/das/ldap/delete/test/InitialContextDestroyerTest.java?view=auto&rev=529293
==============================================================================
--- directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/test/java/org/apache/tuscany/das/ldap/delete/test/InitialContextDestroyerTest.java (added)
+++ directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/test/java/org/apache/tuscany/das/ldap/delete/test/InitialContextDestroyerTest.java Mon Apr 16 08:43:15 2007
@@ -0,0 +1,41 @@
+
+package org.apache.tuscany.das.ldap.delete.test;
+
+import javax.naming.NamingException;
+import javax.naming.directory.DirContext;
+
+import org.apache.tuscany.das.ldap.delete.InitialContextDestroyer;
+import org.apache.tuscany.das.ldap.test.TestSetup;
+
+public class InitialContextDestroyerTest extends TestSetup
+{
+    DirContext test1Context = null;
+    DirContext test2Context = null;
+    DirContext test3Context = null;
+    
+
+    
+    public void testDestroy() throws NamingException
+    {
+        test1Context = ( DirContext ) directoryContext.createSubcontext( "cn=test1" );
+        test2Context = ( DirContext ) test1Context.createSubcontext( "cn=test2" );
+        test3Context = ( DirContext ) test2Context.createSubcontext( "cn=test3" );
+        
+        Object test = null; 
+        test = directoryContext.lookup( "cn=test1" );
+        assertNotNull(test);
+        
+        InitialContextDestroyer.destroy(test3Context, directoryContext);
+        
+        try 
+        {
+            test = directoryContext.lookup( "cn=test1" );
+        }
+        catch (Exception e)
+        {
+            test = "caught";
+        }
+        
+        assertSame("caught", test);
+    }
+}

Added: directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/test/java/org/apache/tuscany/das/ldap/test/TestSetup.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/test/java/org/apache/tuscany/das/ldap/test/TestSetup.java?view=auto&rev=529293
==============================================================================
--- directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/test/java/org/apache/tuscany/das/ldap/test/TestSetup.java (added)
+++ directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/test/java/org/apache/tuscany/das/ldap/test/TestSetup.java Mon Apr 16 08:43:15 2007
@@ -0,0 +1,36 @@
+
+package org.apache.tuscany.das.ldap.test;
+
+import javax.naming.NamingException;
+import javax.naming.directory.DirContext;
+
+import org.apache.tuscany.das.ldap.configuration.model.v100.DASLdapModelV100Factory;
+import org.apache.tuscany.das.ldap.configuration.model.v100.JNDIProperties;
+import org.eclipse.emf.common.util.URI;
+
+import junit.framework.TestCase;
+
+public abstract class TestSetup extends TestCase
+{
+    protected String xsdNamespace = "http://example.system/users/accounts";
+    protected URI xsdNamespaceURI = URI.createURI( xsdNamespace );
+    
+    protected DirContext directoryContext = null;
+    protected JNDIProperties jndiProperties = null;
+
+    public void setUp() throws NamingException
+    {
+        DASLdapModelV100Factory dasLdapV100Factory = 
+            DASLdapModelV100Factory.eINSTANCE;
+    
+        jndiProperties                             = 
+            dasLdapV100Factory.createJNDIProperties();
+
+        directoryContext = jndiProperties.connect();
+    }
+
+    public void tearDown() throws NamingException
+    {
+        jndiProperties.disconnect( directoryContext );
+    }
+}

Added: directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/test/java/org/apache/tuscany/das/ldap/util/test/JNDIUtilTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/test/java/org/apache/tuscany/das/ldap/util/test/JNDIUtilTest.java?view=auto&rev=529293
==============================================================================
--- directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/test/java/org/apache/tuscany/das/ldap/util/test/JNDIUtilTest.java (added)
+++ directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/test/java/org/apache/tuscany/das/ldap/util/test/JNDIUtilTest.java Mon Apr 16 08:43:15 2007
@@ -0,0 +1,89 @@
+package org.apache.tuscany.das.ldap.util.test;
+
+import javax.naming.NamingException;
+import javax.naming.directory.DirContext;
+
+import org.apache.tuscany.das.ldap.test.TestSetup;
+import org.apache.tuscany.das.ldap.util.JNDIUtil;
+
+/*
+ * Note that these tests rely on the ADS Partition
+ * ou=system, which is also the directoryContext
+ * that the tests start with.
+ */
+public class JNDIUtilTest extends TestSetup
+{
+    DirContext test1Context = null;
+    DirContext test2Context = null;
+    DirContext test3Context = null;
+    
+    public void setUp() throws NamingException
+    {
+        super.setUp();
+        test1Context = ( DirContext ) directoryContext.createSubcontext( "cn=test1" );
+        test2Context = ( DirContext ) test1Context.createSubcontext( "cn=test2" );
+        test3Context = ( DirContext ) test2Context.createSubcontext( "cn=test3" );
+    }
+    
+    public void tearDown() throws NamingException
+    {   
+        test2Context.destroySubcontext( "cn=test3" );
+        test1Context.destroySubcontext("cn=test2");
+        directoryContext.destroySubcontext("cn=test1");
+        super.tearDown();
+    }
+
+    public void testCalculateParentRelativeDN() throws NamingException
+    {
+        String partitionDN = "ou=system";
+        
+        String testA = 
+            JNDIUtil.calculateParentRelativeDN( 
+                test2Context, partitionDN );
+        
+        String testB = 
+            JNDIUtil.calculateParentRelativeDN( 
+                test3Context, partitionDN );
+        
+        String testC = 
+            JNDIUtil.calculateParentRelativeDN( test1Context, partitionDN );
+        
+        assertTrue(testA.equals( "cn=test1" ));
+        assertTrue(testB.equals( "cn=test2,cn=test1" ));
+        assertTrue(testC.equals( "ou=system" ));
+
+    }
+    
+    public void testCalculateDNComponents() throws NamingException
+    {
+        String[] contextComponents = JNDIUtil.calculateDNComponents(  test3Context );
+        assertTrue(contextComponents.length==4);
+        
+        contextComponents = null;
+        
+        contextComponents = JNDIUtil.calculateDNComponents(  test3Context.getNameInNamespace() );
+        assertTrue(contextComponents.length==4);
+    }
+    
+    public void testGetParentContext() throws NamingException
+    {
+        DirContext parentContext = 
+            JNDIUtil.getParentContext( test3Context, directoryContext );
+        
+        assertTrue(
+            parentContext.getNameInNamespace().
+            equals("cn=test2,cn=test1,ou=system"));
+        
+        parentContext = 
+            JNDIUtil.getParentContext( test1Context, directoryContext );
+        
+        assertTrue(
+            parentContext.getNameInNamespace().
+            equals("ou=system"));
+
+        parentContext = 
+            JNDIUtil.getParentContext( directoryContext, directoryContext );
+        
+        assertTrue(null == parentContext);
+    }
+}

Added: directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/test/java/org/apache/tuscany/das/ldap/util/test/XSDNamespaceURITokenizerTest.java
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/test/java/org/apache/tuscany/das/ldap/util/test/XSDNamespaceURITokenizerTest.java?view=auto&rev=529293
==============================================================================
--- directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/test/java/org/apache/tuscany/das/ldap/util/test/XSDNamespaceURITokenizerTest.java (added)
+++ directory/sandbox/oersoy/das.ldap.parent/das.ldap/src/test/java/org/apache/tuscany/das/ldap/util/test/XSDNamespaceURITokenizerTest.java Mon Apr 16 08:43:15 2007
@@ -0,0 +1,28 @@
+
+package org.apache.tuscany.das.ldap.util.test;
+
+import org.apache.tuscany.das.ldap.test.TestSetup;
+import org.apache.tuscany.das.ldap.util.XSDNamespaceURITokenizer;
+
+public class XSDNamespaceURITokenizerTest extends TestSetup
+{
+    public void testCreateAuthorityTokens()
+    {
+        String[] authorityTokens =
+            XSDNamespaceURITokenizer.createAuthorityTokens(xsdNamespaceURI);
+        
+        assertTrue(authorityTokens[0].equals( "example"));
+        assertTrue(authorityTokens[1].equals("system"));
+        assertTrue(authorityTokens.length == 2);
+    }
+
+    public void testCreatePathTokens()
+    {
+        String[] pathTokens =  XSDNamespaceURITokenizer.createPathTokens(xsdNamespaceURI);
+        
+        assertTrue(pathTokens[1].equals("users"));
+        assertTrue(pathTokens[2].equals("accounts"));
+        assertTrue(pathTokens.length == 3);
+    }
+
+}

Added: directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/classes/org/apache/tuscany/das/ldap/LdapDAS.class
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/classes/org/apache/tuscany/das/ldap/LdapDAS.class?view=auto&rev=529293
==============================================================================
Binary file - no diff available.

Propchange: directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/classes/org/apache/tuscany/das/ldap/LdapDAS.class
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/classes/org/apache/tuscany/das/ldap/create/InitialContextCreator.class
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/classes/org/apache/tuscany/das/ldap/create/InitialContextCreator.class?view=auto&rev=529293
==============================================================================
Binary file - no diff available.

Propchange: directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/classes/org/apache/tuscany/das/ldap/create/InitialContextCreator.class
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/classes/org/apache/tuscany/das/ldap/create/UniqueOIDCreator.class
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/classes/org/apache/tuscany/das/ldap/create/UniqueOIDCreator.class?view=auto&rev=529293
==============================================================================
Binary file - no diff available.

Propchange: directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/classes/org/apache/tuscany/das/ldap/create/UniqueOIDCreator.class
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/classes/org/apache/tuscany/das/ldap/create/helpers/InitialContextCreatorHelper.class
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/classes/org/apache/tuscany/das/ldap/create/helpers/InitialContextCreatorHelper.class?view=auto&rev=529293
==============================================================================
Binary file - no diff available.

Propchange: directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/classes/org/apache/tuscany/das/ldap/create/helpers/InitialContextCreatorHelper.class
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/classes/org/apache/tuscany/das/ldap/delete/InitialContextDestroyer.class
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/classes/org/apache/tuscany/das/ldap/delete/InitialContextDestroyer.class?view=auto&rev=529293
==============================================================================
Binary file - no diff available.

Propchange: directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/classes/org/apache/tuscany/das/ldap/delete/InitialContextDestroyer.class
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/classes/org/apache/tuscany/das/ldap/impl/LdapDASImpl.class
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/classes/org/apache/tuscany/das/ldap/impl/LdapDASImpl.class?view=auto&rev=529293
==============================================================================
Binary file - no diff available.

Propchange: directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/classes/org/apache/tuscany/das/ldap/impl/LdapDASImpl.class
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/classes/org/apache/tuscany/das/ldap/util/JNDIUtil.class
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/classes/org/apache/tuscany/das/ldap/util/JNDIUtil.class?view=auto&rev=529293
==============================================================================
Binary file - no diff available.

Propchange: directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/classes/org/apache/tuscany/das/ldap/util/JNDIUtil.class
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/classes/org/apache/tuscany/das/ldap/util/XSDNamespaceToInitialContextTransformer.class
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/classes/org/apache/tuscany/das/ldap/util/XSDNamespaceToInitialContextTransformer.class?view=auto&rev=529293
==============================================================================
Binary file - no diff available.

Propchange: directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/classes/org/apache/tuscany/das/ldap/util/XSDNamespaceToInitialContextTransformer.class
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/classes/org/apache/tuscany/das/ldap/util/XSDNamespaceURITokenizer.class
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/classes/org/apache/tuscany/das/ldap/util/XSDNamespaceURITokenizer.class?view=auto&rev=529293
==============================================================================
Binary file - no diff available.

Propchange: directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/classes/org/apache/tuscany/das/ldap/util/XSDNamespaceURITokenizer.class
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/classes/org/apache/tuscany/das/ldap/validate/URIValidator.class
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/classes/org/apache/tuscany/das/ldap/validate/URIValidator.class?view=auto&rev=529293
==============================================================================
Binary file - no diff available.

Propchange: directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/classes/org/apache/tuscany/das/ldap/validate/URIValidator.class
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/das.ldap-1.0-SNAPSHOT.jar
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/das.ldap-1.0-SNAPSHOT.jar?view=auto&rev=529293
==============================================================================
Binary file - no diff available.

Propchange: directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/das.ldap-1.0-SNAPSHOT.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/surefire-reports/TEST-org.apache.tuscany.das.ldap.create.helper.test.InitialContextCreatorHelperTest.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/surefire-reports/TEST-org.apache.tuscany.das.ldap.create.helper.test.InitialContextCreatorHelperTest.xml?view=auto&rev=529293
==============================================================================
--- directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/surefire-reports/TEST-org.apache.tuscany.das.ldap.create.helper.test.InitialContextCreatorHelperTest.xml (added)
+++ directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/surefire-reports/TEST-org.apache.tuscany.das.ldap.create.helper.test.InitialContextCreatorHelperTest.xml Mon Apr 16 08:43:15 2007
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<testsuite failures="0" time="0.381" errors="0" skipped="0" tests="6" name="org.apache.tuscany.das.ldap.create.helper.test.InitialContextCreatorHelperTest">
+  <properties>
+    <property name="java.runtime.name" value="Java(TM) SE Runtime Environment"/>
+    <property name="sun.boot.library.path" value="/usr/java/jdk1.6.0/jre/lib/i386"/>
+    <property name="java.vm.version" value="1.6.0-b105"/>
+    <property name="java.vm.vendor" value="Sun Microsystems Inc."/>
+    <property name="java.vendor.url" value="http://java.sun.com/"/>
+    <property name="path.separator" value=":"/>
+    <property name="java.vm.name" value="Java HotSpot(TM) Client VM"/>
+    <property name="file.encoding.pkg" value="sun.io"/>
+    <property name="user.country" value="US"/>
+    <property name="sun.java.launcher" value="SUN_STANDARD"/>
+    <property name="sun.os.patch.level" value="unknown"/>
+    <property name="java.vm.specification.name" value="Java Virtual Machine Specification"/>
+    <property name="user.dir" value="/home/ole/workspace/das.ldap.parent/das.ldap"/>
+    <property name="java.runtime.version" value="1.6.0-b105"/>
+    <property name="java.awt.graphicsenv" value="sun.awt.X11GraphicsEnvironment"/>
+    <property name="basedir" value="/home/ole/workspace/das.ldap.parent/das.ldap"/>
+    <property name="java.endorsed.dirs" value="/usr/java/jdk1.6.0/jre/lib/endorsed"/>
+    <property name="os.arch" value="i386"/>
+    <property name="java.io.tmpdir" value="/tmp"/>
+    <property name="line.separator" value="
+"/>
+    <property name="java.vm.specification.vendor" value="Sun Microsystems Inc."/>
+    <property name="os.name" value="Linux"/>
+    <property name="sun.jnu.encoding" value="UTF-8"/>
+    <property name="java.library.path" value="/usr/java/jdk1.6.0/jre/lib/i386/client:/usr/java/jdk1.6.0/jre/lib/i386:/usr/java/jdk1.6.0/jre/../lib/i386:/usr/java/packages/lib/i386:/lib:/usr/lib"/>
+    <property name="java.specification.name" value="Java Platform API Specification"/>
+    <property name="java.class.version" value="50.0"/>
+    <property name="sun.management.compiler" value="HotSpot Client Compiler"/>
+    <property name="os.version" value="2.6.20-1.2933.fc6"/>
+    <property name="user.home" value="/home/ole"/>
+    <property name="user.timezone" value="America/Chicago"/>
+    <property name="java.awt.printerjob" value="sun.print.PSPrinterJob"/>
+    <property name="file.encoding" value="UTF-8"/>
+    <property name="java.specification.version" value="1.6"/>
+    <property name="user.name" value="ole"/>
+    <property name="java.class.path" value="/home/ole/.m2/repository/org/apache/maven/surefire/surefire-api/2.0/surefire-api-2.0.jar:/home/ole/.m2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar:/home/ole/.m2/repository/org/apache/maven/surefire/surefire-booter/2.0/surefire-booter-2.0.jar"/>
+    <property name="java.vm.specification.version" value="1.0"/>
+    <property name="sun.arch.data.model" value="32"/>
+    <property name="java.home" value="/usr/java/jdk1.6.0/jre"/>
+    <property name="java.specification.vendor" value="Sun Microsystems Inc."/>
+    <property name="user.language" value="en"/>
+    <property name="java.vm.info" value="mixed mode, sharing"/>
+    <property name="java.version" value="1.6.0"/>
+    <property name="java.ext.dirs" value="/usr/java/jdk1.6.0/jre/lib/ext:/usr/java/packages/lib/ext"/>
+    <property name="sun.boot.class.path" value="/usr/java/jdk1.6.0/jre/lib/resources.jar:/usr/java/jdk1.6.0/jre/lib/rt.jar:/usr/java/jdk1.6.0/jre/lib/sunrsasign.jar:/usr/java/jdk1.6.0/jre/lib/jsse.jar:/usr/java/jdk1.6.0/jre/lib/jce.jar:/usr/java/jdk1.6.0/jre/lib/charsets.jar:/usr/java/jdk1.6.0/jre/classes"/>
+    <property name="java.vendor" value="Sun Microsystems Inc."/>
+    <property name="localRepository" value="/home/ole/.m2/repository"/>
+    <property name="file.separator" value="/"/>
+    <property name="java.vendor.url.bug" value="http://java.sun.com/cgi-bin/bugreport.cgi"/>
+    <property name="sun.cpu.endian" value="little"/>
+    <property name="sun.io.unicode.encoding" value="UnicodeLittle"/>
+    <property name="sun.cpu.isalist" value=""/>
+  </properties>
+  <testcase time="0.151" name="testCreateAuthorityTokens"/>
+  <testcase time="0.006" name="testCreatePathTokens"/>
+  <testcase time="0.016" name="testCapitalizeInitialContextRDN"/>
+  <testcase time="0.045" name="testCreateSubContext"/>
+  <testcase time="0.006" name="testCreatePathContext"/>
+  <testcase time="0.01" name="testCreateAuthorityContext"/>
+</testsuite>
\ No newline at end of file

Added: directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/surefire-reports/org.apache.tuscany.das.ldap.create.helper.test.InitialContextCreatorHelperTest.txt
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/surefire-reports/org.apache.tuscany.das.ldap.create.helper.test.InitialContextCreatorHelperTest.txt?view=auto&rev=529293
==============================================================================
--- directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/surefire-reports/org.apache.tuscany.das.ldap.create.helper.test.InitialContextCreatorHelperTest.txt (added)
+++ directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/surefire-reports/org.apache.tuscany.das.ldap.create.helper.test.InitialContextCreatorHelperTest.txt Mon Apr 16 08:43:15 2007
@@ -0,0 +1,4 @@
+-------------------------------------------------------------------------------
+Test set: org.apache.tuscany.das.ldap.create.helper.test.InitialContextCreatorHelperTest
+-------------------------------------------------------------------------------
+Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.394 sec

Added: directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/test-classes/org/apache/tuscany/das/ldap/create/helper/test/InitialContextCreatorHelperTest.class
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/test-classes/org/apache/tuscany/das/ldap/create/helper/test/InitialContextCreatorHelperTest.class?view=auto&rev=529293
==============================================================================
Binary file - no diff available.

Propchange: directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/test-classes/org/apache/tuscany/das/ldap/create/helper/test/InitialContextCreatorHelperTest.class
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/test-classes/org/apache/tuscany/das/ldap/create/test/AttributeTypeEntryCreatorTest.class
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/test-classes/org/apache/tuscany/das/ldap/create/test/AttributeTypeEntryCreatorTest.class?view=auto&rev=529293
==============================================================================
Binary file - no diff available.

Propchange: directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/test-classes/org/apache/tuscany/das/ldap/create/test/AttributeTypeEntryCreatorTest.class
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/test-classes/org/apache/tuscany/das/ldap/create/test/CreateSyntaxEntryTest.class
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/test-classes/org/apache/tuscany/das/ldap/create/test/CreateSyntaxEntryTest.class?view=auto&rev=529293
==============================================================================
Binary file - no diff available.

Propchange: directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/test-classes/org/apache/tuscany/das/ldap/create/test/CreateSyntaxEntryTest.class
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/test-classes/org/apache/tuscany/das/ldap/create/test/InitialContextCreatorTest.class
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/test-classes/org/apache/tuscany/das/ldap/create/test/InitialContextCreatorTest.class?view=auto&rev=529293
==============================================================================
Binary file - no diff available.

Propchange: directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/test-classes/org/apache/tuscany/das/ldap/create/test/InitialContextCreatorTest.class
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/test-classes/org/apache/tuscany/das/ldap/create/test/MetaSchemaConstants.class
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/test-classes/org/apache/tuscany/das/ldap/create/test/MetaSchemaConstants.class?view=auto&rev=529293
==============================================================================
Binary file - no diff available.

Propchange: directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/test-classes/org/apache/tuscany/das/ldap/create/test/MetaSchemaConstants.class
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/test-classes/org/apache/tuscany/das/ldap/create/test/SystemSchemaConstants.class
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/test-classes/org/apache/tuscany/das/ldap/create/test/SystemSchemaConstants.class?view=auto&rev=529293
==============================================================================
Binary file - no diff available.

Propchange: directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/test-classes/org/apache/tuscany/das/ldap/create/test/SystemSchemaConstants.class
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/test-classes/org/apache/tuscany/das/ldap/create/test/UniqueOIDCreatorTest.class
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/test-classes/org/apache/tuscany/das/ldap/create/test/UniqueOIDCreatorTest.class?view=auto&rev=529293
==============================================================================
Binary file - no diff available.

Propchange: directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/test-classes/org/apache/tuscany/das/ldap/create/test/UniqueOIDCreatorTest.class
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/test-classes/org/apache/tuscany/das/ldap/delete/test/InitialContextDestroyerTest.class
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/test-classes/org/apache/tuscany/das/ldap/delete/test/InitialContextDestroyerTest.class?view=auto&rev=529293
==============================================================================
Binary file - no diff available.

Propchange: directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/test-classes/org/apache/tuscany/das/ldap/delete/test/InitialContextDestroyerTest.class
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/test-classes/org/apache/tuscany/das/ldap/test/TestSetup.class
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/test-classes/org/apache/tuscany/das/ldap/test/TestSetup.class?view=auto&rev=529293
==============================================================================
Binary file - no diff available.

Propchange: directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/test-classes/org/apache/tuscany/das/ldap/test/TestSetup.class
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/test-classes/org/apache/tuscany/das/ldap/util/test/JNDIUtilTest.class
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/test-classes/org/apache/tuscany/das/ldap/util/test/JNDIUtilTest.class?view=auto&rev=529293
==============================================================================
Binary file - no diff available.

Propchange: directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/test-classes/org/apache/tuscany/das/ldap/util/test/JNDIUtilTest.class
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/test-classes/org/apache/tuscany/das/ldap/util/test/XSDNamespaceURITokenizerTest.class
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/test-classes/org/apache/tuscany/das/ldap/util/test/XSDNamespaceURITokenizerTest.class?view=auto&rev=529293
==============================================================================
Binary file - no diff available.

Propchange: directory/sandbox/oersoy/das.ldap.parent/das.ldap/target/test-classes/org/apache/tuscany/das/ldap/util/test/XSDNamespaceURITokenizerTest.class
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/sandbox/oersoy/das.ldap.parent/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/oersoy/das.ldap.parent/pom.xml?view=auto&rev=529293
==============================================================================
--- directory/sandbox/oersoy/das.ldap.parent/pom.xml (added)
+++ directory/sandbox/oersoy/das.ldap.parent/pom.xml Mon Apr 16 08:43:15 2007
@@ -0,0 +1,265 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>org.apache.tuscany</groupId>
+	<artifactId>das.ldap.parent</artifactId>
+	<packaging>pom</packaging>
+	<version>1.0-SNAPSHOT</version>
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<configuration>
+					<source>1.5</source>
+					<target>1.5</target>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+	<dependencyManagement>
+		<dependencies>
+
+			<dependency>
+				<groupId>junit</groupId>
+				<artifactId>junit</artifactId>
+				<version>3.8.1</version>
+				<scope>test</scope>
+			</dependency>
+
+
+			<dependency>
+				<groupId>org.eclipse.emf</groupId>
+				<artifactId>ant</artifactId>
+				<version>2.3.0-M4</version>
+			</dependency>
+
+			<dependency>
+				<groupId>org.eclipse.emf</groupId>
+				<artifactId>codegen</artifactId>
+				<version>2.3.0-M4</version>
+			</dependency>
+
+			<dependency>
+				<groupId>org.eclipse.emf</groupId>
+				<artifactId>codegen-ecore</artifactId>
+				<version>2.3.0-M4</version>
+			</dependency>
+
+			<dependency>
+				<groupId>org.eclipse.emf</groupId>
+				<artifactId>codegen-ecore-ui</artifactId>
+				<version>2.3.0-M4</version>
+			</dependency>
+
+			<dependency>
+				<groupId>org.eclipse.emf</groupId>
+				<artifactId>codegen-ui</artifactId>
+				<version>2.3.0-M4</version>
+			</dependency>
+
+			<dependency>
+				<groupId>org.eclipse.emf</groupId>
+				<artifactId>common</artifactId>
+				<version>2.3.0-M4</version>
+			</dependency>
+
+			<dependency>
+				<groupId>org.eclipse.emf</groupId>
+				<artifactId>commonj-sdo</artifactId>
+				<version>2.3.0-M4</version>
+			</dependency>
+
+			<dependency>
+				<groupId>org.eclipse.emf</groupId>
+				<artifactId>common-ui</artifactId>
+				<version>2.3.0-M4</version>
+			</dependency>
+
+			<dependency>
+				<groupId>org.eclipse.emf</groupId>
+				<artifactId>converter</artifactId>
+				<version>2.3.0-M4</version>
+			</dependency>
+
+			<dependency>
+				<groupId>org.eclipse.emf</groupId>
+				<artifactId>ecore</artifactId>
+				<version>2.3.0-M4</version>
+			</dependency>
+
+			<dependency>
+				<groupId>org.eclipse.emf</groupId>
+				<artifactId>ecore-change</artifactId>
+				<version>2.3.0-M4</version>
+			</dependency>
+
+			<dependency>
+				<groupId>org.eclipse.emf</groupId>
+				<artifactId>ecore-change-edit</artifactId>
+				<version>2.3.0-M4</version>
+			</dependency>
+
+			<dependency>
+				<groupId>org.eclipse.emf</groupId>
+				<artifactId>ecore-edit</artifactId>
+				<version>2.3.0-M4</version>
+			</dependency>
+
+			<dependency>
+				<groupId>org.eclipse.emf</groupId>
+				<artifactId>ecore-sdo</artifactId>
+				<version>2.3.0-M4</version>
+			</dependency>
+
+			<dependency>
+				<groupId>org.eclipse.emf</groupId>
+				<artifactId>ecore-sdo-edit</artifactId>
+				<version>2.3.0-M4</version>
+			</dependency>
+
+			<dependency>
+				<groupId>org.eclipse.emf</groupId>
+				<artifactId>ecore-xmi</artifactId>
+				<version>2.3.0-M4</version>
+			</dependency>
+
+			<dependency>
+				<groupId>org.eclipse.emf</groupId>
+				<artifactId>edit</artifactId>
+				<version>2.3.0-M4</version>
+			</dependency>
+
+			<dependency>
+				<groupId>org.eclipse.emf</groupId>
+				<artifactId>edit-ui</artifactId>
+				<version>2.3.0-M4</version>
+			</dependency>
+
+			<dependency>
+				<groupId>org.eclipse.emf</groupId>
+				<artifactId>emf</artifactId>
+				<version>2.3.0-M4</version>
+			</dependency>
+
+			<dependency>
+				<groupId>org.eclipse.emf</groupId>
+				<artifactId>exporter</artifactId>
+				<version>2.3.0-M4</version>
+			</dependency>
+
+			<dependency>
+				<groupId>org.eclipse.emf</groupId>
+				<artifactId>importer</artifactId>
+				<version>2.3.0-M4</version>
+			</dependency>
+
+			<dependency>
+				<groupId>org.eclipse.emf</groupId>
+				<artifactId>importer-ecore</artifactId>
+				<version>2.3.0-M4</version>
+			</dependency>
+
+			<dependency>
+				<groupId>org.eclipse.emf</groupId>
+				<artifactId>importer-java</artifactId>
+				<version>2.3.0-M4</version>
+			</dependency>
+
+			<dependency>
+				<groupId>org.eclipse.emf</groupId>
+				<artifactId>importer-rose</artifactId>
+				<version>2.3.0-M4</version>
+			</dependency>
+
+			<dependency>
+				<groupId>org.eclipse.emf</groupId>
+				<artifactId>mapping</artifactId>
+				<version>2.3.0-M4</version>
+			</dependency>
+
+			<dependency>
+				<groupId>org.eclipse.emf</groupId>
+				<artifactId>mapping-ecore2ecore</artifactId>
+				<version>2.3.0-M4</version>
+			</dependency>
+
+			<dependency>
+				<groupId>org.eclipse.emf</groupId>
+				<artifactId>mapping-ecore2ecore-editor</artifactId>
+				<version>2.3.0-M4</version>
+			</dependency>
+
+			<dependency>
+				<groupId>org.eclipse.emf</groupId>
+				<artifactId>mapping-ecore2xml</artifactId>
+				<version>2.3.0-M4</version>
+			</dependency>
+
+			<dependency>
+				<groupId>org.eclipse.emf</groupId>
+				<artifactId>mapping-ecore2xml-ui</artifactId>
+				<version>2.3.0-M4</version>
+			</dependency>
+
+			<dependency>
+				<groupId>org.eclipse.emf</groupId>
+				<artifactId>mapping-ui</artifactId>
+				<version>2.3.0-M4</version>
+			</dependency>
+
+			<dependency>
+				<groupId>org.eclipse.emf</groupId>
+				<artifactId>mapping-xsd2ecore</artifactId>
+				<version>2.3.0-M4</version>
+			</dependency>
+
+			<dependency>
+				<groupId>org.eclipse.emf</groupId>
+				<artifactId>mapping-xsd2ecore-editor</artifactId>
+				<version>2.3.0-M4</version>
+			</dependency>
+
+			<dependency>
+				<groupId>org.eclipse.xsd</groupId>
+				<artifactId>ecore-exporter</artifactId>
+				<version>2.3.0-M4</version>
+			</dependency>
+
+			<dependency>
+				<groupId>org.eclipse.xsd</groupId>
+				<artifactId>ecore-importer</artifactId>
+				<version>2.3.0-M4</version>
+			</dependency>
+
+			<dependency>
+				<groupId>org.eclipse.xsd</groupId>
+				<artifactId>edit</artifactId>
+				<version>2.3.0-M4</version>
+			</dependency>
+
+			<dependency>
+				<groupId>org.eclipse.xsd</groupId>
+				<artifactId>xsd</artifactId>
+				<version>2.3.0-M4</version>
+			</dependency>
+
+		</dependencies>
+	</dependencyManagement>
+	
+	<repositories>
+		<repository>
+			<id>emf-maven-mirror</id>
+			<url>
+				http://mirrors.cat.pdx.edu/eclipse/tools/emf/maven2/
+			</url>
+		</repository>
+	</repositories>
+	
+  <modules>
+    <module>das.ldap.configuration.model.v100</module>
+    <module>das.ldap.configuration.model.ecore.v100</module>
+    <module>das.ldap</module>
+    <module>das.ldap.prototype</module>
+  </modules>
+</project>
\ No newline at end of file



Mime
View raw message