Package javax.naming.ldap

Examples of javax.naming.ldap.LdapContext.modifyAttributes()


        createData( sysRoot );

        // An invalid AT value
        Attributes attrs = new BasicAttributes( "seeAlso", "AAA", true );

        sysRoot.modifyAttributes( RDN_HEATHER_NOVA, DirContext.ADD_ATTRIBUTE, attrs );
    }
   
   
    /**
     * Add a AT not part of the MAY/MUST, with an invalid value, in an entry with the
View Full Code Here


        createData( sysRoot );

        // An invalid AT value
        Attributes attrs = new BasicAttributes( "mobile", "AAA", true );

        sysRoot.modifyAttributes( "ou=testing01", DirContext.ADD_ATTRIBUTE, attrs );
    }
   
   
    /**
     * Add an operational AT in an entry with no extensibleObject OC
View Full Code Here

        createData( sysRoot );

        // An operationalAttribute
        Attributes attrs = new BasicAttributes( "subschemaSubentry", "cn=anotherSchema", true );

        sysRoot.modifyAttributes( RDN_HEATHER_NOVA, DirContext.ADD_ATTRIBUTE, attrs );
    }
   
   
    /**
     * Add an operational AT in an entry the extensibleObject OC
View Full Code Here

        createData( sysRoot );

        // An operational attribute
        Attributes attrs = new BasicAttributes( "subschemaSubentry", "cn=anotherSchema", true );

        sysRoot.modifyAttributes( "ou=testing01", DirContext.ADD_ATTRIBUTE, attrs );
    }
   
   
    //---------------------------------------------------------------------------------------------
    // 1 Entry exists
View Full Code Here

        // A new description attribute value
        String newValue = "test";

        Attributes attrs = new BasicAttributes( "description", newValue, true );

        sysRoot.modifyAttributes( RDN_HEATHER_NOVA, DirContext.ADD_ATTRIBUTE, attrs );

        // Verify that the attribute value has been added
        attrs = sysRoot.getAttributes( RDN_HEATHER_NOVA );
        Attribute attr = attrs.get( "description" );
        assertNotNull( attr );
View Full Code Here

        LdapContext sysRoot = getSystemContext( service );
        createData( sysRoot );

        Attributes attrs = new BasicAttributes( "description", PERSON_DESCRIPTION, true );

        sysRoot.modifyAttributes( RDN_HEATHER_NOVA, DirContext.ADD_ATTRIBUTE, attrs );
    }
   
   
    /**
     * Add an empty value in an existing AT in the entry, the AT is not part of the MAY or MUST,
View Full Code Here

        createData( sysRoot );

        Attributes attrs = new BasicAttributes( "crossCertificatePair", "12345".getBytes(), true );
       
        // Add the first AVA
        sysRoot.modifyAttributes( "ou=testing01", DirContext.ADD_ATTRIBUTE, attrs );

        attrs = new BasicAttributes( "crossCertificatePair", StringTools.EMPTY_BYTES, true );
       
        // Add the second AVA
        sysRoot.modifyAttributes( "ou=testing01", DirContext.ADD_ATTRIBUTE, attrs );
View Full Code Here

        sysRoot.modifyAttributes( "ou=testing01", DirContext.ADD_ATTRIBUTE, attrs );

        attrs = new BasicAttributes( "crossCertificatePair", StringTools.EMPTY_BYTES, true );
       
        // Add the second AVA
        sysRoot.modifyAttributes( "ou=testing01", DirContext.ADD_ATTRIBUTE, attrs );

        // Verify that the attribute value has been added
        attrs = sysRoot.getAttributes( "ou=testing01" );
        Attribute attr = attrs.get( "crossCertificatePair" );
        assertNotNull( attr );
View Full Code Here

        // The initial value
        Attributes attrs = new BasicAttributes( "c", "FR", true );

        // Add the AVA
        sysRoot.modifyAttributes( "ou=testing01", DirContext.ADD_ATTRIBUTE, attrs );
       
        // Add another value
        Attributes attrs2 = new BasicAttributes( "c", "US", true );

        // Add the AVA
View Full Code Here

       
        // Add another value
        Attributes attrs2 = new BasicAttributes( "c", "US", true );

        // Add the AVA
        sysRoot.modifyAttributes( "ou=testing01", DirContext.ADD_ATTRIBUTE, attrs2 );
    }
   
   
    /**
     * Add the existing value in a single valued AT
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.