Examples of removeAttributes()


Examples of org.apache.directory.api.ldap.model.entry.DefaultEntry.removeAttributes()

        entry.removeAttributes( "CN", "SN" );

        assertFalse( entry.containsAttribute( "cn", "sn" ) );
        assertTrue( entry.containsAttribute( "objectclass", "userpassword" ) );

        entry.removeAttributes( "badId" );
        entry.removeAttributes( "l" );
        entry.removeAttributes( ( String ) null );
    }

View Full Code Here

Examples of org.apache.directory.api.ldap.model.entry.DefaultEntry.removeAttributes()

        assertFalse( entry.containsAttribute( "cn", "sn" ) );
        assertTrue( entry.containsAttribute( "objectclass", "userpassword" ) );

        entry.removeAttributes( "badId" );
        entry.removeAttributes( "l" );
        entry.removeAttributes( ( String ) null );
    }


    /**
 
View Full Code Here

Examples of org.apache.directory.api.ldap.model.entry.Entry.removeAttributes()

            case REMOVE_ATTRIBUTE:
                Attribute toBeRemoved = mod.getAttribute();

                if ( toBeRemoved.size() == 0 )
                {
                    targetEntry.removeAttributes( id );
                }
                else
                {
                    Attribute existing = targetEntry.get( id );
View Full Code Here

Examples of org.apache.directory.api.ldap.model.entry.Entry.removeAttributes()

                Entry modifiedEntry = super.modify( modifyContext.getDn(),
                    modifyContext.getModItems().toArray( new Modification[]
                        {} ) );

                // Remove the EntryDN
                modifiedEntry.removeAttributes( ENTRY_DN_AT );

                modifyContext.setAlteredEntry( modifiedEntry );
            }
            catch ( Exception e )
            {
View Full Code Here

Examples of org.apache.directory.api.ldap.model.entry.Entry.removeAttributes()

                if ( suffixEntry != null )
                {
                    Entry entry = master.get( suffixId );

                    // Don't write the EntryDN attribute
                    entry.removeAttributes( ENTRY_DN_AT );

                    entry.setDn( suffixDn );

                    appendLdif( entry );
View Full Code Here

Examples of org.apache.directory.api.ldap.model.entry.Entry.removeAttributes()

            IndexEntry<ParentIdAndRdn, String> element = cursor.get();
            String childId = element.getId();
            Entry entry = fetch( childId );

            // Remove the EntryDn
            entry.removeAttributes( SchemaConstants.ENTRY_DN_AT );

            appendLdif( entry );

            countChildren++;
View Full Code Here

Examples of org.apache.directory.api.ldap.model.entry.Entry.removeAttributes()

        // Get the modified entry and store it in the context for post usage
        Entry modifiedEntry = fetch( id, modifyContext.getDn() );
        modifyContext.setAlteredEntry( modifiedEntry );

        // Remove the EntryDN
        modifiedEntry.removeAttributes( ENTRY_DN_AT );

        // just overwrite the existing file
        Dn dn = modifyContext.getDn();

        // And write it back on disk
View Full Code Here

Examples of org.apache.directory.api.ldap.model.entry.Entry.removeAttributes()

        Attribute attrSN = new DefaultAttribute( atSN, "Test1", "Test2" );
        Attribute attrPWD = new DefaultAttribute( atPwd, BYTES1, BYTES2 );

        entry.put( attrOC, attrCN, attrSN, attrPWD );

        entry.removeAttributes( atCN, atSN );

        assertFalse( entry.containsAttribute( "cn", "sn" ) );
        assertTrue( entry.containsAttribute( "objectclass", "userpassword" ) );
    }
View Full Code Here

Examples of org.apache.directory.api.ldap.model.entry.Entry.removeAttributes()

        Attribute attrSN = new DefaultAttribute( atSN, "Test1", "Test2" );
        Attribute attrPWD = new DefaultAttribute( atPwd, BYTES1, BYTES2 );

        entry.put( attrOC, attrCN, attrSN, attrPWD );

        entry.removeAttributes( "CN", "SN" );

        assertFalse( entry.containsAttribute( "cn", "sn" ) );
        assertTrue( entry.containsAttribute( "objectclass", "userpassword" ) );

        entry.removeAttributes( "badId" );
View Full Code Here

Examples of org.apache.directory.api.ldap.model.entry.Entry.removeAttributes()

        entry.removeAttributes( "CN", "SN" );

        assertFalse( entry.containsAttribute( "cn", "sn" ) );
        assertTrue( entry.containsAttribute( "objectclass", "userpassword" ) );

        entry.removeAttributes( "badId" );
        entry.removeAttributes( "l" );
        entry.removeAttributes( ( String ) null );
    }

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.