You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by ak...@apache.org on 2011/01/23 02:17:26 UTC
svn commit: r1062306 [28/32] - in /directory:
apacheds-manuals/trunk/src/advanced-user-guide/
apacheds-manuals/trunk/src/basic-user-guide/
apacheds/trunk/core-annotations/src/main/java/org/apache/directory/server/core/factory/
apacheds/trunk/core-api/s...
Modified: directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/util/tree/TestDnNode.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/util/tree/TestDnNode.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/util/tree/TestDnNode.java (original)
+++ directory/shared/trunk/ldap/src/test/java/org/apache/directory/shared/ldap/util/tree/TestDnNode.java Sun Jan 23 01:17:06 2011
@@ -32,8 +32,8 @@ import org.apache.directory.junit.tools.
import org.apache.directory.junit.tools.ConcurrentJunitRunner;
import org.apache.directory.shared.ldap.exception.LdapException;
import org.apache.directory.shared.ldap.exception.LdapUnwillingToPerformException;
-import org.apache.directory.shared.ldap.name.DN;
-import org.apache.directory.shared.ldap.name.RDN;
+import org.apache.directory.shared.ldap.name.Dn;
+import org.apache.directory.shared.ldap.name.Rdn;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -48,42 +48,42 @@ import org.junit.runner.RunWith;
public class TestDnNode
{
//---------------------------------------------------------------------------
- // Test the Add( DN ) operation
+ // Test the Add( Dn ) operation
//---------------------------------------------------------------------------
/**
- * Test the addition of a null DN
+ * Test the addition of a null Dn
*/
@Test( expected=LdapUnwillingToPerformException.class)
public void testAddNullDNNoElem() throws LdapException
{
- DnNode<DN> tree = new DnNode<DN>();
+ DnNode<Dn> tree = new DnNode<Dn>();
tree.add( null );
}
/**
- * Test the addition of a DN with three RDN
+ * Test the addition of a Dn with three Rdn
*/
@Test
public void testAdd3LevelDNNoElem() throws LdapException
{
- DnNode<DN> tree = new DnNode<DN>( DN.EMPTY_DN, null );
- DN dn = new DN( "dc=c,dc=b,dc=a" );
+ DnNode<Dn> tree = new DnNode<Dn>( Dn.EMPTY_DN, null );
+ Dn dn = new Dn( "dc=c,dc=b,dc=a" );
tree.add( dn );
assertNotNull( tree );
- Map<RDN, DnNode<DN>> children = tree.getChildren();
+ Map<Rdn, DnNode<Dn>> children = tree.getChildren();
assertNotNull( children );
assertEquals( 1, children.size() );
assertNull( tree.getElement() );
- DnNode<DN> level1 = children.get( new RDN( "dc=a" ) );
- DnNode<DN> level2 = level1.getChildren().get( new RDN( "dc=b" ) );
- DnNode<DN> level3 = level2.getChildren().get( new RDN( "dc=c" ) );
+ DnNode<Dn> level1 = children.get( new Rdn( "dc=a" ) );
+ DnNode<Dn> level2 = level1.getChildren().get( new Rdn( "dc=b" ) );
+ DnNode<Dn> level3 = level2.getChildren().get( new Rdn( "dc=c" ) );
assertNotNull( level3 );
assertFalse( level3.hasElement() );
@@ -96,29 +96,29 @@ public class TestDnNode
@Test
public void testAdd2DistinctDNsNoElem() throws LdapException
{
- DnNode<DN> tree = new DnNode<DN>();
- DN dn1 = new DN( "dc=b,dc=a" );
- DN dn2 = new DN( "dc=f,dc=e" );
+ DnNode<Dn> tree = new DnNode<Dn>();
+ Dn dn1 = new Dn( "dc=b,dc=a" );
+ Dn dn2 = new Dn( "dc=f,dc=e" );
tree.add( dn1 );
tree.add( dn2 );
assertNotNull( tree );
- Map<RDN, DnNode<DN>> children = tree.getChildren();
+ Map<Rdn, DnNode<Dn>> children = tree.getChildren();
assertNotNull( children );
assertEquals( 2, children.size() );
assertNull( tree.getElement() );
- DnNode<DN> level1 = children.get( new RDN( "dc=a" ) );
- DnNode<DN> level2 = level1.getChildren().get( new RDN( "dc=b" ) );
+ DnNode<Dn> level1 = children.get( new Rdn( "dc=a" ) );
+ DnNode<Dn> level2 = level1.getChildren().get( new Rdn( "dc=b" ) );
assertNotNull( level2 );
assertFalse( level2.hasElement() );
- level1 = children.get( new RDN( "dc=e" ) );
- level2 = level1.getChildren().get( new RDN( "dc=f" ) );
+ level1 = children.get( new Rdn( "dc=e" ) );
+ level2 = level1.getChildren().get( new Rdn( "dc=f" ) );
assertNotNull( level2 );
assertFalse( level2.hasElement() );
@@ -131,25 +131,25 @@ public class TestDnNode
@Test
public void testAdd2OverlappingDNsNoElem() throws LdapException
{
- DnNode<DN> tree = new DnNode<DN>();
- DN dn1 = new DN( "dc=b,dc=a" );
- DN dn2 = new DN( "dc=f,dc=a" );
+ DnNode<Dn> tree = new DnNode<Dn>();
+ Dn dn1 = new Dn( "dc=b,dc=a" );
+ Dn dn2 = new Dn( "dc=f,dc=a" );
tree.add( dn1 );
tree.add( dn2 );
assertNotNull( tree );
- Map<RDN, DnNode<DN>> children = tree.getChildren();
+ Map<Rdn, DnNode<Dn>> children = tree.getChildren();
assertNotNull( children );
assertEquals( 1, children.size() );
assertNull( tree.getElement() );
- DnNode<DN> level1 = children.get( new RDN( "dc=a" ) );
- DnNode<DN> level2 = level1.getChildren().get( new RDN( "dc=b" ) );
+ DnNode<Dn> level1 = children.get( new Rdn( "dc=a" ) );
+ DnNode<Dn> level2 = level1.getChildren().get( new Rdn( "dc=b" ) );
- Map<RDN, DnNode<DN>> childrenDn1 = level1.getChildren();
+ Map<Rdn, DnNode<Dn>> childrenDn1 = level1.getChildren();
assertNotNull( childrenDn1 );
assertEquals( 2, childrenDn1.size() );
@@ -158,8 +158,8 @@ public class TestDnNode
assertNotNull( level2 );
assertFalse( level2.hasElement() );
- level1 = children.get( new RDN( "dc=a" ) );
- level2 = level1.getChildren().get( new RDN( "dc=f" ) );
+ level1 = children.get( new Rdn( "dc=a" ) );
+ level2 = level1.getChildren().get( new Rdn( "dc=f" ) );
assertNotNull( level2 );
assertFalse( level2.hasElement() );
@@ -172,9 +172,9 @@ public class TestDnNode
@Test( expected=LdapUnwillingToPerformException.class)
public void testAdd2EqualDNsNoElem() throws LdapException
{
- DnNode<DN> tree = new DnNode<DN>();
- DN dn1 = new DN( "dc=b,dc=a" );
- DN dn2 = new DN( "dc=b,dc=a" );
+ DnNode<Dn> tree = new DnNode<Dn>();
+ Dn dn1 = new Dn( "dc=b,dc=a" );
+ Dn dn2 = new Dn( "dc=b,dc=a" );
tree.add( dn1 );
tree.add( dn2 );
@@ -182,42 +182,42 @@ public class TestDnNode
//---------------------------------------------------------------------------
- // Test the Add( DN, N ) operation
+ // Test the Add( Dn, N ) operation
//---------------------------------------------------------------------------
/**
- * Test the addition of a null DN
+ * Test the addition of a null Dn
*/
@Test( expected=LdapUnwillingToPerformException.class)
public void testAddNullDN() throws LdapException
{
- DnNode<DN> tree = new DnNode<DN>();
+ DnNode<Dn> tree = new DnNode<Dn>();
- tree.add( (DN)null, null );
+ tree.add( (Dn)null, null );
}
/**
- * Test the addition of a DN with three RDN
+ * Test the addition of a Dn with three Rdn
*/
@Test
public void testAdd3LevelDN() throws LdapException
{
- DnNode<DN> tree = new DnNode<DN>();
- DN dn = new DN( "dc=c,dc=b,dc=a" );
+ DnNode<Dn> tree = new DnNode<Dn>();
+ Dn dn = new Dn( "dc=c,dc=b,dc=a" );
tree.add( dn, dn );
assertNotNull( tree );
- Map<RDN, DnNode<DN>> children = tree.getChildren();
+ Map<Rdn, DnNode<Dn>> children = tree.getChildren();
assertNotNull( children );
assertEquals( 1, children.size() );
assertNull( tree.getElement() );
- DnNode<DN> level1 = children.get( new RDN( "dc=a" ) );
- DnNode<DN> level2 = level1.getChildren().get( new RDN( "dc=b" ) );
- DnNode<DN> level3 = level2.getChildren().get( new RDN( "dc=c" ) );
+ DnNode<Dn> level1 = children.get( new Rdn( "dc=a" ) );
+ DnNode<Dn> level2 = level1.getChildren().get( new Rdn( "dc=b" ) );
+ DnNode<Dn> level3 = level2.getChildren().get( new Rdn( "dc=c" ) );
assertNotNull( level3 );
assertEquals( dn, level3.getElement() );
@@ -230,29 +230,29 @@ public class TestDnNode
@Test
public void testAdd2DistinctDNs() throws LdapException
{
- DnNode<DN> tree = new DnNode<DN>();
- DN dn1 = new DN( "dc=b,dc=a" );
- DN dn2 = new DN( "dc=f,dc=e" );
+ DnNode<Dn> tree = new DnNode<Dn>();
+ Dn dn1 = new Dn( "dc=b,dc=a" );
+ Dn dn2 = new Dn( "dc=f,dc=e" );
tree.add( dn1, dn1 );
tree.add( dn2, dn2 );
assertNotNull( tree );
- Map<RDN, DnNode<DN>> children = tree.getChildren();
+ Map<Rdn, DnNode<Dn>> children = tree.getChildren();
assertNotNull( children );
assertEquals( 2, children.size() );
assertNull( tree.getElement() );
- DnNode<DN> level1 = children.get( new RDN( "dc=a" ) );
- DnNode<DN> level2 = level1.getChildren().get( new RDN( "dc=b" ) );
+ DnNode<Dn> level1 = children.get( new Rdn( "dc=a" ) );
+ DnNode<Dn> level2 = level1.getChildren().get( new Rdn( "dc=b" ) );
assertNotNull( level2 );
assertEquals( dn1, level2.getElement() );
- level1 = children.get( new RDN( "dc=e" ) );
- level2 = level1.getChildren().get( new RDN( "dc=f" ) );
+ level1 = children.get( new Rdn( "dc=e" ) );
+ level2 = level1.getChildren().get( new Rdn( "dc=f" ) );
assertNotNull( level2 );
assertEquals( dn2, level2.getElement() );
@@ -265,25 +265,25 @@ public class TestDnNode
@Test
public void testAdd2OverlappingDNs() throws LdapException
{
- DnNode<DN> tree = new DnNode<DN>();
- DN dn1 = new DN( "dc=b,dc=a" );
- DN dn2 = new DN( "dc=f,dc=a" );
+ DnNode<Dn> tree = new DnNode<Dn>();
+ Dn dn1 = new Dn( "dc=b,dc=a" );
+ Dn dn2 = new Dn( "dc=f,dc=a" );
tree.add( dn1, dn1 );
tree.add( dn2, dn2 );
assertNotNull( tree );
- Map<RDN, DnNode<DN>> children = tree.getChildren();
+ Map<Rdn, DnNode<Dn>> children = tree.getChildren();
assertNotNull( children );
assertEquals( 1, children.size() );
assertNull( tree.getElement() );
- DnNode<DN> level1 = children.get( new RDN( "dc=a" ) );
- DnNode<DN> level2 = level1.getChildren().get( new RDN( "dc=b" ) );
+ DnNode<Dn> level1 = children.get( new Rdn( "dc=a" ) );
+ DnNode<Dn> level2 = level1.getChildren().get( new Rdn( "dc=b" ) );
- Map<RDN, DnNode<DN>> childrenDn1 = level1.getChildren();
+ Map<Rdn, DnNode<Dn>> childrenDn1 = level1.getChildren();
assertNotNull( childrenDn1 );
assertEquals( 2, childrenDn1.size() );
@@ -292,8 +292,8 @@ public class TestDnNode
assertNotNull( level2 );
assertEquals( dn1, level2.getElement() );
- level1 = children.get( new RDN( "dc=a" ) );
- level2 = level1.getChildren().get( new RDN( "dc=f" ) );
+ level1 = children.get( new Rdn( "dc=a" ) );
+ level2 = level1.getChildren().get( new Rdn( "dc=f" ) );
assertNotNull( level2 );
assertEquals( dn2, level2.getElement() );
@@ -306,9 +306,9 @@ public class TestDnNode
@Test( expected=LdapUnwillingToPerformException.class)
public void testAdd2EqualDNs() throws LdapException
{
- DnNode<DN> tree = new DnNode<DN>();
- DN dn1 = new DN( "dc=b,dc=a" );
- DN dn2 = new DN( "dc=b,dc=a" );
+ DnNode<Dn> tree = new DnNode<Dn>();
+ Dn dn1 = new Dn( "dc=b,dc=a" );
+ Dn dn2 = new Dn( "dc=b,dc=a" );
tree.add( dn1, dn1 );
tree.add( dn2, dn2 );
@@ -321,34 +321,34 @@ public class TestDnNode
@Test
public void testHasChildren() throws Exception
{
- DnNode<DN> tree = new DnNode<DN>();
- DN dn1 = new DN( "dc=b,dc=a" );
+ DnNode<Dn> tree = new DnNode<Dn>();
+ Dn dn1 = new Dn( "dc=b,dc=a" );
tree.add( dn1 );
assertTrue( tree.hasChildren() );
- Map<RDN, DnNode<DN>> children = tree.getChildren();
+ Map<Rdn, DnNode<Dn>> children = tree.getChildren();
assertNotNull( children );
- DnNode<DN> child = children.get( new RDN( "dc=a" ) );
+ DnNode<Dn> child = children.get( new Rdn( "dc=a" ) );
assertTrue( child.hasChildren() );
children = child.getChildren();
- child = children.get( new RDN( "dc=b" ) );
+ child = children.get( new Rdn( "dc=b" ) );
assertFalse( child.hasChildren() );
}
//---------------------------------------------------------------------------
- // Test the hasChildren(DN) method
+ // Test the hasChildren(Dn) method
//---------------------------------------------------------------------------
@Test
public void testHasChildrenDN() throws Exception
{
- DnNode<DN> tree = new DnNode<DN>();
- DN dn1 = new DN( "dc=b,dc=a" );
+ DnNode<Dn> tree = new DnNode<Dn>();
+ Dn dn1 = new Dn( "dc=b,dc=a" );
tree.add( dn1 );
- assertTrue( tree.hasChildren( new DN( "dc=a" ) ) );
+ assertTrue( tree.hasChildren( new Dn( "dc=a" ) ) );
assertFalse( tree.hasChildren( dn1 ) );
}
@@ -359,39 +359,39 @@ public class TestDnNode
@Test
public void testIsLeaf() throws Exception
{
- DnNode<DN> tree = new DnNode<DN>();
- DN dn = new DN( "dc=c,dc=b,dc=a" );
+ DnNode<Dn> tree = new DnNode<Dn>();
+ Dn dn = new Dn( "dc=c,dc=b,dc=a" );
tree.add( dn );
assertFalse( tree.isLeaf() );
- DnNode<DN> child = tree.getChild( new RDN( "dc=a" ) );
+ DnNode<Dn> child = tree.getChild( new Rdn( "dc=a" ) );
assertFalse( child.isLeaf() );
- child = child.getChild( new RDN( "dc=b" ) );
+ child = child.getChild( new Rdn( "dc=b" ) );
assertFalse( child.isLeaf() );
- child = child.getChild( new RDN( "dc=c" ) );
+ child = child.getChild( new Rdn( "dc=c" ) );
assertTrue( child.isLeaf() );
}
//---------------------------------------------------------------------------
- // Test the isLeaf(DN) method
+ // Test the isLeaf(Dn) method
//---------------------------------------------------------------------------
@Test
public void testIsLeafDN() throws Exception
{
- DnNode<DN> tree = new DnNode<DN>();
- DN dn1 = new DN( "dc=c,dc=b,dc=a" );
+ DnNode<Dn> tree = new DnNode<Dn>();
+ Dn dn1 = new Dn( "dc=c,dc=b,dc=a" );
tree.add( dn1, dn1 );
- DN dn2 = new DN( "dc=e,dc=a" );
+ Dn dn2 = new Dn( "dc=e,dc=a" );
tree.add( dn2 );
- assertFalse( tree.isLeaf( DN.EMPTY_DN ) );
- assertFalse( tree.isLeaf( new DN( "dc=a" ) ) );
- assertFalse( tree.isLeaf( new DN( "dc=b,dc=a" ) ) );
+ assertFalse( tree.isLeaf( Dn.EMPTY_DN ) );
+ assertFalse( tree.isLeaf( new Dn( "dc=a" ) ) );
+ assertFalse( tree.isLeaf( new Dn( "dc=b,dc=a" ) ) );
assertTrue( tree.isLeaf( dn1 ) );
assertTrue( tree.isLeaf( dn2 ) );
}
@@ -403,19 +403,19 @@ public class TestDnNode
@Test
public void testGetElement() throws Exception
{
- DnNode<DN> tree = new DnNode<DN>();
- DN dn = new DN( "dc=c,dc=b,dc=a" );
+ DnNode<Dn> tree = new DnNode<Dn>();
+ Dn dn = new Dn( "dc=c,dc=b,dc=a" );
tree.add( dn, dn );
assertNull( tree.getElement() );
- DnNode<DN> child = tree.getChild( new RDN( "dc=a" ) );
+ DnNode<Dn> child = tree.getChild( new Rdn( "dc=a" ) );
assertNull( child.getElement() );
- child = child.getChild( new RDN( "dc=b" ) );
+ child = child.getChild( new Rdn( "dc=b" ) );
assertNull( child.getElement() );
- child = child.getChild( new RDN( "dc=c" ) );
+ child = child.getChild( new Rdn( "dc=c" ) );
assertEquals( dn, child.getElement() );
}
@@ -426,61 +426,61 @@ public class TestDnNode
@Test
public void testHasElement() throws Exception
{
- DnNode<DN> tree = new DnNode<DN>();
- DN dn = new DN( "dc=c,dc=b,dc=a" );
+ DnNode<Dn> tree = new DnNode<Dn>();
+ Dn dn = new Dn( "dc=c,dc=b,dc=a" );
tree.add( dn, dn );
assertFalse( tree.hasElement() );
- DnNode<DN> child = tree.getChild( new RDN( "dc=a" ) );
+ DnNode<Dn> child = tree.getChild( new Rdn( "dc=a" ) );
assertFalse( child.hasElement() );
- child = child.getChild( new RDN( "dc=b" ) );
+ child = child.getChild( new Rdn( "dc=b" ) );
assertFalse( child.hasElement() );
- child = child.getChild( new RDN( "dc=c" ) );
+ child = child.getChild( new Rdn( "dc=c" ) );
assertTrue( child.hasElement() );
}
//---------------------------------------------------------------------------
- // Test the getElement(DN) method
+ // Test the getElement(Dn) method
//---------------------------------------------------------------------------
@Test
public void testGetElementDN() throws Exception
{
- DnNode<DN> tree = new DnNode<DN>();
- DN dn1 = new DN( "dc=c,dc=b,dc=a" );
+ DnNode<Dn> tree = new DnNode<Dn>();
+ Dn dn1 = new Dn( "dc=c,dc=b,dc=a" );
tree.add( dn1, dn1 );
- DN dn2 = new DN( "dc=e,dc=a" );
+ Dn dn2 = new Dn( "dc=e,dc=a" );
tree.add( dn2, dn2 );
- assertNull( tree.getElement( DN.EMPTY_DN ) );
- assertNull( tree.getElement( new DN( "dc=a" ) ) );
- assertNull( tree.getElement( new DN( "dc=b,dc=a" ) ) );
+ assertNull( tree.getElement( Dn.EMPTY_DN ) );
+ assertNull( tree.getElement( new Dn( "dc=a" ) ) );
+ assertNull( tree.getElement( new Dn( "dc=b,dc=a" ) ) );
assertEquals( dn1, tree.getElement( dn1 ) );
assertEquals( dn2, tree.getElement( dn2 ) );
- assertEquals( dn2, tree.getElement( new DN( "dc=g,dc=f,dc=e,dc=a" ) ) );
+ assertEquals( dn2, tree.getElement( new Dn( "dc=g,dc=f,dc=e,dc=a" ) ) );
}
//---------------------------------------------------------------------------
- // Test the hasElement(DN) method
+ // Test the hasElement(Dn) method
//---------------------------------------------------------------------------
@Test
public void testHasElementDN() throws Exception
{
- DnNode<DN> tree = new DnNode<DN>();
- DN dn1 = new DN( "dc=c,dc=b,dc=a" );
+ DnNode<Dn> tree = new DnNode<Dn>();
+ Dn dn1 = new Dn( "dc=c,dc=b,dc=a" );
tree.add( dn1, dn1 );
- DN dn2 = new DN( "dc=e,dc=a" );
+ Dn dn2 = new Dn( "dc=e,dc=a" );
tree.add( dn2 );
- assertFalse( tree.hasElement( DN.EMPTY_DN ) );
- assertFalse( tree.hasElement( new DN( "dc=a" ) ) );
- assertFalse( tree.hasElement( new DN( "dc=b,dc=a" ) ) );
+ assertFalse( tree.hasElement( Dn.EMPTY_DN ) );
+ assertFalse( tree.hasElement( new Dn( "dc=a" ) ) );
+ assertFalse( tree.hasElement( new Dn( "dc=b,dc=a" ) ) );
assertTrue( tree.hasElement( dn1 ) );
assertFalse( tree.hasElement( dn2 ) );
}
@@ -492,22 +492,22 @@ public class TestDnNode
@Test
public void testSize() throws LdapException
{
- DnNode<DN> tree = new DnNode<DN>();
+ DnNode<Dn> tree = new DnNode<Dn>();
assertEquals( 1, tree.size() );
- tree.add( new DN( "dc=b,dc=a" ) );
+ tree.add( new Dn( "dc=b,dc=a" ) );
assertEquals( 3, tree.size() );
- tree.add( new DN( "dc=f,dc=a" ) );
+ tree.add( new Dn( "dc=f,dc=a" ) );
assertEquals( 4, tree.size() );
- tree.add( new DN( "dc=a,dc=f,dc=a" ) );
+ tree.add( new Dn( "dc=a,dc=f,dc=a" ) );
assertEquals( 5, tree.size() );
- tree.add( new DN( "dc=b,dc=f,dc=a" ) );
+ tree.add( new Dn( "dc=b,dc=f,dc=a" ) );
assertEquals( 6, tree.size() );
- tree.add( new DN( "dc=z,dc=t" ) );
+ tree.add( new Dn( "dc=z,dc=t" ) );
assertEquals( 8, tree.size() );
}
@@ -518,48 +518,48 @@ public class TestDnNode
@Test
public void testGetParent() throws Exception
{
- DnNode<DN> tree = new DnNode<DN>();
- DN dn = new DN( "dc=c,dc=b,dc=a" );
+ DnNode<Dn> tree = new DnNode<Dn>();
+ Dn dn = new Dn( "dc=c,dc=b,dc=a" );
tree.add( dn, dn );
assertNull( tree.getParent() );
- DnNode<DN> child = tree.getChild( new RDN( "dc=a" ) );
+ DnNode<Dn> child = tree.getChild( new Rdn( "dc=a" ) );
assertEquals( tree, child.getParent() );
- DnNode<DN> child1 = child.getChild( new RDN( "dc=b" ) );
+ DnNode<Dn> child1 = child.getChild( new Rdn( "dc=b" ) );
assertEquals( child, child1.getParent() );
- child = child1.getChild( new RDN( "dc=c" ) );
+ child = child1.getChild( new Rdn( "dc=c" ) );
assertEquals( child1, child.getParent() );
}
//---------------------------------------------------------------------------
- // Test the getNode(DN) method
+ // Test the getNode(Dn) method
//---------------------------------------------------------------------------
@Test
public void testGetNodeDN() throws Exception
{
- DnNode<DN> tree = new DnNode<DN>();
- DN dn1 = new DN( "dc=c,dc=b,dc=a" );
+ DnNode<Dn> tree = new DnNode<Dn>();
+ Dn dn1 = new Dn( "dc=c,dc=b,dc=a" );
tree.add( dn1, dn1 );
- DN dn2 = new DN( "dc=e,dc=a" );
+ Dn dn2 = new Dn( "dc=e,dc=a" );
tree.add( dn2, dn2 );
- assertNull( tree.getNode( DN.EMPTY_DN ) );
+ assertNull( tree.getNode( Dn.EMPTY_DN ) );
- DnNode<DN> child = tree.getChild( new RDN( "dc=a" ) );
- assertEquals( child, tree.getNode( new DN( "dc=a" ) ) );
+ DnNode<Dn> child = tree.getChild( new Rdn( "dc=a" ) );
+ assertEquals( child, tree.getNode( new Dn( "dc=a" ) ) );
- child = child.getChild( new RDN( "dc=b" ) );
- assertEquals( child, tree.getNode( new DN( "dc=b,dc=a" ) ) );
+ child = child.getChild( new Rdn( "dc=b" ) );
+ assertEquals( child, tree.getNode( new Dn( "dc=b,dc=a" ) ) );
- child = child.getChild( new RDN( "dc=c" ) );
- assertEquals( child, tree.getNode( new DN( "dc=c,dc=b,dc=a" ) ) );
+ child = child.getChild( new Rdn( "dc=c" ) );
+ assertEquals( child, tree.getNode( new Dn( "dc=c,dc=b,dc=a" ) ) );
- assertEquals( child, tree.getNode( new DN( "dc=f,dc=e,dc=c,dc=b,dc=a" ) ) );
+ assertEquals( child, tree.getNode( new Dn( "dc=f,dc=e,dc=c,dc=b,dc=a" ) ) );
}
@@ -569,66 +569,66 @@ public class TestDnNode
@Test
public void testHasParent() throws Exception
{
- DnNode<DN> tree = new DnNode<DN>();
- DN dn = new DN( "dc=c,dc=b,dc=a" );
+ DnNode<Dn> tree = new DnNode<Dn>();
+ Dn dn = new Dn( "dc=c,dc=b,dc=a" );
tree.add( dn, dn );
assertFalse( tree.hasParent() );
- DnNode<DN> child = tree.getChild( new RDN( "dc=a" ) );
+ DnNode<Dn> child = tree.getChild( new Rdn( "dc=a" ) );
assertTrue( child.hasParent() );
- DnNode<DN> child1 = child.getChild( new RDN( "dc=b" ) );
+ DnNode<Dn> child1 = child.getChild( new Rdn( "dc=b" ) );
assertTrue( child1.hasParent() );
- child = child1.getChild( new RDN( "dc=c" ) );
+ child = child1.getChild( new Rdn( "dc=c" ) );
assertTrue( child.hasParent() );
}
//---------------------------------------------------------------------------
- // Test the hasParent(DN) method
+ // Test the hasParent(Dn) method
//---------------------------------------------------------------------------
@Test
public void testHasParentDN() throws Exception
{
- DnNode<DN> tree = new DnNode<DN>();
- DN dn1 = new DN( "dc=c,dc=b,dc=a" );
+ DnNode<Dn> tree = new DnNode<Dn>();
+ Dn dn1 = new Dn( "dc=c,dc=b,dc=a" );
tree.add( dn1, dn1 );
- DN dn2 = new DN( "dc=e,dc=a" );
+ Dn dn2 = new Dn( "dc=e,dc=a" );
tree.add( dn2, dn2 );
- assertFalse( tree.hasParent( DN.EMPTY_DN ) );
+ assertFalse( tree.hasParent( Dn.EMPTY_DN ) );
- DnNode<DN> child = tree.getChild( new RDN( "dc=a" ) );
- assertTrue( tree.hasParent( new DN( "dc=a" ) ) );
+ DnNode<Dn> child = tree.getChild( new Rdn( "dc=a" ) );
+ assertTrue( tree.hasParent( new Dn( "dc=a" ) ) );
- child = child.getChild( new RDN( "dc=b" ) );
- assertTrue( tree.hasParent( new DN( "dc=b,dc=a" ) ) );
+ child = child.getChild( new Rdn( "dc=b" ) );
+ assertTrue( tree.hasParent( new Dn( "dc=b,dc=a" ) ) );
- child = child.getChild( new RDN( "dc=c" ) );
- assertTrue( tree.hasParent( new DN( "dc=c,dc=b,dc=a" ) ) );
+ child = child.getChild( new Rdn( "dc=c" ) );
+ assertTrue( tree.hasParent( new Dn( "dc=c,dc=b,dc=a" ) ) );
- assertTrue( tree.hasParent( new DN( "dc=f,dc=e,dc=c,dc=b,dc=a" ) ) );
+ assertTrue( tree.hasParent( new Dn( "dc=f,dc=e,dc=c,dc=b,dc=a" ) ) );
}
//---------------------------------------------------------------------------
- // Test the getChild(RDN) method
+ // Test the getChild(Rdn) method
//---------------------------------------------------------------------------
@Test
public void testGetChildRdn() throws Exception
{
- DnNode<DN> tree = new DnNode<DN>();
- DN dn = new DN( "dc=c,dc=b,dc=a" );
+ DnNode<Dn> tree = new DnNode<Dn>();
+ Dn dn = new Dn( "dc=c,dc=b,dc=a" );
tree.add( dn, dn );
- RDN rdnA = new RDN( "dc=a" );
- RDN rdnB = new RDN( "dc=b" );
- RDN rdnC = new RDN( "dc=c" );
+ Rdn rdnA = new Rdn( "dc=a" );
+ Rdn rdnB = new Rdn( "dc=b" );
+ Rdn rdnC = new Rdn( "dc=c" );
- DnNode<DN> child = tree.getChild( rdnA );
+ DnNode<Dn> child = tree.getChild( rdnA );
assertNotNull( child );
assertEquals( rdnA, child.getRdn() );
@@ -643,24 +643,24 @@ public class TestDnNode
//---------------------------------------------------------------------------
- // Test the contains(RDN) method
+ // Test the contains(Rdn) method
//---------------------------------------------------------------------------
@Test
public void testContains() throws Exception
{
- DnNode<DN> tree = new DnNode<DN>();
- DN dn = new DN( "dc=c,dc=b,dc=a" );
+ DnNode<Dn> tree = new DnNode<Dn>();
+ Dn dn = new Dn( "dc=c,dc=b,dc=a" );
tree.add( dn, dn );
- RDN rdnA = new RDN( "dc=a" );
- RDN rdnB = new RDN( "dc=b" );
- RDN rdnC = new RDN( "dc=c" );
+ Rdn rdnA = new Rdn( "dc=a" );
+ Rdn rdnB = new Rdn( "dc=b" );
+ Rdn rdnC = new Rdn( "dc=c" );
assertTrue( tree.contains( rdnA ) );
assertFalse( tree.contains( rdnB ) );
assertFalse( tree.contains( rdnC ) );
- DnNode<DN> child = tree.getChild( rdnA );
+ DnNode<Dn> child = tree.getChild( rdnA );
assertFalse( child.contains( rdnA ) );
assertTrue( child.contains( rdnB ) );
@@ -679,13 +679,13 @@ public class TestDnNode
@Test
public void testComplexTreeDeletion() throws LdapException
{
- DnNode<DN> dnLookupTree = new DnNode<DN>();
- DN dn1 = new DN( "dc=directory,dc=apache,dc=org" );
- DN dn2 = new DN( "dc=mina,dc=apache,dc=org" );
- DN dn3 = new DN( "dc=test,dc=com" );
- DN dn4 = new DN( "dc=acme,dc=com" );
- DN dn5 = new DN( "dc=acme,c=us,dc=com" );
- DN dn6 = new DN( "dc=empty" );
+ DnNode<Dn> dnLookupTree = new DnNode<Dn>();
+ Dn dn1 = new Dn( "dc=directory,dc=apache,dc=org" );
+ Dn dn2 = new Dn( "dc=mina,dc=apache,dc=org" );
+ Dn dn3 = new Dn( "dc=test,dc=com" );
+ Dn dn4 = new Dn( "dc=acme,dc=com" );
+ Dn dn5 = new Dn( "dc=acme,c=us,dc=com" );
+ Dn dn6 = new Dn( "dc=empty" );
dnLookupTree.add( dn1, dn1 );
dnLookupTree.add( dn2, dn2 );
@@ -703,8 +703,8 @@ public class TestDnNode
assertTrue( dnLookupTree.hasParent( dn4 ) );
assertTrue( dnLookupTree.hasParent( dn5 ) );
assertTrue( dnLookupTree.hasParent( dn6 ) );
- assertTrue( dnLookupTree.hasParent( new DN( "dc=nothing,dc=empty" ) ) );
- assertFalse( dnLookupTree.hasParent( new DN( "dc=directory,dc=apache,dc=root" ) ) );
+ assertTrue( dnLookupTree.hasParent( new Dn( "dc=nothing,dc=empty" ) ) );
+ assertFalse( dnLookupTree.hasParent( new Dn( "dc=directory,dc=apache,dc=root" ) ) );
dnLookupTree.remove( dn6 );
assertEquals( 9, dnLookupTree.size() );
@@ -712,16 +712,16 @@ public class TestDnNode
assertTrue( dnLookupTree.hasParent( dn2 ) );
assertTrue( dnLookupTree.hasParent( dn4 ) );
assertTrue( dnLookupTree.hasParent( dn5 ) );
- assertFalse( dnLookupTree.hasParent( new DN( "dc=nothing,dc=empty" ) ) );
- assertFalse( dnLookupTree.hasParent( new DN( "dc=directory,dc=apache,dc=root" ) ) );
+ assertFalse( dnLookupTree.hasParent( new Dn( "dc=nothing,dc=empty" ) ) );
+ assertFalse( dnLookupTree.hasParent( new Dn( "dc=directory,dc=apache,dc=root" ) ) );
dnLookupTree.remove( dn1 );
assertEquals( 8, dnLookupTree.size() );
assertTrue( dnLookupTree.hasParent( dn2 ) );
assertTrue( dnLookupTree.hasParent( dn4 ) );
assertTrue( dnLookupTree.hasParent( dn5 ) );
- assertFalse( dnLookupTree.hasParent( new DN( "dc=nothing,dc=empty" ) ) );
- assertFalse( dnLookupTree.hasParent( new DN( "dc=directory,dc=apache,dc=root" ) ) );
+ assertFalse( dnLookupTree.hasParent( new Dn( "dc=nothing,dc=empty" ) ) );
+ assertFalse( dnLookupTree.hasParent( new Dn( "dc=directory,dc=apache,dc=root" ) ) );
// Should not change anything
dnLookupTree.remove( dn3 );
@@ -729,44 +729,44 @@ public class TestDnNode
assertTrue( dnLookupTree.hasParent( dn2 ) );
assertTrue( dnLookupTree.hasParent( dn4 ) );
assertTrue( dnLookupTree.hasParent( dn5 ) );
- assertFalse( dnLookupTree.hasParent( new DN( "dc=nothing,dc=empty" ) ) );
- assertFalse( dnLookupTree.hasParent( new DN( "dc=directory,dc=apache,dc=root" ) ) );
+ assertFalse( dnLookupTree.hasParent( new Dn( "dc=nothing,dc=empty" ) ) );
+ assertFalse( dnLookupTree.hasParent( new Dn( "dc=directory,dc=apache,dc=root" ) ) );
dnLookupTree.remove( dn5 );
assertEquals( 6, dnLookupTree.size() );
assertTrue( dnLookupTree.hasParent( dn2 ) );
assertTrue( dnLookupTree.hasParent( dn4 ) );
- assertFalse( dnLookupTree.hasParent( new DN( "dc=nothing,dc=empty" ) ) );
- assertFalse( dnLookupTree.hasParent( new DN( "dc=directory,dc=apache,dc=root" ) ) );
+ assertFalse( dnLookupTree.hasParent( new Dn( "dc=nothing,dc=empty" ) ) );
+ assertFalse( dnLookupTree.hasParent( new Dn( "dc=directory,dc=apache,dc=root" ) ) );
dnLookupTree.remove( dn2 );
assertEquals( 3, dnLookupTree.size() );
assertTrue( dnLookupTree.hasParent( dn4 ) );
- assertFalse( dnLookupTree.hasParent( new DN( "dc=nothing,dc=empty" ) ) );
- assertFalse( dnLookupTree.hasParent( new DN( "dc=directory,dc=apache,dc=root" ) ) );
+ assertFalse( dnLookupTree.hasParent( new Dn( "dc=nothing,dc=empty" ) ) );
+ assertFalse( dnLookupTree.hasParent( new Dn( "dc=directory,dc=apache,dc=root" ) ) );
dnLookupTree.remove( dn4 );
assertEquals( 1, dnLookupTree.size() );
- assertFalse( dnLookupTree.hasParent( new DN( "dc=nothing,dc=empty" ) ) );
- assertFalse( dnLookupTree.hasParent( new DN( "dc=directory,dc=apache,dc=root" ) ) );
+ assertFalse( dnLookupTree.hasParent( new Dn( "dc=nothing,dc=empty" ) ) );
+ assertFalse( dnLookupTree.hasParent( new Dn( "dc=directory,dc=apache,dc=root" ) ) );
}
//---------------------------------------------------------------------------
- // Test the hasParentElement(DN) method
+ // Test the hasParentElement(Dn) method
//---------------------------------------------------------------------------
@Test
public void testHasParentElement() throws Exception
{
- DnNode<DN> dnLookupTree = new DnNode<DN>();
- DN dn1 = new DN( "dc=directory,dc=apache,dc=org" );
- DN dn2 = new DN( "dc=mina,dc=apache,dc=org" );
- DN dn3 = new DN( "dc=test,dc=com" );
- DN dn4 = new DN( "dc=acme,dc=com" );
- DN dn5 = new DN( "dc=acme,c=us,dc=com" );
- DN dn6 = new DN( "dc=empty" );
+ DnNode<Dn> dnLookupTree = new DnNode<Dn>();
+ Dn dn1 = new Dn( "dc=directory,dc=apache,dc=org" );
+ Dn dn2 = new Dn( "dc=mina,dc=apache,dc=org" );
+ Dn dn3 = new Dn( "dc=test,dc=com" );
+ Dn dn4 = new Dn( "dc=acme,dc=com" );
+ Dn dn5 = new Dn( "dc=acme,c=us,dc=com" );
+ Dn dn6 = new Dn( "dc=empty" );
- DN org = new DN( "dc=org" );
+ Dn org = new Dn( "dc=org" );
dnLookupTree.add( dn1, dn1 );
dnLookupTree.add( dn2, dn2 );
@@ -778,20 +778,20 @@ public class TestDnNode
// Inject some intermediary nodes
dnLookupTree.add( org, org );
- assertTrue( dnLookupTree.hasParentElement( new DN( "dc=apache,dc=org" ) ) );
+ assertTrue( dnLookupTree.hasParentElement( new Dn( "dc=apache,dc=org" ) ) );
// Check that org has at least one descendant containing an element
assertTrue( dnLookupTree.hasDescendantElement( org ) );
// check that for one node which has no children with any element, we get false
- assertFalse( dnLookupTree.hasDescendantElement( new DN( "c=us,dc=com" ) ) );
+ assertFalse( dnLookupTree.hasDescendantElement( new Dn( "c=us,dc=com" ) ) );
// Check that we correctly get back all the children
- DN dn7 = new DN( "dc=elem,dc=mina,dc=apache,dc=org" );
+ Dn dn7 = new Dn( "dc=elem,dc=mina,dc=apache,dc=org" );
dnLookupTree.add( dn7, dn7 );
// With dc=org, we should get back dn1 and dn3
- List<DN> dns = dnLookupTree.getDescendantElements( org );
+ List<Dn> dns = dnLookupTree.getDescendantElements( org );
assertNotNull( dns );
assertEquals( 2, dns.size() );
Modified: directory/studio/trunk/helps/ldapbrowser.help/src/main/resources/html/rfc/rfc2251.txt
URL: http://svn.apache.org/viewvc/directory/studio/trunk/helps/ldapbrowser.help/src/main/resources/html/rfc/rfc2251.txt?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/studio/trunk/helps/ldapbrowser.help/src/main/resources/html/rfc/rfc2251.txt (original)
+++ directory/studio/trunk/helps/ldapbrowser.help/src/main/resources/html/rfc/rfc2251.txt Sun Jan 23 01:17:06 2011
@@ -925,7 +925,7 @@ RFC 2251 LDAPv3
-- 72-79 unused --
other (80) },
-- 81-90 reserved for APIs --
- matchedDN LDAPDN,
+ matchedDn LDAPDN,
errorMessage LDAPString,
referral [3] Referral OPTIONAL }
@@ -961,12 +961,12 @@ RFC 2251 LDAPv3
the LDAPResult type MUST contain a zero length string.
For result codes of noSuchObject, aliasProblem, invalidDNSyntax and
- aliasDereferencingProblem, the matchedDN field is set to the name of
+ aliasDereferencingProblem, the matchedDn field is set to the name of
the lowest entry (object or alias) in the directory that was matched.
If no aliases were dereferenced while attempting to locate the entry,
this will be a truncated form of the name provided, or if aliases
were dereferenced, of the resulting name, as defined in section 12.5
- of X.511 [8]. The matchedDN field is to be set to a zero length
+ of X.511 [8]. The matchedDn field is to be set to a zero length
string with all other result codes.
4.1.11. Referral
@@ -1921,7 +1921,7 @@ RFC 2251 LDAPv3
MUST exist. For example, if the client attempted to add
"CN=JS,O=Foo,C=US", the "O=Foo,C=US" entry did not exist, and the
"C=US" entry did exist, then the server would return the error
- noSuchObject with the matchedDN field containing "C=US". If the
+ noSuchObject with the matchedDn field containing "C=US". If the
parent entry exists but is not in a naming context held by the
server, the server SHOULD return a referral to the server holding the
parent entry.
@@ -2542,7 +2542,7 @@ RFC 2251 LDAPv3
-- 72-79 unused --
other (80) },
-- 81-90 reserved for APIs --
- matchedDN LDAPDN,
+ matchedDn LDAPDN,
errorMessage LDAPString,
referral [3] Referral OPTIONAL }
Modified: directory/studio/trunk/helps/ldapbrowser.help/src/main/resources/html/rfc/rfc4511.txt
URL: http://svn.apache.org/viewvc/directory/studio/trunk/helps/ldapbrowser.help/src/main/resources/html/rfc/rfc4511.txt?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/studio/trunk/helps/ldapbrowser.help/src/main/resources/html/rfc/rfc4511.txt (original)
+++ directory/studio/trunk/helps/ldapbrowser.help/src/main/resources/html/rfc/rfc4511.txt Sun Jan 23 01:17:06 2011
@@ -590,7 +590,7 @@ RFC 4511 LDAPv3
-- 72-79 unused --
other (80),
... },
- matchedDN LDAPDN,
+ matchedDn LDAPDN,
diagnosticMessage LDAPString,
referral [3] Referral OPTIONAL }
@@ -622,12 +622,12 @@ RFC 4511 LDAPv3
For certain result codes (typically, but not restricted to
noSuchObject, aliasProblem, invalidDNSyntax, and
- aliasDereferencingProblem), the matchedDN field is set (subject to
+ aliasDereferencingProblem), the matchedDn field is set (subject to
access controls) to the name of the last entry (object or alias) used
in finding the target (or base) object. This will be a truncated
form of the provided name or, if an alias was dereferenced while
attempting to locate the entry, of the resulting name. Otherwise,
- the matchedDN field is empty.
+ the matchedDn field is empty.
4.1.10. Referral
@@ -1835,7 +1835,7 @@ RFC 4511 LDAPv3
client attempted to add <CN=JS,DC=Example,DC=NET>, the
<DC=Example,DC=NET> entry did not exist, and the <DC=NET> entry did
exist, then the server would return the noSuchObject result code with
- the matchedDN field containing <DC=NET>.
+ the matchedDn field containing <DC=NET>.
Upon receipt of an Add Request, a server will attempt to add the
requested entry. The result of the Add attempt will be returned to
@@ -1941,7 +1941,7 @@ RFC 4511 LDAPv3
client attempted to add <CN=JS,DC=Example,DC=NET>, the
<DC=Example,DC=NET> entry did not exist, and the <DC=NET> entry did
exist, then the server would return the noSuchObject result code with
- the matchedDN field containing <DC=NET>.
+ the matchedDn field containing <DC=NET>.
If the deleteoldrdn field is TRUE, the attribute values forming the
old RDN (but not the new RDN) are deleted from the entry. If the
@@ -2476,7 +2476,7 @@ RFC 4511 LDAPv3
confidentiality measures are not in place. Clients are advised to
reject referrals from the StartTLS operation.
- The matchedDN and diagnosticMessage fields, as well as some
+ The matchedDn and diagnosticMessage fields, as well as some
resultCode values (e.g., attributeOrValueExists and
entryAlreadyExists), could disclose the presence or absence of
specific data in the directory that is subject to access and other
@@ -3116,7 +3116,7 @@ RFC 4511 LDAPv3
-- 72-79 unused --
other (80),
... },
- matchedDN LDAPDN,
+ matchedDn LDAPDN,
diagnosticMessage LDAPString,
referral [3] Referral OPTIONAL }
@@ -3389,7 +3389,7 @@ C.1.9. Section 4.1.10 (Result Message)
- Renamed "errorMessage" to "diagnosticMessage" as it is allowed to
be sent for non-error results.
- Moved some language into Appendix A, and referred the reader there.
- - Allowed matchedDN to be present for other result codes than those
+ - Allowed matchedDn to be present for other result codes than those
listed in RFC 2251.
- Renamed the code "strongAuthRequired" to "strongerAuthRequired" to
clarify that this code may often be returned to indicate that a
@@ -3629,7 +3629,7 @@ C.1.28. Section 7 (Security Considerati
- Warned against following referrals that may have been injected in
the data stream.
- Noted that servers should protect information equally, whether in
- an error condition or not, and mentioned matchedDN,
+ an error condition or not, and mentioned matchedDn,
diagnosticMessage, and resultCodes specifically.
- Added a note regarding malformed and long encodings.
Modified: directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/UserClassWrapper.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/UserClassWrapper.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/UserClassWrapper.java (original)
+++ directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/model/UserClassWrapper.java Sun Jan 23 01:17:06 2011
@@ -33,7 +33,7 @@ import java.util.Set;
import org.apache.directory.shared.ldap.aci.ACIItemParser;
import org.apache.directory.shared.ldap.aci.UserClass;
import org.apache.directory.shared.ldap.aci.UserFirstACIItem;
-import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.Dn;
import org.apache.directory.shared.ldap.subtree.SubtreeSpecification;
import org.apache.directory.studio.valueeditors.AbstractDialogStringValueEditor;
import org.eclipse.osgi.util.NLS;
@@ -166,8 +166,8 @@ public class UserClassWrapper
if ( userClass.getClass() == UserClass.Name.class )
{
UserClass.Name name = ( UserClass.Name ) userClass;
- Set<DN> jndiNames = name.getNames();
- for ( DN jndiName : jndiNames )
+ Set<Dn> jndiNames = name.getNames();
+ for ( Dn jndiName : jndiNames )
{
values.add( jndiName.toString() );
}
@@ -175,8 +175,8 @@ public class UserClassWrapper
else if ( userClass.getClass() == UserClass.UserGroup.class )
{
UserClass.UserGroup userGrops = ( UserClass.UserGroup ) userClass;
- Set<DN> jndiNames = userGrops.getNames();
- for ( DN jndiName : jndiNames )
+ Set<Dn> jndiNames = userGrops.getNames();
+ for ( Dn jndiName : jndiNames )
{
values.add( jndiName.toString() );
}
Modified: directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/ExclusionDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/ExclusionDialog.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/ExclusionDialog.java (original)
+++ directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/ExclusionDialog.java Sun Jan 23 01:17:06 2011
@@ -24,7 +24,7 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
-import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.Dn;
import org.apache.directory.studio.aciitemeditor.Activator;
import org.apache.directory.studio.common.ui.widgets.BaseWidgetUtils;
import org.apache.directory.studio.ldapbrowser.common.widgets.WidgetModifyEvent;
@@ -58,18 +58,18 @@ class ExclusionDialog extends Dialog
private IBrowserConnection connection;
/** The base. */
- private DN base;
+ private Dn base;
/** The initial type. */
private String initialType;
- /** The initial DN */
+ /** The initial Dn */
private String initalDN;
/** The return type */
private String returnType;
- /** The return DN */
+ /** The return Dn */
private String returnDN;
private static final String EMPTY = ""; //$NON-NLS-1$
@@ -87,10 +87,10 @@ class ExclusionDialog extends Dialog
*
* @param parentShell the parent shell
* @param connection the connection
- * @param base the base DN
+ * @param base the base Dn
* @param exclusion the exclusion string
*/
- protected ExclusionDialog( Shell parentShell, IBrowserConnection connection, DN base, String exclusion )
+ protected ExclusionDialog( Shell parentShell, IBrowserConnection connection, Dn base, String exclusion )
{
super( parentShell );
this.connection = connection;
@@ -172,7 +172,7 @@ class ExclusionDialog extends Dialog
entryWidget.createWidget( composite );
try
{
- DN dn = new DN( initalDN );
+ Dn dn = new Dn( initalDN );
entryWidget.setInput( connection, dn, base, true );
}
catch ( LdapInvalidDnException e )
@@ -219,10 +219,10 @@ class ExclusionDialog extends Dialog
/**
- * Gets the DN.
+ * Gets the Dn.
*
* @return
- * the DN, null if canceled
+ * the Dn, null if canceled
*/
public String getDN()
{
Modified: directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/SubtreeSpecificationDialog.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/SubtreeSpecificationDialog.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/SubtreeSpecificationDialog.java (original)
+++ directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/SubtreeSpecificationDialog.java Sun Jan 23 01:17:06 2011
@@ -26,7 +26,7 @@ import java.util.Iterator;
import java.util.List;
import java.util.Set;
-import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.Dn;
import org.apache.directory.shared.ldap.subtree.BaseSubtreeSpecification;
import org.apache.directory.shared.ldap.subtree.SubtreeSpecification;
import org.apache.directory.shared.ldap.subtree.SubtreeSpecificationParser;
@@ -79,8 +79,8 @@ class SubtreeSpecificationDialog extends
/** The connection */
private IBrowserConnection connection;
- /** The subentry's DN */
- private DN subentryDN;
+ /** The subentry's Dn */
+ private Dn subentryDn;
/** Flag indicating if the refinement or filter widget should be visible */
private boolean refinementOrFilterVisible;
@@ -118,8 +118,8 @@ class SubtreeSpecificationDialog extends
* the shell to use
* @param connection
* the connection to use
- * @param subentryDN
- * the subentry's DN
+ * @param subentryDn
+ * the subentry's Dn
* @param initialSubtreeSpecification
* the initial SubtreeSpecification
* @param refinementOrFilterVisible
@@ -127,12 +127,12 @@ class SubtreeSpecificationDialog extends
* @param useLocalName
* true to use local name for the base
*/
- SubtreeSpecificationDialog( Shell shell, IBrowserConnection connection, DN subentryDN,
+ SubtreeSpecificationDialog( Shell shell, IBrowserConnection connection, Dn subentryDn,
String initialSubtreeSpecification, boolean refinementOrFilterVisible, boolean useLocalName )
{
super( shell );
this.connection = connection;
- this.subentryDN = subentryDN;
+ this.subentryDn = subentryDn;
this.refinementOrFilterVisible = refinementOrFilterVisible;
this.useLocalName = useLocalName;
@@ -153,14 +153,14 @@ class SubtreeSpecificationDialog extends
}
exclusions = new ArrayList<String>();
- Set<DN> chopBeforeExclusions = subtreeSpecification.getChopBeforeExclusions();
- for ( DN dn : chopBeforeExclusions )
+ Set<Dn> chopBeforeExclusions = subtreeSpecification.getChopBeforeExclusions();
+ for ( Dn dn : chopBeforeExclusions )
{
exclusions.add( "chopBefore: \"" + dn.getNormName() + "\"" ); //$NON-NLS-1$ //$NON-NLS-2$
}
- Set<DN> chopAfterExclusions = subtreeSpecification.getChopAfterExclusions();
- for ( DN dn : chopAfterExclusions )
+ Set<Dn> chopAfterExclusions = subtreeSpecification.getChopAfterExclusions();
+ for ( Dn dn : chopAfterExclusions )
{
exclusions.add( "chopAfter: \"" + dn.getNormName() + "\"" ); //$NON-NLS-1$ //$NON-NLS-2$
}
@@ -216,8 +216,8 @@ class SubtreeSpecificationDialog extends
BaseWidgetUtils.createLabel( composite, Messages.getString( "SubtreeValueEditor.label.base" ), 1 ); //$NON-NLS-1$
- DN base = subtreeSpecification.getBase();
- DN suffix = subentryDN != null ? DnUtils.getParent( subentryDN ) : null;
+ Dn base = subtreeSpecification.getBase();
+ Dn suffix = subentryDn != null ? DnUtils.getParent(subentryDn) : null;
entryWidget = new EntryWidget( connection, base, suffix, useLocalName );
entryWidget.createWidget( composite );
entryWidget.addWidgetModifyListener( new WidgetModifyListener()
@@ -495,7 +495,7 @@ class SubtreeSpecificationDialog extends
{
boolean valid = true;
- DN base = entryWidget.getDn();
+ Dn base = entryWidget.getDn();
valid &= base != null;
String ss = buildSubreeSpecification();
@@ -530,7 +530,7 @@ class SubtreeSpecificationDialog extends
sb.append( "{" ); //$NON-NLS-1$
// Adding base
- DN base = entryWidget.getDn();
+ Dn base = entryWidget.getDn();
if ( base != null && !SubtreeValueEditor.EMPTY.equals( base.toString() ) )
{
sb.append( " base \"" + base.toString() + "\"," ); //$NON-NLS-1$ //$NON-NLS-2$
@@ -652,10 +652,10 @@ class SubtreeSpecificationDialog extends
*/
private void addValueExclusionsTable()
{
- DN chopBase = subtreeSpecification.getBase();
- if ( useLocalName && subentryDN != null && DnUtils.getParent( subentryDN ) != null )
+ Dn chopBase = subtreeSpecification.getBase();
+ if ( useLocalName && subentryDn != null && DnUtils.getParent(subentryDn) != null )
{
- DN suffix = subentryDN != null ? DnUtils.getParent( subentryDN ) : null;
+ Dn suffix = subentryDn != null ? DnUtils.getParent(subentryDn) : null;
chopBase = DnUtils.composeDn( chopBase, suffix );
}
@@ -680,10 +680,10 @@ class SubtreeSpecificationDialog extends
String oldValue = getSelectedValueExclusionsTable();
if ( oldValue != null )
{
- DN chopBase = subtreeSpecification.getBase();
- if ( useLocalName && subentryDN != null && DnUtils.getParent( subentryDN ) != null )
+ Dn chopBase = subtreeSpecification.getBase();
+ if ( useLocalName && subentryDn != null && DnUtils.getParent(subentryDn) != null )
{
- DN suffix = subentryDN != null ? DnUtils.getParent( subentryDN ) : null;
+ Dn suffix = subentryDn != null ? DnUtils.getParent(subentryDn) : null;
chopBase = DnUtils.composeDn( chopBase, suffix );
}
Modified: directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/SubtreeValueEditor.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/SubtreeValueEditor.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/SubtreeValueEditor.java (original)
+++ directory/studio/trunk/plugins/aciitemeditor/src/main/java/org/apache/directory/studio/aciitemeditor/valueeditors/SubtreeValueEditor.java Sun Jan 23 01:17:06 2011
@@ -20,7 +20,7 @@
package org.apache.directory.studio.aciitemeditor.valueeditors;
-import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.Dn;
import org.apache.directory.studio.ldapbrowser.common.dialogs.TextDialog;
import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
import org.apache.directory.studio.ldapbrowser.core.model.IValue;
@@ -77,7 +77,7 @@ public class SubtreeValueEditor extends
SubtreeSpecificationValueWrapper wrapper = ( SubtreeSpecificationValueWrapper ) value;
SubtreeSpecificationDialog dialog = new SubtreeSpecificationDialog( shell, wrapper.connection,
- wrapper.subentryDN, wrapper.subtreeSpecification, refinementOrFilterVisible, useLocalName );
+ wrapper.subentryDn, wrapper.subtreeSpecification, refinementOrFilterVisible, useLocalName );
if ( dialog.open() == TextDialog.OK && dialog.getSubtreeSpecificationValue() != null )
{
setValue( dialog.getSubtreeSpecificationValue() );
@@ -97,7 +97,7 @@ public class SubtreeValueEditor extends
if ( o != null && o instanceof String )
{
IBrowserConnection connection = value.getAttribute().getEntry().getBrowserConnection();
- DN dn = value.getAttribute().getEntry().getDn();
+ Dn dn = value.getAttribute().getEntry().getDn();
return new SubtreeSpecificationValueWrapper( connection, dn, value.getStringValue() );
}
@@ -115,8 +115,8 @@ public class SubtreeValueEditor extends
/** The connection, used in DnDialog to browse for an entry */
private IBrowserConnection connection;
- /** The subentry's DN */
- private DN subentryDN;
+ /** The subentry's Dn */
+ private Dn subentryDn;
/** The subtreeSpecification */
private String subtreeSpecification;
@@ -128,15 +128,15 @@ public class SubtreeValueEditor extends
* @param connection
* the connection
* @param subentryDn
- * the DN of the subentry
+ * the Dn of the subentry
* @param subtreeSpecification
* the subtreeSpecification
*/
- private SubtreeSpecificationValueWrapper( IBrowserConnection connection, DN subentryDN,
+ private SubtreeSpecificationValueWrapper( IBrowserConnection connection, Dn subentryDn,
String subtreeSpecification )
{
this.connection = connection;
- this.subentryDN = subentryDN;
+ this.subentryDn = subentryDn;
this.subtreeSpecification = subtreeSpecification;
}
Modified: directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/ApacheDS2ConfigurationContentDescriber.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/ApacheDS2ConfigurationContentDescriber.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/ApacheDS2ConfigurationContentDescriber.java (original)
+++ directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/ApacheDS2ConfigurationContentDescriber.java Sun Jan 23 01:17:06 2011
@@ -28,7 +28,7 @@ import org.apache.directory.shared.ldap.
import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
import org.apache.directory.shared.ldap.ldif.LdifEntry;
import org.apache.directory.shared.ldap.ldif.LdifReader;
-import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.Dn;
import org.eclipse.core.runtime.QualifiedName;
import org.eclipse.core.runtime.content.IContentDescription;
import org.eclipse.core.runtime.content.ITextContentDescriber;
@@ -44,11 +44,11 @@ public class ApacheDS2ConfigurationConte
/** The maximum number of entries to search before determining the file as invalid */
private static int MAX_NUMBER_ENTRIES_SEARCH = 10;
- /** The DN of the config entry ('ou=config')*/
- private DN configEntryDn;
+ /** The Dn of the config entry ('ou=config')*/
+ private Dn configEntryDn;
- /** The DN of the directory service entry ('ads-directoryServiceId=default,ou=config') */
- private DN directoryServiceDn;
+ /** The Dn of the directory service entry ('ads-directoryServiceId=default,ou=config') */
+ private Dn directoryServiceDn;
/**
@@ -59,8 +59,8 @@ public class ApacheDS2ConfigurationConte
// Initializing DNs
try
{
- configEntryDn = new DN( "ou=config" );
- directoryServiceDn = new DN( "ads-directoryServiceId=default,ou=config" );
+ configEntryDn = new Dn( "ou=config" );
+ directoryServiceDn = new Dn( "ads-directoryServiceId=default,ou=config" );
}
catch ( LdapInvalidDnException e )
{
Modified: directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/KerberosServerPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/KerberosServerPage.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/KerberosServerPage.java (original)
+++ directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/KerberosServerPage.java Sun Jan 23 01:17:06 2011
@@ -24,7 +24,7 @@ import org.apache.directory.server.confi
import org.apache.directory.server.config.beans.KdcServerBean;
import org.apache.directory.server.config.beans.TransportBean;
import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
-import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.Dn;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
@@ -126,7 +126,7 @@ public class KerberosServerPage extends
try
{
- DN searchBaseDn = new DN( searchBaseDnValue );
+ Dn searchBaseDn = new Dn( searchBaseDnValue );
getKdcServerBean().setSearchBaseDn( searchBaseDn );
}
catch ( LdapInvalidDnException e1 )
@@ -304,8 +304,8 @@ public class KerberosServerPage extends
"EXAMPLE.COM" );
defaultSaslPrincipalLabel.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, 2, 1 ) );
- // Search Base DN
- toolkit.createLabel( composite, "Search Base DN:" );
+ // Search Base Dn
+ toolkit.createLabel( composite, "Search Base Dn:" );
kdcSearchBaseDnText = toolkit.createText( composite, "" ); //$NON-NLS-1$
kdcSearchBaseDnText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
Label defaultSaslSearchBaseDnLabel = createDefaultValueLabel( toolkit, composite, "ou=users,dc=example,dc=com" );
@@ -428,7 +428,7 @@ public class KerberosServerPage extends
addDirtyListener( primaryKdcRealmText );
addModifyListener( primaryKdcRealmText, primaryKdcRealmTextListener );
- // KDC Search Base DN Text
+ // KDC Search Base Dn Text
addDirtyListener( kdcSearchBaseDnText );
addModifyListener( kdcSearchBaseDnText, kdcSearchBaseDnTextListener );
@@ -503,7 +503,7 @@ public class KerberosServerPage extends
removeDirtyListener( primaryKdcRealmText );
removeModifyListener( primaryKdcRealmText, primaryKdcRealmTextListener );
- // KDC Search Base DN Text
+ // KDC Search Base Dn Text
removeDirtyListener( kdcSearchBaseDnText );
removeModifyListener( kdcSearchBaseDnText, kdcSearchBaseDnTextListener );
Modified: directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/LdapLdapsServersPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/LdapLdapsServersPage.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/LdapLdapsServersPage.java (original)
+++ directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/editor/LdapLdapsServersPage.java Sun Jan 23 01:17:06 2011
@@ -23,7 +23,7 @@ package org.apache.directory.studio.apac
import org.apache.directory.server.config.beans.LdapServerBean;
import org.apache.directory.server.config.beans.TransportBean;
import org.apache.directory.shared.ldap.exception.LdapInvalidDnException;
-import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.Dn;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
@@ -123,7 +123,7 @@ public class LdapLdapsServersPage extend
try
{
- DN searchBaseDn = new DN( searchBaseDnValue );
+ Dn searchBaseDn = new Dn( searchBaseDnValue );
getLdapServerBean().setSearchBaseDn( searchBaseDn );
}
catch ( LdapInvalidDnException e1 )
@@ -362,8 +362,8 @@ public class LdapLdapsServersPage extend
"ldap/ldap.example.com@EXAMPLE.COM" );
defaultSaslPrincipalLabel.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false, 2, 1 ) );
- // Search Base DN
- toolkit.createLabel( composite, "Search Base DN:" );
+ // Search Base Dn
+ toolkit.createLabel( composite, "Search Base Dn:" );
saslSearchBaseDnText = toolkit.createText( composite, "" ); //$NON-NLS-1$
saslSearchBaseDnText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
Label defaultSaslSearchBaseDnLabel = createDefaultValueLabel( toolkit, composite, "ou=users,dc=example,dc=com" );
@@ -447,7 +447,7 @@ public class LdapLdapsServersPage extend
addDirtyListener( saslPrincipalText );
addModifyListener( saslPrincipalText, saslPrincipalTextListener );
- // SASL Seach Base DN Text
+ // SASL Seach Base Dn Text
addDirtyListener( saslSearchBaseDnText );
addModifyListener( saslSearchBaseDnText, saslSearchBaseDnTextListener );
}
@@ -506,7 +506,7 @@ public class LdapLdapsServersPage extend
removeDirtyListener( saslPrincipalText );
removeModifyListener( saslPrincipalText, saslPrincipalTextListener );
- // SASL Seach Base DN Text
+ // SASL Seach Base Dn Text
removeDirtyListener( saslSearchBaseDnText );
removeModifyListener( saslSearchBaseDnText, saslSearchBaseDnTextListener );
}
Modified: directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/EntryBasedConfigurationPartition.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/EntryBasedConfigurationPartition.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/EntryBasedConfigurationPartition.java (original)
+++ directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/EntryBasedConfigurationPartition.java Sun Jan 23 01:17:06 2011
@@ -32,11 +32,10 @@ import org.apache.directory.server.core.
import org.apache.directory.server.core.interceptor.context.RenameOperationContext;
import org.apache.directory.server.core.partition.impl.avl.AvlPartition;
import org.apache.directory.server.core.partition.ldif.AbstractLdifPartition;
-import org.apache.directory.server.xdbm.impl.avl.AvlStore;
import org.apache.directory.shared.ldap.constants.SchemaConstants;
import org.apache.directory.shared.ldap.entry.Entry;
import org.apache.directory.shared.ldap.exception.LdapException;
-import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.Dn;
import org.apache.directory.shared.ldap.schema.SchemaManager;
@@ -69,7 +68,7 @@ public class EntryBasedConfigurationPart
// Initializing the wrapped partition
setWrappedPartition( new AvlPartition() );
setId( "config" );
- setSuffix( new DN( "ou=config" ) );
+ setSuffix( new Dn( "ou=config" ) );
wrappedPartition.setSchemaManager( schemaManager );
wrappedPartition.initialize();
Modified: directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/LoadConfigurationRunnable.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/LoadConfigurationRunnable.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/LoadConfigurationRunnable.java (original)
+++ directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/LoadConfigurationRunnable.java Sun Jan 23 01:17:06 2011
@@ -38,7 +38,7 @@ import org.apache.directory.shared.ldap.
import org.apache.directory.shared.ldap.entry.Entry;
import org.apache.directory.shared.ldap.exception.LdapException;
import org.apache.directory.shared.ldap.exception.LdapNoSuchObjectException;
-import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.Dn;
import org.apache.directory.shared.ldap.schema.SchemaManager;
import org.apache.directory.shared.ldap.entry.AttributeUtils;
import org.apache.directory.studio.apacheds.configuration.v2.ApacheDS2ConfigurationPlugin;
@@ -282,7 +282,7 @@ public class LoadConfigurationRunnable i
// Creating the search parameter
SearchParameter configSearchParameter = new SearchParameter();
- configSearchParameter.setSearchBase( new DN( "ou=config" ) );
+ configSearchParameter.setSearchBase( new Dn( "ou=config" ) );
configSearchParameter.setFilter( "(objectClass=*)" );
configSearchParameter.setScope( SearchScope.OBJECT );
configSearchParameter.setReturningAttributes( SchemaConstants.ALL_USER_ATTRIBUTES_ARRAY );
@@ -304,7 +304,7 @@ public class LoadConfigurationRunnable i
// Creating the 'ou=config' base entry
SearchResult searchResult = ( SearchResult ) enumeration.next();
configEntry = new DefaultEntry( schemaManager, AttributeUtils.toClientEntry(
- searchResult.getAttributes(), new DN( searchResult.getNameInNamespace() ) ) );
+ searchResult.getAttributes(), new Dn( searchResult.getNameInNamespace() ) ) );
}
enumeration.close();
@@ -360,7 +360,7 @@ public class LoadConfigurationRunnable i
// Creating the child entry
SearchResult searchResult = ( SearchResult ) childrenEnumeration.next();
Entry childEntry = new DefaultEntry( schemaManager, AttributeUtils.toClientEntry(
- searchResult.getAttributes(), new DN( searchResult.getNameInNamespace() ) ) );
+ searchResult.getAttributes(), new Dn( searchResult.getNameInNamespace() ) ) );
// Adding the children to the list of entries
entries.add( childEntry );
Modified: directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/PartitionsDiffComputer.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/PartitionsDiffComputer.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/PartitionsDiffComputer.java (original)
+++ directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/jobs/PartitionsDiffComputer.java Sun Jan 23 01:17:06 2011
@@ -43,7 +43,7 @@ import org.apache.directory.shared.ldap.
import org.apache.directory.shared.ldap.ldif.ChangeType;
import org.apache.directory.shared.ldap.ldif.LdifEntry;
import org.apache.directory.shared.ldap.message.AliasDerefMode;
-import org.apache.directory.shared.ldap.name.DN;
+import org.apache.directory.shared.ldap.name.Dn;
import org.apache.directory.shared.ldap.schema.AttributeType;
import org.apache.directory.shared.ldap.schema.AttributeTypeOptions;
import org.apache.directory.shared.ldap.schema.SchemaManager;
@@ -87,12 +87,12 @@ public class PartitionsDiffComputer
}
- public List<LdifEntry> computeModifications( DN baseDN, String[] attributeIds ) throws Exception
+ public List<LdifEntry> computeModifications( Dn baseDn, String[] attributeIds ) throws Exception
{
// Checking partitions
checkPartitions();
- return comparePartitions( baseDN, attributeIds );
+ return comparePartitions(baseDn, attributeIds );
}
@@ -142,15 +142,15 @@ public class PartitionsDiffComputer
/**
* Compare the two partitions.
*
- * @param baseDN
- * the base DN
+ * @param baseDn
+ * the base Dn
* @param attributeIds
* the IDs of the attributes
* @return
* a list containing LDIF entries with all modifications
* @throws Exception
*/
- public List<LdifEntry> comparePartitions( DN baseDN, String[] attributeIds ) throws PartitionsDiffException
+ public List<LdifEntry> comparePartitions( Dn baseDn, String[] attributeIds ) throws PartitionsDiffException
{
// Creating the list containing all modifications
List<LdifEntry> modifications = new ArrayList<LdifEntry>();
@@ -159,7 +159,7 @@ public class PartitionsDiffComputer
{
// Looking up the original base entry
Entry originalBaseEntry = originalPartition
- .lookup( new LookupOperationContext( null, baseDN, attributeIds ) );
+ .lookup( new LookupOperationContext( null, baseDn, attributeIds ) );
if ( originalBaseEntry == null )
{
throw new PartitionsDiffException( "Unable to find the base entry in the original partition." );
Modified: directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v152/AuthenticationPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v152/AuthenticationPage.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v152/AuthenticationPage.java (original)
+++ directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v152/AuthenticationPage.java Sun Jan 23 01:17:06 2011
@@ -208,8 +208,8 @@ public class AuthenticationPage extends
saslPrincipalText = toolkit.createText( client, "" );
saslPrincipalText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
- // Search Base DN
- toolkit.createLabel( client, "Search Base DN:" );
+ // Search Base Dn
+ toolkit.createLabel( client, "Search Base Dn:" );
searchBaseDnText = toolkit.createText( client, "" );
searchBaseDnText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
}
@@ -317,7 +317,7 @@ public class AuthenticationPage extends
// SASL Principal
saslPrincipalText.setText( configuration.getSaslPrincipal() );
- // Search Base DN
+ // Search Base Dn
searchBaseDnText.setText( configuration.getSearchBaseDn() );
// SASL Quality Of Protection
@@ -374,7 +374,7 @@ public class AuthenticationPage extends
// SASL Principal
saslPrincipalText.addModifyListener( modifyListener );
- // Search Base DN
+ // Search Base Dn
searchBaseDnText.addModifyListener( modifyListener );
// SASL Quality Of Protection
@@ -533,7 +533,7 @@ public class AuthenticationPage extends
configuration.setSaslPrincipal( saslPrincipalText.getText() );
}
- // Search Base DN
+ // Search Base Dn
if ( ( searchBaseDnText != null ) && ( !searchBaseDnText.isDisposed() ) )
{
configuration.setSearchBaseDn( searchBaseDnText.getText() );
Modified: directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v153/AuthenticationPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v153/AuthenticationPage.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v153/AuthenticationPage.java (original)
+++ directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v153/AuthenticationPage.java Sun Jan 23 01:17:06 2011
@@ -215,8 +215,8 @@ public class AuthenticationPage extends
saslPrincipalText = toolkit.createText( client, "" );
saslPrincipalText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
- // Search Base DN
- toolkit.createLabel( client, "Search Base DN:" );
+ // Search Base Dn
+ toolkit.createLabel( client, "Search Base Dn:" );
searchBaseDnText = toolkit.createText( client, "" );
searchBaseDnText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
}
@@ -324,7 +324,7 @@ public class AuthenticationPage extends
// SASL Principal
saslPrincipalText.setText( configuration.getSaslPrincipal() );
- // Search Base DN
+ // Search Base Dn
searchBaseDnText.setText( configuration.getSearchBaseDn() );
// SASL Quality Of Protection
@@ -413,7 +413,7 @@ public class AuthenticationPage extends
// SASL Principal
saslPrincipalText.addModifyListener( modifyListener );
- // Search Base DN
+ // Search Base Dn
searchBaseDnText.addModifyListener( modifyListener );
// SASL Quality Of Protection
@@ -598,7 +598,7 @@ public class AuthenticationPage extends
configuration.setSaslPrincipal( saslPrincipalText.getText() );
}
- // Search Base DN
+ // Search Base Dn
if ( ( searchBaseDnText != null ) && ( !searchBaseDnText.isDisposed() ) )
{
configuration.setSearchBaseDn( searchBaseDnText.getText() );
Modified: directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v154/AuthenticationPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v154/AuthenticationPage.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v154/AuthenticationPage.java (original)
+++ directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v154/AuthenticationPage.java Sun Jan 23 01:17:06 2011
@@ -218,7 +218,7 @@ public class AuthenticationPage extends
saslPrincipalText = toolkit.createText( client, "" ); //$NON-NLS-1$
saslPrincipalText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
- // Search Base DN
+ // Search Base Dn
toolkit.createLabel( client, Messages.getString( "AuthenticationPage.SearchBaseDN" ) ); //$NON-NLS-1$
searchBaseDnText = toolkit.createText( client, "" ); //$NON-NLS-1$
searchBaseDnText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
@@ -330,7 +330,7 @@ public class AuthenticationPage extends
// SASL Principal
saslPrincipalText.setText( configuration.getSaslPrincipal() );
- // Search Base DN
+ // Search Base Dn
searchBaseDnText.setText( configuration.getSearchBaseDn() );
// SASL Quality Of Protection
@@ -419,7 +419,7 @@ public class AuthenticationPage extends
// SASL Principal
saslPrincipalText.addModifyListener( modifyListener );
- // Search Base DN
+ // Search Base Dn
searchBaseDnText.addModifyListener( modifyListener );
// SASL Quality Of Protection
@@ -604,7 +604,7 @@ public class AuthenticationPage extends
configuration.setSaslPrincipal( saslPrincipalText.getText() );
}
- // Search Base DN
+ // Search Base Dn
if ( ( searchBaseDnText != null ) && ( !searchBaseDnText.isDisposed() ) )
{
configuration.setSearchBaseDn( searchBaseDnText.getText() );
Modified: directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v155/AuthenticationPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v155/AuthenticationPage.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v155/AuthenticationPage.java (original)
+++ directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v155/AuthenticationPage.java Sun Jan 23 01:17:06 2011
@@ -213,7 +213,7 @@ public class AuthenticationPage extends
saslPrincipalText = toolkit.createText( client, "" ); //$NON-NLS-1$
saslPrincipalText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
- // Search Base DN
+ // Search Base Dn
toolkit.createLabel( client, Messages.getString( "AuthenticationPage.SearchBaseDN" ) ); //$NON-NLS-1$
searchBaseDnText = toolkit.createText( client, "" ); //$NON-NLS-1$
searchBaseDnText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
@@ -282,7 +282,7 @@ public class AuthenticationPage extends
// SASL Principal
saslPrincipalText.setText( configuration.getSaslPrincipal() );
- // Search Base DN
+ // Search Base Dn
searchBaseDnText.setText( configuration.getSearchBaseDn() );
// SASL Realms
@@ -368,7 +368,7 @@ public class AuthenticationPage extends
// SASL Principal
saslPrincipalText.addModifyListener( modifyListener );
- // Search Base DN
+ // Search Base Dn
searchBaseDnText.addModifyListener( modifyListener );
// SASL Realms
@@ -528,7 +528,7 @@ public class AuthenticationPage extends
configuration.setSaslPrincipal( saslPrincipalText.getText() );
}
- // Search Base DN
+ // Search Base Dn
if ( ( searchBaseDnText != null ) && ( !searchBaseDnText.isDisposed() ) )
{
configuration.setSearchBaseDn( searchBaseDnText.getText() );
Modified: directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v156/AuthenticationPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v156/AuthenticationPage.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v156/AuthenticationPage.java (original)
+++ directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v156/AuthenticationPage.java Sun Jan 23 01:17:06 2011
@@ -213,7 +213,7 @@ public class AuthenticationPage extends
saslPrincipalText = toolkit.createText( client, "" ); //$NON-NLS-1$
saslPrincipalText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
- // Search Base DN
+ // Search Base Dn
toolkit.createLabel( client, Messages.getString( "AuthenticationPage.SearchBaseDN" ) ); //$NON-NLS-1$
searchBaseDnText = toolkit.createText( client, "" ); //$NON-NLS-1$
searchBaseDnText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
@@ -282,7 +282,7 @@ public class AuthenticationPage extends
// SASL Principal
saslPrincipalText.setText( configuration.getSaslPrincipal() );
- // Search Base DN
+ // Search Base Dn
searchBaseDnText.setText( configuration.getSearchBaseDn() );
// SASL Realms
@@ -368,7 +368,7 @@ public class AuthenticationPage extends
// SASL Principal
saslPrincipalText.addModifyListener( modifyListener );
- // Search Base DN
+ // Search Base Dn
searchBaseDnText.addModifyListener( modifyListener );
// SASL Realms
@@ -528,7 +528,7 @@ public class AuthenticationPage extends
configuration.setSaslPrincipal( saslPrincipalText.getText() );
}
- // Search Base DN
+ // Search Base Dn
if ( ( searchBaseDnText != null ) && ( !searchBaseDnText.isDisposed() ) )
{
configuration.setSearchBaseDn( searchBaseDnText.getText() );
Modified: directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v157/AuthenticationPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v157/AuthenticationPage.java?rev=1062306&r1=1062305&r2=1062306&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v157/AuthenticationPage.java (original)
+++ directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/v157/AuthenticationPage.java Sun Jan 23 01:17:06 2011
@@ -213,7 +213,7 @@ public class AuthenticationPage extends
saslPrincipalText = toolkit.createText( client, "" ); //$NON-NLS-1$
saslPrincipalText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
- // Search Base DN
+ // Search Base Dn
toolkit.createLabel( client, Messages.getString( "AuthenticationPage.SearchBaseDN" ) ); //$NON-NLS-1$
searchBaseDnText = toolkit.createText( client, "" ); //$NON-NLS-1$
searchBaseDnText.setLayoutData( new GridData( SWT.FILL, SWT.NONE, true, false ) );
@@ -282,7 +282,7 @@ public class AuthenticationPage extends
// SASL Principal
saslPrincipalText.setText( configuration.getSaslPrincipal() );
- // Search Base DN
+ // Search Base Dn
searchBaseDnText.setText( configuration.getSearchBaseDn() );
// SASL Realms
@@ -368,7 +368,7 @@ public class AuthenticationPage extends
// SASL Principal
saslPrincipalText.addModifyListener( modifyListener );
- // Search Base DN
+ // Search Base Dn
searchBaseDnText.addModifyListener( modifyListener );
// SASL Realms
@@ -528,7 +528,7 @@ public class AuthenticationPage extends
configuration.setSaslPrincipal( saslPrincipalText.getText() );
}
- // Search Base DN
+ // Search Base Dn
if ( ( searchBaseDnText != null ) && ( !searchBaseDnText.isDisposed() ) )
{
configuration.setSearchBaseDn( searchBaseDnText.getText() );