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

net.nemerosa.ontrack.model.labels.LabelProvider.kt Maven / Gradle / Ivy

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

import net.nemerosa.ontrack.model.structure.Project

/**
 * Defines a service which can computes automatic [labels][Label] for
 * projects.
 */
interface LabelProvider {
    /**
     * Display name for the provider
     */
    val name: String

    /**
     * Is this label provided enabled?
     */
    val isEnabled: Boolean

    /**
     * Gets the list of labels for a project
     */
    fun getLabelsForProject(project: Project): List
}

/**
 * Gets the [LabelProviderDescription] for a [LabelProvider].
 */
val LabelProvider.description: LabelProviderDescription
    get() = LabelProviderDescription(
            this::class.java.name,
            name
    )




© 2015 - 2025 Weber Informatics LLC | Privacy Policy