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

Examples of org.apache.directory.shared.ldap.model.name.Dn.apply()


    @Test
    public void testSerializeCompleteEntry() throws LdapException, IOException, ClassNotFoundException
    {
        Dn dn = new Dn( "ou=system" );

        dn.apply( schemaManager );

        byte[] password = Strings.getBytesUtf8( "secret" );
        Entry entry = new DefaultEntry( dn );
        entry.add( "ObjectClass", "top", "person" );
        entry.add( "cn", "test1" );
View Full Code Here


    @Test
    public void testSerializeEntryWithNoAttribute() throws LdapException, IOException, ClassNotFoundException
    {
        Dn dn = new Dn( "ou=system" );

        dn.apply( schemaManager );

        Entry entry = new DefaultEntry( dn );

        Entry entrySer = deserializeValue( serializeValue( entry ) );
View Full Code Here

       
        if ( obj instanceof Dn)
        {
            dn = (Dn)obj;
           
            dn = ( dn.isSchemaAware() ? dn : dn.apply( schemaManager ) );
        }
        else if ( obj instanceof String )
        {
            dn = new Dn( schemaManager, ( String ) obj );
        }
View Full Code Here

        partition.add( addCtx );

        SearchOperationContext searchCtx = new SearchOperationContext( mockSession );

        Dn dn = new Dn( "dc=test,ou=test,ou=system" );
        dn.apply( schemaManager );
        searchCtx.setDn( dn );
        ExprNode filter = FilterParser.parse( schemaManager, "(ObjectClass=domain)" );
        NameComponentNormalizer ncn = new ConcreteNameComponentNormalizer( schemaManager );
        FilterNormalizingVisitor visitor = new FilterNormalizingVisitor( ncn, schemaManager );
        filter.accept( visitor );
View Full Code Here

        LdapPrincipal principal = session.getEffectivePrincipal();
        Dn principalDn = principal.getDn();

        if ( !principalDn.isSchemaAware() )
        {
            principalDn.apply( schemaManager );
        }

        // Bypass this interceptor if we disabled the AC subsystem or if the principal is the admin
        if ( isPrincipalAnAdministrator( principalDn ) || !directoryService.isAccessControlEnabled() )
        {
View Full Code Here

            Dn apName = oldDn.getParent();
            Dn baseDn = apName;
            baseDn = baseDn.add( ss.getBase() );
            Dn newName = newSuperiorDn;
            newName = newName.add( oldDn.getRdn() );
            newName.apply( schemaManager );

            subentryCache.addSubentry( newName, subentry );

            next.move( moveContext );
View Full Code Here

                // Modify all the entries under this subentry
                while ( subentries.next() )
                {
                    Entry candidate = subentries.get();
                    Dn dn = candidate.getDn();
                    dn.apply( schemaManager );

                    if ( evaluator.evaluate( ss, apName, dn, candidate ) )
                    {
                        nexus.modify( new ModifyOperationContext( moveContext.getSession(), dn, getOperationalModsForReplace(
                            oldDn, newName, subentry, candidate ) ) );
View Full Code Here

            Dn baseDn = apName;
            baseDn = baseDn.add( ss.getBase() );
            Dn newName = newSuperiorDn.getParent();

            newName = newName.add( moveAndRenameContext.getNewRdn() );
            newName.apply( schemaManager );

            subentryCache.addSubentry( newName, subentry );

            next.moveAndRename( moveAndRenameContext );
View Full Code Here

            {
                while ( subentries.next() )
                {
                    Entry candidate = subentries.get();
                    Dn dn = candidate.getDn();
                    dn.apply( schemaManager );

                    if ( evaluator.evaluate( ss, apName, dn, candidate ) )
                    {
                        nexus.modify( new ModifyOperationContext( moveAndRenameContext.getSession(), dn, getOperationalModsForReplace(
                            oldDn, newName, subentry, candidate ) ) );
View Full Code Here

            Dn baseDn = apName;
            baseDn = baseDn.add( ss.getBase() );
            Dn newName = oldDn.getParent();

            newName = newName.add( renameContext.getNewRdn() );
            newName.apply( schemaManager );

            subentryCache.addSubentry( newName, subentry );
            next.rename( renameContext );

            subentry = subentryCache.getSubentry( newName );
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.