| | |
| | | final SearchFilter filter = searchOp.getFilter(); |
| | | final SearchScope scope = searchOp.getScope(); |
| | | |
| | | if (ChangelogBackend.CHANGELOG_BASE_DN.matchesBaseAndScope(baseDN, scope)) |
| | | if (ChangelogBackend.CHANGELOG_BASE_DN.isInScopeOf(baseDN, scope)) |
| | | { |
| | | final Entry entry = buildBaseChangelogEntry(); |
| | | if (filter.matchesEntry(entry) && !searchOp.returnEntry(entry, null)) |
| | |
| | | for (final Map.Entry<DN, MonitorProvider<?>> e : dit.tailMap(baseDN).entrySet()) |
| | | { |
| | | final DN dn = e.getKey(); |
| | | if (dn.matchesBaseAndScope(baseDN, scope)) |
| | | if (dn.isInScopeOf(baseDN, scope)) |
| | | { |
| | | final Entry entry = getEntry(dn, dit); |
| | | if (filter.matchesEntry(entry)) |
| | |
| | | |
| | | private boolean shouldInclude(final Entry entry) throws DirectoryException |
| | | { |
| | | return entry.getName().matchesBaseAndScope(baseDN, scope) && filter.matchesEntry(entry); |
| | | return entry.getName().isInScopeOf(baseDN, scope) && filter.matchesEntry(entry); |
| | | } |
| | | |
| | | void modifyEntry(final IndexBuffer buffer, final EntryID entryID, final Entry oldEntry, final Entry newEntry, |
| | |
| | | SearchScope scope = searchOperation.getScope(); |
| | | for (DN dn : dnSet) |
| | | { |
| | | if (! dn.matchesBaseAndScope(baseDN, scope)) |
| | | if (! dn.isInScopeOf(baseDN, scope)) |
| | | { |
| | | continue; |
| | | } |
| | |
| | | |
| | | final Entry valueEntry; |
| | | if (currentConfiguration.getCheckReferencesScopeCriteria() == CheckReferencesScopeCriteria.NAMING_CONTEXT |
| | | && valueEntryDN.matchesBaseAndScope(entryBaseDN, SearchScope.SUBORDINATES)) |
| | | && valueEntryDN.isInScopeOf(entryBaseDN, SearchScope.SUBORDINATES)) |
| | | { |
| | | return PluginResult.PreOperation.stopProcessing(ResultCode.CONSTRAINT_VIOLATION, |
| | | ERR_PLUGIN_REFERENT_NAMINGCONTEXT_MISMATCH.get(valueEntryDN, attr.getName(), entryDN)); |
| | |
| | | |
| | | for (DN baseDN : baseDNs) |
| | | { |
| | | if (dn.matchesBaseAndScope(baseDN, SearchScope.SUBORDINATES)) |
| | | if (dn.isInScopeOf(baseDN, SearchScope.SUBORDINATES)) |
| | | { |
| | | namingContext = baseDN; |
| | | break; |
| | |
| | | * @return <CODE>true</CODE> if this entry is within the given |
| | | * base and scope, or <CODE>false</CODE> if it is not. |
| | | */ |
| | | public boolean matchesBaseAndScope(DN baseDN, SearchScope scope) |
| | | public boolean isInScopeOf(DN baseDN, SearchScope scope) |
| | | { |
| | | switch (scope.asEnum()) |
| | | { |
| | |
| | | */ |
| | | public boolean matchesBaseAndScope(DN baseDN, SearchScope scope) |
| | | { |
| | | return dn.matchesBaseAndScope(baseDN, scope); |
| | | return dn.isInScopeOf(baseDN, scope); |
| | | } |
| | | |
| | | |
| | |
| | | { |
| | | for (DN dn : baseDNs) |
| | | { |
| | | if (entryDN.matchesBaseAndScope(dn, scope)) |
| | | if (entryDN.isInScopeOf(dn, scope)) |
| | | { |
| | | return true; |
| | | } |