Examples of Modification


Examples of org.apache.directory.api.ldap.model.entry.Modification

        results.close();

        assertEquals( 1, nbFound );

        // Ok, now replace the cn
        Modification modification = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE, "cn", "New cn" );

        connection.modify( dn, modification );

        // The Substring index on CN should still work
        // The old cn should not be present anymore
View Full Code Here

Examples of org.apache.directory.api.ldap.model.entry.Modification

        Attribute attrib = new DefaultAttribute( SchemaConstants.OU_AT, OU_AT );

        String attribVal = "Marketing";
        attrib.add( attribVal );

        Modification add = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE, attrib );

        Entry lookedup = store.fetch( store.getEntryId( dn ), dn );

        assertNull( lookedup.get( "ou" ) ); // before replacing
View Full Code Here

Examples of org.apache.directory.api.ldap.model.entry.Modification

        results.close();

        assertEquals( 1, nbFound );

        // Ok, now replace the cn
        Modification modification = new DefaultModification( ModificationOperation.ADD_ATTRIBUTE, "cn", "New cn" );

        connection.modify( dn, modification );

        // The Substring index on CN should still work
        // The old cn should still be present anymore
View Full Code Here

Examples of org.apache.directory.api.ldap.model.entry.Modification

        results.close();

        assertEquals( 1, nbFound );

        // Ok, now replace the cn
        Modification modification = new DefaultModification( ModificationOperation.REMOVE_ATTRIBUTE, "displayName",
            "testEntry" );

        connection.modify( dn, modification );

        // We should not find anything using the substring filter for the displayName AT
View Full Code Here

Examples of org.apache.directory.api.ldap.model.entry.Modification

       
        assertTrue( Arrays.equals( akarasulu.get( "userPassword" ).getBytes(), readEntry.get( "userPassword" ).getBytes() ) );

        Attribute attribute = new DefaultAttribute( "userPassword", "replaced" );

        Modification mod = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE, attribute );
     
        Dn userDn = new Dn( getService().getSchemaManager(), "uid=akarasulu,ou=users,ou=system" );
        LdapPrincipal principal = new LdapPrincipal( getService().getSchemaManager(), userDn, AuthenticationLevel.SIMPLE );
        CoreSession akarasuluSession = getService().getSession( principal );
View Full Code Here

Examples of org.apache.directory.api.ldap.model.entry.Modification

    {
        disableSchema( "nis" );
        Dn dn = new Dn( subschemaSubentryDn );
        String substrate = "( 1.3.6.1.4.1.18060.0.4.0.2.10000 NAME ( 'bogus' 'bogusName' ) "
            + "DESC 'bogus description' SUP name SYNTAX '1.3.6.1.4.1.1466.115.121.1.15' SINGLE-VALUE X-SCHEMA 'nis' )";
        Modification mod = new DefaultModification(
            ModificationOperation.ADD_ATTRIBUTE, new DefaultAttribute( "attributeTypes", substrate ) );

        connection.modify( dn, mod );

        Attribute attributeTypes = subschemaSubentry.get( "attributeTypes" );
View Full Code Here

Examples of org.apache.directory.api.ldap.model.entry.Modification

    {
        enableSchema( "nis" );
        Dn dn = new Dn( subschemaSubentryDn );
        String substrate = "( 1.3.6.1.4.1.18060.0.4.0.2.10000 NAME ( 'bogus' 'bogusName' ) "
            + "DESC 'bogus description' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SUP name SINGLE-VALUE X-SCHEMA 'nis' )";
        Modification mod = new DefaultModification(
            ModificationOperation.ADD_ATTRIBUTE, new DefaultAttribute( "attributeTypes", substrate ) );

        connection.modify( dn, mod );

        updateSSSE();
View Full Code Here

Examples of org.apache.directory.api.ldap.model.entry.Modification

    {
        enableSchema( "nis" );
        Dn dn = new Dn( subschemaSubentryDn );
        String substrate = "( 1.3.6.1.4.1.18060.0.4.0.2.10000 NAME ( 'bogus' 'bogus_microsoft_name' ) "
            + "DESC 'bogus description' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SUP name SINGLE-VALUE X-SCHEMA 'nis' )";
        Modification mod = new DefaultModification(
            ModificationOperation.ADD_ATTRIBUTE, new DefaultAttribute( "attributeTypes", substrate ) );

        connection.modify( dn, mod );
    }
View Full Code Here

Examples of org.apache.directory.api.ldap.model.entry.Modification

    {
        enableSchema( "nis" );
        Dn dn = new Dn( subschemaSubentryDn );
        String substrate = "( 1.3.6.1.4.1.18060.0.4.0.2.10000 NAME ( 'bogus' 'bogusName' ) "
            + "DESC '  ' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SUP name SINGLE-VALUE X-SCHEMA 'nis' )";
        Modification mod = new DefaultModification(
            ModificationOperation.ADD_ATTRIBUTE, new DefaultAttribute( "attributeTypes", substrate ) );

        // Apply the addition
        connection.modify( dn, mod );
View Full Code Here

Examples of org.apache.directory.api.ldap.model.entry.Modification

        enableSchema( "nis" );
        Dn dn = new Dn( subschemaSubentryDn );
        String substrate = "( 1.3.6.1.4.1.18060.0.4.0.2.10000 NAME ( 'bogus' 'bogusName' ) "
            + "DESC 'bogus description' SUP name SINGLE-VALUE X-SCHEMA 'nis' )";
        Modification mod = new DefaultModification(
            ModificationOperation.ADD_ATTRIBUTE, new DefaultAttribute( "attributeTypes", substrate ) );

        connection.modify( dn, mod );

        // now check the modification timestamp and the modifiers name
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.