| | |
| | | * DN request. |
| | | */ |
| | | public abstract void logModifyDNRequest( |
| | | ModifyDNOperationBasis modifyDNOperation); |
| | | ModifyDNOperation modifyDNOperation); |
| | | |
| | | |
| | | |
| | |
| | | * DN response. |
| | | */ |
| | | public abstract void logModifyDNResponse( |
| | | ModifyDNOperationBasis modifyDNOperation); |
| | | ModifyDNOperation modifyDNOperation); |
| | | |
| | | |
| | | |
| | |
| | | * information to use to log the unbind |
| | | * request. |
| | | */ |
| | | public abstract void logUnbind(UnbindOperationBasis |
| | | unbindOperation); |
| | | public abstract void logUnbind(UnbindOperation unbindOperation); |
| | | |
| | | /** |
| | | * Gets the DN of the configuration entry for this access log |
| | |
| | | import org.opends.server.types.SearchResultReference; |
| | | |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.opends.server.types.operation.PostOperationAbandonOperation; |
| | | import org.opends.server.types.operation.PostOperationAddOperation; |
| | | import org.opends.server.types.operation.PostOperationBindOperation; |
| | | import org.opends.server.types.operation.PostOperationCompareOperation; |
| | |
| | | import org.opends.server.types.operation.PostOperationModifyDNOperation; |
| | | import org.opends.server.types.operation.PostOperationModifyOperation; |
| | | import org.opends.server.types.operation.PostOperationSearchOperation; |
| | | import org.opends.server.types.operation.PostOperationUnbindOperation; |
| | | import org.opends.server.types.operation.PostResponseAddOperation; |
| | | import org.opends.server.types.operation.PostResponseBindOperation; |
| | | import org.opends.server.types.operation.PostResponseCompareOperation; |
| | |
| | | import org.opends.server.types.operation.PreOperationModifyDNOperation; |
| | | import org.opends.server.types.operation.PreOperationModifyOperation; |
| | | import org.opends.server.types.operation.PreOperationSearchOperation; |
| | | import org.opends.server.types.operation.PreParseAbandonOperation; |
| | | import org.opends.server.types.operation.PreParseAddOperation; |
| | | import org.opends.server.types.operation.PreParseBindOperation; |
| | | import org.opends.server.types.operation.PreParseCompareOperation; |
| | | import org.opends.server.types.operation.PreParseDeleteOperation; |
| | | import org.opends.server.types.operation.PreParseModifyDNOperation; |
| | | import org.opends.server.types.operation.PreParseExtendedOperation; |
| | | import org.opends.server.types.operation.PreParseModifyOperation; |
| | | import org.opends.server.types.operation.PreParseSearchOperation; |
| | | import org.opends.server.types.operation.PreParseUnbindOperation; |
| | | import org.opends.server.types.operation.SearchEntrySearchOperation; |
| | | import org.opends.server.types.operation.SearchReferenceSearchOperation; |
| | | import org.opends.server.workflowelement.localbackend.*; |
| | | |
| | | import static org.opends.server.loggers.ErrorLogger.*; |
| | |
| | | * @return The result of processing the pre-parse abandon plugins. |
| | | */ |
| | | public PreParsePluginResult invokePreParseAbandonPlugins( |
| | | AbandonOperationBasis abandonOperation) |
| | | PreParseAbandonOperation abandonOperation) |
| | | { |
| | | PreParsePluginResult result = null; |
| | | |
| | |
| | | * @return The result of processing the pre-parse modify DN plugins. |
| | | */ |
| | | public PreParsePluginResult invokePreParseModifyDNPlugins( |
| | | ModifyDNOperationBasis modifyDNOperation) |
| | | PreParseModifyDNOperation modifyDNOperation) |
| | | { |
| | | PreParsePluginResult result = null; |
| | | |
| | |
| | | * @return The result of processing the pre-parse unbind plugins. |
| | | */ |
| | | public PreParsePluginResult invokePreParseUnbindPlugins( |
| | | UnbindOperationBasis unbindOperation) |
| | | PreParseUnbindOperation unbindOperation) |
| | | { |
| | | PreParsePluginResult result = null; |
| | | |
| | |
| | | * @return The result of processing the post-operation abandon plugins. |
| | | */ |
| | | public PostOperationPluginResult invokePostOperationAbandonPlugins( |
| | | AbandonOperationBasis abandonOperation) |
| | | PostOperationAbandonOperation abandonOperation) |
| | | { |
| | | PostOperationPluginResult result = null; |
| | | |
| | |
| | | * @return The result of processing the post-operation unbind plugins. |
| | | */ |
| | | public PostOperationPluginResult invokePostOperationUnbindPlugins( |
| | | UnbindOperationBasis unbindOperation) |
| | | PostOperationUnbindOperation unbindOperation) |
| | | { |
| | | PostOperationPluginResult result = null; |
| | | |
| | |
| | | * @return The result of processing the search result entry plugins. |
| | | */ |
| | | public SearchEntryPluginResult invokeSearchResultEntryPlugins( |
| | | SearchOperationBasis searchOperation, |
| | | SearchResultEntry searchEntry) |
| | | SearchEntrySearchOperation searchOperation, |
| | | SearchResultEntry searchEntry) |
| | | { |
| | | SearchEntryPluginResult result = null; |
| | | |
| | |
| | | * @return The result of processing the search result reference plugins. |
| | | */ |
| | | public SearchReferencePluginResult invokeSearchResultReferencePlugins( |
| | | SearchOperationBasis searchOperation, |
| | | SearchResultReference searchReference) |
| | | SearchReferenceSearchOperation searchOperation, |
| | | SearchResultReference searchReference) |
| | | { |
| | | SearchReferencePluginResult result = null; |
| | | |
| | |
| | | * @param modifyDNOperation The modify DN operation containing the |
| | | * information to use to log the modify DN request. |
| | | */ |
| | | public static void logModifyDNRequest(ModifyDNOperationBasis |
| | | modifyDNOperation) |
| | | public static void logModifyDNRequest(ModifyDNOperation modifyDNOperation) |
| | | { |
| | | for (AccessLogPublisher publisher : accessPublishers) |
| | | { |
| | |
| | | * information to use to log the modify DN |
| | | * response. |
| | | */ |
| | | public static void logModifyDNResponse(ModifyDNOperationBasis |
| | | modifyDNOperation) |
| | | public static void logModifyDNResponse(ModifyDNOperation modifyDNOperation) |
| | | { |
| | | for (AccessLogPublisher publisher : accessPublishers) |
| | | { |
| | |
| | | * @param unbindOperation The unbind operation containing the information to |
| | | * use to log the unbind request. |
| | | */ |
| | | public static void logUnbind(UnbindOperationBasis unbindOperation) |
| | | public static void logUnbind(UnbindOperation unbindOperation) |
| | | { |
| | | for (AccessLogPublisher publisher : accessPublishers) |
| | | { |
| | |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.ExtendedOperation; |
| | | import org.opends.server.core.ModifyOperation; |
| | | import org.opends.server.core.ModifyDNOperationBasis; |
| | | import org.opends.server.core.ModifyDNOperation; |
| | | import org.opends.server.core.SearchOperation; |
| | | import org.opends.server.core.UnbindOperationBasis; |
| | | import org.opends.server.core.UnbindOperation; |
| | | import org.opends.server.types.*; |
| | | import org.opends.server.util.TimeThread; |
| | | |
| | |
| | | * @param modifyDNOperation The modify DN operation containing the |
| | | * info to use to log the modify DN request. |
| | | */ |
| | | public void logModifyDNRequest(ModifyDNOperationBasis modifyDNOperation) |
| | | public void logModifyDNRequest(ModifyDNOperation modifyDNOperation) |
| | | { |
| | | long connectionID = modifyDNOperation.getConnectionID(); |
| | | if (connectionID < 0) |
| | |
| | | * information to use to log the modify DN |
| | | * response. |
| | | */ |
| | | public void logModifyDNResponse(ModifyDNOperationBasis modifyDNOperation) |
| | | public void logModifyDNResponse(ModifyDNOperation modifyDNOperation) |
| | | { |
| | | long connectionID = modifyDNOperation.getConnectionID(); |
| | | if (connectionID < 0) |
| | |
| | | * @param unbindOperation The unbind operation containing the info to |
| | | * use to log the unbind request. |
| | | */ |
| | | public void logUnbind(UnbindOperationBasis unbindOperation) |
| | | public void logUnbind(UnbindOperation unbindOperation) |
| | | { |
| | | long connectionID = unbindOperation.getConnectionID(); |
| | | if (connectionID < 0) |
| | |
| | | import org.opends.server.core.DeleteOperation; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.ExtendedOperation; |
| | | import org.opends.server.core.ModifyDNOperation; |
| | | import org.opends.server.core.ModifyOperation; |
| | | import org.opends.server.core.ModifyDNOperationBasis; |
| | | import org.opends.server.core.SearchOperation; |
| | | import org.opends.server.core.UnbindOperationBasis; |
| | | import org.opends.server.core.UnbindOperation; |
| | | import org.opends.server.types.*; |
| | | import org.opends.server.util.Base64; |
| | | import org.opends.server.util.StaticUtils; |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public void logModifyDNRequest(ModifyDNOperationBasis modifyDNOperation) |
| | | public void logModifyDNRequest(ModifyDNOperation modifyDNOperation) |
| | | { |
| | | } |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public void logModifyDNResponse(ModifyDNOperationBasis modifyDNOperation) |
| | | public void logModifyDNResponse(ModifyDNOperation modifyDNOperation) |
| | | { |
| | | long connectionID = modifyDNOperation.getConnectionID(); |
| | | if (connectionID < 0) |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | public void logUnbind(UnbindOperationBasis unbindOperation) |
| | | public void logUnbind(UnbindOperation unbindOperation) |
| | | { |
| | | } |
| | | |
| | |
| | | * processed and contains information about the result of |
| | | * the processing. |
| | | */ |
| | | public ModifyDNOperationBasis processModifyDN(String rawEntryDN, |
| | | public ModifyDNOperation processModifyDN(String rawEntryDN, |
| | | String rawNewRDN, |
| | | boolean deleteOldRDN) |
| | | { |
| | |
| | | * processed and contains information about the result of |
| | | * the processing. |
| | | */ |
| | | public ModifyDNOperationBasis processModifyDN(ByteString rawEntryDN, |
| | | public ModifyDNOperation processModifyDN(ByteString rawEntryDN, |
| | | ByteString rawNewRDN, |
| | | boolean deleteOldRDN) |
| | | { |
| | |
| | | * processed and contains information about the result of |
| | | * the processing. |
| | | */ |
| | | public ModifyDNOperationBasis processModifyDN(String rawEntryDN, |
| | | public ModifyDNOperation processModifyDN(String rawEntryDN, |
| | | String rawNewRDN, |
| | | boolean deleteOldRDN, |
| | | String rawNewSuperior) |
| | |
| | | * processed and contains information about the result of |
| | | * the processing. |
| | | */ |
| | | public ModifyDNOperationBasis processModifyDN(ByteString rawEntryDN, |
| | | public ModifyDNOperation processModifyDN(ByteString rawEntryDN, |
| | | ByteString rawNewRDN, |
| | | boolean deleteOldRDN, |
| | | ByteString rawNewSuperior) |
| | |
| | | * processed and contains information about the result of |
| | | * the processing. |
| | | */ |
| | | public ModifyDNOperationBasis processModifyDN(DN entryDN, |
| | | public ModifyDNOperation processModifyDN(DN entryDN, |
| | | RDN newRDN, |
| | | boolean deleteOldRDN) |
| | | { |
| | |
| | | * processed and contains information about the result of |
| | | * the processing. |
| | | */ |
| | | public ModifyDNOperationBasis processModifyDN(DN entryDN, |
| | | public ModifyDNOperation processModifyDN(DN entryDN, |
| | | RDN newRDN, |
| | | boolean deleteOldRDN, |
| | | DN newSuperior) |
| | |
| | | * @return A reference to the add operation that was processed and contains |
| | | * information about the result of the processing. |
| | | */ |
| | | public AddOperationBasis processAdd(ASN1OctetString rawEntryDN, |
| | | public AddOperation processAdd(ASN1OctetString rawEntryDN, |
| | | ArrayList<RawAttribute> rawAttributes) |
| | | { |
| | | AddOperationBasis addOperation = |
| | |
| | | * @return A reference to the delete operation that was processed and |
| | | * contains information about the result of the processing. |
| | | */ |
| | | public DeleteOperationBasis processDelete(ASN1OctetString rawEntryDN) |
| | | public DeleteOperation processDelete(ASN1OctetString rawEntryDN) |
| | | { |
| | | DeleteOperationBasis deleteOperation = |
| | | new DeleteOperationBasis(this, nextOperationID(), nextMessageID(), |
| | |
| | | * @return A reference to the modify operation that was processed and |
| | | * contains information about the result of the processing |
| | | */ |
| | | public ModifyOperationBasis processModify(ASN1OctetString rawEntryDN, |
| | | public ModifyOperation processModify(ASN1OctetString rawEntryDN, |
| | | ArrayList<RawModification> rawModifications) |
| | | { |
| | | ModifyOperationBasis modifyOperation = |
| | |
| | | * @return A reference to the modify DN operation that was processed and |
| | | * contains information about the result of the processing. |
| | | */ |
| | | public ModifyDNOperationBasis processModifyDN(ASN1OctetString rawEntryDN, |
| | | public ModifyDNOperation processModifyDN(ASN1OctetString rawEntryDN, |
| | | ASN1OctetString rawNewRDN, |
| | | boolean deleteOldRDN) |
| | | { |
| | |
| | | * @return A reference to the modify DN operation that was processed and |
| | | * contains information about the result of the processing. |
| | | */ |
| | | public ModifyDNOperationBasis processModifyDN(ASN1OctetString rawEntryDN, |
| | | public ModifyDNOperation processModifyDN(ASN1OctetString rawEntryDN, |
| | | ASN1OctetString rawNewRDN, |
| | | boolean deleteOldRDN, |
| | | ASN1OctetString rawNewSuperior) |
| | |
| | | * processed and contains information about the result of |
| | | * the processing. |
| | | */ |
| | | public ModifyDNOperationBasis processModifyDN(DN entryDN, RDN newRDN, |
| | | public ModifyDNOperation processModifyDN(DN entryDN, RDN newRDN, |
| | | boolean deleteOldRDN, |
| | | DN newSuperior) |
| | | { |
| | |
| | | import org.opends.server.core.DeleteOperation; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.LockFileManager; |
| | | import org.opends.server.core.ModifyDNOperation; |
| | | import org.opends.server.core.ModifyDNOperationBasis; |
| | | import org.opends.server.core.ModifyOperation; |
| | | import org.opends.server.core.ModifyOperationBasis; |
| | |
| | | * @return true if the process is completed, false if it must continue. |
| | | * @throws Exception When the operation is not valid. |
| | | */ |
| | | private boolean solveNamingConflict(ModifyDNOperationBasis op, |
| | | private boolean solveNamingConflict(ModifyDNOperation op, |
| | | UpdateMessage msg) throws Exception |
| | | { |
| | | ResultCode result = op.getResultCode(); |
| | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | |
| | | ModifyDNOperationBasis newOp = conn.processModifyDN( |
| | | ModifyDNOperation newOp = conn.processModifyDN( |
| | | dn, generateDeleteConflictDn(uid, dn),false, baseDN); |
| | | |
| | | if (newOp.getResultCode() != ResultCode.SUCCESS) |
| | |
| | | * @param addOperation The add operation to be tested. |
| | | */ |
| | | @Test(dataProvider = "addOperations") |
| | | public void testGetAndSetRawEntryDN(AddOperationBasis addOperation) |
| | | public void testGetAndSetRawEntryDN(AddOperation addOperation) |
| | | { |
| | | ByteString originalDN = addOperation.getRawEntryDN(); |
| | | assertNotNull(originalDN); |
| | |
| | | * @param addOperation The add operation to be tested. |
| | | */ |
| | | @Test(dataProvider = "addOperations") |
| | | public void testGetAndSetRawAttributes(AddOperationBasis addOperation) |
| | | public void testGetAndSetRawAttributes(AddOperation addOperation) |
| | | { |
| | | List<RawAttribute> rawAttrs = addOperation.getRawAttributes(); |
| | | assertNotNull(rawAttrs); |
| | |
| | | |
| | | InternalClientConnection conn = |
| | | InternalClientConnection.getRootConnection(); |
| | | ModifyDNOperationBasis modifyDNOperation = |
| | | ModifyDNOperation modifyDNOperation = |
| | | conn.processModifyDN(groupDN, newRDN, true); |
| | | assertEquals(modifyDNOperation.getResultCode(), ResultCode.SUCCESS); |
| | | |
| | |
| | | * |
| | | * @param searchOperation The operation to be tested. |
| | | */ |
| | | private void examineCompletedOperation(SearchOperationBasis searchOperation) |
| | | private void examineCompletedOperation(SearchOperation searchOperation) |
| | | { |
| | | assertTrue(searchOperation.getProcessingStartTime() > 0); |
| | | assertTrue(searchOperation.getProcessingStopTime() > 0); |
| | |
| | | * |
| | | * @param modifyDNOperation The operation to be tested. |
| | | */ |
| | | private void examineCompletedOperation(ModifyDNOperationBasis modifyDNOperation) |
| | | private void examineCompletedOperation(ModifyDNOperation modifyDNOperation) |
| | | { |
| | | assertTrue(modifyDNOperation.getProcessingStartTime() > 0); |
| | | assertTrue(modifyDNOperation.getProcessingStopTime() > 0); |
| | |
| | | * |
| | | * @param modifyDNOperation The operation to be tested. |
| | | */ |
| | | private void examineIncompleteOperation(ModifyDNOperationBasis modifyDNOperation) |
| | | private void examineIncompleteOperation(ModifyDNOperation modifyDNOperation) |
| | | { |
| | | assertTrue(modifyDNOperation.getProcessingStartTime() > 0); |
| | | assertTrue(modifyDNOperation.getProcessingStopTime() > 0); |
| | |
| | | * |
| | | * @param modifyDNOperation The operation to be tested. |
| | | */ |
| | | private void examineUnparsedOperation(ModifyDNOperationBasis modifyDNOperation) |
| | | private void examineUnparsedOperation(ModifyDNOperation modifyDNOperation) |
| | | { |
| | | assertTrue(modifyDNOperation.getProcessingStartTime() > 0); |
| | | assertTrue(modifyDNOperation.getProcessingStopTime() > 0); |
| | |
| | | * |
| | | * @param unbindOperation The operation to be tested. |
| | | */ |
| | | private void examineCompletedOperation(UnbindOperationBasis unbindOperation) |
| | | private void examineCompletedOperation(UnbindOperation unbindOperation) |
| | | { |
| | | assertTrue(unbindOperation.getProcessingStartTime() > 0); |
| | | assertTrue(unbindOperation.getProcessingStopTime() > 0); |
| | |
| | | import org.opends.server.config.ConfigException; |
| | | import org.opends.server.core.AddOperation; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.ModifyDNOperation; |
| | | import org.opends.server.core.ModifyOperation; |
| | | import org.opends.server.core.ModifyDNOperationBasis; |
| | | import org.opends.server.protocols.internal.InternalClientConnection; |
| | | import org.opends.server.types.Attribute; |
| | | import org.opends.server.types.AttributeType; |
| | |
| | | assertEquals(addOperation.getResultCode(), ResultCode.SUCCESS); |
| | | |
| | | |
| | | ModifyDNOperationBasis modifyDNOperation = |
| | | ModifyDNOperation modifyDNOperation = |
| | | conn.processModifyDN(e.getDN(), RDN.decode("cn=test2"), false); |
| | | assertEquals(modifyDNOperation.getResultCode(), ResultCode.SUCCESS); |
| | | |
| | |
| | | import org.opends.server.core.DeleteOperation; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.ExtendedOperation; |
| | | import org.opends.server.core.ModifyDNOperationBasis; |
| | | import org.opends.server.core.ModifyDNOperation; |
| | | import org.opends.server.core.ModifyOperation; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.protocols.ldap.LDAPAttribute; |
| | |
| | | assertEquals(addOperation.getResultCode(), ResultCode.SUCCESS); |
| | | |
| | | |
| | | ModifyDNOperationBasis modifyDNOperation = |
| | | ModifyDNOperation modifyDNOperation = |
| | | conn.processModifyDN(new ASN1OctetString("cn=test,o=test"), |
| | | new ASN1OctetString("cn=test2"), true); |
| | | assertEquals(modifyDNOperation.getResultCode(), ResultCode.SUCCESS); |
| | |
| | | assertEquals(addOperation.getResultCode(), ResultCode.SUCCESS); |
| | | |
| | | |
| | | ModifyDNOperationBasis modifyDNOperation = |
| | | ModifyDNOperation modifyDNOperation = |
| | | conn.processModifyDN(new ASN1OctetString("cn=test,o=test"), |
| | | new ASN1OctetString("cn=test2"), true, |
| | | new ASN1OctetString("dc=example,dc=com")); |
| | |
| | | assertEquals(addOperation.getResultCode(), ResultCode.SUCCESS); |
| | | |
| | | |
| | | ModifyDNOperationBasis modifyDNOperation = |
| | | ModifyDNOperation modifyDNOperation = |
| | | conn.processModifyDN(DN.decode("cn=test,o=test"), |
| | | RDN.decode("cn=test2"), true); |
| | | assertEquals(modifyDNOperation.getResultCode(), ResultCode.SUCCESS); |
| | |
| | | assertEquals(addOperation.getResultCode(), ResultCode.SUCCESS); |
| | | |
| | | |
| | | ModifyDNOperationBasis modifyDNOperation = |
| | | ModifyDNOperation modifyDNOperation = |
| | | conn.processModifyDN(DN.decode("cn=test,o=test"), |
| | | RDN.decode("cn=test2"), true, |
| | | DN.decode("dc=example,dc=com")); |
| | |
| | | import org.opends.server.core.DeleteOperation; |
| | | import org.opends.server.core.DeleteOperationBasis; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.ModifyDNOperation; |
| | | import org.opends.server.core.ModifyDNOperationBasis; |
| | | import org.opends.server.core.ModifyOperation; |
| | | import org.opends.server.core.ModifyOperationBasis; |
| | |
| | | { |
| | | assertEquals(conn.hasPrivilege(Privilege.JMX_WRITE, null), hasPrivilege); |
| | | |
| | | ModifyDNOperationBasis modifyDNOperation = |
| | | ModifyDNOperation modifyDNOperation = |
| | | conn.processModifyDN(DN.decode("cn=Work Queue,cn=config"), |
| | | RDN.decode("cn=New RDN for Work Queue"), true, |
| | | null); |
| | |
| | | import org.opends.server.core.DeleteOperation; |
| | | import org.opends.server.core.DeleteOperationBasis; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.ModifyDNOperation; |
| | | import org.opends.server.core.ModifyDNOperationBasis; |
| | | import org.opends.server.core.ModifyOperation; |
| | | import org.opends.server.core.ModifyOperationBasis; |
| | |
| | | { |
| | | assertEquals(conn.hasPrivilege(Privilege.CONFIG_WRITE, null), hasPrivilege); |
| | | |
| | | ModifyDNOperationBasis modifyDNOperation = |
| | | ModifyDNOperation modifyDNOperation = |
| | | conn.processModifyDN(DN.decode("cn=Work Queue,cn=config"), |
| | | RDN.decode("cn=New RDN for Work Queue"), true, |
| | | null); |