Example usage for com.amazonaws.services.codebuild AWSCodeBuildClient batchGetProjects

List of usage examples for com.amazonaws.services.codebuild AWSCodeBuildClient batchGetProjects

Introduction

In this page you can find the example usage for com.amazonaws.services.codebuild AWSCodeBuildClient batchGetProjects.

Prototype

@Override
public BatchGetProjectsResult batchGetProjects(BatchGetProjectsRequest request) 

Source Link

Document

Gets information about one or more build projects.

Usage

From source file:CodeBuilder.java

License:Open Source License

private void retrieveArtifactAndSourceInfo(AWSCodeBuildClient cbClient) throws Exception {
    BatchGetProjectsResult bgpResult = cbClient
            .batchGetProjects(new BatchGetProjectsRequest().withNames(this.projectName));

    if (bgpResult.getProjects().isEmpty()) {
        throw new RuntimeException("Project " + this.projectName + " does not exist.");
    } else {//  w ww. java2 s .  co m
        this.artifactLocation = bgpResult.getProjects().get(0).getArtifacts().getLocation();
        this.artifactType = bgpResult.getProjects().get(0).getArtifacts().getType();

        this.projectSourceLocation = bgpResult.getProjects().get(0).getSource().getLocation();
        this.projectSourceType = bgpResult.getProjects().get(0).getSource().getType();
    }
}