本文整理汇总了Java中jetbrains.buildServer.util.CollectionsUtil.convertCollection方法的典型用法代码示例。如果您正苦于以下问题:Java CollectionsUtil.convertCollection方法的具体用法?Java CollectionsUtil.convertCollection怎么用?Java CollectionsUtil.convertCollection使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类jetbrains.buildServer.util.CollectionsUtil
的用法示例。
在下文中一共展示了CollectionsUtil.convertCollection方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createNewClient
import jetbrains.buildServer.util.CollectionsUtil; //导入方法依赖的package包/类
@NotNull
@Override
public CloudClientEx createNewClient(@NotNull CloudState cloudState, @NotNull CloudClientParameters cloudClientParameters) {
try {
final KubeCloudClientParametersImpl kubeClientParams = KubeCloudClientParametersImpl.create(cloudClientParameters);
final KubeApiConnector apiConnector = KubeApiConnectorImpl.create(kubeClientParams, myAuthStrategies.get(kubeClientParams.getAuthStrategy()));
List<KubeCloudImage> images = CollectionsUtil.convertCollection(kubeClientParams.getImages(), kubeCloudImageData -> {
KubeCloudImageImpl kubeCloudImage = new KubeCloudImageImpl(kubeCloudImageData, apiConnector, myCache);
kubeCloudImage.populateInstances();
return kubeCloudImage;
});
return new KubeCloudClient(
myServerSettings.getServerUUID(),
cloudState.getProfileId(),
apiConnector,
images,
kubeClientParams,
myPodTemplateProviders,
myCache,
myUpdater);
} catch (Throwable ex){
if(ex instanceof KubernetesClientException){
final Throwable cause = ex.getCause();
if(cause != null) throw new CloudException(cause.getMessage(), cause);
else throw ex;
} else throw ex;
}
}
示例2: filterPaths
import jetbrains.buildServer.util.CollectionsUtil; //导入方法依赖的package包/类
@NotNull
public List<String> filterPaths(@NotNull List<String> paths) {
if (isIncludeAll()) return paths;
final Collection<PathNode> files = AntPatternTreeMatcher.scan(createPathTree(paths), myIncludePatterns, myExcludePatterns, AntPatternTreeMatcher.ScanOption.LEAFS_ONLY);
return CollectionsUtil.convertCollection(files, PathNode::getPath);
}
示例3: getTriggerPropertiesProcessor
import jetbrains.buildServer.util.CollectionsUtil; //导入方法依赖的package包/类
@NotNull
@Override
public PropertiesProcessor getTriggerPropertiesProcessor() {
return new PropertiesProcessor() {
@Override
public Collection<InvalidProperty> process(Map<String, String> properties) {
return CollectionsUtil.convertCollection(ParametersValidator.validateSettings(properties, false).entrySet(), new Converter<InvalidProperty, Map.Entry<String, String>>() {
@Override
public InvalidProperty createFrom(@NotNull Map.Entry<String, String> source) {
return new InvalidProperty(source.getKey(), source.getValue());
}
});
}
};
}
开发者ID:JetBrains,项目名称:teamcity-aws-codepipeline-plugin,代码行数:16,代码来源:CodePipelineBuildTriggerService.java
示例4: getChildren
import jetbrains.buildServer.util.CollectionsUtil; //导入方法依赖的package包/类
@NotNull
public List<GraphNode> getChildren() {
return CollectionsUtil.convertCollection(myBuildType.getDependencies(), new Converter<GraphNode, Dependency>() {
public GraphNode createFrom(@NotNull final Dependency dependency) {
return new BuildTypeNode(dependency.getDependOn());
}
});
}
示例5: getChildren
import jetbrains.buildServer.util.CollectionsUtil; //导入方法依赖的package包/类
@NotNull
public List<GraphNode> getChildren() {
return CollectionsUtil.convertCollection(myPromotion.getDependencies(), new Converter<GraphNode, BuildDependency>() {
public GraphNode createFrom(@NotNull final BuildDependency buildDependency) {
return new PromotionNode(buildDependency.getDependOn());
}
});
}
示例6: getImages
import jetbrains.buildServer.util.CollectionsUtil; //导入方法依赖的package包/类
@NotNull
@Override
public Collection<KubeCloudImageData> getImages(){
return CollectionsUtil.convertCollection(myParameters.getCloudImages(), KubeCloudImageData::new);
}
示例7: listNamespaces
import jetbrains.buildServer.util.CollectionsUtil; //导入方法依赖的package包/类
@NotNull
@Override
public Collection<String> listNamespaces() {
return CollectionsUtil.convertCollection(myKubernetesClient.namespaces().list().getItems(), namespace -> namespace.getMetadata().getName());
}
示例8: listDeployments
import jetbrains.buildServer.util.CollectionsUtil; //导入方法依赖的package包/类
@NotNull
@Override
public Collection<String> listDeployments() {
return CollectionsUtil.convertCollection(myKubernetesClient.extensions().deployments().list().getItems(), namespace -> namespace.getMetadata().getName());
}
示例9: getPathsToDelete
import jetbrains.buildServer.util.CollectionsUtil; //导入方法依赖的package包/类
@NotNull
private List<String> getPathsToDelete(@NotNull ArtifactListData artifactsInfo, @NotNull String patterns, @NotNull String pathPrefix) throws IOException {
final List<String> keys = CollectionsUtil.convertCollection(artifactsInfo.getArtifactList(), ArtifactData::getPath);
return new ArrayList<>(new PathPatternFilter(patterns).filterPaths(keys));
}