CommandResult

sealed class CommandResult<T : Any, C : KlerkContext, V>

Inheritors

Types

Link copied to clipboard
data class Failure<T : Any, C : KlerkContext, V>(val problem: Problem) : CommandResult<T, C, V>
Link copied to clipboard
data class Success<T : Any, C : KlerkContext, V>(val primaryModel: ModelID<T>?, val createdModels: List<ModelID<out Any>>, val modelsWithUpdatedProps: List<ModelID<out Any>>, val deletedModels: List<ModelID<out Any>>, val transitionedModels: List<ModelID<out Any>>, val secondaryEvents: List<EventReference>, val jobs: List<Job<C, V>>, val actions: List<GeneralAction>, val authorizedModels: Map<ModelID<out Any>, Model<out Any>>, val log: List<String>) : CommandResult<T, C, V>

Note that the reason this doesn't return the whole models is because it is easy to make a mistake and show the result to the user by mistake when the user does not have permission to see the models.

Functions

Link copied to clipboard
Link copied to clipboard