| | |
| | | // search processing. |
| | | baseDN = getBaseDN(); |
| | | filter = getFilter(); |
| | | if ((baseDN == null) || (filter == null)){ |
| | | if (baseDN == null || filter == null) |
| | | { |
| | | break searchProcessing; |
| | | } |
| | | |
| | |
| | | * @throws DirectoryException If there is a problem with any of the request |
| | | * controls. |
| | | */ |
| | | private void handleRequestControls() |
| | | throws DirectoryException |
| | | private void handleRequestControls() throws DirectoryException |
| | | { |
| | | List<Control> requestControls = getRequestControls(); |
| | | if ((requestControls != null) && (! requestControls.isEmpty())) |
| | | if (requestControls != null && !requestControls.isEmpty()) |
| | | { |
| | | for (Control c : requestControls) |
| | | { |
| | |
| | | addAdditionalLogItem(AdditionalLogItem.keyOnly(getClass(), |
| | | "obsoleteProxiedAuthzV1Control")); |
| | | |
| | | // The requester must have the PROXIED_AUTH privilige in order to be |
| | | // The requester must have the PROXIED_AUTH privilege in order to be |
| | | // able to use this control. |
| | | if (! clientConnection.hasPrivilege(Privilege.PROXIED_AUTH, this)) |
| | | { |
| | |
| | | } |
| | | else if (oid.equals(OID_PROXIED_AUTH_V2)) |
| | | { |
| | | // The requester must have the PROXIED_AUTH privilige in order to be |
| | | // The requester must have the PROXIED_AUTH privilege in order to be |
| | | // able to use this control. |
| | | if (! clientConnection.hasPrivilege(Privilege.PROXIED_AUTH, this)) |
| | | { |
| | |
| | | } |
| | | |
| | | // TODO: Add support for additional controls, including VLV |
| | | else if (c.isCritical()) |
| | | else if (c.isCritical() |
| | | && (replicationServer == null || !supportsControl(oid))) |
| | | { |
| | | if ((replicationServer == null) || (! supportsControl(oid))) |
| | | { |
| | | throw new DirectoryException( |
| | | ResultCode.UNAVAILABLE_CRITICAL_EXTENSION, |
| | | ERR_SEARCH_UNSUPPORTED_CRITICAL_CONTROL.get(oid)); |
| | | } |
| | | throw new DirectoryException( |
| | | ResultCode.UNAVAILABLE_CRITICAL_EXTENSION, |
| | | ERR_SEARCH_UNSUPPORTED_CRITICAL_CONTROL.get(oid)); |
| | | } |
| | | } |
| | | } |
| | |
| | | if (CHANGELOG_ROOT_DN.matchesBaseAndScope(baseDN, getScope())) |
| | | { |
| | | final Entry entry = createRootEntry(update != null); |
| | | if (filter.matchesEntry(entry)) |
| | | if (filter.matchesEntry(entry) && !returnEntry(entry, null)) |
| | | { |
| | | if (!returnEntry(entry, null)) |
| | | { |
| | | // Abandon, Size limit reached. |
| | | abortECLSession = true; |
| | | return; |
| | | } |
| | | // Abandon, Size limit reached. |
| | | abortECLSession = true; |
| | | return; |
| | | } |
| | | } |
| | | |
| | |
| | | */ |
| | | private boolean matchScopeAndFilter(Entry entry) throws DirectoryException |
| | | { |
| | | if (entry.matchesBaseAndScope(getBaseDN(), getScope())) |
| | | { |
| | | return getFilter().matchesEntry(entry); |
| | | } |
| | | return false; |
| | | return entry.matchesBaseAndScope(getBaseDN(), getScope()) |
| | | && getFilter().matchesEntry(entry); |
| | | } |
| | | |
| | | /** |
| | |
| | | uAttrs, operationalAttrs); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public CancelResult cancel(CancelRequest cancelRequest) |
| | | { |
| | |
| | | return super.cancel(cancelRequest); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public void abort(CancelRequest cancelRequest) |
| | | { |
| | |
| | | int sn = Integer.decode( |
| | | sf.getAssertionValue().getNormalizedValue().toString()); |
| | | startCLmsg.setFirstChangeNumber(sn); |
| | | return startCLmsg; |
| | | } |
| | | else if (matches(sf, FilterType.LESS_OR_EQUAL, "changeNumber")) |
| | | { |
| | | int sn = Integer.decode( |
| | | sf.getAssertionValue().getNormalizedValue().toString()); |
| | | startCLmsg.setLastChangeNumber(sn); |
| | | return startCLmsg; |
| | | } |
| | | else if (matches(sf, FilterType.EQUALITY, "replicationcsn")) |
| | | { |
| | | // == exact CSN |
| | | startCLmsg.setCSN(new CSN(sf.getAssertionValue().toString())); |
| | | return startCLmsg; |
| | | } |
| | | else if (matches(sf, FilterType.EQUALITY, "changenumber")) |
| | | { |
| | |
| | | sf.getAssertionValue().getNormalizedValue().toString()); |
| | | startCLmsg.setFirstChangeNumber(sn); |
| | | startCLmsg.setLastChangeNumber(sn); |
| | | return startCLmsg; |
| | | } |
| | | else if (sf.getFilterType() == FilterType.AND) |
| | | { |
| | |
| | | startCLmsg.setLastChangeNumber(Math.min(l1, l2)); |
| | | |
| | | startCLmsg.setFirstChangeNumber(Math.max(f1,f2)); |
| | | return startCLmsg; |
| | | } |
| | | else |
| | | { |
| | | return startCLmsg; |
| | | } |
| | | return startCLmsg; |
| | | } |
| | | |
| | | private static boolean matches(SearchFilter sf, FilterType filterType, |