All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.dk.cachet.carp.common.application.services.IntegrationEvent.kt Maven / Gradle / Ivy

Go to download

Helper classes and base types relied upon by all subsystems. This library does not contain any domain logic.

The newest version!
package dk.cachet.carp.common.application.services

import dk.cachet.carp.common.application.Immutable
import dk.cachet.carp.common.application.ImplementAsDataClass
import kotlinx.serialization.Polymorphic
import kotlinx.serialization.Required


/**
 * An event raised by an application service [TApplicationService].
 *
 * Integration events need to be immutable.
 */
@Polymorphic
@Immutable
@ImplementAsDataClass
interface IntegrationEvent>
{
    @Required
    val apiVersion: ApiVersion

    /**
     * All events related to the same aggregate ID are handled in order,
     * or no ordering is required in case `null`.
     *
     * In case the event pertains to an aggregate root,
     * specify its ID to ensure correct handling of business logic in the domain.
     */
    val aggregateId: String?
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy