| | |
| | | public synchronized ConditionResult hasSubordinates(DN entryDN) |
| | | throws DirectoryException |
| | | { |
| | | long ret = numSubordinates(entryDN); |
| | | long ret = numSubordinates(entryDN, false); |
| | | if(ret < 0) |
| | | { |
| | | return ConditionResult.UNDEFINED; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public synchronized long numSubordinates(DN entryDN) |
| | | public synchronized long numSubordinates(DN entryDN, boolean subtree) |
| | | throws DirectoryException |
| | | { |
| | | // Try to look up the immediate children for the DN |
| | |
| | | return -1; |
| | | } |
| | | |
| | | return children.size(); |
| | | if(!subtree) |
| | | { |
| | | return children.size(); |
| | | } |
| | | else |
| | | { |
| | | long count = 0; |
| | | for(DN child : children) |
| | | { |
| | | count += numSubordinates(child, true); |
| | | count++; |
| | | } |
| | | return count; |
| | | } |
| | | } |
| | | |
| | | /** |