| | |
| | | setPrimaryValid(lFilter); |
| | | String s = getBaseDN(); |
| | | boolean displayAll = false; |
| | | DN theDN = null; |
| | | if (s != null) |
| | | { |
| | | displayAll = s.equals(ALL_BASE_DNS); |
| | |
| | | { |
| | | try |
| | | { |
| | | DN.decode(s); |
| | | theDN = DN.decode(s); |
| | | } |
| | | catch (Throwable t) |
| | | { |
| | |
| | | { |
| | | for (BaseDNDescriptor baseDN : backend.getBaseDns()) |
| | | { |
| | | if ((theDN != null) && baseDN.getDn().equals(theDN)) |
| | | { |
| | | isBaseDN = true; |
| | | } |
| | | String dn = Utilities.unescapeUtf8(baseDN.getDn().toString()); |
| | | if (displayAll) |
| | | { |
| | |
| | | else if (s.equals(dn)) |
| | | { |
| | | controller.addSuffix(dn, null); |
| | | isBaseDN = true; |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | if (baseDN.getEntries() > 0) |
| | | { |
| | | if (!controller.hasSuffix(dn)) |
| | | try |
| | | { |
| | | if (displayAll) |
| | | if (!controller.hasSuffix(dn)) |
| | | { |
| | | controller.addSuffix(dn, null); |
| | | if (displayAll || isBaseDN) |
| | | { |
| | | controller.addSuffix(dn, null); |
| | | } |
| | | } |
| | | else if (s.equals(dn)) |
| | | { |
| | | controller.addSuffix(dn, null); |
| | | } |
| | | } |
| | | catch (IllegalArgumentException iae) |
| | | { |
| | | // The suffix node exists but is not a suffix node. |
| | | // Simply log a message. |
| | | LOG.log(Level.WARNING, "Suffix: "+dn+ |
| | | " added as a non suffix node. Exception: "+iae, iae); |
| | | } |
| | | } |
| | | } |