/** * Specifies an entry that should always be returned as the in-memory * directory server's root DSE. Note that if a specific root DSE entry is * provided, then * * @param rootDSEEntry An entry that should always be returned as the * in-memory directory server's root DSE, or * {@code null} to indicate that the root DSE should be * dynamically generated. */ public void setRootDSEEntry(final Entry rootDSEEntry) { if (rootDSEEntry == null) { this.rootDSEEntry = null; return; } final Entry e = rootDSEEntry.duplicate(); e.setDN(""); this.rootDSEEntry = new ReadOnlyEntry(e); }
/** * Merges the contents of all provided entries so that the resulting entry * will contain all attribute values present in at least one of the entries. * * @param entries The set of entries to be merged. At least one entry must * be provided. * * @return An entry containing all attribute values present in at least one * of the entries. */ public static Entry mergeEntries(final Entry... entries) { ensureNotNull(entries); ensureTrue(entries.length > 0); final Entry newEntry = entries[0].duplicate(); for (int i=1; i < entries.length; i++) { for (final Attribute a : entries[i].attributes.values()) { newEntry.addAttribute(a); } } return newEntry; }
/** * Merges the contents of all provided entries so that the resulting entry * will contain all attribute values present in at least one of the entries. * * @param entries The set of entries to be merged. At least one entry must * be provided. * * @return An entry containing all attribute values present in at least one * of the entries. */ public static Entry mergeEntries(final Entry... entries) { ensureNotNull(entries); ensureTrue(entries.length > 0); final Entry newEntry = entries[0].duplicate(); for (int i=1; i < entries.length; i++) { for (final Attribute a : entries[i].attributes.values()) { newEntry.addAttribute(a); } } return newEntry; }
if (entry.getDN().length() > 10) final Entry dup = entry.duplicate(); dup.setDN(""); ldifLinesWithDN = dup.toLDIF(wrapColumn);
ensureTrue(entries.length > 0); final Entry newEntry = entries[0].duplicate();
ensureTrue(entries.length > 0); final Entry newEntry = entries[0].duplicate();
ensureFalse(modifications.isEmpty()); final Entry e = entry.duplicate(); final ArrayList<String> errors = new ArrayList<String>(modifications.size());
ensureFalse(modifications.isEmpty()); final Entry e = entry.duplicate(); final ArrayList<String> errors = new ArrayList<String>(modifications.size());
final Entry copy = e.duplicate(); final Attribute existingAttribute = copy.getAttribute(attributeToAdd.getName(), schema);
final Entry newEntry = entry.duplicate(); if (parsedNewSuperiorDN == null)
final Entry newEntry = entry.duplicate(); if (parsedNewSuperiorDN == null)