• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java Requirement类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: getRunnerSpecificRequirements

import jetbrains.buildServer.requirements.Requirement; //导入依赖的package包/类
@NotNull
@Override
public List<Requirement> getRunnerSpecificRequirements(@NotNull final Map<String, String> runParameters) {
  final List<Requirement> result = new ArrayList<>();
  final String minVersion = getMinimalVersion(runParameters);
  final PowerShellBitness bit = getBitness(runParameters);
  final PowerShellEdition edition = getEdition(runParameters);
  if (bit == null) {
    result.addAll(generateDisjunctionReqs(minVersion, edition));
  } else {
    if (minVersion == null) {
      result.add(new Requirement(bit.getVersionKey(), null, RequirementType.EXISTS));
    } else {
      result.add(new Requirement(bit.getVersionKey(), minVersion, RequirementType.VER_NO_LESS_THAN));
    }
    if (edition != null) {
      result.add(new Requirement(bit.getEditionKey(), edition.getValue(), RequirementType.EQUALS));
    }
  }
  return result;
}
 
开发者ID:JetBrains,项目名称:teamcity-powershell,代码行数:22,代码来源:PowerShellRunType.java


示例2: generateDisjunctionReqs

import jetbrains.buildServer.requirements.Requirement; //导入依赖的package包/类
private List<Requirement> generateDisjunctionReqs(@Nullable final String minVersion, @Nullable final PowerShellEdition edition) {
  final List<Requirement> result = new ArrayList<>();
  if (minVersion == null) { // generate OR requirement of type EXISTS
    result.add(new Requirement(RequirementQualifier.EXISTS_QUALIFIER + "(" +
        // version property is set only if corresponding PowerShell is properly detected
        Arrays.stream(PowerShellBitness.values()).map(PowerShellBitness::getVersionKey).collect(Collectors.joining("|"))+")", null, RequirementType.EXISTS));
  } else {
    result.add(new Requirement(RequirementQualifier.EXISTS_QUALIFIER + "(" +
        // version property is set only if corresponding PowerShell is properly detected
        Arrays.stream(PowerShellBitness.values()).map(PowerShellBitness::getVersionKey).collect(Collectors.joining("|"))+")", minVersion, RequirementType.VER_NO_LESS_THAN));
    // generate OR requirement of type VER_NO_LESS_THAN
  }
  // if some specific edition is required, add disjunction of editions by bitness
  if (edition != null) {
    result.add(new Requirement(RequirementQualifier.EXISTS_QUALIFIER + "(" +
        // version property is set only if corresponding PowerShell is properly detected
        Arrays.stream(PowerShellBitness.values()).map(PowerShellBitness::getEditionKey).collect(Collectors.joining("|"))+")", edition.getValue(), RequirementType.EQUALS));
  }
  return result;
}
 
开发者ID:JetBrains,项目名称:teamcity-powershell,代码行数:21,代码来源:PowerShellRunType.java


示例3: shouldProviderSemanticVersionRestriction

import jetbrains.buildServer.requirements.Requirement; //导入依赖的package包/类
@Test(dataProvider = "bitnessAndVersionProvider")
@TestFor(issues = "TW-33570")
public void shouldProviderSemanticVersionRestriction(@NotNull final PowerShellBitness bitness, @Nullable final String version) {
  final Map<String, String> parameters = createDummyParameters(bitness);
  if (version != null) {
    parameters.put(PowerShellConstants.RUNNER_MIN_VERSION, version);
  }
  final Collection<Requirement> requirements = runType.getRunnerSpecificRequirements(parameters);
  assertEquals(1, requirements.size());
  final Requirement req = requirements.iterator().next();
  assertEquals(bitness.getVersionKey(), req.getPropertyName());
  if (version == null) {
    assertEquals(RequirementType.EXISTS, req.getType());
  } else {
    assertEquals(RequirementType.VER_NO_LESS_THAN, req.getType());
    assertEquals(version, req.getPropertyValue());
  }
}
 
开发者ID:JetBrains,项目名称:teamcity-powershell,代码行数:19,代码来源:PowerShellRunTypeTest.java


示例4: shouldUseInternalValueAsPArtOfRequirement

