Package javax.naming.directory

Examples of javax.naming.directory.InitialDirContext.listBindings()


                }
   
                if(log.isDebugEnabled())
                    log.debug("starting syncLdapUser");
                      
                NamingEnumeration<Binding> enm2 = ctx.listBindings(SystemConfiguration.getInstance().getStringValue(SystemConfiguration.Key.LDAP_USER_PREFIX));
                while (enm2.hasMore()) {
                    Attributes attrs = ctx.getAttributes(enm2.next().getName() + "," + SystemConfiguration.getInstance().getStringValue(SystemConfiguration.Key.LDAP_USER_PREFIX),new String[]{"uid"});
                       
                    if(attrs.get("uid") != null) {
                        String username = (String)attrs.get("uid").get(0);                  
View Full Code Here


     */
    public List<String> getLdapGroups() throws NamingException
    {
        List<String> groupList = new ArrayList<String>();
        InitialDirContext ctx = new InitialDirContext(env);
        NamingEnumeration<Binding> enm = ctx.listBindings(SystemConfiguration.getInstance().getStringValue(SystemConfiguration.Key.LDAP_GROUP_PREFIX));
        while (enm.hasMore())
        {
            Binding b = enm.next();
            groupList.add(b.getName());
        }
View Full Code Here

    {
        if(!SystemConfiguration.getInstance().getBooleanValue(SystemConfiguration.Key.LDAP_ADDRESS_EXPORT_ENABLED))
            return;
       
        DirContext ctx = new InitialDirContext(env);
        NamingEnumeration enm = ctx.listBindings("");
        while (enm.hasMore())
        {
            Binding b = (Binding) enm.next();
            ctx.unbind(b.getName());
        }
View Full Code Here

    {
        if(!SystemConfiguration.getInstance().getBooleanValue(SystemConfiguration.Key.LDAP_ADDRESS_EXPORT_ENABLED))
            return;
       
        DirContext ctx = new InitialDirContext(env);
        NamingEnumeration enm = ctx.listBindings("");
        while (enm.hasMore())
        {
            Binding b = (Binding) enm.next();
            ctx.unbind(b.getName());
        }
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.