directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1423968 [8/27] - in /directory/shared/branches/shared-refact: dsml/engine/src/main/java/org/apache/directory/shared/dsmlv2/engine/ dsml/parser/src/main/java/org/apache/directory/shared/dsmlv2/ dsml/parser/src/main/java/org/apache/directory...
Date Wed, 19 Dec 2012 17:24:42 GMT
Added: directory/shared/branches/shared-refact/integ/src/test/java/org/apache/directory/api/ldap/schema/syntaxCheckers/SubtreeSpecificationSyntaxCheckerTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-refact/integ/src/test/java/org/apache/directory/api/ldap/schema/syntaxCheckers/SubtreeSpecificationSyntaxCheckerTest.java?rev=1423968&view=auto
==============================================================================
--- directory/shared/branches/shared-refact/integ/src/test/java/org/apache/directory/api/ldap/schema/syntaxCheckers/SubtreeSpecificationSyntaxCheckerTest.java (added)
+++ directory/shared/branches/shared-refact/integ/src/test/java/org/apache/directory/api/ldap/schema/syntaxCheckers/SubtreeSpecificationSyntaxCheckerTest.java Wed Dec 19 17:24:08 2012
@@ -0,0 +1,297 @@
+/*
+ *  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.directory.api.ldap.schema.syntaxCheckers;
+
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import com.mycila.junit.concurrent.Concurrency;
+import com.mycila.junit.concurrent.ConcurrentJunitRunner;
+
+import org.apache.directory.api.ldap.model.schema.SchemaManager;
+import org.apache.directory.api.ldap.model.schema.syntaxCheckers.SubtreeSpecificationSyntaxChecker;
+import org.apache.directory.shared.ldap.schemaloader.JarLdifSchemaLoader;
+import org.apache.directory.shared.ldap.schemamanager.impl.DefaultSchemaManager;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+
+/**
+ * Test cases for SubtreeSpecificationSyntaxChecker.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+@RunWith(ConcurrentJunitRunner.class)
+@Concurrency()
+public class SubtreeSpecificationSyntaxCheckerTest
+{
+    private static SubtreeSpecificationSyntaxChecker checker;
+
+
+    /**
+     * Initialization
+     */
+    @BeforeClass
+    public static void init() throws Exception
+    {
+        JarLdifSchemaLoader loader = new JarLdifSchemaLoader();
+        SchemaManager schemaManager = new DefaultSchemaManager( loader );
+
+        schemaManager.loadAllEnabled();
+
+        checker = new SubtreeSpecificationSyntaxChecker();
+        checker.setSchemaManager( schemaManager );
+    }
+
+
+    @Test
+    public void testNullString()
+    {
+        assertFalse( checker.isValidSyntax( null ) );
+    }
+
+
+    @Test
+    public void testEmptyString()
+    {
+        assertFalse( checker.isValidSyntax( "" ) );
+    }
+
+
+    @Test
+    public void testOid()
+    {
+        assertEquals( "1.3.6.1.4.1.1466.115.121.1.45", checker.getOid() );
+    }
+
+
+    @Test
+    public void testCorrectCase()
+    {
+    }
+
+    /** A valid empty specification with single white space between brackets */
+    private static final String EMPTY_SPEC = "{ }";
+
+    /** A valid specification only with base set */
+    private static final String SPEC_WITH_BASE = "{ base \"ou=system\" }";
+
+    /** An invalid specification with missing white space and base set */
+    private static final String INVALID_SPEC_WITH_BASE_AND_MISSING_WS = "{ base\"ou=system\"}";
+
+    /** A valid specification with some specific exclusions set */
+    private static final String SPEC_WITH_SPECIFICEXCLUSIONS = "{ specificExclusions { chopAfter:\"ef=gh\", chopBefore:\"ab=cd\" } }";
+
+    /** A valid specification with empty specific exclusions set */
+    private static final String SPEC_WITH_EMPTY_SPECIFICEXCLUSIONS = "{ specificExclusions { } }";
+
+    /** A valid specification with minimum and maximum set */
+    private static final String SPEC_WITH_MINIMUM_AND_MAXIMUM = "{ minimum 1, maximum 2 }";
+
+    /** A valid specification with base and minimum and maximum set */
+    private static final String SPEC_WITH_BASE_AND_MINIMUM_AND_MAXIMUM = "{ base \"ou=ORGANIZATION UNIT\", minimum  1, maximum   2 }";
+
+    /**
+     * A valid specification with base and specific exclusions and minimum and
+     * maximum set
+     */
+    private static final String SPEC_WITH_BASE_AND_SPECIFICEXCLUSIONS_AND_MINIMUM_AND_MAXIMUM = "{ base \"ou=people\", specificExclusions { chopBefore:\"x=y\""
+        + ", chopAfter:\"k=l\", chopBefore:\"y=z\", chopAfter:\"l=m\" }, minimum   7, maximum 77 }";
+
+    /** A valid specification with refinement set */
+    private static final String SPEC_WITH_REFINEMENT = "{ base \"ou=system\", specificationFilter and:{ and:{ item:1.2.3"
+        + ", or:{ item:4.5.6, item:person-7 } }, not: item:10.11.12 } }";
+
+    /** A valid specification with base and an empty refinement set */
+    private static final String SPEC_WITH_BASE_AND_EMPTY_REFINEMENT = "{ base \"ou=system\", specificationFilter and:{ } }";
+
+    /** A valid specification with ALL IN ONE */
+    private static final String SPEC_WITH_ALL_IN_ONE = "{ base    \"ou=departments\""
+        + ", specificExclusions { chopBefore:\"x=y\", chopAfter:\"k=l\", chopBefore:\"y=z\", chopAfter:\"l=m\" }"
+        + ", minimum 7, maximum   77"
+        + ", specificationFilter     and:{ and:{ item:1.2.3, or:{ item:4.5.6, item:7.8.9 } }, not: item:10.11.12 } }";
+
+    /** An valid specification with unordinary component order */
+    private static final String SPEC_ORDER_OF_COMPONENTS_DOES_NOT_MATTER = "{ base \"ou=system\", minimum 3, specificExclusions { chopBefore:\"x=y\" } }";
+
+    /** An invalid specification with completely unrelated content */
+    private static final String INVALID_SILLY_THING = "How much wood would a wood chuck chuck if a wood chuck would chuck wood?";
+
+    /** A valid specification with filter expression */
+    private static final String SPEC_WITH_FILTER = "{ base \"ou=system\", specificationFilter (&(cn=test)(sn=test)) }";
+
+
+    /**
+     * Tests the parser with a valid empty specification.
+     */
+    @Test
+    public void testEmptySpec() throws Exception
+    {
+        assertTrue( checker.isValidSyntax( EMPTY_SPEC ) );
+
+        // try a second time
+        assertTrue( checker.isValidSyntax( EMPTY_SPEC ) );
+
+        // try a third time
+        assertTrue( checker.isValidSyntax( EMPTY_SPEC ) );
+    }
+
+
+    /**
+     * Tests the parser with a valid specification with base set.
+     */
+    @Test
+    public void testSpecWithBase() throws Exception
+    {
+        assertTrue( checker.isValidSyntax( SPEC_WITH_BASE ) );
+    }
+
+
+    /**
+     * Tests the parser with an invalid specification with missing white spaces
+     * and base set.
+     */
+    @Test
+    public void testInvalidSpecWithBaseAndMissingWS() throws Exception
+    {
+        assertFalse( checker.isValidSyntax( INVALID_SPEC_WITH_BASE_AND_MISSING_WS ) );
+    }
+
+
+    /**
+     * Tests the parser with a valid specification with some specific exclusions
+     * set.
+     */
+    @Test
+    public void testSpecWithSpecificExclusions() throws Exception
+    {
+        assertTrue( checker.isValidSyntax( SPEC_WITH_SPECIFICEXCLUSIONS ) );
+    }
+
+
+    /**
+     * Tests the parser with a valid specification with an empty specific
+     * exclusions set.
+     */
+    @Test
+    public void testSpecWithEmptySpecificExclusions() throws Exception
+    {
+        assertTrue( checker.isValidSyntax( SPEC_WITH_EMPTY_SPECIFICEXCLUSIONS ) );
+    }
+
+
+    /**
+     * Tests the parser with a valid specification with minimum and maximum set.
+     */
+    @Test
+    public void testSpecWithMinimumAndMaximum() throws Exception
+    {
+        assertTrue( checker.isValidSyntax( SPEC_WITH_MINIMUM_AND_MAXIMUM ) );
+    }
+
+
+    /**
+     * Tests the parser with a valid specification with base and minimum and
+     * maximum set.
+     */
+    @Test
+    public void testWithBaseAndMinimumAndMaximum() throws Exception
+    {
+        assertTrue( checker.isValidSyntax( SPEC_WITH_BASE_AND_MINIMUM_AND_MAXIMUM ) );
+    }
+
+
+    /**
+     * Tests the parser with a valid specification with base and specific
+     * exclusions and minimum and maximum set.
+     */
+    @Test
+    public void testSpecWithBaseAndSpecificExclusionsAndMinimumAndMaximum() throws Exception
+    {
+        assertTrue( checker.isValidSyntax( SPEC_WITH_BASE_AND_SPECIFICEXCLUSIONS_AND_MINIMUM_AND_MAXIMUM ) );
+    }
+
+
+    /**
+     * Tests the parser with a valid specification with refinement set.
+     */
+    @Test
+    public void testSpecWithRefinement() throws Exception
+    {
+        assertTrue( checker.isValidSyntax( SPEC_WITH_REFINEMENT ) );
+    }
+
+
+    /**
+     * Tests the parser with a valid specification with base and empty
+     * refinement set.
+     */
+    @Test
+    public void testSpecWithBaseAndEmptyRefinement() throws Exception
+    {
+        assertTrue( checker.isValidSyntax( SPEC_WITH_BASE_AND_EMPTY_REFINEMENT ) );
+    }
+
+
+    /**
+     * Tests the parser with a valid specification with all components set.
+     */
+    @Test
+    public void testSpecWithAllInOne() throws Exception
+    {
+        assertTrue( checker.isValidSyntax( SPEC_WITH_ALL_IN_ONE ) );
+
+    }
+
+
+    /**
+     * Tests the parser with a valid specification with unordinary component
+     * order.
+     */
+    @Test
+    public void testSpecOrderOfComponentsDoesNotMatter() throws Exception
+    {
+        assertTrue( checker.isValidSyntax( SPEC_ORDER_OF_COMPONENTS_DOES_NOT_MATTER ) );
+    }
+
+
+    /**
+     * Tests the parser with a valid specification with unordinary component
+     * order.
+     */
+    @Test
+    public void testBadAssertion() throws Exception
+    {
+        assertFalse( checker.isValidSyntax( INVALID_SILLY_THING ) );
+    }
+
+
+    /**
+     * Tests the parser with a valid specification with refinement set.
+     */
+    @Test
+    public void testSpecWithFilter() throws Exception
+    {
+        assertTrue( checker.isValidSyntax( SPEC_WITH_FILTER ) );
+    }
+}

Propchange: directory/shared/branches/shared-refact/integ/src/test/java/org/apache/directory/api/ldap/schema/syntaxCheckers/SubtreeSpecificationSyntaxCheckerTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: directory/shared/branches/shared-refact/integ/src/test/java/org/apache/directory/api/ldap/subtree/SubtreeSpecificationParserTest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-refact/integ/src/test/java/org/apache/directory/api/ldap/subtree/SubtreeSpecificationParserTest.java?rev=1423968&view=auto
==============================================================================
--- directory/shared/branches/shared-refact/integ/src/test/java/org/apache/directory/api/ldap/subtree/SubtreeSpecificationParserTest.java (added)
+++ directory/shared/branches/shared-refact/integ/src/test/java/org/apache/directory/api/ldap/subtree/SubtreeSpecificationParserTest.java Wed Dec 19 17:24:08 2012
@@ -0,0 +1,489 @@
+/*
+ *  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.directory.api.ldap.subtree;
+
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.text.ParseException;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.directory.api.ldap.model.name.Dn;
+import org.apache.directory.api.ldap.model.schema.ObjectClass;
+import org.apache.directory.api.ldap.model.schema.SchemaManager;
+import org.apache.directory.api.ldap.model.subtree.AndRefinement;
+import org.apache.directory.api.ldap.model.subtree.ItemRefinement;
+import org.apache.directory.api.ldap.model.subtree.NotRefinement;
+import org.apache.directory.api.ldap.model.subtree.OrRefinement;
+import org.apache.directory.api.ldap.model.subtree.Refinement;
+import org.apache.directory.api.ldap.model.subtree.SubtreeSpecification;
+import org.apache.directory.api.ldap.model.subtree.SubtreeSpecificationParser;
+import org.apache.directory.shared.ldap.schemaloader.JarLdifSchemaLoader;
+import org.apache.directory.shared.ldap.schemamanager.impl.DefaultSchemaManager;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import com.mycila.junit.concurrent.Concurrency;
+import com.mycila.junit.concurrent.ConcurrentJunitRunner;
+
+
+/**
+ * Unit tests class for Subtree Specification parser (wrapper).
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+@RunWith(ConcurrentJunitRunner.class)
+@Concurrency()
+public class SubtreeSpecificationParserTest
+{
+    /** the ss parser wrapper */
+    private static SubtreeSpecificationParser parser;
+
+    /** A valid empty specification with single white space between brackets */
+    private static final String EMPTY_SPEC = "{ }";
+
+    /** A valid specification only with base set */
+    private static final String SPEC_WITH_BASE = "{ base \"ou=system\" }";
+
+    /** An invalid specification with missing white space and base set */
+    private static final String INVALID_SPEC_WITH_BASE_AND_MISSING_WS = "{ base\"ou=system\"}";
+
+    /** A valid specification with some specific exclusions set */
+    private static final String SPEC_WITH_SPECIFICEXCLUSIONS = "{ specificExclusions { chopAfter:\"cn=gh\", chopBefore:\"cn=cd\" } }";
+
+    /** A valid specification with empty specific exclusions set */
+    private static final String SPEC_WITH_EMPTY_SPECIFICEXCLUSIONS = "{ specificExclusions { } }";
+
+    /** A valid specification with minimum and maximum set */
+    private static final String SPEC_WITH_MINIMUM_AND_MAXIMUM = "{ minimum 1, maximum 2 }";
+
+    /** A valid specification with base and minimum and maximum set */
+    private static final String SPEC_WITH_BASE_AND_MINIMUM_AND_MAXIMUM = "{ base \"ou=ORGANIZATION UNIT\", minimum  1, maximum   2 }";
+
+    /**
+     * A valid specification with base and specific exclusions and minimum and
+     * maximum set
+     */
+    private static final String SPEC_WITH_BASE_AND_SPECIFICEXCLUSIONS_AND_MINIMUM_AND_MAXIMUM = "{ base \"ou=people\", specificExclusions { chopBefore:\"cn=y\""
+        + ", chopAfter:\"sn=l\", chopBefore:\"c=z\", chopAfter:\"l=m\" }, minimum   7, maximum 77 }";
+
+    /** A valid specification with refinement set */
+    private static final String SPEC_WITH_REFINEMENT = "{ base \"ou=system\", specificationFilter and:{ and:{ item:2.5.6.0"
+        + ", or:{ item:2.5.6.1, item:person } }, not: item:2.5.6.2 } }";
+
+    /** A valid specification with base and an empty refinement set */
+    private static final String SPEC_WITH_BASE_AND_EMPTY_REFINEMENT = "{ base \"ou=system\", specificationFilter and:{ } }";
+
+    /** A valid specification with ALL IN ONE */
+    private static final String SPEC_WITH_ALL_IN_ONE = "{ base    \"ou=departments\""
+        + ", specificExclusions { chopBefore:\"cn=y\", chopAfter:\"sn=l\", chopBefore:\"c=z\", chopAfter:\"l=m\" }"
+        + ", minimum 7, maximum   77"
+        + ", specificationFilter     and:{ and:{ item:2.5.6.0, or:{ item:2.5.6.1, item:2.5.6.2 } }, not: item:2.5.6.3 } }";
+
+    /** An valid specification with unordinary component order */
+    private static final String SPEC_ORDER_OF_COMPONENTS_DOES_NOT_MATTER = "{ base \"ou=system\", minimum 3, specificExclusions { chopBefore:\"cn=y\" } }";
+
+    /** An invalid specification with completely unrelated content */
+    private static final String INVALID_SILLY_THING = "How much wood would a wood chuck chuck if a wood chuck would chuck wood?";
+
+    /** holds multithreaded success value */
+    boolean isSuccessMultithreaded = true;
+
+    /** The schema manager */
+    private static SchemaManager schemaManager;
+
+    /** Some global OC */
+    private static ObjectClass TOP_OC; // 2.5.6.0
+    private static ObjectClass ALIAS_OC; // 2.5.6.1
+    private static ObjectClass COUNTRY_OC; // 2.5.6.2
+    private static ObjectClass PERSON_OC; // 2.5.6.6
+
+
+    /**
+     * Initialization
+     */
+    @BeforeClass
+    public static void init() throws Exception
+    {
+        JarLdifSchemaLoader loader = new JarLdifSchemaLoader();
+        schemaManager = new DefaultSchemaManager( loader );
+
+        schemaManager.loadAllEnabled();
+
+        parser = new SubtreeSpecificationParser( schemaManager );
+
+        TOP_OC = schemaManager.lookupObjectClassRegistry( "top" );
+        ALIAS_OC = schemaManager.lookupObjectClassRegistry( "alias" );
+        COUNTRY_OC = schemaManager.lookupObjectClassRegistry( "country" );
+        PERSON_OC = schemaManager.lookupObjectClassRegistry( "person" );
+    }
+
+
+    /**
+     * Tests the parser with a valid empty specification.
+     */
+    @Test
+    public void testEmptySpec() throws Exception
+    {
+        SubtreeSpecification ss = parser.parse( EMPTY_SPEC );
+        assertNotNull( ss );
+
+        // try a second time
+        ss = parser.parse( EMPTY_SPEC );
+        assertNotNull( ss );
+
+        // try a third time
+        ss = parser.parse( EMPTY_SPEC );
+        assertNotNull( ss );
+    }
+
+
+    /**
+     * Tests the parser with a valid specification with base set.
+     */
+    @Test
+    public void testSpecWithBase() throws Exception
+    {
+        SubtreeSpecification ss = parser.parse( SPEC_WITH_BASE );
+        assertNotNull( ss );
+
+        assertEquals( "ou=system", ss.getBase().toString() );
+    }
+
+
+    /**
+     * Tests the parser with an invalid specification with missing white spaces
+     * and base set.
+     */
+    @Test
+    public void testInvalidSpecWithBaseAndMissingWS() throws Exception
+    {
+        try
+        {
+            parser.parse( INVALID_SPEC_WITH_BASE_AND_MISSING_WS );
+            fail( "testInvalidSpecWithBaseAndMissingWS() should never come here..." );
+        }
+        catch ( ParseException e )
+        {
+            assertNotNull( e );
+        }
+    }
+
+
+    /**
+     * Tests the parser with a valid specification with some specific exclusions
+     * set.
+     */
+    @Test
+    public void testSpecWithSpecificExclusions() throws Exception
+    {
+        SubtreeSpecification ss = parser.parse( SPEC_WITH_SPECIFICEXCLUSIONS );
+        assertFalse( ss.getChopBeforeExclusions().isEmpty() );
+        assertFalse( ss.getChopAfterExclusions().isEmpty() );
+        assertTrue( ss.getChopBeforeExclusions().contains( new Dn( schemaManager, "cn=cd" ) ) );
+        assertTrue( ss.getChopAfterExclusions().contains( new Dn( schemaManager, "cn=gh" ) ) );
+
+        // try a second time
+        ss = parser.parse( SPEC_WITH_SPECIFICEXCLUSIONS );
+        assertFalse( ss.getChopBeforeExclusions().isEmpty() );
+        assertFalse( ss.getChopAfterExclusions().isEmpty() );
+        assertTrue( ss.getChopBeforeExclusions().contains( new Dn( schemaManager, "cn=cd" ) ) );
+        assertTrue( ss.getChopAfterExclusions().contains( new Dn( schemaManager, "cn=gh" ) ) );
+
+        // try a third time
+        ss = parser.parse( SPEC_WITH_SPECIFICEXCLUSIONS );
+        assertFalse( ss.getChopBeforeExclusions().isEmpty() );
+        assertFalse( ss.getChopAfterExclusions().isEmpty() );
+        assertTrue( ss.getChopBeforeExclusions().contains( new Dn( schemaManager, "cn=cd" ) ) );
+        assertTrue( ss.getChopAfterExclusions().contains( new Dn( schemaManager, "cn=gh" ) ) );
+    }
+
+
+    /**
+     * Tests the parser with a valid specification with an empty specific
+     * exclusions set.
+     */
+    @Test
+    public void testSpecWithEmptySpecificExclusions() throws Exception
+    {
+        SubtreeSpecification ss = parser.parse( SPEC_WITH_EMPTY_SPECIFICEXCLUSIONS );
+        assertNotNull( ss );
+
+        assertTrue( ss.getChopBeforeExclusions().isEmpty() );
+    }
+
+
+    /**
+     * Tests the parser with a valid specification with minimum and maximum set.
+     */
+    @Test
+    public void testSpecWithMinimumAndMaximum() throws Exception
+    {
+        SubtreeSpecification ss = parser.parse( SPEC_WITH_MINIMUM_AND_MAXIMUM );
+        assertEquals( 1, ss.getMinBaseDistance() );
+        assertEquals( 2, ss.getMaxBaseDistance() );
+
+        // try a second time
+        ss = parser.parse( SPEC_WITH_MINIMUM_AND_MAXIMUM );
+        assertEquals( 1, ss.getMinBaseDistance() );
+        assertEquals( 2, ss.getMaxBaseDistance() );
+
+        // try a third time
+        ss = parser.parse( SPEC_WITH_MINIMUM_AND_MAXIMUM );
+        assertEquals( 1, ss.getMinBaseDistance() );
+        assertEquals( 2, ss.getMaxBaseDistance() );
+    }
+
+
+    /**
+     * Tests the parser with a valid specification with base and minimum and
+     * maximum set.
+     */
+    @Test
+    public void testWithBaseAndMinimumAndMaximum() throws Exception
+    {
+        SubtreeSpecification ss = parser.parse( SPEC_WITH_BASE_AND_MINIMUM_AND_MAXIMUM );
+
+        assertEquals( new Dn( "ou=ORGANIZATION UNIT" ).getName(), ss.getBase().getName() );
+        assertEquals( 1, ss.getMinBaseDistance() );
+        assertEquals( 2, ss.getMaxBaseDistance() );
+    }
+
+
+    /**
+     * Tests the parser with a valid specification with base and specific
+     * exclusions and minimum and maximum set.
+     */
+    @Test
+    public void testSpecWithBaseAndSpecificExclusionsAndMinimumAndMaximum() throws Exception
+    {
+        SubtreeSpecification ss = parser.parse( SPEC_WITH_BASE_AND_SPECIFICEXCLUSIONS_AND_MINIMUM_AND_MAXIMUM );
+        assertNotNull( ss );
+
+        assertEquals( "ou=people", ss.getBase().toString() );
+        assertTrue( ss.getChopBeforeExclusions().contains( new Dn( "cn=y" ).apply( schemaManager ) ) );
+        assertTrue( ss.getChopBeforeExclusions().contains( new Dn( "c=z" ).apply( schemaManager ) ) );
+        assertTrue( ss.getChopAfterExclusions().contains( new Dn( "sn=l" ).apply( schemaManager ) ) );
+        assertTrue( ss.getChopAfterExclusions().contains( new Dn( "l=m" ).apply( schemaManager ) ) );
+        assertEquals( 7, ss.getMinBaseDistance() );
+        assertEquals( 77, ss.getMaxBaseDistance() );
+    }
+
+
+    /**
+     * Tests the parser with a valid specification with refinement set.
+     */
+    @Test
+    public void testSpecWithRefinement() throws Exception
+    {
+        SubtreeSpecification ss = parser.parse( SPEC_WITH_REFINEMENT );
+
+        // The items
+        Refinement topItem = new ItemRefinement( TOP_OC );
+        Refinement aliasItem = new ItemRefinement( ALIAS_OC );
+        Refinement personItem = new ItemRefinement( PERSON_OC );
+        Refinement countryItem = new ItemRefinement( COUNTRY_OC );
+
+        // The inner OR refinement or:{item:2.5.6.1, item:person}
+        List<Refinement> orList = new ArrayList<Refinement>();
+        orList.add( aliasItem );
+        orList.add( personItem );
+
+        Refinement orRefinement = new OrRefinement( orList );
+
+        // The inner AND refinement and:{ item:2.5.6.0, or:... }
+        List<Refinement> innerAndList = new ArrayList<Refinement>();
+        innerAndList.add( topItem );
+        innerAndList.add( orRefinement );
+
+        Refinement innerAndRefinement = new AndRefinement( innerAndList );
+
+        // The NOT refinement not:item:2.5.6.2
+        Refinement notRefinement = new NotRefinement( countryItem );
+
+        // The outer AND refinement and:{and:..., not:...}
+        List<Refinement> outerAndList = new ArrayList<Refinement>();
+        outerAndList.add( innerAndRefinement );
+        outerAndList.add( notRefinement );
+
+        StringBuilder buffer = new StringBuilder();
+        ss.getRefinement().printRefinementToBuffer( buffer );
+
+        //assertEquals( outerAndRefinement.toString(), buffer );
+        assertEquals( "and: { and: { item: 2.5.6.0, or: { item: 2.5.6.1, item: person } }, not: item: 2.5.6.2 }",
+            buffer.toString() );
+    }
+
+
+    /**
+     * Tests the parser with a valid specification with base and empty
+     * refinement set.
+     */
+    @Test
+    public void testSpecWithBaseAndEmptyRefinement() throws Exception
+    {
+        SubtreeSpecification ss = parser.parse( SPEC_WITH_BASE_AND_EMPTY_REFINEMENT );
+
+        assertEquals( "ou=system", ss.getBase().toString() );
+    }
+
+
+    /**
+     * Tests the parser with a valid specification with all components set.
+     */
+    @Test
+    public void testSpecWithAllInOne() throws Exception
+    {
+        SubtreeSpecification ss = parser.parse( SPEC_WITH_ALL_IN_ONE );
+        assertNotNull( ss );
+    }
+
+
+    /**
+     * Tests the parser with a valid specification with unordinary component
+     * order.
+     */
+    @Test
+    public void testSpecOrderOfComponentsDoesNotMatter() throws Exception
+    {
+        SubtreeSpecification ss = parser.parse( SPEC_ORDER_OF_COMPONENTS_DOES_NOT_MATTER );
+        assertNotNull( ss );
+    }
+
+
+    /**
+     * Tests the parser with an invalid specification with silly things in.
+     */
+    @Test
+    public void testInvalidSillyThing() throws Exception
+    {
+        try
+        {
+            parser.parse( INVALID_SILLY_THING );
+            fail( "testInvalidSillyThing() should never come here..." );
+        }
+        catch ( ParseException e )
+        {
+            assertNotNull( e );
+        }
+    }
+
+
+    /**
+     * Test reusability, especially if the state is resetted.
+     */
+    @Test
+    public void testReusabiltiy() throws Exception
+    {
+        Dn firstDn = new Dn( schemaManager, "cn=l" );
+        String firstExclusion = "{ specificExclusions { chopAfter:\"cn=l\" } }";
+        SubtreeSpecification firstSpec = parser.parse( firstExclusion );
+        assertEquals( 1, firstSpec.getChopAfterExclusions().size() );
+        assertEquals( firstDn, firstSpec.getChopAfterExclusions().iterator().next() );
+
+        Dn secondDn = new Dn( schemaManager, "l=y" );
+        String secondExclusion = "{ specificExclusions { chopAfter:\"l=y\" } }";
+        SubtreeSpecification secondSpec = parser.parse( secondExclusion );
+        assertEquals( 1, secondSpec.getChopAfterExclusions().size() );
+        assertEquals( secondDn, secondSpec.getChopAfterExclusions().iterator().next() );
+
+    }
+
+
+    /**
+     * Tests the multithreaded use of a single parser.
+     */
+    @Test
+    public void testMultiThreaded() throws Exception
+    {
+        // start up and track all threads (40 threads)
+        List<Thread> threads = new ArrayList<Thread>();
+        for ( int ii = 0; ii < 10; ii++ )
+        {
+            Thread t0 = new Thread( new ParseSpecification( EMPTY_SPEC ) );
+            Thread t1 = new Thread( new ParseSpecification( SPEC_WITH_SPECIFICEXCLUSIONS ) );
+            Thread t2 = new Thread( new ParseSpecification( SPEC_WITH_MINIMUM_AND_MAXIMUM ) );
+            Thread t3 = new Thread( new ParseSpecification( SPEC_WITH_ALL_IN_ONE ) );
+            threads.add( t0 );
+            threads.add( t1 );
+            threads.add( t2 );
+            threads.add( t3 );
+            t0.start();
+            t1.start();
+            t2.start();
+            t3.start();
+        }
+
+        // wait until all threads have died
+        boolean hasLiveThreads = false;
+        do
+        {
+            hasLiveThreads = false;
+
+            for ( int ii = 0; ii < threads.size(); ii++ )
+            {
+                Thread t = threads.get( ii );
+                hasLiveThreads = hasLiveThreads || t.isAlive();
+            }
+        }
+        while ( hasLiveThreads );
+
+        // check that no one thread failed to parse and generate a SS object
+        assertTrue( isSuccessMultithreaded );
+    }
+
+    /**
+     * Used to test multithreaded use of a single parser.
+     */
+    class ParseSpecification implements Runnable
+    {
+        private final String specStr;
+
+        SubtreeSpecification result;
+
+
+        public ParseSpecification( String specStr )
+        {
+            this.specStr = specStr;
+        }
+
+
+        public void run()
+        {
+            try
+            {
+                result = parser.parse( specStr );
+            }
+            catch ( ParseException e )
+            {
+                e.printStackTrace();
+            }
+
+            isSuccessMultithreaded = isSuccessMultithreaded && ( result != null );
+        }
+    }
+}

Propchange: directory/shared/branches/shared-refact/integ/src/test/java/org/apache/directory/api/ldap/subtree/SubtreeSpecificationParserTest.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/AbstractLdapConnection.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/AbstractLdapConnection.java?rev=1423968&r1=1423967&r2=1423968&view=diff
==============================================================================
--- directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/AbstractLdapConnection.java (original)
+++ directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/AbstractLdapConnection.java Wed Dec 19 17:24:08 2012
@@ -19,22 +19,22 @@
  */
 package org.apache.directory.ldap.client.api;
 
-import static org.apache.directory.shared.ldap.model.message.ResultCodeEnum.processResponse;
+import static org.apache.directory.api.ldap.model.message.ResultCodeEnum.processResponse;
 
 import java.io.IOException;
 import java.util.concurrent.atomic.AtomicInteger;
 
+import org.apache.directory.api.ldap.model.exception.LdapException;
+import org.apache.directory.api.ldap.model.message.BindRequest;
+import org.apache.directory.api.ldap.model.message.BindRequestImpl;
+import org.apache.directory.api.ldap.model.message.BindResponse;
+import org.apache.directory.api.ldap.model.message.Control;
+import org.apache.directory.api.ldap.model.name.Dn;
+import org.apache.directory.api.ldap.model.schema.SchemaManager;
 import org.apache.directory.api.util.StringConstants;
 import org.apache.directory.api.util.Strings;
 import org.apache.directory.shared.ldap.codec.api.LdapApiService;
 import org.apache.directory.shared.ldap.codec.api.LdapApiServiceFactory;
