Package org.forgerock.opendj.ldif
Interface RejectedChangeRecordListener
public interface RejectedChangeRecordListener
A listener interface which is notified whenever a change record cannot be
applied to an entry. This may occur when an attempt is made to update a
non-existent entry, or add an entry which already exists.
By default the FAIL_FAST listener is used.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final RejectedChangeRecordListenerA handler which terminates processing by throwing aDecodeExceptionas soon as a change is rejected.static final RejectedChangeRecordListenerThe default handler which ignores changes applied to missing entries and tolerates duplicate entries by overwriting the existing entry with the new entry. -
Method Summary
Modifier and TypeMethodDescriptionhandleDuplicateEntry(AddRequest change, Entry existingEntry) Invoked when an attempt was made to add an entry which already exists.handleDuplicateEntry(ModifyDnRequest change, Entry existingEntry, Entry renamedEntry) Invoked when an attempt was made to rename an entry which already exists.voidhandleRejectedChangeRecord(AddRequest change, LocalizableMessage reason) Invoked when an attempt to add an entry was rejected.voidhandleRejectedChangeRecord(DeleteRequest change, LocalizableMessage reason) Invoked when an attempt to delete an entry was rejected.voidhandleRejectedChangeRecord(ModifyDnRequest change, LocalizableMessage reason) Invoked when an attempt to rename an entry was rejected.voidhandleRejectedChangeRecord(ModifyRequest change, LocalizableMessage reason) Invoked when an attempt to modify an entry was rejected.
-
Field Details
-
FAIL_FAST
A handler which terminates processing by throwing aDecodeExceptionas soon as a change is rejected. -
OVERWRITE
The default handler which ignores changes applied to missing entries and tolerates duplicate entries by overwriting the existing entry with the new entry.
-
-
Method Details
-
handleDuplicateEntry
Invoked when an attempt was made to add an entry which already exists.- Parameters:
change- The conflicting add request.existingEntry- The pre-existing entry.- Returns:
- The entry which should be kept.
- Throws:
DecodeException- If processing should terminate.
-
handleDuplicateEntry
Entry handleDuplicateEntry(ModifyDnRequest change, Entry existingEntry, Entry renamedEntry) throws DecodeException Invoked when an attempt was made to rename an entry which already exists.- Parameters:
change- The conflicting add request.existingEntry- The pre-existing entry.renamedEntry- The renamed entry.- Returns:
- The entry which should be kept.
- Throws:
DecodeException- If processing should terminate.
-
handleRejectedChangeRecord
void handleRejectedChangeRecord(AddRequest change, LocalizableMessage reason) throws DecodeException Invoked when an attempt to add an entry was rejected. This may be because the target parent entry was not found, or controls provided with the request are not supported. This method will not be called when the entry to be added already exists, since this is handled byhandleDuplicateEntry(AddRequest, Entry).- Parameters:
change- The rejected add request.reason- The reason why the record was rejected.- Throws:
DecodeException- If processing should terminate.
-
handleRejectedChangeRecord
void handleRejectedChangeRecord(DeleteRequest change, LocalizableMessage reason) throws DecodeException Invoked when an attempt to delete an entry was rejected. This may be because the target entry was not found, or controls provided with the request are not supported.- Parameters:
change- The rejected delete request.reason- The reason why the record was rejected.- Throws:
DecodeException- If processing should terminate.
-
handleRejectedChangeRecord
void handleRejectedChangeRecord(ModifyRequest change, LocalizableMessage reason) throws DecodeException Invoked when an attempt to modify an entry was rejected. This may be because the target entry was not found, or controls provided with the request are not supported.- Parameters:
change- The rejected modify request.reason- The reason why the record was rejected.- Throws:
DecodeException- If processing should terminate.
-
handleRejectedChangeRecord
void handleRejectedChangeRecord(ModifyDnRequest change, LocalizableMessage reason) throws DecodeException Invoked when an attempt to rename an entry was rejected. This may be because the target entry was not found, or controls provided with the request are not supported. This method will not be called when a renamed entry already exists, since this is handled byhandleDuplicateEntry(ModifyDnRequest, Entry, Entry).- Parameters:
change- The rejected modify DN request.reason- The reason why the record was rejected.- Throws:
DecodeException- If processing should terminate.
-