opendj-server-legacy/src/main/java/org/opends/server/workflowelement/localbackend/LocalBackendAddOperation.java
@@ -36,6 +36,7 @@ import org.forgerock.i18n.slf4j.LocalizedLogger; import org.forgerock.opendj.ldap.ByteString; import org.forgerock.opendj.ldap.ResultCode; import org.forgerock.opendj.ldap.schema.AttributeType; import org.forgerock.opendj.ldap.schema.Syntax; import org.opends.server.api.AccessControlHandler; import org.opends.server.api.AuthenticationPolicy; @@ -58,7 +59,6 @@ import org.opends.server.schema.UserPasswordSyntax; import org.opends.server.types.Attribute; import org.opends.server.types.AttributeBuilder; import org.forgerock.opendj.ldap.schema.AttributeType; import org.opends.server.types.Attributes; import org.opends.server.types.CanceledOperationException; import org.opends.server.types.Control; @@ -1048,7 +1048,7 @@ // We don't need to do anything here because it's already handled // in LocalBackendAddOperation.handlePasswordPolicy(). } else if (c.isCritical() && (backend == null || !backend.supportsControl(oid))) else if (c.isCritical() && !backend.supportsControl(oid)) { throw newDirectoryException(entryDN, ResultCode.UNAVAILABLE_CRITICAL_EXTENSION, ERR_ADD_UNSUPPORTED_CRITICAL_CONTROL.get(entryDN, oid)); opendj-server-legacy/src/main/java/org/opends/server/workflowelement/localbackend/LocalBackendDeleteOperation.java
@@ -22,7 +22,7 @@ * * * Copyright 2008-2009 Sun Microsystems, Inc. * Portions Copyright 2011-2015 ForgeRock AS * Portions Copyright 2011-2016 ForgeRock AS */ package org.opends.server.workflowelement.localbackend; @@ -194,6 +194,14 @@ return; } // Get the backend to use for the delete. If there is none, then fail. if (backend == null) { setResultCode(ResultCode.NO_SUCH_OBJECT); appendErrorMessage(ERR_DELETE_NO_SUCH_ENTRY.get(entryDN)); return; } /* * Grab a write lock on the entry and its subtree in order to prevent concurrent updates to * subordinate entries. @@ -267,22 +275,13 @@ } } // Get the backend to use for the delete. If there is none, then fail. if (backend == null) { setResultCode(ResultCode.NO_SUCH_OBJECT); appendErrorMessage(ERR_DELETE_NO_SUCH_ENTRY.get(entryDN)); return; } LocalBackendWorkflowElement.checkIfBackendIsWritable(backend, this, entryDN, ERR_DELETE_SERVER_READONLY, ERR_DELETE_BACKEND_READONLY); // The selected backend will have the responsibility of making sure that // the entry actually exists and does not have any children (or possibly // handling a subtree delete). But we will need to check if there are // any subordinate backends that should stop us from attempting the // delete. // any subordinate backends that should stop us from attempting the delete for (Backend<?> b : backend.getSubordinateBackends()) { for (DN dn : b.getBaseDNs()) @@ -312,8 +311,7 @@ backend.deleteEntry(entryDN, this); } LocalBackendWorkflowElement.addPreReadResponse(this, preReadRequest, entry); LocalBackendWorkflowElement.addPreReadResponse(this, preReadRequest, entry); if (!noOp) { @@ -450,7 +448,7 @@ { continue; } else if (c.isCritical() && (backend == null || !backend.supportsControl(oid))) else if (c.isCritical() && !backend.supportsControl(oid)) { throw newDirectoryException(entry, ResultCode.UNAVAILABLE_CRITICAL_EXTENSION, ERR_DELETE_UNSUPPORTED_CRITICAL_CONTROL.get(entryDN, oid)); @@ -486,9 +484,7 @@ return true; } /** * Invoke post operation synchronization providers. */ /** Invoke post operation synchronization providers. */ private void processSynchPostOperationPlugins() { for (SynchronizationProvider<?> provider : getSynchronizationProviders()) { try { opendj-server-legacy/src/main/java/org/opends/server/workflowelement/localbackend/LocalBackendModifyDNOperation.java
@@ -37,6 +37,7 @@ import org.forgerock.opendj.ldap.ByteString; import org.forgerock.opendj.ldap.ModificationType; import org.forgerock.opendj.ldap.ResultCode; import org.forgerock.opendj.ldap.schema.AttributeType; import org.opends.server.api.AccessControlHandler; import org.opends.server.api.Backend; import org.opends.server.api.ClientConnection; @@ -50,7 +51,6 @@ import org.opends.server.core.ModifyDNOperationWrapper; import org.opends.server.core.PersistentSearch; import org.opends.server.types.Attribute; import org.forgerock.opendj.ldap.schema.AttributeType; import org.opends.server.types.Attributes; import org.opends.server.types.CanceledOperationException; import org.opends.server.types.Control; @@ -602,7 +602,7 @@ { continue; } else if (c.isCritical() && (backend == null || !backend.supportsControl(oid))) else if (c.isCritical() && !backend.supportsControl(oid)) { throw new DirectoryException(ResultCode.UNAVAILABLE_CRITICAL_EXTENSION, ERR_MODDN_UNSUPPORTED_CRITICAL_CONTROL.get(entryDN, oid)); opendj-server-legacy/src/main/java/org/opends/server/workflowelement/localbackend/LocalBackendModifyOperation.java
@@ -39,6 +39,7 @@ import org.forgerock.opendj.ldap.ByteString; import org.forgerock.opendj.ldap.ModificationType; import org.forgerock.opendj.ldap.ResultCode; import org.forgerock.opendj.ldap.schema.AttributeType; import org.forgerock.opendj.ldap.schema.MatchingRule; import org.forgerock.opendj.ldap.schema.Syntax; import org.forgerock.util.Reject; @@ -69,7 +70,6 @@ import org.opends.server.types.AccountStatusNotificationType; import org.opends.server.types.Attribute; import org.opends.server.types.AttributeBuilder; import org.forgerock.opendj.ldap.schema.AttributeType; import org.opends.server.types.AuthenticationInfo; import org.opends.server.types.CanceledOperationException; import org.opends.server.types.Control; @@ -356,6 +356,12 @@ { return; } if (backend == null) { setResultCode(ResultCode.NO_SUCH_OBJECT); appendErrorMessage(ERR_MODIFY_NO_BACKEND_FOR_ENTRY.get(entryDN)); return; } // Process the modifications to convert them from their raw form to the // form required for the rest of the modify processing. @@ -476,13 +482,6 @@ // Actually perform the modify operation. This should also include // taking care of any synchronization that might be needed. if (backend == null) { setResultCode(ResultCode.NO_SUCH_OBJECT); appendErrorMessage(ERR_MODIFY_NO_BACKEND_FOR_ENTRY.get(entryDN)); return; } LocalBackendWorkflowElement.checkIfBackendIsWritable(backend, this, entryDN, ERR_MODIFY_SERVER_READONLY, ERR_MODIFY_BACKEND_READONLY); @@ -714,7 +713,7 @@ { pwPolicyControlRequested = true; } else if (c.isCritical() && (backend == null || !backend.supportsControl(oid))) else if (c.isCritical() && !backend.supportsControl(oid)) { throw newDirectoryException(currentEntry, ResultCode.UNAVAILABLE_CRITICAL_EXTENSION, ERR_MODIFY_UNSUPPORTED_CRITICAL_CONTROL.get(entryDN, oid));