-import org.apache.directory.shared.ldap.model.exception.LdapException;
-import org.apache.directory.shared.ldap.model.message.BindRequest;
-import org.apache.directory.shared.ldap.model.message.BindRequestImpl;
-import org.apache.directory.shared.ldap.model.message.BindResponse;
-import org.apache.directory.shared.ldap.model.message.Control;
-import org.apache.directory.shared.ldap.model.name.Dn;
-import org.apache.directory.shared.ldap.model.schema.SchemaManager;
 import org.apache.mina.core.service.IoHandlerAdapter;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;

Modified: directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/CramMd5Request.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/CramMd5Request.java?rev=1423968&r1=1423967&r2=1423968&view=diff
==============================================================================
--- directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/CramMd5Request.java (original)
+++ directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/CramMd5Request.java Wed Dec 19 17:24:08 2012
@@ -21,7 +21,7 @@
 package org.apache.directory.ldap.client.api;
 
 
-import org.apache.directory.shared.ldap.model.constants.SupportedSaslMechanisms;
+import org.apache.directory.api.ldap.model.constants.SupportedSaslMechanisms;
 
 
 /**

Modified: directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/DefaultSchemaLoader.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/DefaultSchemaLoader.java?rev=1423968&r1=1423967&r2=1423968&view=diff
==============================================================================
--- directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/DefaultSchemaLoader.java (original)
+++ directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/DefaultSchemaLoader.java Wed Dec 19 17:24:08 2012
@@ -27,46 +27,46 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Set;
 
+import org.apache.directory.api.ldap.model.constants.MetaSchemaConstants;
+import org.apache.directory.api.ldap.model.constants.SchemaConstants;
+import org.apache.directory.api.ldap.model.entry.Attribute;
+import org.apache.directory.api.ldap.model.entry.DefaultEntry;
+import org.apache.directory.api.ldap.model.entry.Entry;
+import org.apache.directory.api.ldap.model.entry.Value;
+import org.apache.directory.api.ldap.model.exception.LdapException;
+import org.apache.directory.api.ldap.model.exception.LdapInvalidAttributeValueException;
+import org.apache.directory.api.ldap.model.name.Dn;
+import org.apache.directory.api.ldap.model.schema.AttributeType;
+import org.apache.directory.api.ldap.model.schema.AttributesFactory;
+import org.apache.directory.api.ldap.model.schema.DitContentRule;
+import org.apache.directory.api.ldap.model.schema.DitStructureRule;
+import org.apache.directory.api.ldap.model.schema.LdapSyntax;
+import org.apache.directory.api.ldap.model.schema.MatchingRule;
+import org.apache.directory.api.ldap.model.schema.MatchingRuleUse;
+import org.apache.directory.api.ldap.model.schema.NameForm;
+import org.apache.directory.api.ldap.model.schema.ObjectClass;
+import org.apache.directory.api.ldap.model.schema.SchemaObject;
+import org.apache.directory.api.ldap.model.schema.SchemaObjectWrapper;
+import org.apache.directory.api.ldap.model.schema.parsers.AttributeTypeDescriptionSchemaParser;
+import org.apache.directory.api.ldap.model.schema.parsers.DitContentRuleDescriptionSchemaParser;
+import org.apache.directory.api.ldap.model.schema.parsers.DitStructureRuleDescriptionSchemaParser;
+import org.apache.directory.api.ldap.model.schema.parsers.LdapComparatorDescription;
+import org.apache.directory.api.ldap.model.schema.parsers.LdapComparatorDescriptionSchemaParser;
+import org.apache.directory.api.ldap.model.schema.parsers.LdapSyntaxDescriptionSchemaParser;
+import org.apache.directory.api.ldap.model.schema.parsers.MatchingRuleDescriptionSchemaParser;
+import org.apache.directory.api.ldap.model.schema.parsers.MatchingRuleUseDescriptionSchemaParser;
+import org.apache.directory.api.ldap.model.schema.parsers.NameFormDescriptionSchemaParser;
+import org.apache.directory.api.ldap.model.schema.parsers.NormalizerDescription;
+import org.apache.directory.api.ldap.model.schema.parsers.NormalizerDescriptionSchemaParser;
+import org.apache.directory.api.ldap.model.schema.parsers.ObjectClassDescriptionSchemaParser;
+import org.apache.directory.api.ldap.model.schema.parsers.SyntaxCheckerDescription;
+import org.apache.directory.api.ldap.model.schema.parsers.SyntaxCheckerDescriptionSchemaParser;
+import org.apache.directory.api.ldap.model.schema.registries.AbstractSchemaLoader;
+import org.apache.directory.api.ldap.model.schema.registries.DefaultSchema;
+import org.apache.directory.api.ldap.model.schema.registries.Schema;
 import org.apache.directory.api.util.Base64;
 import org.apache.directory.api.util.Strings;
 import org.apache.directory.ldap.client.api.exception.InvalidConnectionException;
-import org.apache.directory.shared.ldap.model.constants.MetaSchemaConstants;
-import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.model.entry.Attribute;
-import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
-import org.apache.directory.shared.ldap.model.entry.Entry;
-import org.apache.directory.shared.ldap.model.entry.Value;
-import org.apache.directory.shared.ldap.model.exception.LdapException;
-import org.apache.directory.shared.ldap.model.exception.LdapInvalidAttributeValueException;
-import org.apache.directory.shared.ldap.model.name.Dn;
-import org.apache.directory.shared.ldap.model.schema.AttributeType;
-import org.apache.directory.shared.ldap.model.schema.AttributesFactory;
-import org.apache.directory.shared.ldap.model.schema.DitContentRule;
-import org.apache.directory.shared.ldap.model.schema.DitStructureRule;
-import org.apache.directory.shared.ldap.model.schema.LdapSyntax;
-import org.apache.directory.shared.ldap.model.schema.MatchingRule;
-import org.apache.directory.shared.ldap.model.schema.MatchingRuleUse;
-import org.apache.directory.shared.ldap.model.schema.NameForm;
-import org.apache.directory.shared.ldap.model.schema.ObjectClass;
-import org.apache.directory.shared.ldap.model.schema.SchemaObject;
-import org.apache.directory.shared.ldap.model.schema.SchemaObjectWrapper;
-import org.apache.directory.shared.ldap.model.schema.parsers.AttributeTypeDescriptionSchemaParser;
-import org.apache.directory.shared.ldap.model.schema.parsers.DitContentRuleDescriptionSchemaParser;
-import org.apache.directory.shared.ldap.model.schema.parsers.DitStructureRuleDescriptionSchemaParser;
-import org.apache.directory.shared.ldap.model.schema.parsers.LdapComparatorDescription;
-import org.apache.directory.shared.ldap.model.schema.parsers.LdapComparatorDescriptionSchemaParser;
-import org.apache.directory.shared.ldap.model.schema.parsers.LdapSyntaxDescriptionSchemaParser;
-import org.apache.directory.shared.ldap.model.schema.parsers.MatchingRuleDescriptionSchemaParser;
-import org.apache.directory.shared.ldap.model.schema.parsers.MatchingRuleUseDescriptionSchemaParser;
-import org.apache.directory.shared.ldap.model.schema.parsers.NameFormDescriptionSchemaParser;
-import org.apache.directory.shared.ldap.model.schema.parsers.NormalizerDescription;
-import org.apache.directory.shared.ldap.model.schema.parsers.NormalizerDescriptionSchemaParser;
-import org.apache.directory.shared.ldap.model.schema.parsers.ObjectClassDescriptionSchemaParser;
-import org.apache.directory.shared.ldap.model.schema.parsers.SyntaxCheckerDescription;
-import org.apache.directory.shared.ldap.model.schema.parsers.SyntaxCheckerDescriptionSchemaParser;
-import org.apache.directory.shared.ldap.model.schema.registries.AbstractSchemaLoader;
-import org.apache.directory.shared.ldap.model.schema.registries.DefaultSchema;
-import org.apache.directory.shared.ldap.model.schema.registries.Schema;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

Modified: directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/DigestMd5Request.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/DigestMd5Request.java?rev=1423968&r1=1423967&r2=1423968&view=diff
==============================================================================
--- directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/DigestMd5Request.java (original)
+++ directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/DigestMd5Request.java Wed Dec 19 17:24:08 2012
@@ -21,7 +21,7 @@
 package org.apache.directory.ldap.client.api;
 
 
-import org.apache.directory.shared.ldap.model.constants.SupportedSaslMechanisms;
+import org.apache.directory.api.ldap.model.constants.SupportedSaslMechanisms;
 
 
 /**

Modified: directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/EntryCursorImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/EntryCursorImpl.java?rev=1423968&r1=1423967&r2=1423968&view=diff
==============================================================================
--- directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/EntryCursorImpl.java (original)
+++ directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/EntryCursorImpl.java Wed Dec 19 17:24:08 2012
@@ -24,17 +24,17 @@ package org.apache.directory.ldap.client
 import java.io.IOException;
 
 import org.apache.directory.api.i18n.I18n;
-import org.apache.directory.shared.ldap.model.cursor.AbstractCursor;
-import org.apache.directory.shared.ldap.model.cursor.CursorException;
-import org.apache.directory.shared.ldap.model.cursor.EntryCursor;
-import org.apache.directory.shared.ldap.model.cursor.InvalidCursorPositionException;
-import org.apache.directory.shared.ldap.model.cursor.SearchCursor;
-import org.apache.directory.shared.ldap.model.entry.Entry;
-import org.apache.directory.shared.ldap.model.exception.LdapException;
-import org.apache.directory.shared.ldap.model.message.Response;
-import org.apache.directory.shared.ldap.model.message.SearchResultDone;
-import org.apache.directory.shared.ldap.model.message.SearchResultEntry;
-import org.apache.directory.shared.ldap.model.message.SearchResultReference;
+import org.apache.directory.api.ldap.model.cursor.AbstractCursor;
+import org.apache.directory.api.ldap.model.cursor.CursorException;
+import org.apache.directory.api.ldap.model.cursor.EntryCursor;
+import org.apache.directory.api.ldap.model.cursor.InvalidCursorPositionException;
+import org.apache.directory.api.ldap.model.cursor.SearchCursor;
+import org.apache.directory.api.ldap.model.entry.Entry;
+import org.apache.directory.api.ldap.model.exception.LdapException;
+import org.apache.directory.api.ldap.model.message.Response;
+import org.apache.directory.api.ldap.model.message.SearchResultDone;
+import org.apache.directory.api.ldap.model.message.SearchResultEntry;
+import org.apache.directory.api.ldap.model.message.SearchResultReference;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

Modified: directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/GssApiRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/GssApiRequest.java?rev=1423968&r1=1423967&r2=1423968&view=diff
==============================================================================
--- directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/GssApiRequest.java (original)
+++ directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/GssApiRequest.java Wed Dec 19 17:24:08 2012
@@ -23,7 +23,7 @@ package org.apache.directory.ldap.client
 
 import javax.security.auth.login.Configuration;
 
-import org.apache.directory.shared.ldap.model.constants.SupportedSaslMechanisms;
+import org.apache.directory.api.ldap.model.constants.SupportedSaslMechanisms;
 
 
 /**

Modified: directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapAsyncConnection.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapAsyncConnection.java?rev=1423968&r1=1423967&r2=1423968&view=diff
==============================================================================
--- directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapAsyncConnection.java (original)
+++ directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapAsyncConnection.java Wed Dec 19 17:24:08 2012
@@ -22,6 +22,18 @@ package org.apache.directory.ldap.client
 
 import java.io.IOException;
 
+import org.apache.directory.api.ldap.model.entry.Entry;
+import org.apache.directory.api.ldap.model.exception.LdapException;
+import org.apache.directory.api.ldap.model.message.AddRequest;
+import org.apache.directory.api.ldap.model.message.BindRequest;
+import org.apache.directory.api.ldap.model.message.CompareRequest;
+import org.apache.directory.api.ldap.model.message.DeleteRequest;
+import org.apache.directory.api.ldap.model.message.ExtendedRequest;
+import org.apache.directory.api.ldap.model.message.ModifyDnRequest;
+import org.apache.directory.api.ldap.model.message.ModifyRequest;
+import org.apache.directory.api.ldap.model.message.SearchRequest;
+import org.apache.directory.api.ldap.model.message.SearchScope;
+import org.apache.directory.api.ldap.model.name.Dn;
 import org.apache.directory.ldap.client.api.future.AddFuture;
 import org.apache.directory.ldap.client.api.future.BindFuture;
 import org.apache.directory.ldap.client.api.future.CompareFuture;
@@ -30,18 +42,6 @@ import org.apache.directory.ldap.client.
 import org.apache.directory.ldap.client.api.future.ModifyDnFuture;
 import org.apache.directory.ldap.client.api.future.ModifyFuture;
 import org.apache.directory.ldap.client.api.future.SearchFuture;
-import org.apache.directory.shared.ldap.model.entry.Entry;
-import org.apache.directory.shared.ldap.model.exception.LdapException;
-import org.apache.directory.shared.ldap.model.message.AddRequest;
-import org.apache.directory.shared.ldap.model.message.BindRequest;
-import org.apache.directory.shared.ldap.model.message.CompareRequest;
-import org.apache.directory.shared.ldap.model.message.DeleteRequest;
-import org.apache.directory.shared.ldap.model.message.ExtendedRequest;
-import org.apache.directory.shared.ldap.model.message.ModifyDnRequest;
-import org.apache.directory.shared.ldap.model.message.ModifyRequest;
-import org.apache.directory.shared.ldap.model.message.SearchRequest;
-import org.apache.directory.shared.ldap.model.message.SearchScope;
-import org.apache.directory.shared.ldap.model.name.Dn;
 
 
 /**
@@ -146,7 +146,7 @@ public interface LdapAsyncConnection ext
      * @param scope The search scope : OBJECT, ONELEVEL or SUBTREE
      * @param attributes The attributes for this search
      * @return the search operation's future
-     * @throws org.apache.directory.shared.ldap.model.exception.LdapException if some error occurred
+     * @throws org.apache.directory.api.ldap.model.exception.LdapException if some error occurred
      */
     SearchFuture searchAsync( String baseDn, String filter, SearchScope scope, String... attributes )
         throws LdapException;

Modified: directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapConnection.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapConnection.java?rev=1423968&r1=1423967&r2=1423968&view=diff
==============================================================================
--- directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapConnection.java (original)
+++ directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapConnection.java Wed Dec 19 17:24:08 2012
@@ -24,36 +24,36 @@ import java.io.IOException;
 import java.util.List;
 
 import org.apache.directory.api.asn1.util.Oid;
+import org.apache.directory.api.ldap.model.cursor.EntryCursor;
+import org.apache.directory.api.ldap.model.cursor.SearchCursor;
+import org.apache.directory.api.ldap.model.entry.Entry;
+import org.apache.directory.api.ldap.model.entry.Modification;
+import org.apache.directory.api.ldap.model.entry.ModificationOperation;
+import org.apache.directory.api.ldap.model.entry.Value;
+import org.apache.directory.api.ldap.model.exception.LdapException;
+import org.apache.directory.api.ldap.model.message.AbandonRequest;
+import org.apache.directory.api.ldap.model.message.AddRequest;
+import org.apache.directory.api.ldap.model.message.AddResponse;
+import org.apache.directory.api.ldap.model.message.BindRequest;
+import org.apache.directory.api.ldap.model.message.BindResponse;
+import org.apache.directory.api.ldap.model.message.CompareRequest;
+import org.apache.directory.api.ldap.model.message.CompareResponse;
+import org.apache.directory.api.ldap.model.message.Control;
+import org.apache.directory.api.ldap.model.message.DeleteRequest;
+import org.apache.directory.api.ldap.model.message.DeleteResponse;
+import org.apache.directory.api.ldap.model.message.ExtendedRequest;
+import org.apache.directory.api.ldap.model.message.ExtendedResponse;
+import org.apache.directory.api.ldap.model.message.ModifyDnRequest;
+import org.apache.directory.api.ldap.model.message.ModifyDnResponse;
+import org.apache.directory.api.ldap.model.message.ModifyRequest;
+import org.apache.directory.api.ldap.model.message.ModifyResponse;
+import org.apache.directory.api.ldap.model.message.SearchRequest;
+import org.apache.directory.api.ldap.model.message.SearchScope;
+import org.apache.directory.api.ldap.model.name.Dn;
+import org.apache.directory.api.ldap.model.name.Rdn;
+import org.apache.directory.api.ldap.model.schema.SchemaManager;
 import org.apache.directory.shared.ldap.codec.api.BinaryAttributeDetector;
 import org.apache.directory.shared.ldap.codec.api.LdapApiService;
-import org.apache.directory.shared.ldap.model.cursor.EntryCursor;
-import org.apache.directory.shared.ldap.model.cursor.SearchCursor;
-import org.apache.directory.shared.ldap.model.entry.Entry;
-import org.apache.directory.shared.ldap.model.entry.Modification;
-import org.apache.directory.shared.ldap.model.entry.ModificationOperation;
-import org.apache.directory.shared.ldap.model.entry.Value;
-import org.apache.directory.shared.ldap.model.exception.LdapException;
-import org.apache.directory.shared.ldap.model.message.AbandonRequest;
-import org.apache.directory.shared.ldap.model.message.AddRequest;
-import org.apache.directory.shared.ldap.model.message.AddResponse;
-import org.apache.directory.shared.ldap.model.message.BindRequest;
-import org.apache.directory.shared.ldap.model.message.BindResponse;
-import org.apache.directory.shared.ldap.model.message.CompareRequest;
-import org.apache.directory.shared.ldap.model.message.CompareResponse;
-import org.apache.directory.shared.ldap.model.message.Control;
-import org.apache.directory.shared.ldap.model.message.DeleteRequest;
-import org.apache.directory.shared.ldap.model.message.DeleteResponse;
-import org.apache.directory.shared.ldap.model.message.ExtendedRequest;
-import org.apache.directory.shared.ldap.model.message.ExtendedResponse;
-import org.apache.directory.shared.ldap.model.message.ModifyDnRequest;
-import org.apache.directory.shared.ldap.model.message.ModifyDnResponse;
-import org.apache.directory.shared.ldap.model.message.ModifyRequest;
-import org.apache.directory.shared.ldap.model.message.ModifyResponse;
-import org.apache.directory.shared.ldap.model.message.SearchRequest;
-import org.apache.directory.shared.ldap.model.message.SearchScope;
-import org.apache.directory.shared.ldap.model.name.Dn;
-import org.apache.directory.shared.ldap.model.name.Rdn;
-import org.apache.directory.shared.ldap.model.schema.SchemaManager;
 
 
 /**
@@ -363,7 +363,7 @@ public interface LdapConnection
      * @param newRdn new Rdn for the target Dn
      * @return modifyDn operation's response
      * @throws {@link LdapException} if some error occurred
-     * @see #rename(org.apache.directory.shared.ldap.model.name.Dn, org.apache.directory.shared.ldap.model.name.Rdn, boolean)
+     * @see #rename(org.apache.directory.api.ldap.model.name.Dn, org.apache.directory.api.ldap.model.name.Rdn, boolean)
      */
     void rename( Dn entryDn, Rdn newRdn ) throws LdapException;
 
