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

net.nemerosa.ontrack.job.JobCategory.kt Maven / Gradle / Ivy

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

data class JobCategory(
        val key: String,
        val name: String
) {

    fun withName(name: String) = JobCategory(key, name)

    fun getType(key: String): JobType {
        return JobType.of(this, key)
    }

    override fun toString(): String {
        return String.format(
                "[%s]",
                key
        )
    }

    companion object {

        /**
         * Core category, used internally
         */
        @JvmField
        val CORE = JobCategory.of("core").withName("Core")

        @JvmStatic
        fun of(key: String): JobCategory {
            return JobCategory(key, key)
        }
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy