Package javax.naming.directory

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


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


    try {
      if ((attrs != null) && (ctx instanceof DirContext)) {
        DirContext dirctx = (DirContext)ctx;
        param = parameters[0];
        if (param instanceof AnyName) {
          dirctx.bind((Name)param.toObject(), value, attrs);
        } else {
          dirctx.bind(param.toString(), value, attrs);
        }
        return this;
      }
View Full Code Here

        DirContext dirctx = (DirContext)ctx;
        param = parameters[0];
        if (param instanceof AnyName) {
          dirctx.bind((Name)param.toObject(), value, attrs);
        } else {
          dirctx.bind(param.toString(), value, attrs);
        }
        return this;
      }

      param = parameters[0];
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

            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

            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

            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

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.