import jetbrains.buildServer.requirements.Requirement; //导入依赖的package包/类
@Test(dataProvider = "bitnessProvider")
public void shouldUseInternalValueAsPArtOfRequirement(@NotNull final PowerShellBitness bit) {
  final Collection<Requirement> requirements = runType.getRunnerSpecificRequirements(createDummyParameters(bit));
  assertEquals(1, requirements.size());
  final Requirement req = requirements.iterator().next();
  final String versionKey = bit.getVersionKey();
  assertEquals(versionKey, req.getPropertyName());
  assertEquals("powershell_" + bit.getValue(), versionKey);
}
 
开发者ID:JetBrains,项目名称:teamcity-powershell,代码行数:10,代码来源:PowerShellRunTypeTest.java


示例5: testGenerateAnyBitnessRequirement_NoMinVersion

import jetbrains.buildServer.requirements.Requirement; //导入依赖的package包/类
@Test
@TestFor(issues = "TW-44808")
public void testGenerateAnyBitnessRequirement_NoMinVersion() throws Exception {
  final Map<String, String> input = createDummyParameters(null);
  final Collection<Requirement> requirements = runType.getRunnerSpecificRequirements(input);
  assertEquals(1, requirements.size());
  final Requirement r = requirements.iterator().next();
  assertEquals("Exists=>(powershell_x86|powershell_x64)", r.getPropertyName());
  assertNull(r.getPropertyValue());
  assertEquals(RequirementType.EXISTS, r.getType());
}
 
开发者ID:JetBrains,项目名称:teamcity-powershell,代码行数:12,代码来源:PowerShellRunTypeTest.java


示例6: testGenerateAnyBitnessRequirement_WithMinVersion

import jetbrains.buildServer.requirements.Requirement; //导入依赖的package包/类
@Test(dataProvider = "versionProvider")
@TestFor(issues = "TW-44808")
public void testGenerateAnyBitnessRequirement_WithMinVersion(@NotNull final String version) throws Exception {
  final Map<String, String> input = createDummyParameters(null);
  input.put(PowerShellConstants.RUNNER_MIN_VERSION, version);
  final Collection<Requirement> requirements = runType.getRunnerSpecificRequirements(input);
  assertEquals(1, requirements.size());
  final Requirement r = requirements.iterator().next();
  assertEquals("Exists=>(powershell_x86|powershell_x64)", r.getPropertyName());
  assertEquals(version, r.getPropertyValue());
  assertEquals(RequirementType.VER_NO_LESS_THAN, r.getType());
}
 
开发者ID:JetBrains,项目名称:teamcity-powershell,代码行数:13,代码来源:PowerShellRunTypeTest.java


示例7: getRunnerSpecificRequirements

import jetbrains.buildServer.requirements.Requirement; //导入依赖的package包/类
@Override
public @NotNull List<Requirement> getRunnerSpecificRequirements(final @NotNull Map<String, String> runParameters) {
  final List<Requirement> requirements = new ArrayList<>(4);
  requirements.add(new Requirement(TOOL_AUTOCONF, null, RequirementType.EXISTS));
  requirements.add(new Requirement(TOOL_MAKE, null, RequirementType.EXISTS));
  requirements.add(new Requirement(TOOL_TAR, null, RequirementType.EXISTS));
  requirements.add(new Requirement(TOOL_GZIP, null, RequirementType.EXISTS));
  return requirements;
}
 
开发者ID:unix-junkie,项目名称:teamcity-autotools-plugin,代码行数:10,代码来源:AutotoolsBuildRunType.java


示例8: getRequirements

import jetbrains.buildServer.requirements.Requirement; //导入依赖的package包/类
@NotNull
public static List<Requirement> getRequirements(final Map<String, String> runParameters) {
    final List<Requirement> list = new ArrayList<Requirement>();
    final String authType = runParameters.get(SettingsKeys.AuthType);
    if (authType != null && authType.equals(PrExtrasConstants.SystemWideTokenAuthType)) {
        // seems teamcity cannot find the system wide property even if defined
        // list.add(new Requirement("system." + SettingsKeys.GithubToken, null, RequirementType.EXISTS));
    }
    return list;
}
 
开发者ID:Nicologies,项目名称:PrExtras,代码行数:11,代码来源:RequirementsUtil.java


示例9: getRunnerSpecificRequirements

