当前位置: 首页>>代码示例>>Java>>正文


Java Jenkins.getDescriptor方法代码示例

本文整理汇总了Java中jenkins.model.Jenkins.getDescriptor方法的典型用法代码示例。如果您正苦于以下问题:Java Jenkins.getDescriptor方法的具体用法?Java Jenkins.getDescriptor怎么用?Java Jenkins.getDescriptor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在jenkins.model.Jenkins的用法示例。


在下文中一共展示了Jenkins.getDescriptor方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: updateFromGlobalConfiguration

import jenkins.model.Jenkins; //导入方法依赖的package包/类
private void updateFromGlobalConfiguration() {
    Jenkins jenkins = Jenkins.getInstance();

    if (jenkins !=  null) {
        GlobalConsulConfig.DescriptorImpl globalDescriptor = (GlobalConsulConfig.DescriptorImpl)
                jenkins.getDescriptor(GlobalConsulConfig.class);

        if (globalDescriptor != null) {
            this.hostUrl = globalDescriptor.getConsulHostUrl();
            this.apiUri = globalDescriptor.getConsulApiUri();
            this.aclToken = globalDescriptor.getConsulAclToken();
            this.timeoutConnection = globalDescriptor.getConsulTimeoutConnection();
            this.timeoutResponse = globalDescriptor.getConsulTimeoutResponse();
            this.debugMode = globalDescriptor.getConsulDebugMode();
        } else {
            LOGGER.warning("Could not load global settings.");
        }
    } else {
        LOGGER.warning("Could not load global settings.");
    }
}
 
开发者ID:jenkinsci,项目名称:consul-kv-builder-plugin,代码行数:22,代码来源:ConsulKVBuilder.java

示例2: updateFromGlobalConfiguration

import jenkins.model.Jenkins; //导入方法依赖的package包/类
/**
 * Loads global settings
 */
public void updateFromGlobalConfiguration() {
    Jenkins jenkins = Jenkins.getInstance();

    if (jenkins !=  null) {
        GlobalConsulConfig.DescriptorImpl globalDescriptor = (GlobalConsulConfig.DescriptorImpl)
                jenkins.getDescriptor(GlobalConsulConfig.class);

        if (globalDescriptor != null) {
            this.hostUrl = globalDescriptor.getConsulHostUrl();
            this.apiUri = globalDescriptor.getConsulApiUri();
            this.aclToken = globalDescriptor.getConsulAclToken();
            this.timeoutConnect = globalDescriptor.getConsulTimeoutConnection();
            this.timeoutResponse = globalDescriptor.getConsulTimeoutResponse();
            this.debugMode = globalDescriptor.getConsulDebugMode();
        } else {
            LOGGER.warning("Could not load global settings.");
        }
    } else {
        LOGGER.warning("Could not load global settings.");
    }
}
 
开发者ID:jenkinsci,项目名称:consul-kv-builder-plugin,代码行数:25,代码来源:ReadBean.java

示例3: setUpDiskPools

import jenkins.model.Jenkins; //导入方法依赖的package包/类
private static void setUpDiskPools(Jenkins jenkins, List<DiskPool> diskPools) {
    ExwsAllocateStep.DescriptorImpl descriptor = (ExwsAllocateStep.DescriptorImpl) jenkins.getDescriptor(ExwsAllocateStep.class);

    Field diskPoolsField = ReflectionUtils.findField(ExwsAllocateStep.DescriptorImpl.class, "diskPools");
    diskPoolsField.setAccessible(true);
    ReflectionUtils.setField(diskPoolsField, descriptor, diskPools);
}
 
开发者ID:jenkinsci,项目名称:external-workspace-manager-plugin,代码行数:8,代码来源:TestUtil.java


注:本文中的jenkins.model.Jenkins.getDescriptor方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。