@@ -377,7 +377,7 @@ public interface LdapConnection
      * @param deleteOldRdn flag to indicate whether to delete the old Rdn
      * @return modifyDn operation's response
      * @throws {@link LdapException} if some error occurred
-     * @see #rename(org.apache.directory.shared.ldap.model.name.Dn, org.apache.directory.shared.ldap.model.name.Rdn, boolean)
+     * @see #rename(org.apache.directory.api.ldap.model.name.Dn, org.apache.directory.api.ldap.model.name.Rdn, boolean)
      */
     void rename( String entryDn, String newRdn, boolean deleteOldRdn ) throws LdapException;
 
@@ -402,7 +402,7 @@ public interface LdapConnection
      * @param newSuperiorDn Dn of the new parent/superior
      * @return modifyDn operation's response
      * @throws {@link LdapException} if some error occurred
-     * @see #move(org.apache.directory.shared.ldap.model.name.Dn, org.apache.directory.shared.ldap.model.name.Dn)
+     * @see #move(org.apache.directory.api.ldap.model.name.Dn, org.apache.directory.api.ldap.model.name.Dn)
      */
     void move( String entryDn, String newSuperiorDn ) throws LdapException;
 
@@ -425,7 +425,7 @@ public interface LdapConnection
      * @param newDn The new Entry Dn
      * @return modifyDn operations response
      * @throws {@link LdapException} if some error occurred
-     * @see #moveAndRename(org.apache.directory.shared.ldap.model.name.Dn, org.apache.directory.shared.ldap.model.name.Dn, boolean)
+     * @see #moveAndRename(org.apache.directory.api.ldap.model.name.Dn, org.apache.directory.api.ldap.model.name.Dn, boolean)
      */
     void moveAndRename( Dn entryDn, Dn newDn ) throws LdapException;
 
@@ -437,7 +437,7 @@ public interface LdapConnection
      * @param newDn The new Entry Dn
      * @return modifyDn operations response
      * @throws {@link LdapException} if some error occurred
-     * @see #moveAndRename(org.apache.directory.shared.ldap.model.name.Dn, org.apache.directory.shared.ldap.model.name.Dn, boolean)
+     * @see #moveAndRename(org.apache.directory.api.ldap.model.name.Dn, org.apache.directory.api.ldap.model.name.Dn, boolean)
      */
     void moveAndRename( String entryDn, String newDn ) throws LdapException;
 
@@ -701,7 +701,7 @@ public interface LdapConnection
      * @param dn the Dn of the entry to be fetched
      * @return the Entry with the given Dn or null if no entry exists with that Dn
      * @throws {@link LdapException} in case of any problems while searching for the Dn or if the returned response contains a referral
-     * @see #lookup(org.apache.directory.shared.ldap.model.name.Dn, String...)
+     * @see #lookup(org.apache.directory.api.ldap.model.name.Dn, String...)
      */
     Entry lookup( Dn dn ) throws LdapException;
 
@@ -747,7 +747,7 @@ public interface LdapConnection
      * @param attributes the attributes to be returned along with entry
      * @return the Entry with the given Dn or null if no entry exists with that Dn
      * @throws {@link LdapException} in case of any problems while searching for the Dn or if the returned response contains a referral
-     * @see #lookup(org.apache.directory.shared.ldap.model.name.Dn, String...)
+     * @see #lookup(org.apache.directory.api.ldap.model.name.Dn, String...)
      */
     Entry lookup( String dn, String... attributes ) throws LdapException;
 
@@ -760,7 +760,7 @@ public interface LdapConnection
      * @param attributes the attributes to be returned along with entry
      * @return the Entry with the given Dn or null if no entry exists with that Dn
      * @throws {@link LdapException} in case of any problems while searching for the Dn or if the returned response contains a referral
-     * @see #lookup(org.apache.directory.shared.ldap.model.name.Dn, String...)
+     * @see #lookup(org.apache.directory.api.ldap.model.name.Dn, String...)
      */
     Entry lookup( String dn, Control[] controls, String... attributes ) throws LdapException;
 

Modified: directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java?rev=1423968&r1=1423967&r2=1423968&view=diff
==============================================================================
--- directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java (original)
+++ directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java Wed Dec 19 17:24:08 2012
@@ -20,7 +20,7 @@
 package org.apache.directory.ldap.client.api;
 
 
-import static org.apache.directory.shared.ldap.model.message.ResultCodeEnum.processResponse;
+import static org.apache.directory.api.ldap.model.message.ResultCodeEnum.processResponse;
 
 import java.io.File;
 import java.io.FileWriter;
@@ -50,6 +50,80 @@ import javax.security.sasl.SaslClient;
 
 import org.apache.directory.api.asn1.DecoderException;
 import org.apache.directory.api.asn1.util.Oid;
+import org.apache.directory.api.ldap.model.constants.SchemaConstants;
+import org.apache.directory.api.ldap.model.cursor.Cursor;
+import org.apache.directory.api.ldap.model.cursor.EntryCursor;
+import org.apache.directory.api.ldap.model.cursor.SearchCursor;
+import org.apache.directory.api.ldap.model.entry.Attribute;
+import org.apache.directory.api.ldap.model.entry.DefaultEntry;
+import org.apache.directory.api.ldap.model.entry.Entry;
+import org.apache.directory.api.ldap.model.entry.Modification;
+import org.apache.directory.api.ldap.model.entry.ModificationOperation;
+import org.apache.directory.api.ldap.model.entry.Value;
+import org.apache.directory.api.ldap.model.exception.LdapAuthenticationException;
+import org.apache.directory.api.ldap.model.exception.LdapException;
+import org.apache.directory.api.ldap.model.exception.LdapInvalidDnException;
+import org.apache.directory.api.ldap.model.exception.LdapNoPermissionException;
+import org.apache.directory.api.ldap.model.exception.LdapOperationException;
+import org.apache.directory.api.ldap.model.message.AbandonRequest;
+import org.apache.directory.api.ldap.model.message.AbandonRequestImpl;
+import org.apache.directory.api.ldap.model.message.AddRequest;
+import org.apache.directory.api.ldap.model.message.AddRequestImpl;
+import org.apache.directory.api.ldap.model.message.AddResponse;
+import org.apache.directory.api.ldap.model.message.AliasDerefMode;
+import org.apache.directory.api.ldap.model.message.BindRequest;
+import org.apache.directory.api.ldap.model.message.BindRequestImpl;
+import org.apache.directory.api.ldap.model.message.BindResponse;
+import org.apache.directory.api.ldap.model.message.CompareRequest;
+import org.apache.directory.api.ldap.model.message.CompareRequestImpl;
+import org.apache.directory.api.ldap.model.message.CompareResponse;
+import org.apache.directory.api.ldap.model.message.Control;
+import org.apache.directory.api.ldap.model.message.DeleteRequest;
+import org.apache.directory.api.ldap.model.message.DeleteRequestImpl;
+import org.apache.directory.api.ldap.model.message.DeleteResponse;
+import org.apache.directory.api.ldap.model.message.ExtendedRequest;
+import org.apache.directory.api.ldap.model.message.ExtendedResponse;
+import org.apache.directory.api.ldap.model.message.IntermediateResponse;
+import org.apache.directory.api.ldap.model.message.IntermediateResponseImpl;
+import org.apache.directory.api.ldap.model.message.LdapResult;
+import org.apache.directory.api.ldap.model.message.Message;
+import org.apache.directory.api.ldap.model.message.ModifyDnRequest;
+import org.apache.directory.api.ldap.model.message.ModifyDnRequestImpl;
+import org.apache.directory.api.ldap.model.message.ModifyDnResponse;
+import org.apache.directory.api.ldap.model.message.ModifyRequest;
+import org.apache.directory.api.ldap.model.message.ModifyRequestImpl;
+import org.apache.directory.api.ldap.model.message.ModifyResponse;
+import org.apache.directory.api.ldap.model.message.Request;
+import org.apache.directory.api.ldap.model.message.Response;
+import org.apache.directory.api.ldap.model.message.ResultCodeEnum;
+import org.apache.directory.api.ldap.model.message.SearchRequest;
+import org.apache.directory.api.ldap.model.message.SearchRequestImpl;
+import org.apache.directory.api.ldap.model.message.SearchResultDone;
+import org.apache.directory.api.ldap.model.message.SearchResultEntry;
+import org.apache.directory.api.ldap.model.message.SearchResultReference;
+import org.apache.directory.api.ldap.model.message.SearchScope;
+import org.apache.directory.api.ldap.model.message.UnbindRequest;
+import org.apache.directory.api.ldap.model.message.UnbindRequestImpl;
+import org.apache.directory.api.ldap.model.message.controls.OpaqueControl;
+import org.apache.directory.api.ldap.model.message.extended.AddNoDResponse;
+import org.apache.directory.api.ldap.model.message.extended.BindNoDResponse;
+import org.apache.directory.api.ldap.model.message.extended.CompareNoDResponse;
+import org.apache.directory.api.ldap.model.message.extended.DeleteNoDResponse;
+import org.apache.directory.api.ldap.model.message.extended.ExtendedNoDResponse;
+import org.apache.directory.api.ldap.model.message.extended.ModifyDnNoDResponse;
+import org.apache.directory.api.ldap.model.message.extended.ModifyNoDResponse;
+import org.apache.directory.api.ldap.model.message.extended.NoticeOfDisconnect;
+import org.apache.directory.api.ldap.model.message.extended.SearchNoDResponse;
+import org.apache.directory.api.ldap.model.name.Dn;
+import org.apache.directory.api.ldap.model.name.Rdn;
+import org.apache.directory.api.ldap.model.schema.AttributeType;
+import org.apache.directory.api.ldap.model.schema.MutableAttributeType;
+import org.apache.directory.api.ldap.model.schema.ObjectClass;
+import org.apache.directory.api.ldap.model.schema.SchemaManager;
+import org.apache.directory.api.ldap.model.schema.parsers.OpenLdapSchemaParser;
+import org.apache.directory.api.ldap.model.schema.registries.AttributeTypeRegistry;
+import org.apache.directory.api.ldap.model.schema.registries.ObjectClassRegistry;
+import org.apache.directory.api.ldap.model.schema.registries.SchemaLoader;
 import org.apache.directory.api.util.StringConstants;
 import org.apache.directory.api.util.Strings;
 import org.apache.directory.ldap.client.api.callback.SaslCallbackHandler;
