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

net.nemerosa.ontrack.extension.bitbucket.cloud.client.DefaultBitbucketCloudClientFactory.kt Maven / Gradle / Ivy

There is a newer version: 4.4.5
Show newest version
package net.nemerosa.ontrack.extension.bitbucket.cloud.client

import net.nemerosa.ontrack.extension.bitbucket.cloud.configuration.BitbucketCloudConfiguration
import org.springframework.stereotype.Component

@Component
class DefaultBitbucketCloudClientFactory : BitbucketCloudClientFactory {

    override fun getBitbucketCloudClient(config: BitbucketCloudConfiguration): BitbucketCloudClient =
        if (config.user != null && config.password != null) {
            DefaultBitbucketCloudClient(config.workspace, config.user!!, config.password!!)
        } else {
            throw IllegalStateException("Bitbucket Cloud user name and app password are required.")
        }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy