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

org.enodeframework.commanding.ICommandContext.kt Maven / Gradle / Ivy

There is a newer version: 1.1.10
Show newest version
package org.enodeframework.commanding

import org.enodeframework.domain.IAggregateRoot
import org.enodeframework.messaging.IApplicationMessage
import java.util.concurrent.CompletableFuture

interface ICommandContext {
    /**
     * Add a new aggregate into the current command context.
     */
    fun add(aggregateRoot: IAggregateRoot?)

    /**
     * Add a new aggregate into the current command context synchronously, and then return a completed task object.
     */
    fun addAsync(aggregateRoot: IAggregateRoot?): CompletableFuture?

    /**
     * Get an aggregate from the current command context.
     */
    fun  getAsync(id: Any, firstFromCache: Boolean, clazz: Class): CompletableFuture
    fun  getAsync(id: Any, clazz: Class): CompletableFuture
    var result: String
    /**
     * Get an application message.
     */
    /**
     * Set an application message.
     */
    var applicationMessage: IApplicationMessage?
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy