Search in sources :

Example 1 with StageAsDMR

use of com.thoughtworks.go.domain.StageAsDMR in project gocd by gocd.

the class LocalDependencyMaterialSourceDao method getPassedStagesAfter.

public List<Modification> getPassedStagesAfter(final String lastRevision, DependencyMaterial material, Pagination pagination) {
    StageIdentifier identifier = new StageIdentifier(lastRevision);
    List<StageAsDMR> passedStagesAfter = stageDao.getPassedStagesAfter(identifier, pagination.getPageSize(), pagination.getOffset());
    List<Modification> mods = new ArrayList<>();
    for (StageAsDMR stage : passedStagesAfter) {
        StageIdentifier stageIdentifier = stage.getIdentifier();
        Modification modification = new Modification(stage.getCompletedDate(), stageIdentifier.stageLocator(), stageIdentifier.getPipelineLabel(), stage.getPipelineId());
        mods.add(modification);
    }
    return mods;
}
Also used : StageIdentifier(com.thoughtworks.go.domain.StageIdentifier) StageAsDMR(com.thoughtworks.go.domain.StageAsDMR) Modification(com.thoughtworks.go.domain.materials.Modification) ArrayList(java.util.ArrayList)

Aggregations

StageAsDMR (com.thoughtworks.go.domain.StageAsDMR)1 StageIdentifier (com.thoughtworks.go.domain.StageIdentifier)1 Modification (com.thoughtworks.go.domain.materials.Modification)1 ArrayList (java.util.ArrayList)1