package org.jboss.pnc.jenkinsbuilddriver;

import org.jboss.pnc.core.spi.builddriver.BuildDriver;
import org.jboss.pnc.core.spi.repositorymanager.Repository;
import org.jboss.pnc.model.BuildResult;
import org.jboss.pnc.model.BuildType;
import org.jboss.pnc.model.Project;

import java.util.function.Consumer;

/**
 * Created by <a href="mailto:matejonnet@gmail.com">Matej Lazar</a> on 2014-11-23.
 */
//TODO implement me
public class JenkinsBuildDriver implements BuildDriver {
    @Override
    public String getDriverId() {
        return null;
    }

    @Override
    public void setDeployRepository(Repository deployRepository) {

    }

    @Override
    public void setSourceRepository(Repository repositoryProxy) {

    }

    @Override
    public void buildProject(Project project, Consumer<BuildResult> onBuildComplete) {
        //TODO implement me

        //notify build complete
        onBuildComplete.accept(new BuildResult());
    }

    @Override
    public BuildType getBuildType() {
        return BuildType.JAVA;
    }

}

@@ -471,16 +471,68 @@
 river %7B%0A
+    private Consumer%3CBuildResult%3E onBuildComplete;%0A%0A
     @Ove
@@ -889,60 +889,47 @@
     
-//TODO implement me%0A%0A        //notify b
+this.onBuildComplete = onB
 uild
- c
+C
 omplete
+;
 %0A   
@@ -937,49 +937,43 @@
     
-onBuildComplete.accept(new BuildResult())
+//TODO implement me%0A%0A        return
 ;%0A  
@@ -1067,10 +1067,153 @@
 %0A    %7D%0A%0A
+    //TODO%0A    private void notifyBuildComplete() %7B%0A        //notify build complete%0A%0A        onBuildComplete.accept(new BuildResult());%0A    %7D%0A%0A
 %7D%0A

Move callback notification 'after' return.