| | |
| | | */ |
| | | public synchronized Entry getEntry(DN entryDN) |
| | | { |
| | | return entryMap.get(entryDN); |
| | | Entry entry = entryMap.get(entryDN); |
| | | if (entry != null) |
| | | { |
| | | entry = entry.duplicate(true); |
| | | } |
| | | |
| | | return entry; |
| | | } |
| | | |
| | | |
| | |
| | | public synchronized void addEntry(Entry entry, AddOperation addOperation) |
| | | throws DirectoryException |
| | | { |
| | | Entry e = entry.duplicate(true); |
| | | Entry e = entry.duplicate(false); |
| | | |
| | | // See if the target entry already exists. If so, then fail. |
| | | DN entryDN = e.getDN(); |
| | |
| | | ModifyOperation modifyOperation) |
| | | throws DirectoryException |
| | | { |
| | | Entry e = entry.duplicate(true); |
| | | Entry e = entry.duplicate(false); |
| | | |
| | | // Make sure the entry exists. If not, then throw an exception. |
| | | DN entryDN = e.getDN(); |
| | |
| | | ModifyDNOperation modifyDNOperation) |
| | | throws DirectoryException |
| | | { |
| | | Entry e = entry.duplicate(true); |
| | | Entry e = entry.duplicate(false); |
| | | |
| | | // Make sure that the target entry exists. |
| | | if (! entryMap.containsKey(currentDN)) |
| | |
| | | matchedDN, null); |
| | | } |
| | | |
| | | if (baseEntry != null) |
| | | { |
| | | baseEntry = baseEntry.duplicate(true); |
| | | } |
| | | |
| | | |
| | | // If it's a base-level search, then just get that entry and return it if it |
| | | // matches the filter. |
| | |
| | | // Walk through all entries and send the ones that match. |
| | | for (Entry e : entryMap.values()) |
| | | { |
| | | e = e.duplicate(true); |
| | | if (e.matchesBaseAndScope(baseDN, scope) && filter.matchesEntry(e)) |
| | | { |
| | | searchOperation.returnEntry(e, new LinkedList<Control>()); |