Search in sources :

Example 6 with Environment

use of com.thoughtworks.go.presentation.pipelinehistory.Environment in project gocd by gocd.

the class EnvironmentService method getEnvironments.

public List<Environment> getEnvironments(Username username) throws NoSuchEnvironmentException {
    List<CaseInsensitiveString> environmentNames = environmentConfigService.environmentNames();
    ArrayList<Environment> environments = new ArrayList<>();
    for (CaseInsensitiveString environmentName : environmentNames) {
        addEnvironmentFor(environmentName, username, environments);
    }
    return environments;
}
Also used : ArrayList(java.util.ArrayList) Environment(com.thoughtworks.go.presentation.pipelinehistory.Environment) CaseInsensitiveString(com.thoughtworks.go.config.CaseInsensitiveString)

Aggregations

CaseInsensitiveString (com.thoughtworks.go.config.CaseInsensitiveString)6 Environment (com.thoughtworks.go.presentation.pipelinehistory.Environment)6 Test (org.junit.Test)4 ArrayList (java.util.ArrayList)3 PipelineModel (com.thoughtworks.go.presentation.pipelinehistory.PipelineModel)2 PipelineInstanceModel (com.thoughtworks.go.presentation.pipelinehistory.PipelineInstanceModel)1 Username (com.thoughtworks.go.server.domain.Username)1