| | |
| | | */ |
| | | public long numSubordinates(DN entryDN) throws DirectoryException |
| | | { |
| | | EntryContainer ec = rootContainer.getEntryContainer(entryDN); |
| | | EntryContainer ec; |
| | | if (rootContainer != null) |
| | | { |
| | | ec = rootContainer.getEntryContainer(entryDN); |
| | | } |
| | | else |
| | | { |
| | | Message message = ERR_ROOT_CONTAINER_NOT_INITIALIZED.get(getBackendID()); |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | message); |
| | | } |
| | | |
| | | if(ec == null) |
| | | { |
| | | return -1; |
| | |
| | | public Entry getEntry(DN entryDN) throws DirectoryException |
| | | { |
| | | readerBegin(); |
| | | EntryContainer ec = rootContainer.getEntryContainer(entryDN); |
| | | |
| | | EntryContainer ec; |
| | | if (rootContainer != null) |
| | | { |
| | | ec = rootContainer.getEntryContainer(entryDN); |
| | | } |
| | | else |
| | | { |
| | | Message message = ERR_ROOT_CONTAINER_NOT_INITIALIZED.get(getBackendID()); |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | message); |
| | | } |
| | | |
| | | ec.sharedLock.lock(); |
| | | Entry entry; |
| | | try |
| | |
| | | { |
| | | writerBegin(); |
| | | DN entryDN = entry.getDN(); |
| | | EntryContainer ec = rootContainer.getEntryContainer(entryDN); |
| | | |
| | | EntryContainer ec; |
| | | if (rootContainer != null) |
| | | { |
| | | ec = rootContainer.getEntryContainer(entryDN); |
| | | } |
| | | else |
| | | { |
| | | Message message = ERR_ROOT_CONTAINER_NOT_INITIALIZED.get(getBackendID()); |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | message); |
| | | } |
| | | |
| | | ec.sharedLock.lock(); |
| | | try |
| | | { |
| | |
| | | { |
| | | writerBegin(); |
| | | |
| | | EntryContainer ec = rootContainer.getEntryContainer(entryDN); |
| | | EntryContainer ec; |
| | | if (rootContainer != null) |
| | | { |
| | | ec = rootContainer.getEntryContainer(entryDN); |
| | | } |
| | | else |
| | | { |
| | | Message message = ERR_ROOT_CONTAINER_NOT_INITIALIZED.get(getBackendID()); |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | message); |
| | | } |
| | | |
| | | ec.sharedLock.lock(); |
| | | try |
| | | { |
| | |
| | | writerBegin(); |
| | | |
| | | DN entryDN = entry.getDN(); |
| | | EntryContainer ec = rootContainer.getEntryContainer(entryDN); |
| | | EntryContainer ec; |
| | | if (rootContainer != null) |
| | | { |
| | | ec = rootContainer.getEntryContainer(entryDN); |
| | | } |
| | | else |
| | | { |
| | | Message message = ERR_ROOT_CONTAINER_NOT_INITIALIZED.get(getBackendID()); |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | message); |
| | | } |
| | | |
| | | ec.sharedLock.lock(); |
| | | |
| | | try |
| | |
| | | throws DirectoryException, CancelledOperationException |
| | | { |
| | | writerBegin(); |
| | | EntryContainer currentContainer = rootContainer.getEntryContainer( |
| | | currentDN); |
| | | |
| | | EntryContainer currentContainer; |
| | | if (rootContainer != null) |
| | | { |
| | | currentContainer = rootContainer.getEntryContainer(currentDN); |
| | | } |
| | | else |
| | | { |
| | | Message message = ERR_ROOT_CONTAINER_NOT_INITIALIZED.get(getBackendID()); |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | message); |
| | | } |
| | | |
| | | EntryContainer container = rootContainer.getEntryContainer(entry.getDN()); |
| | | |
| | | if (currentContainer != container) |
| | |
| | | throws DirectoryException |
| | | { |
| | | readerBegin(); |
| | | EntryContainer ec = rootContainer.getEntryContainer( |
| | | searchOperation.getBaseDN()); |
| | | |
| | | EntryContainer ec; |
| | | if (rootContainer != null) |
| | | { |
| | | ec = rootContainer.getEntryContainer(searchOperation.getBaseDN()); |
| | | } |
| | | else |
| | | { |
| | | Message message = ERR_ROOT_CONTAINER_NOT_INITIALIZED.get(getBackendID()); |
| | | throw new DirectoryException(DirectoryServer.getServerErrorResultCode(), |
| | | message); |
| | | } |
| | | ec.sharedLock.lock(); |
| | | |
| | | try |