use of org.jboss.pnc.spi.repositorymanager.RepositoryManagerResult in project pnc by project-ncl.
the class BuildResultMapper method toEntity.
public BuildResult toEntity(BuildResultRest buildResultRest) {
RepositoryManagerResult repositoryManagerResult = null;
if (buildResultRest.getRepositoryManagerResult() != null) {
repositoryManagerResult = repositoryManagerResultMapper.toEntity(buildResultRest.getRepositoryManagerResult());
}
BuildExecutionConfiguration bec = null;
if (buildResultRest.getBuildExecutionConfiguration() != null) {
bec = buildResultRest.getBuildExecutionConfiguration().toBuildExecutionConfiguration();
}
return new BuildResult(buildResultRest.getCompletionStatus(), ofNullable(buildResultRest.getProcessException()), buildResultRest.getProcessLog(), ofNullable(bec), ofNullable(buildResultRest.getBuildDriverResult()), ofNullable(repositoryManagerResult), ofNullable(buildResultRest.getEnvironmentDriverResult()), ofNullable(buildResultRest.getRepourResult()));
}
use of org.jboss.pnc.spi.repositorymanager.RepositoryManagerResult in project pnc by project-ncl.
the class RepositoryManagerResultMapper method toDTO.
public RepositoryManagerResultRest toDTO(RepositoryManagerResult entity) {
List<Artifact> builtArtifacts = entity.getBuiltArtifacts().stream().map(artifact -> artifactMapper.toDTO(artifact)).collect(Collectors.toList());
List<Artifact> dependencies = entity.getDependencies().stream().map(artifact -> artifactMapper.toDTO(artifact)).collect(Collectors.toList());
String buildContentId = entity.getBuildContentId();
String log = entity.getLog();
CompletionStatus completionStatus = entity.getCompletionStatus();
return new RepositoryManagerResultRest(builtArtifacts, dependencies, buildContentId, log, completionStatus);
}
Aggregations