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

.bamboo.specs.extension.bamboo-specs-extension.1.2.6.source-code.TriggersExtension.kt Maven / Gradle / Ivy

There is a newer version: 1.3.18
Show newest version
package com.atlassian.bamboo.specs.extension

import com.atlassian.bamboo.specs.api.builders.AtlassianModule
import com.atlassian.bamboo.specs.api.builders.trigger.AnyTrigger
import com.atlassian.bamboo.specs.api.builders.trigger.Trigger

internal fun > triggerInitialisation(triggerConstructor: () -> T, description: String? = null, enabled: Boolean? = null, init: SpecsDsl = {}): T {
    val trigger = triggerConstructor()
    if (description != null)
        trigger.description(description)
    if (enabled != null)
        trigger.enabled(enabled)
    trigger.init()
    return trigger
}

internal fun triggerInitialisation(triggerType: String, description: String? = null, enabled: Boolean? = null, init: SpecsDsl = {}): AnyTrigger =
        triggerInitialisation({ AnyTrigger(AtlassianModule(triggerType)) }, description, enabled, init)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy