Package com.novell.ldap

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


  LDAPConnection connection = createConnection();
  if (connection != null) {
      try {
    String[] attributes = new String[1];
    attributes[0] = ouAttributeName;
    LDAPSearchResults searchResults = connection.search(searchRoot, LDAPConnection.SCOPE_SUB,
      "(&(objectclass=" + objectClass + ")(cn=" + userId + "))", attributes, false);

    // popolamento userAttributes con attributeName e attributeValue
    LDAPEntry entry = null;
    if (searchResults.hasMore()) {
View Full Code Here


  LDAPConnection connection = createConnection();
  if (connection != null) {
      try {

    LDAPSearchResults searchResults = connection.search(searchRootGroup, LDAPConnection.SCOPE_SUB,
      "(objectclass=" + objectClassGroup + ")", attrIDsGroup, false);

    LDAPEntry entry = null;
    LDAPAttributeSet attributeSet = null;
    while (searchResults.hasMore()) {
View Full Code Here

    String[] atrr = (String[])null;
    atrr = new String[] { "DisplayName", "mail", "memberOf",
      "sAMAccountName" };

    rs = conn.search("ou=skymobi,dc=sky-mobi,dc=com", 2, filter, atrr,
      false);

    int icnt = 0;
    if (rs != null) {
      while (rs.hasMore()) {
View Full Code Here

      conn.add(newEntry);
      System.out.println("<======Added object: " + EXO_DEVELOPER_DN + " successfully.");

      System.out.println("\nAdded object: " + EXO_DEVELOPER_DN + " successfully.");

      LDAPSearchResults results = conn.search(DEVELOPER_UNIT_DN, // search only
         // the object in
         // the subtree of
         // this dn
         LDAPConnection.SCOPE_SUB, // return
         // all the
View Full Code Here

      conn.add(newEntry);
      System.out.println("<======Added object: " + EXO_DEVELOPER_DN + " successfully.");

      System.out.println("\nAdded object: " + EXO_DEVELOPER_DN + " successfully.");

      LDAPSearchResults results = conn.search(DEVELOPER_UNIT_DN, // search only
         // the object in
         // the subtree of
         // this dn
         LDAPConnection.SCOPE_SUB, // return
         // all the
View Full Code Here

    LDAPSearchResults rs = null;

    try {
      lc = getConnection();

      rs = lc.search(ENTRYDN, LDAPConnection.SCOPE_SUB, "sn=" + user,
          attrNames, false);

      while (rs.hasMore()) {
        try {
          fullEntry = rs.next();
View Full Code Here

    LDAPAttributeSet set = null;
    LDAPSearchResults rs = null;

    try {
      lc = getConnection();
      rs = lc.search(ENTRYDN, LDAPConnection.SCOPE_SUB, "cn=" + user,
          attrNames, false);

      while (rs.hasMore()) {
        try {
          fullEntry = rs.next();
View Full Code Here

    LDAPConnection lc = null;
    LDAPAttributeSet set = null;
    LDAPSearchResults rs = null;
    try {
      lc = getConnection();
      rs = lc.search(ENTRYDN, LDAPConnection.SCOPE_SUB, "cn=" + cn,
          attrNames, false);

      while (rs.hasMore()) {
        try {
          fullEntry = rs.next();
View Full Code Here

    LDAPAttributeSet set = null;
    LDAPSearchResults rs = null;

    try {
      lc = getConnection();
      rs = lc.search(ENTRYDN, LDAPConnection.SCOPE_SUB, "sn=" + sn,
          attrNames, false);

      while (rs.hasMore()) {
        try {
          fullEntry = rs.next();
View Full Code Here

        lc.bind(3, "cn=Manager,o=zephyr.com.cn", password
            .getBytes("UTF8"));
      } catch (UnsupportedEncodingException e1) {
        e1.printStackTrace();
      }
      rs = lc.search(ENTRYDN, LDAPConnection.SCOPE_SUB, "sn=" + user,
          attrNames, false);

      while (rs.hasMore()) {
        try {
          fullEntry = rs.next();
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.