@@ -72,80 +146,6 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.codec.api.MessageDecorator;
 import org.apache.directory.shared.ldap.codec.api.MessageEncoderException;
 import org.apache.directory.shared.ldap.codec.api.SchemaBinaryAttributeDetector;
-import org.apache.directory.shared.ldap.model.constants.SchemaConstants;
-import org.apache.directory.shared.ldap.model.cursor.Cursor;
-import org.apache.directory.shared.ldap.model.cursor.EntryCursor;
-import org.apache.directory.shared.ldap.model.cursor.SearchCursor;
-import org.apache.directory.shared.ldap.model.entry.Attribute;
-import org.apache.directory.shared.ldap.model.entry.DefaultEntry;
-import org.apache.directory.shared.ldap.model.entry.Entry;
-import org.apache.directory.shared.ldap.model.entry.Modification;
-import org.apache.directory.shared.ldap.model.entry.ModificationOperation;
-import org.apache.directory.shared.ldap.model.entry.Value;
-import org.apache.directory.shared.ldap.model.exception.LdapAuthenticationException;
-import org.apache.directory.shared.ldap.model.exception.LdapException;
-import org.apache.directory.shared.ldap.model.exception.LdapInvalidDnException;
-import org.apache.directory.shared.ldap.model.exception.LdapNoPermissionException;
-import org.apache.directory.shared.ldap.model.exception.LdapOperationException;
-import org.apache.directory.shared.ldap.model.message.AbandonRequest;
-import org.apache.directory.shared.ldap.model.message.AbandonRequestImpl;
-import org.apache.directory.shared.ldap.model.message.AddRequest;
-import org.apache.directory.shared.ldap.model.message.AddRequestImpl;
-import org.apache.directory.shared.ldap.model.message.AddResponse;
-import org.apache.directory.shared.ldap.model.message.AliasDerefMode;
-import org.apache.directory.shared.ldap.model.message.BindRequest;
-import org.apache.directory.shared.ldap.model.message.BindRequestImpl;
-import org.apache.directory.shared.ldap.model.message.BindResponse;
-import org.apache.directory.shared.ldap.model.message.CompareRequest;
-import org.apache.directory.shared.ldap.model.message.CompareRequestImpl;
-import org.apache.directory.shared.ldap.model.message.CompareResponse;
-import org.apache.directory.shared.ldap.model.message.Control;
-import org.apache.directory.shared.ldap.model.message.DeleteRequest;
-import org.apache.directory.shared.ldap.model.message.DeleteRequestImpl;
-import org.apache.directory.shared.ldap.model.message.DeleteResponse;
-import org.apache.directory.shared.ldap.model.message.ExtendedRequest;
-import org.apache.directory.shared.ldap.model.message.ExtendedResponse;
-import org.apache.directory.shared.ldap.model.message.IntermediateResponse;
-import org.apache.directory.shared.ldap.model.message.IntermediateResponseImpl;
-import org.apache.directory.shared.ldap.model.message.LdapResult;
-import org.apache.directory.shared.ldap.model.message.Message;
-import org.apache.directory.shared.ldap.model.message.ModifyDnRequest;
-import org.apache.directory.shared.ldap.model.message.ModifyDnRequestImpl;
-import org.apache.directory.shared.ldap.model.message.ModifyDnResponse;
-import org.apache.directory.shared.ldap.model.message.ModifyRequest;
-import org.apache.directory.shared.ldap.model.message.ModifyRequestImpl;
-import org.apache.directory.shared.ldap.model.message.ModifyResponse;
-import org.apache.directory.shared.ldap.model.message.Request;
-import org.apache.directory.shared.ldap.model.message.Response;
-import org.apache.directory.shared.ldap.model.message.ResultCodeEnum;
-import org.apache.directory.shared.ldap.model.message.SearchRequest;
-import org.apache.directory.shared.ldap.model.message.SearchRequestImpl;
-import org.apache.directory.shared.ldap.model.message.SearchResultDone;
-import org.apache.directory.shared.ldap.model.message.SearchResultEntry;
-import org.apache.directory.shared.ldap.model.message.SearchResultReference;
-import org.apache.directory.shared.ldap.model.message.SearchScope;
-import org.apache.directory.shared.ldap.model.message.UnbindRequest;
-import org.apache.directory.shared.ldap.model.message.UnbindRequestImpl;
-import org.apache.directory.shared.ldap.model.message.controls.OpaqueControl;
-import org.apache.directory.shared.ldap.model.message.extended.AddNoDResponse;
-import org.apache.directory.shared.ldap.model.message.extended.BindNoDResponse;
-import org.apache.directory.shared.ldap.model.message.extended.CompareNoDResponse;
-import org.apache.directory.shared.ldap.model.message.extended.DeleteNoDResponse;
-import org.apache.directory.shared.ldap.model.message.extended.ExtendedNoDResponse;
-import org.apache.directory.shared.ldap.model.message.extended.ModifyDnNoDResponse;
-import org.apache.directory.shared.ldap.model.message.extended.ModifyNoDResponse;
-import org.apache.directory.shared.ldap.model.message.extended.NoticeOfDisconnect;
-import org.apache.directory.shared.ldap.model.message.extended.SearchNoDResponse;
-import org.apache.directory.shared.ldap.model.name.Dn;
-import org.apache.directory.shared.ldap.model.name.Rdn;
-import org.apache.directory.shared.ldap.model.schema.AttributeType;
-import org.apache.directory.shared.ldap.model.schema.MutableAttributeType;
-import org.apache.directory.shared.ldap.model.schema.ObjectClass;
-import org.apache.directory.shared.ldap.model.schema.SchemaManager;
-import org.apache.directory.shared.ldap.model.schema.parsers.OpenLdapSchemaParser;
-import org.apache.directory.shared.ldap.model.schema.registries.AttributeTypeRegistry;
-import org.apache.directory.shared.ldap.model.schema.registries.ObjectClassRegistry;
-import org.apache.directory.shared.ldap.model.schema.registries.SchemaLoader;
 import org.apache.directory.shared.ldap.schemamanager.impl.DefaultSchemaManager;
 import org.apache.mina.core.filterchain.IoFilter;
 import org.apache.mina.core.future.CloseFuture;

Modified: directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SaslRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SaslRequest.java?rev=1423968&r1=1423967&r2=1423968&view=diff
==============================================================================
--- directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SaslRequest.java (original)
+++ directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SaslRequest.java Wed Dec 19 17:24:08 2012
@@ -25,11 +25,11 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 
+import org.apache.directory.api.ldap.model.constants.SaslQoP;
+import org.apache.directory.api.ldap.model.constants.SaslSecurityStrength;
+import org.apache.directory.api.ldap.model.message.Control;
 import org.apache.directory.api.util.StringConstants;
 import org.apache.directory.api.util.Strings;
