| | |
| | | import org.opends.server.controls.ProxiedAuthV2Control; |
| | | import org.opends.server.protocols.asn1.ASN1OctetString; |
| | | import org.opends.server.protocols.ldap.LDAPAttribute; |
| | | import org.opends.server.protocols.ldap.LDAPException; |
| | | import org.opends.server.protocols.ldap.LDAPModification; |
| | | import org.opends.server.schema.AuthPasswordSyntax; |
| | | import org.opends.server.schema.BooleanSyntax; |
| | |
| | | import org.opends.server.types.CancelRequest; |
| | | import org.opends.server.types.CancelResult; |
| | | import org.opends.server.types.Control; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DisconnectReason; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.Entry; |
| | | import org.opends.server.types.ErrorLogCategory; |
| | | import org.opends.server.types.ErrorLogSeverity; |
| | | import org.opends.server.types.LDAPException; |
| | | import org.opends.server.types.LockManager; |
| | | import org.opends.server.types.Modification; |
| | | import org.opends.server.types.ModificationType; |
| | | import org.opends.server.types.Operation; |
| | | import org.opends.server.types.OperationType; |
| | | import org.opends.server.types.Privilege; |
| | | import org.opends.server.types.RawModification; |
| | | import org.opends.server.types.RDN; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.types.SearchFilter; |
| | |
| | | import static org.opends.server.config.ConfigConstants.*; |
| | | import static org.opends.server.core.CoreConstants.*; |
| | | import static org.opends.server.loggers.Access.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugCaught; |
| | | import static org.opends.server.loggers.debug.DebugLogger.debugEnabled; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.loggers.Error.*; |
| | | import static org.opends.server.messages.CoreMessages.*; |
| | | import static org.opends.server.messages.MessageHandler.*; |
| | |
| | | implements PreParseModifyOperation, PreOperationModifyOperation, |
| | | PostOperationModifyOperation, PostResponseModifyOperation |
| | | { |
| | | |
| | | |
| | | |
| | | // The raw, unprocessed entry DN as included by the client request. |
| | | private ByteString rawEntryDN; |
| | | |
| | |
| | | |
| | | // The raw, unprocessed set of modifications as included in the client |
| | | // request. |
| | | private List<LDAPModification> rawModifications; |
| | | private List<RawModification> rawModifications; |
| | | |
| | | // The set of modifications for this modify operation. |
| | | private List<Modification> modifications; |
| | |
| | | public ModifyOperation(ClientConnection clientConnection, long operationID, |
| | | int messageID, List<Control> requestControls, |
| | | ByteString rawEntryDN, |
| | | List<LDAPModification> rawModifications) |
| | | List<RawModification> rawModifications) |
| | | { |
| | | super(clientConnection, operationID, messageID, requestControls); |
| | | |
| | |
| | | |
| | | rawEntryDN = new ASN1OctetString(entryDN.toString()); |
| | | |
| | | rawModifications = new ArrayList<LDAPModification>(modifications.size()); |
| | | rawModifications = new ArrayList<RawModification>(modifications.size()); |
| | | for (Modification m : modifications) |
| | | { |
| | | rawModifications.add(new LDAPModification(m.getModificationType(), |
| | |
| | | * @return The set of raw, unprocessed modifications as included in the |
| | | * client request. |
| | | */ |
| | | public final List<LDAPModification> getRawModifications() |
| | | public final List<RawModification> getRawModifications() |
| | | { |
| | | return rawModifications; |
| | | } |
| | |
| | | * @param rawModification The modification to add to the set of raw |
| | | * modifications for this modify operation. |
| | | */ |
| | | public final void addRawModification(LDAPModification rawModification) |
| | | public final void addRawModification(RawModification rawModification) |
| | | { |
| | | rawModifications.add(rawModification); |
| | | |
| | |
| | | * |
| | | * @param rawModifications The raw modifications for this modify operation. |
| | | */ |
| | | public final void setRawModifications(List<LDAPModification> rawModifications) |
| | | public final void setRawModifications(List<RawModification> rawModifications) |
| | | { |
| | | this.rawModifications = rawModifications; |
| | | |
| | |
| | | if (modifications == null) |
| | | { |
| | | modifications = new ArrayList<Modification>(rawModifications.size()); |
| | | for (LDAPModification m : rawModifications) |
| | | for (RawModification m : rawModifications) |
| | | { |
| | | try |
| | | { |
| | |
| | | ErrorLogSeverity.SEVERE_ERROR, |
| | | MSGID_MODIFY_SYNCH_CONFLICT_RESOLUTION_FAILED, |
| | | getConnectionID(), getOperationID(), |
| | | stackTraceToSingleLineString(de)); |
| | | getExceptionMessage(de)); |
| | | |
| | | setResponseData(de); |
| | | break modifyProcessing; |
| | |
| | | logError(ErrorLogCategory.SYNCHRONIZATION, |
| | | ErrorLogSeverity.SEVERE_ERROR, |
| | | MSGID_MODIFY_SYNCH_PREOP_FAILED, getConnectionID(), |
| | | getOperationID(), stackTraceToSingleLineString(de)); |
| | | getOperationID(), getExceptionMessage(de)); |
| | | |
| | | setResponseData(de); |
| | | break modifyProcessing; |
| | |
| | | logError(ErrorLogCategory.SYNCHRONIZATION, |
| | | ErrorLogSeverity.SEVERE_ERROR, |
| | | MSGID_MODIFY_SYNCH_POSTOP_FAILED, getConnectionID(), |
| | | getOperationID(), stackTraceToSingleLineString(de)); |
| | | getOperationID(), getExceptionMessage(de)); |
| | | |
| | | setResponseData(de); |
| | | break; |
| | |
| | | } |
| | | |
| | | int msgID = MSGID_MODIFY_ERROR_NOTIFYING_CHANGE_LISTENER; |
| | | String message = getMessage(msgID, stackTraceToSingleLineString(e)); |
| | | String message = getMessage(msgID, getExceptionMessage(e)); |
| | | logError(ErrorLogCategory.CORE_SERVER, ErrorLogSeverity.SEVERE_ERROR, |
| | | message, msgID); |
| | | } |
| | |
| | | |
| | | int msgID = MSGID_MODIFY_ERROR_NOTIFYING_PERSISTENT_SEARCH; |
| | | String message = getMessage(msgID, String.valueOf(persistentSearch), |
| | | stackTraceToSingleLineString(e)); |
| | | getExceptionMessage(e)); |
| | | logError(ErrorLogCategory.CORE_SERVER, ErrorLogSeverity.SEVERE_ERROR, |
| | | message, msgID); |
| | | |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override() |
| | | boolean setCancelRequest(CancelRequest cancelRequest) |
| | | protected boolean setCancelRequest(CancelRequest cancelRequest) |
| | | { |
| | | this.cancelRequest = cancelRequest; |
| | | return true; |