Package org.apache.directory.shared.ldap.name

Examples of org.apache.directory.shared.ldap.name.DN.normalize()


        assertFalse( new File( wkdir, "ou=test,ou=system/dc=test/dc=test1.ldif" ).exists() );
        assertFalse( new File( wkdir, "ou=test,ou=system/dc=test/dc=test2" ).exists() );
        assertTrue( new File( wkdir, "ou=test,ou=system/dc=test/dc=test2.ldif" ).exists() );

        dn = new DN( "dc=test2,dc=test,ou=test,ou=system" );
        dn.normalize( schemaManager.getNormalizerMapping() );
       
        delCtx.setDn( dn );
       
        partition.delete( delCtx );
View Full Code Here


        partition.add( addCtx );
       
        SearchOperationContext searchCtx = new SearchOperationContext( session );

        DN dn = new DN( "dc=test,ou=test,ou=system" );
        dn.normalize( schemaManager.getNormalizerMapping() );
        searchCtx.setDn( dn );
        ExprNode filter = FilterParser.parse( "(ObjectClass=domain)" );
        searchCtx.setFilter( filter );
        searchCtx.setScope( SearchScope.SUBTREE );
       
View Full Code Here

    public void testLdifRenameAndDeleteOldDN() throws Exception
    {
        CoreSession session = injectEntries();

        DN childDn1 = new DN( "dc=child1,ou=test,ou=system" );
        childDn1.normalize( schemaManager.getNormalizerMapping() );
       
        RDN newRdn = new RDN( SchemaConstants.DC_AT + "=" + "renamedChild1" );
        RenameOperationContext renameOpCtx = new RenameOperationContext( session, childDn1, newRdn, true );
        partition.rename( renameOpCtx );
       
View Full Code Here

    public void testLdifRenameAndRetainOldDN() throws Exception
    {
        CoreSession session = injectEntries();

        DN childDn1 = new DN( "dc=child1,ou=test,ou=system" );
        childDn1.normalize( schemaManager.getNormalizerMapping() );
       
        RDN newRdn = new RDN( SchemaConstants.DC_AT + "=" + "renamedChild1" );
        RenameOperationContext renameOpCtx = new RenameOperationContext( session, childDn1, newRdn, false );
        partition.rename( renameOpCtx );
       
View Full Code Here

    public void testLdifMoveAndRenameWithDeletingOldDN() throws Exception
    {
        CoreSession session = injectEntries();

        DN childDn1 = new DN( "dc=child1,ou=test,ou=system" );
        childDn1.normalize( schemaManager.getNormalizerMapping() );

        DN childDn2 = new DN( "dc=child2,ou=test,ou=system" );
        childDn2.normalize( schemaManager.getNormalizerMapping() );

        RDN newRdn = new RDN( SchemaConstants.DC_AT + "=" + "movedChild1" );
View Full Code Here

        DN childDn1 = new DN( "dc=child1,ou=test,ou=system" );
        childDn1.normalize( schemaManager.getNormalizerMapping() );

        DN childDn2 = new DN( "dc=child2,ou=test,ou=system" );
        childDn2.normalize( schemaManager.getNormalizerMapping() );

        RDN newRdn = new RDN( SchemaConstants.DC_AT + "=" + "movedChild1" );
        MoveAndRenameOperationContext moveAndRenameOpCtx = new MoveAndRenameOperationContext( session, childDn1, childDn2, newRdn, true );
        partition.moveAndRename( moveAndRenameOpCtx );
       
View Full Code Here

    public void testLdifMoveAndRenameRetainingOldDN() throws Exception
    {
        CoreSession session = injectEntries();

        DN childDn1 = new DN( "dc=child1,ou=test,ou=system" );
        childDn1.normalize( schemaManager.getNormalizerMapping() );

        DN childDn2 = new DN( "dc=child2,ou=test,ou=system" );
        childDn2.normalize( schemaManager.getNormalizerMapping() );

        RDN newRdn = new RDN( SchemaConstants.DC_AT + "=" + "movedChild1" );
View Full Code Here

        DN childDn1 = new DN( "dc=child1,ou=test,ou=system" );
        childDn1.normalize( schemaManager.getNormalizerMapping() );

        DN childDn2 = new DN( "dc=child2,ou=test,ou=system" );
        childDn2.normalize( schemaManager.getNormalizerMapping() );

        RDN newRdn = new RDN( SchemaConstants.DC_AT + "=" + "movedChild1" );
        MoveAndRenameOperationContext moveAndRenameOpCtx = new MoveAndRenameOperationContext( session, childDn1, childDn2, newRdn, false );
        partition.moveAndRename( moveAndRenameOpCtx );
       
View Full Code Here

        staticMatchingRulesDNs.put( schemaName, dn );

        // Initialize Comparators Dns
        dn = new DN( SchemaConstants.COMPARATORS_PATH, "cn=" + schemaName, SchemaConstants.OU_SCHEMA );

        dn.normalize( schemaManager.getNormalizerMapping() );
        staticComparatorsDNs.put( schemaName, dn );

        // Initialize Normalizers Dns
        dn = new DN( SchemaConstants.NORMALIZERS_PATH, "cn=" + schemaName, SchemaConstants.OU_SCHEMA );
View Full Code Here

        staticComparatorsDNs.put( schemaName, dn );

        // Initialize Normalizers Dns
        dn = new DN( SchemaConstants.NORMALIZERS_PATH, "cn=" + schemaName, SchemaConstants.OU_SCHEMA );

        dn.normalize( schemaManager.getNormalizerMapping() );
        staticNormalizersDNs.put( schemaName, dn );

        // Initialize SyntaxCheckers Dns
        dn = new DN( SchemaConstants.SYNTAX_CHECKERS_PATH, "cn=" + schemaName, SchemaConstants.OU_SCHEMA );
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.