-import org.apache.directory.shared.ldap.model.constants.SaslQoP;
-import org.apache.directory.shared.ldap.model.constants.SaslSecurityStrength;
-import org.apache.directory.shared.ldap.model.message.Control;
 
 
 /**

Modified: directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SearchCursorImpl.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SearchCursorImpl.java?rev=1423968&r1=1423967&r2=1423968&view=diff
==============================================================================
--- directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SearchCursorImpl.java (original)
+++ directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/SearchCursorImpl.java Wed Dec 19 17:24:08 2012
@@ -25,19 +25,19 @@ import java.io.IOException;
 import java.util.concurrent.TimeUnit;
 
 import org.apache.directory.api.i18n.I18n;
+import org.apache.directory.api.ldap.model.cursor.AbstractCursor;
+import org.apache.directory.api.ldap.model.cursor.CursorException;
+import org.apache.directory.api.ldap.model.cursor.InvalidCursorPositionException;
+import org.apache.directory.api.ldap.model.cursor.SearchCursor;
+import org.apache.directory.api.ldap.model.entry.Entry;
+import org.apache.directory.api.ldap.model.exception.LdapException;
+import org.apache.directory.api.ldap.model.message.IntermediateResponse;
+import org.apache.directory.api.ldap.model.message.Referral;
+import org.apache.directory.api.ldap.model.message.Response;
+import org.apache.directory.api.ldap.model.message.SearchResultDone;
+import org.apache.directory.api.ldap.model.message.SearchResultEntry;
+import org.apache.directory.api.ldap.model.message.SearchResultReference;
 import org.apache.directory.ldap.client.api.future.SearchFuture;
-import org.apache.directory.shared.ldap.model.cursor.AbstractCursor;
-import org.apache.directory.shared.ldap.model.cursor.CursorException;
-import org.apache.directory.shared.ldap.model.cursor.InvalidCursorPositionException;
-import org.apache.directory.shared.ldap.model.cursor.SearchCursor;
-import org.apache.directory.shared.ldap.model.entry.Entry;
-import org.apache.directory.shared.ldap.model.exception.LdapException;
-import org.apache.directory.shared.ldap.model.message.IntermediateResponse;
-import org.apache.directory.shared.ldap.model.message.Referral;
-import org.apache.directory.shared.ldap.model.message.Response;
-import org.apache.directory.shared.ldap.model.message.SearchResultDone;
-import org.apache.directory.shared.ldap.model.message.SearchResultEntry;
-import org.apache.directory.shared.ldap.model.message.SearchResultReference;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

Modified: directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/exception/InvalidConnectionException.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/exception/InvalidConnectionException.java?rev=1423968&r1=1423967&r2=1423968&view=diff
==============================================================================
--- directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/exception/InvalidConnectionException.java (original)
+++ directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/exception/InvalidConnectionException.java Wed Dec 19 17:24:08 2012
@@ -20,7 +20,7 @@
 package org.apache.directory.ldap.client.api.exception;
 
 
-import org.apache.directory.shared.ldap.model.exception.LdapException;
+import org.apache.directory.api.ldap.model.exception.LdapException;
 
 
 /**

Modified: directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/AddFuture.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/AddFuture.java?rev=1423968&r1=1423967&r2=1423968&view=diff
==============================================================================
--- directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/AddFuture.java (original)
+++ directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/AddFuture.java Wed Dec 19 17:24:08 2012
@@ -24,8 +24,8 @@ import java.util.concurrent.ExecutionExc
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 
+import org.apache.directory.api.ldap.model.message.AddResponse;
 import org.apache.directory.ldap.client.api.LdapConnection;
-import org.apache.directory.shared.ldap.model.message.AddResponse;
 
 
 /**

Modified: directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/BindFuture.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/BindFuture.java?rev=1423968&r1=1423967&r2=1423968&view=diff
==============================================================================
--- directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/BindFuture.java (original)
+++ directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/BindFuture.java Wed Dec 19 17:24:08 2012
@@ -24,8 +24,8 @@ import java.util.concurrent.ExecutionExc
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 
+import org.apache.directory.api.ldap.model.message.BindResponse;
 import org.apache.directory.ldap.client.api.LdapConnection;
-import org.apache.directory.shared.ldap.model.message.BindResponse;
 
 
 /**

Modified: directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/CompareFuture.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/CompareFuture.java?rev=1423968&r1=1423967&r2=1423968&view=diff
==============================================================================
--- directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/CompareFuture.java (original)
+++ directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/CompareFuture.java Wed Dec 19 17:24:08 2012
@@ -24,8 +24,8 @@ import java.util.concurrent.ExecutionExc
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 
+import org.apache.directory.api.ldap.model.message.CompareResponse;
 import org.apache.directory.ldap.client.api.LdapConnection;
-import org.apache.directory.shared.ldap.model.message.CompareResponse;
 
 
 /**

Modified: directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/DeleteFuture.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/DeleteFuture.java?rev=1423968&r1=1423967&r2=1423968&view=diff
==============================================================================
--- directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/DeleteFuture.java (original)
+++ directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/DeleteFuture.java Wed Dec 19 17:24:08 2012
@@ -24,8 +24,8 @@ import java.util.concurrent.ExecutionExc
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 
+import org.apache.directory.api.ldap.model.message.DeleteResponse;
 import org.apache.directory.ldap.client.api.LdapConnection;
-import org.apache.directory.shared.ldap.model.message.DeleteResponse;
 
 
 /**

Modified: directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/ExtendedFuture.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/ExtendedFuture.java?rev=1423968&r1=1423967&r2=1423968&view=diff
==============================================================================
--- directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/ExtendedFuture.java (original)
+++ directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/ExtendedFuture.java Wed Dec 19 17:24:08 2012
@@ -24,8 +24,8 @@ import java.util.concurrent.ExecutionExc
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 
+import org.apache.directory.api.ldap.model.message.Response;
 import org.apache.directory.ldap.client.api.LdapConnection;
-import org.apache.directory.shared.ldap.model.message.Response;
 
 
 /**

Modified: directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/ModifyDnFuture.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/ModifyDnFuture.java?rev=1423968&r1=1423967&r2=1423968&view=diff
==============================================================================
--- directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/ModifyDnFuture.java (original)
+++ directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/ModifyDnFuture.java Wed Dec 19 17:24:08 2012
@@ -24,8 +24,8 @@ import java.util.concurrent.ExecutionExc
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 
+import org.apache.directory.api.ldap.model.message.ModifyDnResponse;
 import org.apache.directory.ldap.client.api.LdapConnection;
-import org.apache.directory.shared.ldap.model.message.ModifyDnResponse;
 
 
 /**

Modified: directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/ModifyFuture.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/ModifyFuture.java?rev=1423968&r1=1423967&r2=1423968&view=diff
==============================================================================
--- directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/ModifyFuture.java (original)
+++ directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/ModifyFuture.java Wed Dec 19 17:24:08 2012
@@ -24,8 +24,8 @@ import java.util.concurrent.ExecutionExc
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 
+import org.apache.directory.api.ldap.model.message.ModifyResponse;
 import org.apache.directory.ldap.client.api.LdapConnection;
-import org.apache.directory.shared.ldap.model.message.ModifyResponse;
 
 
 /**

Modified: directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/ResponseFuture.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/ResponseFuture.java?rev=1423968&r1=1423967&r2=1423968&view=diff
==============================================================================
--- directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/ResponseFuture.java (original)
+++ directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/ResponseFuture.java Wed Dec 19 17:24:08 2012
@@ -28,8 +28,8 @@ import java.util.concurrent.LinkedBlocki
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 
+import org.apache.directory.api.ldap.model.message.Response;
 import org.apache.directory.ldap.client.api.LdapConnection;
-import org.apache.directory.shared.ldap.model.message.Response;
 
 
 /**

Modified: directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/SearchFuture.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/SearchFuture.java?rev=1423968&r1=1423967&r2=1423968&view=diff
==============================================================================
--- directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/SearchFuture.java (original)
+++ directory/shared/branches/shared-refact/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/future/SearchFuture.java Wed Dec 19 17:24:08 2012
@@ -24,8 +24,8 @@ import java.util.concurrent.ExecutionExc
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 
+import org.apache.directory.api.ldap.model.message.Response;
 import org.apache.directory.ldap.client.api.LdapConnection;
-import org.apache.directory.shared.ldap.model.message.Response;
 
 
 /**

Modified: directory/shared/branches/shared-refact/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/AttributeValueAssertion.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-refact/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/AttributeValueAssertion.java?rev=1423968&r1=1423967&r2=1423968&view=diff
==============================================================================
--- directory/shared/branches/shared-refact/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/AttributeValueAssertion.java (original)
+++ directory/shared/branches/shared-refact/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/AttributeValueAssertion.java Wed Dec 19 17:24:08 2012
@@ -20,9 +20,9 @@
 package org.apache.directory.shared.ldap.codec;
 
 
+import org.apache.directory.api.ldap.model.entry.*;
 import org.apache.directory.api.util.Strings;
 import org.apache.directory.shared.ldap.codec.api.LdapConstants;
-import org.apache.directory.shared.ldap.model.entry.*;
 
 
 /**

Modified: directory/shared/branches/shared-refact/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/BasicControlDecorator.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-refact/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/BasicControlDecorator.java?rev=1423968&r1=1423967&r2=1423968&view=diff
==============================================================================
--- directory/shared/branches/shared-refact/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/BasicControlDecorator.java (original)
+++ directory/shared/branches/shared-refact/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/BasicControlDecorator.java Wed Dec 19 17:24:08 2012
@@ -26,11 +26,11 @@ import org.apache.directory.api.asn1.Asn
 import org.apache.directory.api.asn1.DecoderException;
 import org.apache.directory.api.asn1.EncoderException;
 import org.apache.directory.api.i18n.I18n;
+import org.apache.directory.api.ldap.model.message.Control;
+import org.apache.directory.api.ldap.model.message.controls.AbstractControl;
 import org.apache.directory.shared.ldap.codec.api.ControlDecorator;
 import org.apache.directory.shared.ldap.codec.api.ControlFactory;
 import org.apache.directory.shared.ldap.codec.api.LdapApiService;
-import org.apache.directory.shared.ldap.model.message.Control;
-import org.apache.directory.shared.ldap.model.message.controls.AbstractControl;
 
 
 /**

Modified: directory/shared/branches/shared-refact/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java
URL: http://svn.apache.org/viewvc/directory/shared/branches/shared-refact/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java?rev=1423968&r1=1423967&r2=1423968&view=diff
==============================================================================
--- directory/shared/branches/shared-refact/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java (original)
+++ directory/shared/branches/shared-refact/ldap/codec/core/src/main/java/org/apache/directory/shared/ldap/codec/LdapMessageGrammar.java Wed Dec 19 17:24:08 2012
@@ -35,6 +35,7 @@ import org.apache.directory.api.asn1.ber
 import org.apache.directory.api.asn1.ber.grammar.GrammarTransition;
 import org.apache.directory.api.asn1.ber.tlv.TLV;
 import org.apache.directory.api.i18n.I18n;
+import org.apache.directory.api.ldap.model.message.Message;
 import org.apache.directory.api.util.Strings;
 import org.apache.directory.shared.ldap.codec.actions.AllowGrammarEnd;
 import org.apache.directory.shared.ldap.codec.actions.CheckLengthNotNull;
@@ -134,7 +135,6 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.codec.api.MessageDecorator;
 import org.apache.directory.shared.ldap.codec.decorators.SearchRequestDecorator;
 import org.apache.directory.shared.ldap.codec.search.ExtensibleMatchFilter;
-import org.apache.directory.shared.ldap.model.message.Message;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 



Mime
View raw message