• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java PlanKeys类的典型用法和代码示例

java 2次浏览

本文整理汇总了Java中com.atlassian.bamboo.plan.PlanKeys的典型用法代码示例。如果您正苦于以下问题:Java PlanKeys类的具体用法?Java PlanKeys怎么用?Java PlanKeys使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

PlanKeys类属于com.atlassian.bamboo.plan包,在下文中一共展示了PlanKeys类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: shouldDisplay

点赞 3

import com.atlassian.bamboo.plan.PlanKeys; //导入依赖的package包/类
public boolean shouldDisplay(Map<String, Object> context) {
    PlanKey planKey = PlanKeys.getPlanKey((String) context.get("planKey"));
    Chain planChain = (Chain) planManager.getPlanByKey(planKey);
    
    for (ChainStage chainStage : planChain.getStages())
    {
        for (Job  job: chainStage.getJobs())
        {
        	Plan plan = planManager.getPlanByKey(job.getPlanKey());
        	List<TaskDefinition> tasks = plan.getBuildDefinition().getTaskDefinitions();
            for(TaskDefinition task : tasks) {
            	if(
                	task.getPluginKey().equals(DeploymentTask.KEY) ||
                	task.getPluginKey().equals(StatisticsTask.KEY) 
                ) {
                    return true;
                }
            }
        }
    }
    
    return false;
}
 

开发者ID:zend-patterns,
项目名称:ZendServerBamboo,
代码行数:24,
代码来源:ZendServerViewCondition.java

示例2: shouldDisplay

点赞 3

import com.atlassian.bamboo.plan.PlanKeys; //导入依赖的package包/类
@SuppressWarnings( "unchecked" )
public boolean shouldDisplay( Map context )
{
    String buildKey =
        ( context.get( ICheckStyleBuildProcessor.BUILD_KEY ) == null ) ? null
                        : (String) context.get( ICheckStyleBuildProcessor.BUILD_KEY );
    String buildNumberString =
        ( context.get( ICheckStyleBuildProcessor.BUILD_NUMBER ) == null ) ? null
                        : (String) context.get( ICheckStyleBuildProcessor.BUILD_NUMBER );
    if ( ( buildKey == null ) || ( buildNumberString == null ) )
    {
        return false;
    }
    
    int buildNumber = Integer.parseInt(buildNumberString);
    PlanResultKey planResultKey = PlanKeys.getPlanResultKey(buildKey, buildNumber);
    ResultsSummary buildResults = resultsSummaryManager.getResultsSummary(planResultKey);
    if ( buildResults == null )
    {
        return false;
    }

    return CheckstylePluginHelper.hasCheckstyleResults( buildResults );
}
 

开发者ID:javiergutites,
项目名称:bamboo-checkstyle-plugin,
代码行数:25,
代码来源:CheckStyleResultWebItemCondition.java

示例3: getRiskReportFile

点赞 2

import com.atlassian.bamboo.plan.PlanKeys; //导入依赖的package包/类
public File getRiskReportFile(final String planKey, final int buildNumber) throws NoSuchMethodException,
        SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
    final PlanResultKey resultKey = PlanKeys.getPlanResultKey(planKey, buildNumber);
    final ArtifactDefinitionContext artifact = getRiskReportArtifactDefinitionContext(null);
    final BambooFileStorageHelper storageHelper = new BambooFileStorageHelper();
    storageHelper.setResultKey(resultKey);
    storageHelper.setArtifactDefinition(artifact);
    final File planRoot = storageHelper.buildArtifactRootDirectory();
    final File dataFile = new File(planRoot, HubBambooUtils.HUB_RISK_REPORT_FILENAME);
    return dataFile;
}
 

开发者ID:blackducksoftware,
项目名称:hub-bamboo,
代码行数:12,
代码来源:HubBambooUtils.java

示例4: addDefaultValues

点赞 2

import com.atlassian.bamboo.plan.PlanKeys; //导入依赖的package包/类
@Override
public void addDefaultValues(@NotNull BuildConfiguration buildConfiguration) {
    Plan plan = planManager.getPlanByKey(PlanKeys.getPlanKey(buildConfiguration.getString("buildKey")));
    RepositoryDefinition repo = Iterables.find(ghReposFrom(plan), DEFAULT_REPO_PREDICATE, null);
    buildConfiguration.setProperty(CONFIG_KEY, repo == null
            ? ImmutableList.of()
            : ImmutableList.of(repo.getId()));
}
 

开发者ID:HackAttack,
项目名称:bamboo-github-status,
代码行数:9,
代码来源:Configuration.java

示例5: doExecute

点赞 2

import com.atlassian.bamboo.plan.PlanKeys; //导入依赖的package包/类
public String doExecute() throws Exception {
    String result = super.doExecute();
    	
    PlanKey planKey = PlanKeys.getPlanKey(getBuildKey());
    Chain planChain = (Chain) planManager.getPlanByKey(planKey);
    
    for (ChainStage chainStage : planChain.getStages())
    {
        for (Job  job: chainStage.getJobs())
        {
        	Plan plan = planManager.getPlanByKey(job.getPlanKey());
        	List<TaskDefinition> tasks = plan.getBuildDefinition().getTaskDefinitions();
            for(TaskDefinition task : tasks) {
            	if(task.getPluginKey().equals(DeploymentTask.KEY)) {
            		buildUrlZsJobDetails(job.getBuildName(), job.getBuildKey());
                }
                else if (task.getPluginKey().equals(StatisticsTask.KEY)) {
                	buildUrlZsStatistics(job.getBuildName(), job.getBuildKey());
                }
            	buildUrlZsJobLog(job.getBuildKey());
            }
        }
    }

    return result;

}
 

开发者ID:zend-patterns,
项目名称:ZendServerBamboo,
代码行数:28,
代码来源:ZendServer.java

示例6: shouldDisplay

点赞 2

import com.atlassian.bamboo.plan.PlanKeys; //导入依赖的package包/类
public boolean shouldDisplay(Map<String, Object> context) {
	PlanKey planKey = PlanKeys.getPlanKey((String) context.get("planKey"));
    Plan plan = planManager.getPlanByKey(planKey);
   
    List<TaskDefinition> tasks = plan.getBuildDefinition().getTaskDefinitions();
    for(TaskDefinition task : tasks) {
        if(task.getPluginKey().equals(DeploymentTask.KEY) ) {
            return true;
        }
    }

    return false;
}
 

开发者ID:zend-patterns,
项目名称:ZendServerBamboo,
代码行数:14,
代码来源:ZendServerDeploymentDetailsViewCondition.java

示例7: shouldDisplay

点赞 2

import com.atlassian.bamboo.plan.PlanKeys; //导入依赖的package包/类
public boolean shouldDisplay(Map<String, Object> context) {
	PlanKey planKey = PlanKeys.getPlanKey((String) context.get("planKey"));
    Plan plan = planManager.getPlanByKey(planKey);
   
    List<TaskDefinition> tasks = plan.getBuildDefinition().getTaskDefinitions();
    for(TaskDefinition task : tasks) {
        if(task.getPluginKey().equals(StatisticsTask.KEY) ) {
            return true;
        }
    }

    return false;
}
 

开发者ID:zend-patterns,
项目名称:ZendServerBamboo,
代码行数:14,
代码来源:ZendServerStatisticsViewCondition.java

示例8: createResultKey

点赞 2

import com.atlassian.bamboo.plan.PlanKeys; //导入依赖的package包/类
private PlanResultKey createResultKey() {
    final PlanResultKey resultKey = PlanKeys.getPlanResultKey("TEST-PLAN-JOB1", 1);
    return resultKey;
}
 

开发者ID:blackducksoftware,
项目名称:hub-bamboo,
代码行数:5,
代码来源:BambooFileStorageHelperPowerMockTest.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)