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 TypeMethodDescriptionvoidentityImported(@NotNull String entityName) Instances were added, deleted or modified in the domain programmatically and not through the user interface.default voidlog(@NotNull String event, net.tangly.commons.logger.EventData.Status status, String text, @NotNull Map<String, Object> data) default voidlog(@NotNull String event, net.tangly.commons.logger.EventData.Status status, String reason, @NotNull Map<String, Object> data, Throwable exception) voidlog(@NotNull net.tangly.commons.logger.EventData auditEvent) name()Returns the name of the domain audit.voidSubmit an event to the external public event channel of the domain.voidsubmitInterally(@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
-
log
-
entityImported
Instances were added, deleted or modified in the domain programmatically and not through the user interface.- Parameters:
entityName- name of the entity
-
submitInterally
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
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
-