Package javax.naming.ldap

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


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

        Attributes attrs = new BasicAttributes( "c", "FR", true );

        sysRoot.modifyAttributes( "ou=testing02", DirContext.REMOVE_ATTRIBUTE, attrs );

        // Verify that the attribute value has been removed
        attrs = sysRoot.getAttributes( "ou=testing02" );
        Attribute country = attrs.get( "c" );
        assertNull( country );
View Full Code Here


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

        Attributes attrs = new BasicAttributes( "uidNumber", "1", true );

        sysRoot.modifyAttributes( "cn=test", DirContext.REMOVE_ATTRIBUTE, attrs );
    }
   
   
    /**
     * Delete a value part of the Rdn
View Full Code Here

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

        Attributes attrs = new BasicAttributes( "cn", "test", true );

        sysRoot.modifyAttributes( "cn=test", DirContext.REMOVE_ATTRIBUTE, attrs );
    }
   
   
    /**
     * Delete an existing AT not part of the RDN, not in MUST
View Full Code Here

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

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

        sysRoot.modifyAttributes( RDN_HEATHER_NOVA, DirContext.REMOVE_ATTRIBUTE, attrs );
       
        // Verify that the attribute has been removed
        attrs = sysRoot.getAttributes( RDN_HEATHER_NOVA );
        Attribute descr = attrs.get( "description" );
        assertNull( descr );
View Full Code Here

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

        Attributes attrs = new BasicAttributes( "sn", null, true );

        sysRoot.modifyAttributes( RDN_HEATHER_NOVA, DirContext.REMOVE_ATTRIBUTE, attrs );
    }
   
   
    /**
     * Delete an existing AT part of the RDN
View Full Code Here

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

        Attributes attrs = new BasicAttributes( "cn", null, true );

        sysRoot.modifyAttributes( RDN_HEATHER_NOVA, DirContext.REMOVE_ATTRIBUTE, attrs );
    }
   
   
    /**
     * Delete a value not present in an existing AT
View Full Code Here

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

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

        sysRoot.modifyAttributes( RDN_HEATHER_NOVA, DirContext.REMOVE_ATTRIBUTE, attrs );
    }

    //---------------------------------------------------------------------------------------------
    // 1 Entry exists
    //  1.3 Entry is an alias
View Full Code Here

        createData( sysRoot );

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

        sysRoot.modifyAttributes( "ou=absent", DirContext.REMOVE_ATTRIBUTE, attrs );
    }
}
View Full Code Here

            attr.add( newValue );
        }

        attrs.put( attr );
       
        sysRoot.modifyAttributes( "cn=testing00", DirContext.ADD_ATTRIBUTE, attrs );
       
        System.out.println(" Done" );
    }

   
View Full Code Here

                t0 = t1;
            }
           
            String newValue = "cn=member" + i + ",ou=people,o=sevenSeas";
            Attributes attrs = new BasicAttributes( "uniqueMember", newValue, true );
            sysRoot.modifyAttributes( "cn=testing00", DirContext.ADD_ATTRIBUTE, attrs );
        }

        System.out.println(" Done" );
    }
}
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.