Package com.novell.ldap

Examples of com.novell.ldap.LDAPConnection.modify()


              mods = (LDAPModification[])modSet.toArray(mods);
              String oldDn = oldEntry.getDN();
              if (log.isDebugEnabled()) {
                log.debug("Writing modification to DN: "+oldDn);
              }
              lc.modify(oldDn, mods, ldapStoreConstraints);
              String msg = intres.getLocalizedMessage("publisher.ldapmodify", "CERT", oldDn);
              log.info(msg)
            } else {
              if(this.getCreateNonExistingUsers()){    
                if (oldEntry == null) {          
View Full Code Here


        lc.bind(ldapVersion, getLoginDN(), getLoginPassword().getBytes("UTF8"), ldapBindConstraints);
        // Add or modify the entry
        if (oldEntry != null) {
          LDAPModification[] mods = new LDAPModification[modSet.size()];
          mods = (LDAPModification[])modSet.toArray(mods);
          lc.modify(dn, mods, ldapStoreConstraints);
          String msg = intres.getLocalizedMessage("publisher.ldapmodify", "CRL", dn);
          log.info(msg)
        } else {
          lc.add(newEntry, ldapStoreConstraints);
          String msg = intres.getLocalizedMessage("publisher.ldapadd", "CRL", dn);
View Full Code Here

        // Add or modify the entry
        if (oldEntry != null && modSet != null && getModifyExistingUsers()) {
          if (removecert) {
            LDAPModification[] mods = new LDAPModification[modSet.size()];
            mods = (LDAPModification[])modSet.toArray(mods);
            lc.modify(oldEntry.getDN(), mods, ldapStoreConstraints);               
          }
          if (removeuser) {
            lc.delete(oldEntry.getDN(), ldapStoreConstraints);               
          }
          String msg = intres.getLocalizedMessage("publisher.ldapremove", dn);
View Full Code Here

        LDAPConnection connection = new LDAPConnection();
        try {
            connection.connect(LDAPServerAddress, 389);
            connection.bind(LDAPConnection.LDAP_V3, "cn=admin,dc=sei,dc=pku",
                    "seiseforge");
            connection.modify("uid=" + user.getUserName()
                    + ",ou=People,o=SEForge,dc=sei,dc=pku",
                    new LDAPModification(LdapContext.REPLACE_ATTRIBUTE,
                            new LDAPAttribute("userPassword", user
                                    .getPassword())));
            System.out.println("成功修改一条记录!");
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.