| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2013 ForgeRock AS |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.extensions; |
| | | |
| | |
| | | // Make sure that the DN of this entry is equal to the config root DN. |
| | | try |
| | | { |
| | | DN configRootDN = DN.decode(DN_CONFIG_ROOT); |
| | | DN configRootDN = DN.valueOf(DN_CONFIG_ROOT); |
| | | if (! entry.getDN().equals(configRootDN)) |
| | | { |
| | | Message message = ERR_CONFIG_FILE_INVALID_BASE_DN.get( |
| | |
| | | |
| | | |
| | | // Make sure that the parent DN of the entry read does exist. |
| | | DN parentDN = entryDN.getParent(); |
| | | DN parentDN = entryDN.parent(); |
| | | if (parentDN == null) |
| | | { |
| | | close(reader); |
| | |
| | | |
| | | |
| | | // Make sure that the entry's parent exists. If it does not, then fail. |
| | | DN parentDN = entryDN.getParent(); |
| | | DN parentDN = entryDN.parent(); |
| | | if (parentDN == null) |
| | | { |
| | | // The entry DN doesn't have a parent. This is not allowed. |
| | |
| | | |
| | | // Get the matched DN, if possible. |
| | | DN matchedDN = null; |
| | | parentDN = parentDN.getParent(); |
| | | parentDN = parentDN.parent(); |
| | | while (parentDN != null) |
| | | { |
| | | if (configEntries.containsKey(parentDN)) |
| | |
| | | break; |
| | | } |
| | | |
| | | parentDN = parentDN.getParent(); |
| | | parentDN = parentDN.parent(); |
| | | } |
| | | |
| | | throw new DirectoryException(ResultCode.NO_SUCH_OBJECT, message, |
| | |
| | | DN matchedDN = null; |
| | | if (entryDN.isDescendantOf(configRootEntry.getDN())) |
| | | { |
| | | DN parentDN = entryDN.getParent(); |
| | | DN parentDN = entryDN.parent(); |
| | | while (parentDN != null) |
| | | { |
| | | if (configEntries.containsKey(parentDN)) |
| | |
| | | break; |
| | | } |
| | | |
| | | parentDN = parentDN.getParent(); |
| | | parentDN = parentDN.parent(); |
| | | } |
| | | } |
| | | |
| | |
| | | DN matchedDN = null; |
| | | if (entryDN.isDescendantOf(configRootEntry.getDN())) |
| | | { |
| | | DN parentDN = entryDN.getParent(); |
| | | DN parentDN = entryDN.parent(); |
| | | while (parentDN != null) |
| | | { |
| | | if (configEntries.containsKey(parentDN)) |
| | |
| | | break; |
| | | } |
| | | |
| | | parentDN = parentDN.getParent(); |
| | | parentDN = parentDN.parent(); |
| | | } |
| | | } |
| | | |
| | |
| | | DN matchedDN = null; |
| | | if (baseDN.isDescendantOf(configRootEntry.getDN())) |
| | | { |
| | | DN parentDN = baseDN.getParent(); |
| | | DN parentDN = baseDN.parent(); |
| | | while (parentDN != null) |
| | | { |
| | | if (configEntries.containsKey(parentDN)) |
| | |
| | | break; |
| | | } |
| | | |
| | | parentDN = parentDN.getParent(); |
| | | parentDN = parentDN.parent(); |
| | | } |
| | | } |
| | | |