import jetbrains.buildServer.requirements.Requirement; //导入依赖的package包/类
@NotNull
@Override
public List<Requirement> getRunnerSpecificRequirements(@NotNull Map<String, String> runParameters) {
  final List<Requirement> requirements = new ArrayList<Requirement>(super.getRunnerSpecificRequirements(runParameters));

  final String vm = runParameters.get(VMConstants.PARAMETER_VM);
  final VM w = VM.find(vm);

  if (w != null) {
    requirements.addAll(w.requirements(runParameters));
  }

  return requirements;
}
 
开发者ID:jonnyzzz,项目名称:TeamCity.Virtual,代码行数:15,代码来源:VMRunType.java


示例10: getImplicitRequirements

import jetbrains.buildServer.requirements.Requirement; //导入依赖的package包/类
public List<Requirement> getImplicitRequirements() {
	// TODO Auto-generated method stub
	return null;
}
 
开发者ID:spyder007,项目名称:teamcity-msteams-notifier,代码行数:5,代码来源:MockSBuildType.java


示例11: getRequirements

import jetbrains.buildServer.requirements.Requirement; //导入依赖的package包/类
public List<Requirement> getRequirements() {
	// TODO Auto-generated method stub
	return null;
}
 
开发者ID:spyder007,项目名称:teamcity-msteams-notifier,代码行数:5,代码来源:MockSBuildType.java


示例12: getRunTypeRequirements

import jetbrains.buildServer.requirements.Requirement; //导入依赖的package包/类
public List<Requirement> getRunTypeRequirements() {
	// TODO Auto-generated method stub
	return null;
}
 
开发者ID:spyder007,项目名称:teamcity-msteams-notifier,代码行数:5,代码来源:MockSBuildType.java


示例13: getRunnerSpecificRequirements

import jetbrains.buildServer.requirements.Requirement; //导入依赖的package包/类
@NotNull
@Override
public List<Requirement> getRunnerSpecificRequirements(@NotNull Map<String, String> runParameters) {
    return Collections.singletonList(new Requirement(HELM_PATH_CONFIG_PARAM, null, RequirementType.EXISTS));
}
 
开发者ID:JetBrains,项目名称:teamcity-kubernetes-plugin,代码行数:6,代码来源:HelmRunType.java


示例14: getRunnerSpecificRequirements

import jetbrains.buildServer.requirements.Requirement; //导入依赖的package包/类
@NotNull
@Override
public List<Requirement> getRunnerSpecificRequirements(@NotNull final Map<String, String> runParameters) {
    return RequirementsUtil.getRequirements(runParameters);
}
 
开发者ID:Nicologies,项目名称:PrExtras,代码行数:6,代码来源:PrExtrasRunType.java


示例15: getRunTypeRequirements

import jetbrains.buildServer.requirements.Requirement; //导入依赖的package包/类
@NotNull
@Override
public List<Requirement> getRunTypeRequirements() {
    return null;
}
 
开发者ID:matt-richardson,项目名称:teamcity-octopus-build-trigger-plugin,代码行数:6,代码来源:FakeSBuildType.java


示例16: getRequirements

import jetbrains.buildServer.requirements.Requirement; //导入依赖的package包/类
@NotNull
@Override
public List<Requirement> getRequirements() {
    return null;
}
 
开发者ID:matt-richardson,项目名称:teamcity-octopus-build-trigger-plugin,代码行数:6,代码来源:FakeSBuildType.java


示例17: getImplicitRequirements

import jetbrains.buildServer.requirements.Requirement; //导入依赖的package包/类
@NotNull
@Override
public List<Requirement> getImplicitRequirements() {
    return null;
}
 
开发者ID:matt-richardson,项目名称:teamcity-octopus-build-trigger-plugin,代码行数:6,代码来源:FakeSBuildType.java


示例18: addRequirement

import jetbrains.buildServer.requirements.Requirement; //导入依赖的package包/类
public void addRequirement(Requirement arg0) {
	// TODO Auto-generated method stub

}
 
开发者ID:spyder007,项目名称:teamcity-msteams-notifier,代码行数:5,代码来源:MockSBuildType.java


示例19: addRequirement

import jetbrains.buildServer.requirements.Requirement; //导入依赖的package包/类
@Override
public void addRequirement(@NotNull Requirement requirement) {

}
 
开发者ID:matt-richardson,项目名称:teamcity-octopus-build-trigger-plugin,代码行数:5,代码来源:FakeSBuildType.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java KeySelectionManager类代码示例发布时间:2022-05-23
下一篇:
Java Ip6类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap