Search in sources :

Example 1 with GenericRepositoryManagerResult

use of org.jboss.pnc.bpm.model.RepositoryManagerResultRest.GenericRepositoryManagerResult in project pnc by project-ncl.

the class RepositoryManagerResultMapper method toEntity.

public RepositoryManagerResult toEntity(RepositoryManagerResultRest dto) {
    List<org.jboss.pnc.model.Artifact> builtArtifacts = dto.getBuiltArtifacts().stream().map(artifactRest -> artifactMapper.toEntityWithTransientTargetRepository(artifactRest)).collect(Collectors.toList());
    List<org.jboss.pnc.model.Artifact> dependencies = dto.getDependencies().stream().map(artifactRest -> artifactMapper.toEntityWithTransientTargetRepository(artifactRest)).collect(Collectors.toList());
    String buildContentId = dto.getBuildContentId();
    String log = dto.getLog();
    CompletionStatus completionStatus = dto.getCompletionStatus();
    return new GenericRepositoryManagerResult(builtArtifacts, dependencies, buildContentId, log, completionStatus);
}
Also used : Inject(javax.inject.Inject) GenericRepositoryManagerResult(org.jboss.pnc.bpm.model.RepositoryManagerResultRest.GenericRepositoryManagerResult) List(java.util.List) RepositoryManagerResult(org.jboss.pnc.spi.repositorymanager.RepositoryManagerResult) RepositoryManagerResultRest(org.jboss.pnc.bpm.model.RepositoryManagerResultRest) CompletionStatus(org.jboss.pnc.spi.coordinator.CompletionStatus) ApplicationScoped(javax.enterprise.context.ApplicationScoped) Artifact(org.jboss.pnc.dto.Artifact) ArtifactMapper(org.jboss.pnc.mapper.api.ArtifactMapper) Collectors(java.util.stream.Collectors) CompletionStatus(org.jboss.pnc.spi.coordinator.CompletionStatus) GenericRepositoryManagerResult(org.jboss.pnc.bpm.model.RepositoryManagerResultRest.GenericRepositoryManagerResult) Artifact(org.jboss.pnc.dto.Artifact)

Aggregations

List (java.util.List)1 Collectors (java.util.stream.Collectors)1 ApplicationScoped (javax.enterprise.context.ApplicationScoped)1 Inject (javax.inject.Inject)1 RepositoryManagerResultRest (org.jboss.pnc.bpm.model.RepositoryManagerResultRest)1 GenericRepositoryManagerResult (org.jboss.pnc.bpm.model.RepositoryManagerResultRest.GenericRepositoryManagerResult)1 Artifact (org.jboss.pnc.dto.Artifact)1 ArtifactMapper (org.jboss.pnc.mapper.api.ArtifactMapper)1 CompletionStatus (org.jboss.pnc.spi.coordinator.CompletionStatus)1 RepositoryManagerResult (org.jboss.pnc.spi.repositorymanager.RepositoryManagerResult)1