本文整理汇总了Java中jetbrains.buildServer.util.StringUtil.isTrue方法的典型用法代码示例。如果您正苦于以下问题:Java StringUtil.isTrue方法的具体用法?Java StringUtil.isTrue怎么用?Java StringUtil.isTrue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类jetbrains.buildServer.util.StringUtil
的用法示例。
在下文中一共展示了StringUtil.isTrue方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getRunnerPropertiesProcessor
import jetbrains.buildServer.util.StringUtil; //导入方法依赖的package包/类
@Nullable
@Override
public PropertiesProcessor getRunnerPropertiesProcessor() {
return new PropertiesProcessor() {
@Override
public Collection<InvalidProperty> process(final Map<String, String> properties) {
final ArrayList<InvalidProperty> result = new ArrayList<InvalidProperty>();
final boolean useDotTrace = StringUtil.isTrue(properties.get(DotTraceBean.Shared.getUseDotTraceKey()));
if(useDotTrace && StringUtil.isEmptyOrSpaces(properties.get(DotTraceBean.Shared.getPathKey()))) {
result.add(new InvalidProperty(DotTraceBean.Shared.getPathKey(), PATH_NOT_SPECIFIED_ERROR_MESSAGE));
}
if(useDotTrace && StringUtil.isEmptyOrSpaces(properties.get(DotTraceBean.Shared.getThresholdsKey()))) {
result.add(new InvalidProperty(DotTraceBean.Shared.getThresholdsKey(), THRESHOLDS_NOT_SPECIFIED_ERROR_MESSAGE));
}
return result;
}
};
}
示例2: getRunnerPropertiesProcessor
import jetbrains.buildServer.util.StringUtil; //导入方法依赖的package包/类
@Nullable
@Override
public PropertiesProcessor getRunnerPropertiesProcessor() {
return new PropertiesProcessor() {
@Override
public Collection<InvalidProperty> process(final Map<String, String> properties) {
final ArrayList<InvalidProperty> result = new ArrayList<InvalidProperty>();
final boolean useDotMemoryUnit = StringUtil.isTrue(properties.get(DotMemoryUnitBean.Shared.getUseDotMemoryUnitKey()));
if(useDotMemoryUnit && StringUtil.isEmptyOrSpaces(properties.get(DotMemoryUnitBean.Shared.getPathKey()))) {
result.add(new InvalidProperty(DotMemoryUnitBean.Shared.getPathKey(), DOT_MEMORY_UNIT_PATH_NOT_SPECIFIED_ERROR_MESSAGE));
}
if(useDotMemoryUnit && StringUtil.isEmptyOrSpaces(properties.get(DotMemoryUnitBean.Shared.getSnapshotsPathKey()))) {
result.add(new InvalidProperty(DotMemoryUnitBean.Shared.getSnapshotsPathKey(), SNAPSHOTS_PATH_NOT_SPECIFIED_ERROR_MESSAGE));
}
return result;
}
};
}
示例3: shouldKeepGeneratedFiles
import jetbrains.buildServer.util.StringUtil; //导入方法依赖的package包/类
private boolean shouldKeepGeneratedFiles() {
return StringUtil.isTrue(getConfigParameters().get(CONFIG_KEEP_GENERATED))
|| StringUtil.isTrue(getConfigParameters().get("teamcity.dont.delete.temp.files"));
}