cccev.s2.framework.api.FrameworkAggregateService.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cccev-framework-api Show documentation
Show all versions of cccev-framework-api Show documentation
Kotlin implementation of Core Criterion and Core Evidence Vocabulary
The newest version!
package cccev.s2.framework.api
import cccev.s2.framework.api.entity.FrameworkAutomateExecutor
import cccev.s2.framework.domain.FrameworkAggregate
import cccev.s2.framework.domain.command.FrameworkCreateCommand
import cccev.s2.framework.domain.command.FrameworkCreatedEvent
import java.util.UUID
import org.springframework.stereotype.Service
@Service
class FrameworkAggregateService(
private val automate: FrameworkAutomateExecutor
): FrameworkAggregate {
override suspend fun create(command: FrameworkCreateCommand) = automate.init(command) {
FrameworkCreatedEvent(
id = UUID.randomUUID().toString(),
identifier = command.identifier,
name = command.name
)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy