Package javax.naming.directory

Examples of javax.naming.directory.DirContext.bind()


            Resource newResource = new Resource(resourceInputStream);
            // FIXME: Add attributes
            if (exists) {
                resources.rebind(path, newResource);
            } else {
                resources.bind(path, newResource);
            }
        } catch(NamingException e) {
            result = false;
        }
View Full Code Here


      env.put(Context.SECURITY_CREDENTIALS, ConfigMain.getParameter("ldap_adminPassword"));

      LdapUser dr = new LdapUser();
      dr.configure(inBenutzer, inPasswort, getNextUidNumber());
      DirContext ctx = new InitialDirContext(env);
      ctx.bind(getUserDN(inBenutzer), dr);
      ctx.close();
      setNextUidNumber();
      Helper.setMeldung(null, Helper.getTranslation("ldapWritten") + " " + inBenutzer.getNachVorname(), "");
      /*
       * -------------------------------- check if HomeDir exists, else create it --------------------------------
View Full Code Here

            Attributes attrs = ldapUser.getLDAPAttributes();
            String name = ldapUser.getDN();

            DirContext ctx = bindAsAdmin();

            ctx.bind(name, null, attrs);
        }
        catch (NamingException ex)
        {
            throw new DataBackendException("NamingException caught", ex);
        }
View Full Code Here

            attrs.put(new BasicAttribute("objectClass", "turbineUserGroup"));
            attrs.put(new BasicAttribute("turbineUserUniqueId", userName));
            try
            {
                // Add the turbineUserGroup.
                ctx.bind(dn, null, attrs);
            }
            catch (NameAlreadyBoundException ex)
            {
                // Since turbineUserGroup had already been created
                // then just add the role name attribute.
View Full Code Here

            // Connect to LDAP.
            DirContext ctx = LDAPUserManager.bindAsAdmin();

            // Add the group in LDAP.
            ctx.bind(dn, null, attrs);

            // Add the group to system-wide cache.
            getAllGroups().add(group);

            return group;
View Full Code Here

            // Connect to LDAP.
            DirContext ctx = LDAPUserManager.bindAsAdmin();

            // Add the role in LDAP.
            ctx.bind(dn, null, attrs);

            // Add the role to system-wide cache.
            getAllRoles().add(role);

            return role;
View Full Code Here

            attrs.put(new BasicAttribute("turbinePermissionName", permName));

            DirContext ctx = LDAPUserManager.bindAsAdmin();

            // Add the permission in LDAP.
            ctx.bind(dn, null, attrs);

            // add the permission to system-wide cache
            getAllPermissions().add(permission);

            return permission;
View Full Code Here

        }

        DirContext context = getContinuationContext(name);

        try {
            context.bind(name.getSuffix(1), obj, attributes);

        } finally {
            context.close();
        }
View Full Code Here

            throws NamingException {
        ResolveResult result = getRootURLContext(url, environment);
        DirContext context = (DirContext) result.getResolvedObj();

        try {
            context.bind(result.getRemainingName(), obj, attributes);
            return;
        } finally {
            context.close();
        }
    }
View Full Code Here

             * multi ns, find next ns context, delegate operation to the next
             * contex
             */
            DirContext nns = (DirContext) findNnsContext(name);
            Name remainingName = name.getSuffix(1);
            nns.bind(remainingName, attributes);
            return;
        }

        /*
         * there is only one ldap ns
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.