| | |
| | | public ConditionResult hasSubordinates(DN entryDN) |
| | | throws DirectoryException |
| | | { |
| | | long ret = numSubordinates(entryDN); |
| | | long ret = numSubordinates(entryDN, false); |
| | | if(ret < 0) |
| | | { |
| | | return ConditionResult.UNDEFINED; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public long numSubordinates(DN entryDN) throws DirectoryException |
| | | public long numSubordinates(DN entryDN, boolean subtree) |
| | | throws DirectoryException |
| | | { |
| | | if (entryDN == null) |
| | | { |
| | |
| | | if (entryDN.equals(taskRootDN)) |
| | | { |
| | | // scheduled and recurring parents. |
| | | return 2; |
| | | if(!subtree) |
| | | { |
| | | return 2; |
| | | } |
| | | else |
| | | { |
| | | return taskScheduler.getScheduledTaskCount() + |
| | | taskScheduler.getRecurringTaskCount() + 2; |
| | | } |
| | | } |
| | | else if (entryDN.equals(scheduledTaskParentDN)) |
| | | { |