Interface SynchronousOperationLogProducer<T>
- All Known Implementing Classes:
CorrelateAllMessageCmd
public interface SynchronousOperationLogProducer<T>
Interface for Commands that synchronously modify multiple entities in one operation.
The methods of this interface take care of producing operation log entries based on the
logEntriesPerSyncOperationLimit property.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateOperationLogEntry(CommandContext commandContext, T result, List<PropertyChange> propChanges, boolean isSummary) Calls the code that produces the operation log.getPropChangesForOperation(List<T> results) Returns a map containing a list of changed properties for every result of the operation.getSummarizingPropChangesForOperation(List<T> results) Returns a list of changed properties summarizing the whole operation involving multiple entities.default voidproduceOperationLog(CommandContext commandContext, List<T> results) The implementing command can call this method to produce the operation log entries for the current operation.
-
Field Details
-
SUMMARY_LOG
-
UNLIMITED_LOG
-
-
Method Details
-
getPropChangesForOperation
Returns a map containing a list of changed properties for every result of the operation. Used to produce an operation log entry per entry contained in the returned map. -
getSummarizingPropChangesForOperation
Returns a list of changed properties summarizing the whole operation involving multiple entities. -
createOperationLogEntry
void createOperationLogEntry(CommandContext commandContext, T result, List<PropertyChange> propChanges, boolean isSummary) Calls the code that produces the operation log. UsuallycommandContext.getOperationLogManager().log...The implementation must be capable of producing a single, summarizing operation log that contain information about an operation spanning affecting multiple entities as well as producing a single, detailed operation log containing information about a single affected entity. This method is called by theproduceOperationLogmethod.- Parameters:
commandContext- the current command contextresult- An object resulting from the operation for which this method produces the operation log. In case the operation produced multiple objects, depending on the implementation a representative object from the list of results or null can be passed.propChanges- property changes to be attached to the operation logisSummary- indicates whether the implementation should produce a summary log or a detailed log
-
produceOperationLog
The implementing command can call this method to produce the operation log entries for the current operation.
-