mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Nicolas Capponi
22.37.2014 6bc38c0e7fad827dc83dedf4ddc0ebed1b4a9095
Checkpoint commit for OPENDJ-1206 : Create a new ReplicationBackend/ChangelogBackend 
to support cn=changelog
CR-4052

Preparatory work for the changelog backend: request control handling

* LocalBackendSearchOperation: add new internal method backendSupporsControl()
1 files modified
19 ■■■■ changed files
opendj3-server-dev/src/server/org/opends/server/workflowelement/localbackend/LocalBackendSearchOperation.java 19 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/workflowelement/localbackend/LocalBackendSearchOperation.java
@@ -504,18 +504,19 @@
        }
        // NYI -- Add support for additional controls.
        else if (c.isCritical())
        else if (c.isCritical() && !backendSupportsControl(oid))
        {
          if ((backend == null) || (! backend.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));
        }
      }
    }
  }
}
  /** Indicates if the backend supports the control corresponding to provided oid. */
  private boolean backendSupportsControl(final String oid)
  {
    return backend != null && backend.supportsControl(oid);
  }
}