Examples of modifyAttributes()


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

      if (failer == null) {
        currMembers.add(dn);
        Attributes attrs = new BasicAttributes();
        attrs.put(currMembers);
       
        ctx.modifyAttributes(this.dn, DirContext.REPLACE_ATTRIBUTE, attrs);
        return true;
      }
 
    } catch (Exception e) {
      throw new OperationFailedException(e);

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

      if (result != null) {
        currMembers.remove(result);
        Attributes attrs = new BasicAttributes();
        attrs.put(currMembers);
     
        ctx.modifyAttributes(this.dn, DirContext.REPLACE_ATTRIBUTE, attrs);
       
        return true;
      }
 
    } catch (Exception e) {

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

   

    try {
      if (attributes != null) {
        if (name != null) {
          dirctx.modifyAttributes(name, modop, attributes);
        } else {
          dirctx.modifyAttributes(sname, modop, attributes);
        }
      } else if (modifications != null) {
        if (name != null) {

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

    try {
      if (attributes != null) {
        if (name != null) {
          dirctx.modifyAttributes(name, modop, attributes);
        } else {
          dirctx.modifyAttributes(sname, modop, attributes);
        }
      } else if (modifications != null) {
        if (name != null) {
          dirctx.modifyAttributes(name, modifications);
        } else {

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

        } else {
          dirctx.modifyAttributes(sname, modop, attributes);
        }
      } else if (modifications != null) {
        if (name != null) {
          dirctx.modifyAttributes(name, modifications);
        } else {
          dirctx.modifyAttributes(sname, modifications);
        }
      }
    } catch (NamingException e) {

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

        }
      } else if (modifications != null) {
        if (name != null) {
          dirctx.modifyAttributes(name, modifications);
        } else {
          dirctx.modifyAttributes(sname, modifications);
        }
      }
    } catch (NamingException e) {
      throw context.exception(e);
    }

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

      } else {
        userPasswordAttribute = new BasicAttribute ( ldapUserPasswordAttribute, pwd );
      }

      modificationItems [ 0 ] = new ModificationItem ( DirContext.REPLACE_ATTRIBUTE, userPasswordAttribute );
      ctx.modifyAttributes ( dn, modificationItems );
      ctx.close();
    } catch (NamingException e) {
      log.error("NamingException when trying to change password with username::" + uid, e);
      errors.insert("Cannot change the password");
    }

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

            {
                // Since turbineUserGroup had already been created
                // then just add the role name attribute.
                attrs = new BasicAttributes();
                attrs.put(new BasicAttribute("turbineRoleName", roleName));
                ctx.modifyAttributes(dn, DirContext.ADD_ATTRIBUTE, attrs);
            }

        }
        catch (NamingException ex)
        {

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

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

            // Remove the role.
            ctx.modifyAttributes(dn, DirContext.REMOVE_ATTRIBUTE, attrs);

        }
        catch (NamingException ex)
        {
            throw new DataBackendException("NamingException caught", ex);

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

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

            // Add the permission.
            ctx.modifyAttributes(dn, DirContext.ADD_ATTRIBUTE, attrs);

        }
        catch (NamingException ex)
        {
            throw new DataBackendException("NamingException caught", ex);
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.