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


Java DescribableList.iterator方法代码示例

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


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

示例1: queryProject

import hudson.util.DescribableList; //导入方法依赖的package包/类
private void queryProject(Project job, Hashtable<String, InstalledPlugin> installedPluginSet) {
    if (job != null) {
       // Query Builders
        if (job.getBuilders() != null && job.getBuilders().size() > 0) {
            for (int i = 0; i < job.getBuilders().size(); i++) {
                LOG.log(Level.FINE, "getBuilders " + addJob(job.getName(), job.getShortUrl(), job.getBuilders().get(i).getClass(), installedPluginSet));
            }
        } else {
            LOG.log(Level.FINE, "getBuilders is empty");
        }

        if (job.getBuildWrappersList() != null && job.getBuildWrappersList().size() > 0) {
            DescribableList<BuildWrapper, Descriptor<BuildWrapper>> wrappersList = job.getBuildWrappersList();
            Iterator<BuildWrapper> buildWrapperIterator = wrappersList.iterator();
            while (buildWrapperIterator.hasNext()) {
                BuildWrapper buildWrapper = buildWrapperIterator.next();
                LOG.log(Level.FINE, "getBuildWrappers " + addJob(job.getName(), job.getShortUrl(), buildWrapper.getClass(), installedPluginSet));
            }

        } else {
            LOG.log(Level.FINE, "getBuildWrappers is empty");
        }

        if (job.getPublishersList() != null && job.getPublishersList().size() > 0) {
            DescribableList<Publisher, Descriptor<Publisher>> publisherList = job.getPublishersList();
            Iterator<Publisher> publisherIterator = publisherList.iterator();
            while (publisherIterator.hasNext()) {
                Publisher publisher = publisherIterator.next();
                LOG.log(Level.FINE, "getPublishersList " + addJob(job.getName(), job.getShortUrl(), publisher.getClass(), installedPluginSet));
            }
        } else {
            LOG.log(Level.FINE, "getPublishersList is empty");
        }

        if (job.getScm() != null) {
            LOG.log(Level.FINE, "getScm " + addJob(job.getName(), job.getShortUrl(), job.getScm().getClass(), installedPluginSet));
        } else {
            LOG.log(Level.FINE, "getScm is empty");
        }

        if (job.getTriggers() != null && job.getTriggers().size() > 0) {
            Iterator<Trigger> triggerIterator =  job.getTriggers().values().iterator();
            while (triggerIterator.hasNext()) {
                Trigger trigger = triggerIterator.next();
                LOG.log(Level.FINE, "getTriggers " + addJob(job.getName(), job.getShortUrl(), trigger.getClass(), installedPluginSet));
            }
        } else {
            LOG.log(Level.FINE, "getTriggers is empty");
        }

        if (job.getProperties() !=null && job.getProperties().size() > 0){
            Map<JobPropertyDescriptor,JobProperty> properties = job.getProperties();
            for (Map.Entry<JobPropertyDescriptor,JobProperty> entry : properties.entrySet()) {
                LOG.log(Level.FINE, "getProperties " + addJob(job.getName(), job.getShortUrl(), entry.getKey().getClass(), installedPluginSet));
            }
        }else {
            LOG.log(Level.FINE, "getProperties is empty");
        }

        if (job.getAllActions() != null && job.getAllActions().size() > 0) {
            for (Action action : job.getAllActions()) {
                LOG.log(Level.FINE, "getAllActions " + addJob(job.getName(), job.getShortUrl(), action.getClass(), installedPluginSet));
            }
        } else {
            LOG.log(Level.FINE, "getAllActions is empty");
        }

    } else {
        LOG.log(Level.FINE, "PROJECT is null");
    }
}
 
开发者ID:v1v,项目名称:plugin-stats-plugin,代码行数:72,代码来源:PluginStatsAction.java

示例2: queryMatrixProject

import hudson.util.DescribableList; //导入方法依赖的package包/类
private void queryMatrixProject(MatrixProject job, Hashtable<String, InstalledPlugin> installedPluginSet) {
    if (job != null) {
        if (job.getBuilders() != null && job.getBuilders().size() > 0) {
            for (int i = 0; i < job.getBuilders().size(); i++) {
                LOG.log(Level.FINE, "getBuilders " + addJob(job.getName(), job.getShortUrl(), job.getBuilders().get(i).getClass(), installedPluginSet));
            }
        } else {
            LOG.log(Level.FINE, "getBuilders is empty");
        }

        if (job.getBuildWrappersList() != null && job.getBuildWrappersList().size() > 0) {
            DescribableList<BuildWrapper, Descriptor<BuildWrapper>> wrappersList = job.getBuildWrappersList();
            Iterator<BuildWrapper> buildWrapperIterator = wrappersList.iterator();
            while (buildWrapperIterator.hasNext()) {
                BuildWrapper buildWrapper = buildWrapperIterator.next();
                LOG.log(Level.FINE, "getBuildWrappers " + addJob(job.getName(), job.getShortUrl(), buildWrapper.getClass(), installedPluginSet));
            }

        } else {
            LOG.log(Level.FINE, "getBuildWrappers is empty");
        }

        if (job.getPublishersList() != null && job.getPublishersList().size() > 0) {
            DescribableList<Publisher, Descriptor<Publisher>> publisherList = job.getPublishersList();
            Iterator<Publisher> publisherIterator = publisherList.iterator();
            while (publisherIterator.hasNext()) {
                Publisher publisher = publisherIterator.next();
                LOG.log(Level.FINE, "getPublishersList " + addJob(job.getName(), job.getShortUrl(), publisher.getClass(), installedPluginSet));
            }
        } else {
            LOG.log(Level.FINE, "getPublishersList is empty");
        }

        if (job.getScm() != null) {
            LOG.log(Level.FINE, "getScm " + addJob(job.getName(), job.getShortUrl(), job.getScm().getClass(), installedPluginSet));
        } else {
            LOG.log(Level.FINE, "getScm is empty");
        }

        if (job.getTriggers() != null && job.getTriggers().size() > 0) {
            Iterator<Trigger<?>> triggerIterator =  job.getTriggers().values().iterator();
            while (triggerIterator.hasNext()) {
                Trigger trigger = triggerIterator.next();
                LOG.log(Level.FINE, "getTriggers " + addJob(job.getName(), job.getShortUrl(), trigger.getClass(), installedPluginSet));
            }
        } else {
            LOG.log(Level.FINE, "getTriggers is empty");
        }

        // TODO: Query Properties
        if (job.getProperties() !=null && job.getProperties().size() > 0){
            LOG.log(Level.FINE, "getProperties is " + job.getProperties().size());
            for (int j = 0; j < job.getProperties().size(); j++) {
                LOG.log(Level.FINE, "getProperties " +job.getProperties().get(j));//+ /+ addJob(job, job.getProperties().get(j).getClass(), installedPluginSet));
            }
        }else {
            LOG.log(Level.FINE, "getProperties is empty");
        }

        if (job.getAllActions() != null && job.getAllActions().size() > 0) {
            for (Action action : job.getAllActions()) {
                LOG.log(Level.FINE, "getAllActions " + addJob(job.getName(), job.getShortUrl(), action.getClass(), installedPluginSet));
            }
        } else {
            LOG.log(Level.FINE, "getAllActions is empty");
        }

    } else {
        LOG.log(Level.FINE, "PROJECT is null");
    }
}
 
开发者ID:v1v,项目名称:plugin-stats-plugin,代码行数:72,代码来源:PluginStatsAction.java

示例3: queryMavenProject

import hudson.util.DescribableList; //导入方法依赖的package包/类
private void queryMavenProject(MavenModuleSet job, Hashtable<String, InstalledPlugin> installedPluginSet) {
    if (job != null) {

        if (job.getBuildWrappersList() != null && job.getBuildWrappersList().size() > 0) {
            DescribableList<BuildWrapper, Descriptor<BuildWrapper>> wrappersList = job.getBuildWrappersList();
            Iterator<BuildWrapper> buildWrapperIterator = wrappersList.iterator();
            while (buildWrapperIterator.hasNext()) {
                BuildWrapper buildWrapper = buildWrapperIterator.next();
                LOG.log(Level.FINE, "getBuildWrappers " + addJob(job.getName(), job.getShortUrl(), buildWrapper.getClass(), installedPluginSet));
            }

        } else {
            LOG.log(Level.FINE, "getBuildWrappers is empty");
        }

        if (job.getPublishersList() != null && job.getPublishersList().size() > 0) {
            DescribableList<Publisher, Descriptor<Publisher>> publisherList = job.getPublishersList();
            Iterator<Publisher> publisherIterator = publisherList.iterator();
            while (publisherIterator.hasNext()) {
                Publisher publisher = publisherIterator.next();
                LOG.log(Level.FINE, "getPublishersList " + addJob(job.getName(), job.getShortUrl(), publisher.getClass(), installedPluginSet));
            }
        } else {
            LOG.log(Level.FINE, "getPublishersList is empty");
        }

        if (job.getScm() != null) {
            LOG.log(Level.FINE, "getScm " + addJob(job.getName(), job.getShortUrl(), job.getScm().getClass(), installedPluginSet));
        } else {
            LOG.log(Level.FINE, "getScm is empty");
        }

        if (job.getTriggers() != null && job.getTriggers().size() > 0) {
            Iterator<Trigger<?>> triggerIterator =  job.getTriggers().values().iterator();
            while (triggerIterator.hasNext()) {
                Trigger trigger = triggerIterator.next();
                LOG.log(Level.FINE, "getTriggers " + addJob(job.getName(), job.getShortUrl(), trigger.getClass(), installedPluginSet));
            }
        } else {
            LOG.log(Level.FINE, "getTriggers is empty");
        }

        if (job.getProperties() !=null && job.getProperties().size() > 0){
            Map<JobPropertyDescriptor, JobProperty<? super MavenModuleSet>> properties = job.getProperties();
            for (Map.Entry<JobPropertyDescriptor, JobProperty<? super MavenModuleSet>> entry : properties.entrySet()) {
                LOG.log(Level.FINE, "getProperties " + addJob(job.getName(), job.getShortUrl(), entry.getKey().getClass(), installedPluginSet));
            }
        }else {
            LOG.log(Level.FINE, "getProperties is empty");
        }

        if (job.getAllActions() != null && job.getAllActions().size() > 0) {
            for (Action action : job.getAllActions()) {
                LOG.log(Level.FINE, "getAllActions " + addJob(job.getName(), job.getShortUrl(), action.getClass(), installedPluginSet));
            }
        } else {
            LOG.log(Level.FINE, "getAllActions is empty");
        }

    } else {
        LOG.log(Level.FINE, "PROJECT is null");
    }
}
 
开发者ID:v1v,项目名称:plugin-stats-plugin,代码行数:64,代码来源:PluginStatsAction.java

示例4: queryMultibranchProject

import hudson.util.DescribableList; //导入方法依赖的package包/类
private void queryMultibranchProject(FreeStyleMultiBranchProject job, Hashtable<String, InstalledPlugin> installedPluginSet) {
    if (job != null) {
        if (job.getPublishersList() != null && job.getPublishersList().size() > 0) {
            DescribableList<Publisher, Descriptor<Publisher>> publisherList = job.getPublishersList();
            Iterator<Publisher> publisherIterator = publisherList.iterator();
            while (publisherIterator.hasNext()) {
                Publisher publisher = publisherIterator.next();
                LOG.log(Level.FINE, "getPublishersList " + addJob(job.getName(), job.getShortUrl(), publisher.getClass(), installedPluginSet));
            }
        } else {
            LOG.log(Level.FINE, "getPublishersList is empty");
        }

        if (job.getScm() != null) {
            LOG.log(Level.FINE, "getScm " + addJob(job.getName(), job.getShortUrl(), job.getScm().getClass(), installedPluginSet));
        } else {
            LOG.log(Level.FINE, "getScm is empty");
        }

        if (job.getTriggers() != null && job.getTriggers().size() > 0) {
            Iterator<Trigger<?>> triggerIterator =  job.getTriggers().values().iterator();
            while (triggerIterator.hasNext()) {
                Trigger trigger = triggerIterator.next();
                LOG.log(Level.FINE, "getTriggers " + addJob(job.getName(), job.getShortUrl(), trigger.getClass(), installedPluginSet));
            }
        } else {
            LOG.log(Level.FINE, "getTriggers is empty");
        }

        if (job.getProperties() !=null && job.getProperties().size() > 0){
            Map<JobPropertyDescriptor, JobProperty<? super FreeStyleProject>> properties = job.getProperties();
            for (Map.Entry<JobPropertyDescriptor, JobProperty<? super FreeStyleProject>> entry : properties.entrySet()) {
                LOG.log(Level.FINE, "getProperties " + addJob(job.getName(), job.getShortUrl(), entry.getKey().getClass(), installedPluginSet));
            }
        }else {
            LOG.log(Level.FINE, "getProperties is empty");
        }

        if (job.getAllActions() != null && job.getAllActions().size() > 0) {
            for (Action action : job.getAllActions()) {
                LOG.log(Level.FINE, "getAllActions " + addJob(job.getName(), job.getShortUrl(), action.getClass(), installedPluginSet));
            }
        } else {
            LOG.log(Level.FINE, "getAllActions is empty");
        }

    } else {
        LOG.log(Level.FINE, "PROJECT is null");
    }
}
 
开发者ID:v1v,项目名称:plugin-stats-plugin,代码行数:51,代码来源:PluginStatsAction.java


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