JsonDomainEvent

data class JsonDomainEvent(val id: String, val header: Header, val bodyType: String, val body: JsonNode, val aggregateId: AggregateId, val ownerId: String, val version: Int, val sequence: Int, val revision: String, val commandId: String, val name: String, val isLast: Boolean = true, val createTime: Long = System.currentTimeMillis()) : DomainEvent<JsonNode> , NamedAggregate

Constructors

Link copied to clipboard
constructor(id: String, header: Header, bodyType: String, body: JsonNode, aggregateId: AggregateId, ownerId: String, version: Int, sequence: Int, revision: String, commandId: String, name: String, isLast: Boolean = true, createTime: Long = System.currentTimeMillis())

Properties

Link copied to clipboard
open override val aggregateId: AggregateId
Link copied to clipboard
open override val aggregateName: String
Link copied to clipboard
open override val body: JsonNode
Link copied to clipboard
Link copied to clipboard
open override val commandId: String
Link copied to clipboard
open override val contextName: String
Link copied to clipboard
open override val createTime: Long
Link copied to clipboard
open override val header: Header
Link copied to clipboard
open override val id: String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override val isLast: Boolean
Link copied to clipboard
Link copied to clipboard
open override val name: String
Link copied to clipboard
open override val ownerId: String
Link copied to clipboard
open override val revision: String
Link copied to clipboard
open override val sequence: Int
Link copied to clipboard
open override val version: Int

Functions

Link copied to clipboard
fun NamedAggregate.aggregateId(id: String = generateId(), tenantId: String = TenantId.DEFAULT_TENANT_ID): DefaultAggregateId

Creates an AggregateId for this NamedAggregate with the specified parameters.

Link copied to clipboard

Finds the aggregate type class associated with this named aggregate.

Link copied to clipboard

Converts this NamedAggregate to its corresponding AggregateMetadata.

Link copied to clipboard

Generates a unique ID string for this NamedAggregate.

Link copied to clipboard
fun NamedBoundedContext.getContextAlias(boundedContext: BoundedContext? = MetadataSearcher.metadata.contexts[contextName]): String
Link copied to clipboard

Gets the context alias prefix for this bounded context.

Link copied to clipboard

Checks if the named aggregate is available locally at runtime.

Link copied to clipboard
open override fun isSameAggregateName(other: NamedAggregate): Boolean
Link copied to clipboard
Link copied to clipboard
fun Message<*, *>.match(function: FunctionInfo): Boolean

Checks if this message matches the given function for compensation purposes.

Link copied to clipboard

Finds the aggregate type class associated with this named aggregate, throwing an exception if not found.

Link copied to clipboard

Extension function to convert a NamedAggregate to an EventNamedAggregate.

Link copied to clipboard

Extension function to convert a domain event with error info to a DomainEventException.

Link copied to clipboard
fun AggregateIdCapable.toGroupKey(parallelism: Int = DEFAULT_PARALLELISM): Int

Computes a grouping key for parallel processing based on the aggregate ID.

Link copied to clipboard

Converts this NamedAggregate to its string representation.

Link copied to clipboard

Converts this NamedAggregate to a string representation using the context alias.

Link copied to clipboard
open fun withHeader(additionalSource: Map<String, String>): DomainEvent<JsonNode>
open fun withHeader(key: String, value: String): DomainEvent<JsonNode>
Link copied to clipboard
open fun withReadOnly(): DomainEvent<JsonNode>