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

net.nemerosa.ontrack.kdsl.spec.extension.general.AutoValidationStampPropertyExtensions.kt Maven / Gradle / Ivy

There is a newer version: 4.4.5
Show newest version
package net.nemerosa.ontrack.kdsl.spec.extension.general

import net.nemerosa.ontrack.json.parse
import net.nemerosa.ontrack.kdsl.spec.Project
import net.nemerosa.ontrack.kdsl.spec.deleteProperty
import net.nemerosa.ontrack.kdsl.spec.getProperty
import net.nemerosa.ontrack.kdsl.spec.setProperty

var Project.autoValidationStampProperty: AutoValidationStampProperty?
    get() = getProperty(AUTO_VALIDATION_STAMP_PROPERTY)?.parse()
    set(value) {
        if (value != null) {
            setProperty(AUTO_VALIDATION_STAMP_PROPERTY, value)
        } else {
            deleteProperty(AUTO_VALIDATION_STAMP_PROPERTY)
        }
    }

const val AUTO_VALIDATION_STAMP_PROPERTY = "net.nemerosa.ontrack.extension.general.AutoValidationStampPropertyType"

data class AutoValidationStampProperty(
    val autoCreate: Boolean = true,
    val autoCreateIfNotPredefined: Boolean = false,
)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy