Interface SynchronousOperationLogProducer<T>

All Known Implementing Classes:

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 Details


      static final Long SUMMARY_LOG

      static final Long UNLIMITED_LOG
  • Method Details

    • getPropChangesForOperation

      Map<T,List<PropertyChange>> getPropChangesForOperation(List<T> results)
      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

      List<PropertyChange> getSummarizingPropChangesForOperation(List<T> results)
      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. Usually commandContext.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 the produceOperationLog method.
      commandContext - the current command context
      result - 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 log
      isSummary - indicates whether the implementation should produce a summary log or a detailed log
    • produceOperationLog

      default void produceOperationLog(CommandContext commandContext, List<T> results)
      The implementing command can call this method to produce the operation log entries for the current operation.