package edu.ipd.kit.crowdcontrol.proto.crowdplatform;

import java.util.concurrent.CompletableFuture;

/**
 * Created by marcel on 20.11.15.
 */
public class Nop implements CrowdPlatform {

    /**
     * publish a task on the given CrowdPlatform. A worker can now access the Task and do answers.
     *
     * @param hit
     * @return true if successful, false if not
     */
    @Override
    public CompletableFuture<Boolean> publishTask(Hit hit) {
        System.out.println("pay task: " + hit);
        return CompletableFuture.completedFuture(true);
    }

    /**
     * @param hit
     * @return true if successful, false if not
     */
    @Override
    public CompletableFuture<Boolean> updateTask(Hit hit) {
        System.out.println("updateTask" + hit);
        return CompletableFuture.completedFuture(true);
    }

    /**
     * unpublish the task, after this call no answers can be sent for this task
     *
     * @param hit
     * @return true if successful, false if not
     */
    @Override
    public CompletableFuture<Boolean> unpublishTask(Hit hit) {
        System.out.println("unpublishTask: " + hit);
        return CompletableFuture.completedFuture(true);
    }

    /**
     * Pay Task
     *
     * @param hit
     * @return true if successful, false if not
     */
    @Override
    public CompletableFuture<Boolean> payTask(Hit hit) {
        System.out.println("payTask: " + hit);
        return CompletableFuture.completedFuture(true);
    }

    /**
     * the name of the CrowdPlatform
     *
     * @return true if successful, false if not
     */
    @Override
    public String getName() {
        return "NOP";
    }
}

@@ -414,23 +414,19 @@
 eFuture%3C
-Boolean
+Hit
 %3E publis
@@ -531,36 +531,35 @@
 completedFuture(
-true
+hit
 );%0A    %7D%0A%0A    /*
@@ -677,23 +677,19 @@
 eFuture%3C
-Boolean
+Hit
 %3E update
@@ -793,36 +793,35 @@
 completedFuture(
-true
+hit
 );%0A    %7D%0A%0A    /*
@@ -1026,23 +1026,22 @@
 eFuture%3C
-Boolean
+String
 %3E unpubl
@@ -1040,39 +1040,41 @@
 %3E unpublishTask(
-Hit hit
+String id
 ) %7B%0A        Syst
@@ -1100,35 +1100,34 @@
 ublishTask: %22 + 
-hit
+id
 );%0A        retur
@@ -1154,36 +1154,34 @@
 completedFuture(
-true
+id
 );%0A    %7D%0A%0A    /*
@@ -1326,15 +1326,11 @@
 ure%3C
-Boolean
+Hit
 %3E pa
@@ -1442,20 +1442,19 @@
 dFuture(
-true
+hit
 );%0A    %7D

fix implement