org.enodeframework.commanding.ICommandContext.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of enode Show documentation
Show all versions of enode Show documentation
The enodeframework core implementation.
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?
}