Interface DomainAudit

All Known Implementing Classes:
BoundedDomain

public interface DomainAudit
Defines the interface to audit relevant events specific to a bounded domain. Bounded domain should audit all imported and exported aggregates. The fact that a report was generated should also be audited.

The following rules are recommended:

  • SUCCESS if all items of a file could be read or written.
  • WARNING if not all items of a file could be read or written.
  • ERROR if an item could not be read or written.
  • INFO if an item could be read or written.
  • FAILURE if file could not be read or written.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    entityImported(@NotNull String entityName)
    Instances were added, deleted or modified in the domain programmatically and not through the user interface.
    default void
    log(@NotNull String event, net.tangly.commons.logger.EventData.Status status, String text, @NotNull Map<String,Object> data)
     
    default void
    log(@NotNull String event, net.tangly.commons.logger.EventData.Status status, String reason, @NotNull Map<String,Object> data, Throwable exception)
     
    void
    log(@NotNull net.tangly.commons.logger.EventData auditEvent)
     
    Returns the name of the domain audit.
    void
    submit(@NotNull Object event)
    Submit an event to the external public event channel of the domain.
    void
    submitInterally(@NotNull Object event)
    Submit an event to the internal event channel of the domain.
  • Method Details

    • name

      String name()
      Returns the name of the domain audit. It should be the name of the bounded domain.
      Returns:
      name of the domain audit
    • log

      void log(@NotNull @NotNull net.tangly.commons.logger.EventData auditEvent)
    • log

      default void log(@NotNull @NotNull String event, @NotNull net.tangly.commons.logger.EventData.Status status, String text, @NotNull @NotNull Map<String,Object> data)
    • log

      default void log(@NotNull @NotNull String event, @NotNull net.tangly.commons.logger.EventData.Status status, String reason, @NotNull @NotNull Map<String,Object> data, Throwable exception)
    • entityImported

      void entityImported(@NotNull @NotNull String entityName)
      Instances were added, deleted or modified in the domain programmatically and not through the user interface.
      Parameters:
      entityName - name of the entity
    • submitInterally

      void submitInterally(@NotNull @NotNull Object event)
      Submit an event to the internal event channel of the domain. The channel is used to publish events within the domain.
      Parameters:
      event - event to submit
    • submit

      void submit(@NotNull @NotNull Object event)
      Submit an event to the external public event channel of the domain. The channel is used to publish events to other domains.
      Parameters:
      event - event to submit