CommandLogEntry

A persistent representation of a Command , being the intention to edit a property or invoke an action.Note that this class doesn’t subclass from Command ( Command is not an interface), but it does implement HasCommandDto , providing access to CommandDto , a serialized representation of the Command .

Use cases requiring persistence including auditing, and for replay of commands for regression testing purposes.

API

CommandLogEntry.java
class CommandLogEntry {
  public final static String LOGICAL_TYPE_NAME;
  public static final String SCHEMA;
  public static final String TABLE;
  CommandLogEntry(CommandDto commandDto, org.apache.causeway.extensions.commandlog.applib.dom.ReplayState replayState, int targetIndex)     (1)
  void sync(Command command)
  void copyOver(CommandDto commandDto, String key, Consumer<String> consume)
  String title()
  ChangeType getType()
  C getParent()
  BigDecimal getDuration()     (2)
  boolean isComplete()
  void setException(Throwable exception)
  String getResultSummary()
  boolean isCausedException()
  boolean hideReplayStateFailureReason()
  void saveAnalysis(String analysis)
  int compareTo(CommandLogEntry other)
  String toString()
}
1 CommandLogEntry(CommandDto, org_apache_causeway_extensions_commandlog_applib_dom_ReplayState, int)

Intended for use on secondary (replay) system.

2 getDuration()

The number of seconds (to 3 decimal places) that this command lasted, derived from * #getStartedAt() and #getCompletedAt() .

Members

CommandLogEntry(CommandDto, org_apache_causeway_extensions_commandlog_applib_dom_ReplayState, int)

Intended for use on secondary (replay) system.

getDuration()

The number of seconds (to 3 decimal places) that this command lasted, derived from * #getStartedAt() and #getCompletedAt() .

Populated only if it has #getCompletedAt() completed .