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

net.nemerosa.ontrack.model.structure.RunInfoService.kt Maven / Gradle / Ivy

There is a newer version: 4.4.5
Show newest version
package net.nemerosa.ontrack.model.structure

import net.nemerosa.ontrack.model.Ack

/**
 * Management of [RunInfo] for [Build]s
 * and [ValidationRun]s.
 */
interface RunInfoService {
    /**
     * Loads the [runnable entity][RunnableEntity] defined by
     * its [type][RunnableEntityType] and [id].
     */
    fun getRunnableEntity(runnableEntityType: RunnableEntityType, id: Int): RunnableEntity

    /**
     * Gets the [RunInfo] associated with a [runnable entity][RunnableEntity].
     */
    fun getRunInfo(entity: RunnableEntity): RunInfo?

    /**
     * Sets a [run info][RunInfoInput] on a [runnable entity][RunnableEntity] and returns
     * a created or update [RunInfo].
     */
    fun setRunInfo(entity: RunnableEntity, input: RunInfoInput): RunInfo

    /**
     * Deletes any existing [RunInfo] associated with [runnableEntity].
     *
     * @return [Ack.OK] if the the [RunInfo] was existing, [Ack.NOK] otherwise.
     */
    fun deleteRunInfo(runnableEntity: RunnableEntity): Ack

    /**
     * Fetches all restore informations and re-exports them.
     */
    fun restore(logger: (String) -> Unit = {})
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy