Package org.forgerock.opendj.ldif
Interface RejectedChangeRecordListener
-
public interface RejectedChangeRecordListenerA 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_FASTlistener is used.
-
-
Field Summary
Fields Modifier and Type Field Description static RejectedChangeRecordListenerFAIL_FASTA handler which terminates processing by throwing aDecodeExceptionas soon as a change is rejected.static RejectedChangeRecordListenerOVERWRITEThe default handler which ignores changes applied to missing entries and tolerates duplicate entries by overwriting the existing entry with the new entry.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description EntryhandleDuplicateEntry(AddRequest change, Entry existingEntry)Invoked when an attempt was made to add an entry which already exists.EntryhandleDuplicateEntry(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 Detail
-
FAIL_FAST
static final RejectedChangeRecordListener FAIL_FAST
A handler which terminates processing by throwing aDecodeExceptionas soon as a change is rejected.
-
OVERWRITE
static final RejectedChangeRecordListener 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 Detail
-
handleDuplicateEntry
Entry handleDuplicateEntry(AddRequest change, Entry existingEntry) throws DecodeException
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.
-
-